Girish Ramakrishnan
04cef32cdd
Rename internal to update and external to provision
2014-11-21 14:09:19 -08:00
Girish Ramakrishnan
b3569ee57f
Add test for internal update server
2014-11-21 14:06:24 -08:00
Girish Ramakrishnan
1d4489468b
Add test for restore
2014-11-21 14:03:02 -08:00
Girish Ramakrishnan
1f846c3e74
Add internal server tests
2014-11-21 13:57:51 -08:00
Girish Ramakrishnan
a3ec0ec4cc
Refactor code to start servers separately
2014-11-21 13:44:30 -08:00
Girish Ramakrishnan
d05f0d8abb
Move announce code to separate file
2014-11-21 11:10:05 -08:00
Girish Ramakrishnan
bf1e217144
Make updates go through the installer
...
Fixes #114
2014-11-20 22:20:35 -08:00
Girish Ramakrishnan
0cd59e658e
Create servers separately
...
This is because the routes are different in internal and external mode
2014-11-20 22:02:32 -08:00
Girish Ramakrishnan
d474a8834b
Move installer api under /api/v1/installer/
...
This namespaces the API and makes it easily routable through nginx (if required)
2014-11-20 22:02:07 -08:00
Girish Ramakrishnan
d716518b99
Update versions-dev.json
2014-11-20 21:14:15 -08:00
Girish Ramakrishnan
b81a431dcd
Keep install server running after install/restore
...
Part of #114
2014-11-20 20:15:50 -08:00
Girish Ramakrishnan
3fc52b640d
Print revision in installer script
2014-11-20 17:01:49 -08:00
Girish Ramakrishnan
6cfb1ba949
Move requireAdmin in user routes
2014-11-20 16:59:17 -08:00
Girish Ramakrishnan
3807e98f6a
Print update args
2014-11-20 16:59:17 -08:00
Girish Ramakrishnan
aefb1f1c07
Updater needs to pass the version instead of revision
2014-11-20 16:57:07 -08:00
Girish Ramakrishnan
63c775b0ae
Provision the box using version instead of revision
...
This allows the installer to be more cognizant of version specific
values if required (like imageId)
2014-11-12 21:53:32 -08:00
Girish Ramakrishnan
23045306a9
Check the type of fields instead of truthiness check
2014-11-12 20:15:24 -08:00
Girish Ramakrishnan
5c8207a9e5
digitalocean requires imageId to be number
...
From the docs, "number (if using an image ID), or String (if using a public image slug)"
2014-11-12 19:12:30 -08:00
Girish Ramakrishnan
0e5563c3ff
Fix test name
2014-11-12 13:15:32 -08:00
Girish Ramakrishnan
d4ee1c59f1
Use connect-lastmile in installer
2014-11-12 13:15:29 -08:00
Girish Ramakrishnan
0b16e95b89
Add connect-lastmile
2014-11-12 12:56:33 -08:00
Girish Ramakrishnan
51764191e3
Set the content-type for responses to text
2014-11-12 12:12:46 -08:00
Girish Ramakrishnan
0525ccc4a4
Disable metadata API access to non-root users
...
The only reason not to use the metadata completely for provisioning
is because many VPS providers do not provide it.
If we rely on a metadata API, we can pretty much remove the installer
server
2014-11-10 16:26:56 -08:00
Girish Ramakrishnan
9309c89a1a
Appstore name is not part of image anymore
2014-11-09 10:06:23 -08:00
Girish Ramakrishnan
bea71b35f6
Move to v2 api
2014-11-09 10:04:29 -08:00
Girish Ramakrishnan
e07ee3e3c8
Do not validate username and password during verification
2014-11-07 21:47:01 -08:00
Girish Ramakrishnan
7f00334437
Handle NOT_FOUND errors
2014-11-07 21:38:15 -08:00
Girish Ramakrishnan
8edcdfb6ea
Actually verify password
...
Fixes #113
2014-11-07 21:30:16 -08:00
Girish Ramakrishnan
ec35fcb9a8
Move requirePassword middleware to routes.user
2014-11-07 20:59:25 -08:00
Girish Ramakrishnan
91fa0559f2
Validate new password
2014-11-07 06:32:01 -08:00
Girish Ramakrishnan
9d3199527b
Add asserts
2014-11-07 06:27:53 -08:00
Girish Ramakrishnan
08111210a1
Make some TODOs as FIXME
2014-11-06 23:27:14 -08:00
Girish Ramakrishnan
729024b9d8
Convert location to lower case
2014-11-06 23:24:02 -08:00
Girish Ramakrishnan
dea72b786e
Make a TODO out of a FIXME
2014-11-06 23:22:53 -08:00
Girish Ramakrishnan
8c6a4eceb3
Handle possible errors in commit and rollback
2014-11-06 23:15:56 -08:00
Girish Ramakrishnan
87a8f819c6
Add test to check conflicting location fails
2014-11-06 22:58:48 -08:00
Girish Ramakrishnan
ade8ccd90a
Remove vbox port bindings forwarding when stopping container
2014-11-06 19:18:17 -08:00
Girish Ramakrishnan
0bb9c321bd
Remove VBox forwarding when unconfiguring nginx
2014-11-06 19:12:47 -08:00
Girish Ramakrishnan
967981838f
Fix REST response codes
...
200 - OK
201 - Created (immediately)
202 - Accepted (for future)
204 - Empty response, action done
Fixes #89
2014-11-06 18:44:49 -08:00
Girish Ramakrishnan
c24488f90f
Remove volume code
...
Most of it is moved to syncer-app
2014-11-06 18:27:47 -08:00
Girish Ramakrishnan
437d224994
Use validator to validate email
2014-11-06 17:54:49 -08:00
Girish Ramakrishnan
c803f66e9a
coding style
2014-11-06 17:06:02 -08:00
Girish Ramakrishnan
0165fb412a
ARGUMENTS -> BAD_FIELD
2014-11-06 17:02:07 -08:00
Girish Ramakrishnan
25836969e7
Add validator module
2014-11-06 16:57:24 -08:00
Girish Ramakrishnan
ed07894c18
Add validation for username and password
2014-11-06 16:53:25 -08:00
Girish Ramakrishnan
f9de936e7f
Add asserts
2014-11-06 11:52:02 -08:00
Girish Ramakrishnan
250b23b7c1
validate restrictAccessTo
2014-11-06 11:48:38 -08:00
Girish Ramakrishnan
0d938c0d74
Fix error handling
2014-11-06 11:26:50 -08:00
Girish Ramakrishnan
ac93de6c18
Do not exit in restore, otherwise the tests quit in the middle
2014-11-06 09:53:20 -08:00
Girish Ramakrishnan
b25a9767ef
Add test to verify that invalid json does not crash server
...
express ensures that req.body is { } with invalid json
If not, we have to check assert(body && typeof body === 'object').
This is because typeof null is 'object'.
2014-11-06 09:47:11 -08:00