Johannes Zellner
e254e08d0d
Not applicable for ubuntu 15.10
2016-01-07 10:45:45 +01:00
Johannes Zellner
34e7940303
Make sysinfo provider selection explicit
2016-01-06 14:34:23 +01:00
Girish Ramakrishnan
27fd637923
Simply remove the old sudoers file that we installed
...
This is alternate fix to 743b8e757b
2016-01-05 20:24:05 -08:00
Johannes Zellner
743b8e757b
Do not remove all files from /etc/sudoers.d/
...
On DO with caas, there are no other files initially, but
on the ec2 ubuntu images, the files have set the rules for the
ubuntu user to be able to sudo without password, which we want to
keep
2016-01-05 17:06:01 +01:00
Johannes Zellner
84cd813cc5
Default provider is caas
2016-01-05 15:58:16 +01:00
Johannes Zellner
439b8923b8
Implement ec2 sysinfo backend
2016-01-05 14:33:33 +01:00
Johannes Zellner
8b1d30d973
Fix sysinfo api usage
2016-01-05 13:18:56 +01:00
Johannes Zellner
6c55824dff
Use new getIP() api in certificates.js
2016-01-05 12:23:07 +01:00
Johannes Zellner
9e523540ac
Use new getIP() api in cloudron.js
2016-01-05 12:16:48 +01:00
Johannes Zellner
5ade21e916
Use new getIP() api in apptask
2016-01-05 12:16:39 +01:00
Johannes Zellner
37d116f3b1
Add missing asserts
2016-01-05 12:14:39 +01:00
Johannes Zellner
46d2500cfa
Make sysinfo based on provider
2016-01-05 12:10:25 +01:00
Johannes Zellner
48b6f8bc63
Also support /dev/xvda1 with collectd, needed for ec2
2016-01-04 17:26:02 +01:00
Johannes Zellner
2553ccd14f
We want all strings in the array as separate strings
2016-01-02 16:52:25 +01:00
Johannes Zellner
1984380313
Fix cloudron tests
2015-12-31 11:55:01 +01:00
Johannes Zellner
521d792282
Merge branch 'selfhost'
2015-12-31 11:41:46 +01:00
Johannes Zellner
90d4debfa8
Do not fail to list apps if we are in developer mode and do not have an appstore token
2015-12-31 10:42:02 +01:00
Johannes Zellner
07585721f9
Do not rely on the VPS name but just get the memory from the system
2015-12-31 10:30:42 +01:00
Johannes Zellner
39fb7224bb
Do not attempt to purchase an app if we dont have an appstore token
2015-12-31 09:15:27 +01:00
Girish Ramakrishnan
d1c112f92e
show all fields
2015-12-30 19:48:10 -08:00
Johannes Zellner
d5ac36208f
Remove unused information within backup listing
2015-12-30 20:31:00 +01:00
Johannes Zellner
c8f4294225
Sort backups by creationTime
2015-12-30 18:31:44 +01:00
Johannes Zellner
1cebdb0a6e
Remove the backup prefix from the key
2015-12-30 18:30:41 +01:00
Johannes Zellner
79ee83cbd0
Partly implement backup listing for s3 backend
2015-12-30 18:21:38 +01:00
Johannes Zellner
f7b8767706
Fix the email require detection in setup
2015-12-30 14:10:20 +01:00
Johannes Zellner
b779b2369e
Do not ask for aws credentials for selfhosting
2015-12-30 13:28:14 +01:00
Johannes Zellner
19c0d21396
Ensure focus and form validation is correct in the setup wizard
2015-12-29 22:10:10 +01:00
Johannes Zellner
346896132f
token is not yet required for provisioning anymore
2015-12-29 19:47:13 +01:00
Johannes Zellner
e968cbf568
Only send heartbeats and fetch cloudron details if we have a token
2015-12-29 17:43:54 +01:00
Johannes Zellner
aa2845b736
Fix crash when the appstore server does not respond correctly on setup
2015-12-29 16:07:04 +01:00
Johannes Zellner
bec136cff0
Skip calling back home on activation in non caas case
2015-12-29 15:56:37 +01:00
Johannes Zellner
a6d7c35e8d
Remove commented dom elements
2015-12-29 15:46:13 +01:00
Johannes Zellner
5f68dc0fc5
Fix setup wizard dependency on setupToken
2015-12-29 15:27:46 +01:00
Johannes Zellner
4dbe9a89f2
The var is named
2015-12-29 12:25:22 +01:00
Johannes Zellner
5e404c5fa8
Read provider field from cloudron.conf
2015-12-29 11:29:08 +01:00
Johannes Zellner
b22ce9e83a
Skip setupToken auth for non caas cloudrons
2015-12-29 11:24:45 +01:00
Johannes Zellner
9892e7408d
Get the cloudron vps provider from config
2015-12-29 11:24:34 +01:00
Johannes Zellner
ded090d7a9
Ask for the user's email if not provided
2015-12-29 11:17:08 +01:00
Johannes Zellner
25ff15fb90
customDomain during setup is a special caas case
2015-12-29 11:04:42 +01:00
Johannes Zellner
3cbaddbe27
Remove Client.isServerFirstTime()
2015-12-29 11:00:32 +01:00
Johannes Zellner
be55e8a587
Add Client.getStatus()
2015-12-29 10:58:26 +01:00
Johannes Zellner
cba9906f82
Redirect the browser to /setup.html in non caas mode
2015-12-29 10:54:00 +01:00
Johannes Zellner
e46a4d41e1
Send provider field with cloudron config
2015-12-29 10:53:22 +01:00
Girish Ramakrishnan
88a0a9454c
default targetBoxVersion to the maximum possible version ever
...
Apps that do not provide a targetBoxVersion are assumed to be
capable of running everywhere.
2015-12-27 16:43:50 -08:00
Girish Ramakrishnan
9f64b2655e
fix path to cpu metrics
2015-12-24 12:46:42 -08:00
Girish Ramakrishnan
51a1766234
fix debugs
2015-12-23 15:22:36 -08:00
Girish Ramakrishnan
15fea914f0
scheduler: remove scheduler.json
...
don't bother saving state across restarts. needlessly complicated.
2015-12-23 14:27:26 -08:00
Girish Ramakrishnan
f1284dfb15
scheduler: do not bother tracking containerIds
2015-12-23 13:29:00 -08:00
Girish Ramakrishnan
772345af6e
scheduler: delete containers by name
...
scheduler.json gets nuked during updates. When the box code restarts,
the scheduler is unable to remove old container because the state file
scheduler.json is now gone. It proceeds to create new container but that
does not work because of name conflict.
Fixes #531
2015-12-23 13:23:49 -08:00
Girish Ramakrishnan
f662ab3862
workaround journalctl logging bug
2015-12-22 13:05:00 -08:00
Girish Ramakrishnan
8b237d1de4
why is the linter not finding this again?
2015-12-21 16:14:30 -08:00
Girish Ramakrishnan
9aff5ee818
if i wrote a linter, these are the bugs it would catch
2015-12-19 13:48:14 -08:00
Girish Ramakrishnan
2565c5a2f3
better debugs
2015-12-19 13:47:48 -08:00
Girish Ramakrishnan
fd65cbe427
fix function name in debug
2015-12-17 20:30:30 -08:00
Girish Ramakrishnan
cdf1ed171c
firefox is unhappy with incorrect chain
2015-12-17 19:42:49 -08:00
Girish Ramakrishnan
51d1a670db
better error messages
2015-12-17 19:35:52 -08:00
Girish Ramakrishnan
5d3b4960f5
Add acme.getCertificate
2015-12-17 13:31:28 -08:00
Girish Ramakrishnan
cc35fad736
do not pass accountKeyPem everywhere
2015-12-17 13:27:10 -08:00
Girish Ramakrishnan
b9e68e902e
set prod option based on provider
2015-12-17 13:17:46 -08:00
Girish Ramakrishnan
2ef89686c3
allow configuring prod/staging of LE url
2015-12-17 13:12:54 -08:00
Girish Ramakrishnan
c59f3ddc4c
remove unused require
2015-12-17 12:55:47 -08:00
Girish Ramakrishnan
2e8be81cb7
fix metrics path
...
See 03da5cc6b382f6f7aad69395d9f8a9d29d18ec26 in installer
We now use the cgroupfs driver instead of systemd cgroup driver
2015-12-15 15:54:19 -08:00
Girish Ramakrishnan
f383a94f78
leave note on 429 error code
2015-12-15 14:25:23 -08:00
Girish Ramakrishnan
eae6c55f2c
fix typo
2015-12-15 12:52:41 -08:00
Girish Ramakrishnan
dc79e2f4be
use admin@cloudron.io for email
...
registrations are failing because the LE server is doing a MX check.
we don't have a proper email to provide here since the box is not
activated yet. we should "update" the email at some point with
the owner information.
2015-12-15 10:39:03 -08:00
Girish Ramakrishnan
8960e60453
update shrinkwrap
2015-12-15 10:04:45 -08:00
Girish Ramakrishnan
cf81f8f226
update superagent
...
the latest superchanged changed the meaning of 'error'. Previously,
error implied a network error. With the latest superagent, error means
a REST api error i.e 4xx, 5xx are flagged as errors.
error && !error.response means network error
2015-12-15 09:53:37 -08:00
Girish Ramakrishnan
f463f12edf
update redis
2015-12-15 08:36:47 -08:00
Girish Ramakrishnan
ecb7b60b15
update password-generator, validator and nock
2015-12-15 08:34:13 -08:00
Girish Ramakrishnan
5f9b1b4faa
define CA_ORIGIN
2015-12-15 00:49:00 -08:00
Girish Ramakrishnan
1b645deae4
remove trailing slash in url
2015-12-15 00:42:18 -08:00
Girish Ramakrishnan
4fd135154a
debug output the error
2015-12-15 00:23:57 -08:00
Girish Ramakrishnan
bb0947cf9e
create acme data dir
2015-12-15 00:21:29 -08:00
Girish Ramakrishnan
f7d151e1c8
do not installAdminCertificate for upgrades
2015-12-14 23:37:52 -08:00
Girish Ramakrishnan
e23d6a4375
detect apptask crashes
2015-12-14 19:11:26 -08:00
Girish Ramakrishnan
d1890b35f8
show error dialog
2015-12-14 18:56:15 -08:00
Girish Ramakrishnan
2864db35e9
add function to show the error dialog
2015-12-14 17:57:58 -08:00
Girish Ramakrishnan
d14fd83180
add error dialog
2015-12-14 17:52:56 -08:00
Girish Ramakrishnan
daf0999e3a
Use production LE
2015-12-14 17:31:41 -08:00
Girish Ramakrishnan
00a1bcef5d
simply use fallback certs if LE fails
...
currently, it fails if we cannot get a cert.
This means that we need to provide some option to simply use fallback
cert. This requires UI changes that I want to avoid :-)
2015-12-14 17:13:54 -08:00
Girish Ramakrishnan
a30277a4f8
fix fallback cert message
2015-12-14 16:42:34 -08:00
Girish Ramakrishnan
d38446e6ee
fix crash
2015-12-14 14:08:45 -08:00
Girish Ramakrishnan
69aab91bce
fix renewal check
2015-12-14 13:52:54 -08:00
Girish Ramakrishnan
07cf8b070d
do not dump the csr
2015-12-14 13:41:30 -08:00
Girish Ramakrishnan
fe6ecd7c9c
update safetydance for readdirSync
2015-12-14 13:10:04 -08:00
Girish Ramakrishnan
372f596077
implement cert auto-renewal
2015-12-14 12:40:39 -08:00
Girish Ramakrishnan
fc9fea1b8e
ensureCertificate: check if cert needs renewal
2015-12-14 12:38:19 -08:00
Girish Ramakrishnan
2f6c81d9ec
add getApi
2015-12-14 12:28:00 -08:00
Girish Ramakrishnan
27cca5a395
use url file to download cert if present
2015-12-14 12:22:57 -08:00
Girish Ramakrishnan
c80df6ab93
move key creation into the acme flow
2015-12-14 12:21:41 -08:00
Girish Ramakrishnan
85b25b5775
save url for renewal in .url files
2015-12-14 12:17:57 -08:00
Girish Ramakrishnan
ab0f6f5055
do not pass outdir
2015-12-14 11:42:59 -08:00
Girish Ramakrishnan
04fb0cf366
provide cert and key file in callback
2015-12-14 09:29:48 -08:00
Girish Ramakrishnan
0f53c328d8
fix debug message
2015-12-14 08:52:43 -08:00
Girish Ramakrishnan
d4c4a34879
code now uses backend
2015-12-14 08:50:57 -08:00
Girish Ramakrishnan
85c5800023
explicitly prune out second argument
2015-12-13 20:35:23 -08:00
Girish Ramakrishnan
9fe3969de9
add a backend for caas
2015-12-13 19:09:57 -08:00
Girish Ramakrishnan
1d3eabca92
refactor code a bit for renewal
2015-12-13 12:26:31 -08:00
Girish Ramakrishnan
eecac336fc
fix path to acme key
2015-12-13 11:54:17 -08:00
Girish Ramakrishnan
ef106f0318
more debug messages
2015-12-12 20:39:24 -08:00
Girish Ramakrishnan
4c7ac89fca
fix path to cert
2015-12-12 20:30:50 -08:00
Girish Ramakrishnan
09dce7e901
maybe this gets the certificate
2015-12-12 20:30:50 -08:00
Girish Ramakrishnan
1d493a73e5
tlsConfig is part of the database
2015-12-12 15:43:42 -08:00
Girish Ramakrishnan
ed37ae82fd
add tls configuration to database
2015-12-12 15:40:33 -08:00
Girish Ramakrishnan
bf24bfdd76
do not write tls config in this version
2015-12-12 14:21:50 -08:00
Girish Ramakrishnan
44623eb9d7
do not save certs in database
2015-12-12 13:29:10 -08:00
Girish Ramakrishnan
6c9aea72e4
Try alternative configuration for systemd restart rate limit
2015-12-12 13:15:41 -08:00
Girish Ramakrishnan
bf072a741d
configure to get only 1 email every 10 minutes
2015-12-12 11:47:32 -08:00
Girish Ramakrishnan
c13538750d
fix typo
2015-12-11 23:29:07 -08:00
Girish Ramakrishnan
83fa1f4a9d
add settings.setTlsConfig
2015-12-11 22:39:13 -08:00
Girish Ramakrishnan
447ce20825
typo
2015-12-11 22:27:00 -08:00
Girish Ramakrishnan
fe08c43a7e
use tlsConfig to determine acme or not
2015-12-11 22:25:57 -08:00
Girish Ramakrishnan
1696846395
store tls config in database
2015-12-11 22:14:56 -08:00
Girish Ramakrishnan
e061b47c60
fix debug namespacing
2015-12-11 21:49:24 -08:00
Girish Ramakrishnan
95b505f773
fix typo
2015-12-11 20:09:16 -08:00
Girish Ramakrishnan
ec30774950
assert assert everywhere, hope none fires!
2015-12-11 14:50:30 -08:00
Girish Ramakrishnan
9fea406733
more moving of nginx code
2015-12-11 14:48:39 -08:00
Girish Ramakrishnan
aa425c0b9c
implement installation of admin certificate via acme
2015-12-11 14:37:55 -08:00
Girish Ramakrishnan
1c88a67359
add attempt
2015-12-11 14:20:37 -08:00
Girish Ramakrishnan
861eaff57c
Add certificates.ensureCertificate which gets cert via acme
2015-12-11 14:15:44 -08:00
Girish Ramakrishnan
ec36aa2f04
rename app.setAppCertificate
2015-12-11 14:13:29 -08:00
Girish Ramakrishnan
f65e4090cf
rename certificates.initialize
2015-12-11 14:02:58 -08:00
Girish Ramakrishnan
1035d09ce8
refactor certificate settings
2015-12-11 13:58:43 -08:00
Girish Ramakrishnan
2bf428a853
Add CertificatesError
2015-12-11 13:43:33 -08:00
Girish Ramakrishnan
162a970b6e
wait forever by default
2015-12-11 13:41:17 -08:00
Girish Ramakrishnan
128d2fa4f4
add waitfordns.js (refactored from appstore)
2015-12-11 13:14:27 -08:00
Girish Ramakrishnan
ba2fd373a7
rename certificatemanager
2015-12-11 12:24:52 -08:00
Girish Ramakrishnan
ea24d88be8
move validateCertificate to certificateManager
2015-12-10 20:38:49 -08:00
Girish Ramakrishnan
e911d43ac1
remove backward compat code now that we have migrated
2015-12-10 16:31:22 -08:00
Girish Ramakrishnan
7e42af28a8
configure nginx as the last step
...
this allow us to wait for certificate (in the case of LE)
2015-12-10 15:26:36 -08:00
Girish Ramakrishnan
274a339e04
split port reserving to separate function
...
this allows us to move nginx configuration to the bottom of apptask
(required for tls cert download support)
2015-12-10 15:25:15 -08:00
Girish Ramakrishnan
11fc178486
use fqdn to save admin certs as well
2015-12-10 14:29:54 -08:00
Girish Ramakrishnan
256920c916
rename admin.cert/.key to {admin_fqdn}.cert/.key
2015-12-10 14:05:44 -08:00
Girish Ramakrishnan
b3a1133155
remove dead comment
2015-12-10 13:56:00 -08:00
Girish Ramakrishnan
f85363dce9
no need to template main nginx config
2015-12-10 13:54:53 -08:00
Girish Ramakrishnan
e6e1d8c417
fix config path
2015-12-10 13:36:44 -08:00
Girish Ramakrishnan
95f4125f0d
add certificate manager stub
2015-12-10 13:35:02 -08:00
Girish Ramakrishnan
506194132b
add config.adminFqdn()
2015-12-10 13:14:13 -08:00
Girish Ramakrishnan
a9bc88d262
keep the requires sorted
2015-12-10 13:08:38 -08:00
Girish Ramakrishnan
86b9838625
do not log the token
2015-12-10 12:50:54 -08:00
Girish Ramakrishnan
f98021d53d
remove test code
2015-12-10 11:09:37 -08:00
Girish Ramakrishnan
8c42ff92c1
treat acme as a cert backend
2015-12-10 11:08:22 -08:00
Girish Ramakrishnan
ccf814e292
download the certificate as binary
2015-12-10 11:07:10 -08:00
Girish Ramakrishnan
426f01b71a
remove unused require
2015-12-10 09:54:21 -08:00
Girish Ramakrishnan
c61e683cf6
acme: create cert file with the chain
2015-12-10 09:11:08 -08:00
Girish Ramakrishnan
df399ff931
add LE cross signed
...
https://letsencrypt.org/certs/lets-encrypt-x1-cross-signed.pem.txt
2015-12-10 09:06:36 -08:00
Girish Ramakrishnan
76831d509d
acme: openssl does not play well with buffers. use files instead
2015-12-10 08:57:53 -08:00
Girish Ramakrishnan
342f029da3
s/privateKeyPem/accountKeyPem
2015-12-09 19:23:19 -08:00
Girish Ramakrishnan
2fdda30514
acme: use safe
2015-12-09 19:22:53 -08:00
Girish Ramakrishnan
4185a8a018
pull in urlBase64Encode
2015-12-09 18:34:27 -08:00
Girish Ramakrishnan
d2104aad76
set default response type to text/plain
2015-12-09 18:34:13 -08:00
Girish Ramakrishnan
9a80d6126b
add ursa
2015-12-09 18:33:35 -08:00
Girish Ramakrishnan
909dbcff4b
convert cert to pem
2015-12-08 20:05:14 -08:00
Girish Ramakrishnan
6cf1604b38
rename function
2015-12-08 19:54:37 -08:00
Girish Ramakrishnan
5a28015ed8
generate the acme account key on first run
2015-12-08 19:42:33 -08:00
Girish Ramakrishnan
a929250244
use this fake email as the account owner for now
2015-12-08 19:15:17 -08:00
Girish Ramakrishnan
3ae8465687
serve acme directory from nginx
2015-12-08 19:04:48 -08:00
Girish Ramakrishnan
aa97ffe3f6
Add LE staging url for testing
2015-12-08 18:25:45 -08:00
Girish Ramakrishnan
ad7801101b
add acme support
...
this is not used anywhere since we want to wait for rate limits to be
fixed.
The current limits are :
Rate limit on registrations per IP is currently 10 per 3 hours
Rate limit on certificates per Domain is currently 5 per 7 days
The domains are counted based on https://publicsuffix.org/list/ (not TLD). Like appspot.com, herokuapp.com while not a TLD, it a public suffix. This list allows browser authors to limit how cookies can be manipulated by the subdomain of those domains. like app1.appspot.com cannot go and change things of app2.appspot.com.
This means
a) we cannot use LE for cloudron.me, cloudron.us (or we have to get on that list)
b) even for custom domains we get only 5 certs every 7 days. And one of them is taken for my.xx domain.
https://community.letsencrypt.org/t/public-beta-rate-limits/4772/38
2015-12-08 15:52:30 -08:00
Girish Ramakrishnan
1872ee21d7
Revert "remove targetBoxVersion checks since all apps are now ported"
...
This reverts commit d104f2a077 .
gitlab is not ported :-(
2015-12-05 02:29:06 -08:00
Girish Ramakrishnan
9a86a3ca15
always return logs regardless of state
2015-12-04 13:13:54 -08:00
Girish Ramakrishnan
38c6ffd1af
send support an email for app crashes
2015-12-02 16:50:00 -08:00
Girish Ramakrishnan
d104f2a077
remove targetBoxVersion checks since all apps are now ported
2015-12-02 15:02:16 -08:00
Girish Ramakrishnan
5fd0743e06
always create an isolated network ns
2015-12-01 13:59:45 -08:00
Girish Ramakrishnan
1b75a4ae99
cloudron exec: disable links for subcontainers
...
Dec 01 08:36:53 girish.cloudron.us node[5431]: Error: HTTP code is 409 which indicates error: undefined - Conflicting options: --net=container can't be used with links. This would result in undefined behavior
2015-12-01 00:51:41 -08:00
Girish Ramakrishnan
570b6a0c79
reset health when app is stopped
2015-11-30 15:41:56 -08:00
Johannes Zellner
ae36077797
Protect from crash on shutdown
2015-11-27 10:05:57 +01:00
Girish Ramakrishnan
eddda496f1
Do not set Hostname for subcontainers
2015-11-26 19:26:29 -08:00
Girish Ramakrishnan
556cd5fa7b
make app subcontainers share network namespace with app
...
pid namespace sharing is coming in https://github.com/docker/docker/issues/10163
2015-11-26 19:18:31 -08:00
Johannes Zellner
f25bc67311
Make all json blobs in db TEXT fields
2015-11-26 12:17:02 +01:00
Johannes Zellner
9a456ae698
Use console.error() to report update errors
2015-11-26 12:04:39 +01:00
Johannes Zellner
9a40f984db
Set app backup progress only after we check the error
2015-11-26 12:00:44 +01:00
Johannes Zellner
28020fb028
Support redirectURIs which already contain query params
2015-11-25 17:50:39 +01:00
Johannes Zellner
285dd8aaa3
Correctly encode the redirectURI in oauth callback
2015-11-25 17:45:18 +01:00
Johannes Zellner
c4327a95e7
Fix crash due to wrong AppsError usage
2015-11-25 13:49:20 +01:00
Girish Ramakrishnan
eb19e93b14
handle scheduler error
2015-11-22 21:17:17 -08:00
Girish Ramakrishnan
7fc630d647
Revert "fix crash in scheduler"
...
This reverts commit 3b5e30f922 .
2015-11-22 21:13:05 -08:00
Girish Ramakrishnan
3b5e30f922
fix crash in scheduler
2015-11-22 17:22:06 -08:00
Girish Ramakrishnan
d94e8acb3a
debug output the changeIds
2015-11-19 17:49:30 -08:00
Johannes Zellner
c1a2fe1154
Docker bridge default ip has changed
2015-11-19 16:32:03 +01:00
Girish Ramakrishnan
dc3f1e2847
new addon images based on docker 1.9.0
2015-11-18 17:53:58 -08:00
Johannes Zellner
b532908c3a
Give correct feedback if an app cannot be found in the appstore
2015-11-13 10:35:29 +01:00
Johannes Zellner
b5c619b34f
Change manifestJson column from VARCHAR to TEXT
2015-11-13 10:21:03 +01:00
Johannes Zellner
83d32d4190
Do not serve up the status page for 500 upstream errors
2015-11-13 09:39:33 +01:00
Johannes Zellner
a4a6dcf7d6
Fix indentantion
2015-11-13 09:30:33 +01:00
Johannes Zellner
5d03850550
Update supererror
2015-11-13 09:23:32 +01:00
Girish Ramakrishnan
43174dbea3
this docker registry keeps going down
2015-11-12 16:22:53 -08:00
Girish Ramakrishnan
a49325280d
do not trust the health state blindly
2015-11-12 16:16:05 -08:00
Girish Ramakrishnan
d51d2a9fc8
typo
2015-11-12 16:13:15 -08:00
Girish Ramakrishnan
51882f32fd
filter out non-healthy apps
2015-11-12 16:04:33 -08:00
Girish Ramakrishnan
1eab094edf
better pullImage debug output
2015-11-12 15:58:39 -08:00
Girish Ramakrishnan
728a2f153c
new format of provisioning info
2015-11-12 14:22:43 -08:00
Girish Ramakrishnan
48bd29276b
rename variable for clarity
2015-11-12 12:40:41 -08:00
Girish Ramakrishnan
3509e5c836
use fallback cert from backup if it exists
2015-11-12 12:37:43 -08:00
Girish Ramakrishnan
d4f00a7cd8
use admin.cert and admin.key if present in backup dir
2015-11-12 12:33:52 -08:00
Girish Ramakrishnan
722f16f244
fix indentation
2015-11-12 12:28:05 -08:00
Girish Ramakrishnan
e2da8c58b1
backup fallback cert
2015-11-12 12:27:25 -08:00
Girish Ramakrishnan
0e486533df
Cannot use >= node 4.1.2
...
https://github.com/nodejs/node/issues/3803
2015-11-12 12:19:13 -08:00
Girish Ramakrishnan
3c84bf26a5
change engine requirements
2015-11-11 15:55:59 -08:00
Girish Ramakrishnan
ad732f260e
new shrinkwrap for 4.2.2
2015-11-11 15:55:24 -08:00
Girish Ramakrishnan
ba51dae1d1
Add -app prefix for all app sources
...
so that this doesn't conflict with some user.
2015-11-11 13:27:45 -08:00
Girish Ramakrishnan
1cf7f92fcf
delete container on network error
2015-11-10 21:56:17 -08:00
Girish Ramakrishnan
78d0eb86be
create new container from cloudron exec
2015-11-10 21:36:20 -08:00
Johannes Zellner
562b1a0aeb
log lines should be newline separated
2015-11-10 11:31:07 +01:00
Girish Ramakrishnan
b4b1052e5b
send mail even if no related app was found (for addons)
2015-11-10 01:39:02 -08:00
Girish Ramakrishnan
50769dc5c7
make crashnotifier send mails again
...
mailer module waits for dns syncing. crashnotifier has no time for all that.
neither does it initialize the database. it simply wants to send mail.
(the crash itself could have happenned because of some db issue)
maybe it should simply use a shell script at some point.
2015-11-10 00:25:47 -08:00
Girish Ramakrishnan
6302da9743
print all missing images
2015-11-09 23:31:04 -08:00
Girish Ramakrishnan
c2994b5332
set bucket and prefix to make migrate test pass
2015-11-09 22:45:07 -08:00
Girish Ramakrishnan
318ceb6a8a
wait for old apptask to finish before starting new one
...
kill() is async and takes no callback :/
2015-11-09 22:10:10 -08:00
Girish Ramakrishnan
c4ba657b87
better taskmanager debugs
2015-11-09 21:58:34 -08:00
Girish Ramakrishnan
02f9539829
add backupConfig in test
2015-11-09 21:08:23 -08:00
Girish Ramakrishnan
f324681123
make migrate test work
2015-11-09 20:34:27 -08:00
Girish Ramakrishnan
db0e90d68e
use debug instead of console.error
2015-11-09 19:10:33 -08:00
Girish Ramakrishnan
fac5c14cbb
remove ununsed require
2015-11-09 18:57:57 -08:00
Girish Ramakrishnan
33849651f7
expose api server origin to determine if the box is dev/staging/prod
2015-11-09 17:50:09 -08:00
Girish Ramakrishnan
d96f307826
do not save aws and backupKey
...
it is now part of backupConfig
2015-11-09 08:39:01 -08:00
Johannes Zellner
959ebd609f
The controller already ensures we don't show the views here
2015-11-09 09:56:59 +01:00
Johannes Zellner
335de765f3
Only show dns and cert pages for custom domain cloudrons
2015-11-09 09:56:08 +01:00
Girish Ramakrishnan
8bf890db62
cannot read propery provider of null
2015-11-09 00:42:25 -08:00
Girish Ramakrishnan
09c2e0decf
do not set dnsConfig for caas on activation
2015-11-09 00:20:16 -08:00
Girish Ramakrishnan
70a4d328a6
pass dnsConfig in update
2015-11-08 23:57:42 -08:00
Girish Ramakrishnan
3d2645bf60
token is not a function
2015-11-08 23:54:47 -08:00
Girish Ramakrishnan
4ca02407a9
pass dnsConfig to backend api
2015-11-08 23:21:55 -08:00
Girish Ramakrishnan
00e696d1e4
always add dns config in tests
2015-11-08 23:05:55 -08:00
Girish Ramakrishnan
b930a050bf
read dnsConfig from settings to choose api backend
2015-11-08 22:55:31 -08:00
Girish Ramakrishnan
d57b56569e
Add getAllPaged to storage api
2015-11-08 22:41:13 -08:00
Girish Ramakrishnan
e56f7aa3a6
remove unused variable
2015-11-08 11:04:39 -08:00
Girish Ramakrishnan
b9b634bb48
ensure correct token is used in tests
2015-11-07 22:19:23 -08:00
Girish Ramakrishnan
89b5768ea3
set the backupConfig in backups test
2015-11-07 22:18:39 -08:00
Girish Ramakrishnan
87c42c4465
Add test for settings.backupConfig
2015-11-07 22:17:08 -08:00
Girish Ramakrishnan
e9904c2e2b
remove bad reference to config.aws
2015-11-07 22:12:03 -08:00
Girish Ramakrishnan
1075277978
remove legacy update params
...
these are now part of settings
2015-11-07 22:07:25 -08:00
Girish Ramakrishnan
3647ee2fcd
remove config.aws and config.backupKey
2015-11-07 22:06:56 -08:00
Girish Ramakrishnan
8f31243c23
load backup config from settingsdb
2015-11-07 22:06:09 -08:00
Girish Ramakrishnan
62379eab93
save backupConfig in db
2015-11-07 21:45:38 -08:00
Girish Ramakrishnan
61d37e7d19
Add backup config to settings
2015-11-07 18:02:45 -08:00
Girish Ramakrishnan
f04e70d894
read new format of restore keys
2015-11-07 17:53:54 -08:00
Girish Ramakrishnan
b150efdd42
change backup provider to caas
2015-11-07 09:17:58 -08:00
Girish Ramakrishnan
5f48d77580
prepare for new backupConfig
2015-11-07 00:26:12 -08:00
Girish Ramakrishnan
768d5970a0
split aws code into storage backends
2015-11-06 18:22:29 -08:00
Girish Ramakrishnan
9c2e2ca3a6
backups: add api call
2015-11-06 18:14:59 -08:00
Girish Ramakrishnan
07893319c7
return BackupError and not SubdomainError
2015-11-06 18:08:25 -08:00
Girish Ramakrishnan
14f9550101
merge SubdomainError into subdomains.js like other error classes
2015-11-06 17:58:01 -08:00
Girish Ramakrishnan
bb18e4ad3a
remove spurious debugs
2015-11-05 11:59:11 -08:00
Johannes Zellner
7c3ff76c4d
Avoid ui glitch in setup if no custom domain
...
This moves the wizard flow logic to next() instead of the views individually
2015-11-05 20:32:30 +01:00
Johannes Zellner
7a4bdc57ce
Remove unused favicon middleware
2015-11-05 19:29:08 +01:00
Girish Ramakrishnan
52773f2a0a
mailer: set dnsReady flag
2015-11-05 10:28:41 -08:00
Girish Ramakrishnan
72eda5941f
mailDnsRecordIds is never used
2015-11-05 10:22:25 -08:00
Girish Ramakrishnan
63dcf6204a
mailServer is never used
2015-11-05 10:22:25 -08:00
Johannes Zellner
bf5f3764f7
Specify icon for oauth views
2015-11-05 19:19:28 +01:00
Girish Ramakrishnan
6801bfeda3
Revert "Remove unused very old yellowtent favicon"
...
This reverts commit c15a200d4a .
This is used by the favicon middleware
2015-11-05 10:14:59 -08:00
Johannes Zellner
44b0e043be
force reload the webadmin on cert upload
2015-11-05 18:38:32 +01:00
Girish Ramakrishnan
554a57924d
setup dkim records for custom domain
2015-11-05 09:30:23 -08:00
Johannes Zellner
5715ae601f
Update the cloudron icon
2015-11-05 18:05:19 +01:00
Johannes Zellner
f80bf51eaa
Remove more unused image assets
2015-11-05 18:04:54 +01:00
Johannes Zellner
7b24e16cab
Remover another unused favicon
2015-11-05 17:49:25 +01:00
Johannes Zellner
31b7ba0a5c
Update the avatar
2015-11-05 17:48:18 +01:00
Johannes Zellner
c15a200d4a
Remove unused very old yellowtent favicon
2015-11-05 17:46:17 +01:00
Girish Ramakrishnan
52d2abe3c7
we expect the server cert to be first like the rfc says
2015-11-04 19:22:37 -08:00
Girish Ramakrishnan
a42169221d
more verbose certificate message
2015-11-04 19:15:23 -08:00
Girish Ramakrishnan
126c4ebf07
pass on certificate errors
2015-11-04 19:13:16 -08:00
Girish Ramakrishnan
4a96dcf8b0
Put dns first since it says dns & certs
2015-11-04 18:23:51 -08:00
Girish Ramakrishnan
9e94d21cc1
fix avatar url for custom domains
2015-11-04 18:21:46 -08:00
Girish Ramakrishnan
fa9bec0de3
move dns and certs to own view
2015-11-04 18:21:43 -08:00
Girish Ramakrishnan
120759f869
move backups after about
2015-11-04 16:41:33 -08:00
Girish Ramakrishnan
0a04b99dba
route53: Do no use weight and setIdentifier
2015-11-04 15:15:39 -08:00
Girish Ramakrishnan
1e2cdb2840
debug any failure
2015-11-04 14:28:26 -08:00
Girish Ramakrishnan
06ed3cbd25
Add space in spf record
2015-11-04 14:22:56 -08:00
Girish Ramakrishnan
1c47953737
insert any dns config into settings
2015-11-04 08:45:12 -08:00
Girish Ramakrishnan
498bac64c6
Revert "Add isConfigured fallback for caas cloudrons"
...
This reverts commit 338f68a0f3 .
We will send dns config from appstore instead
2015-11-04 08:28:21 -08:00
Johannes Zellner
338f68a0f3
Add isConfigured fallback for caas cloudrons
2015-11-04 12:53:16 +01:00
Girish Ramakrishnan
a37ed2154b
listen on timezone key only when configured
2015-11-03 16:11:24 -08:00
Girish Ramakrishnan
7fd33228da
Add configured event
...
Cloudron code paths like cron/mailer/taskmanager now wait for configuration
to be complete before doing anything.
This is useful when a cloudron is moved from a non-custom domain to a custom domain.
In that case, we require route53 configs.
2015-11-03 16:06:38 -08:00
Girish Ramakrishnan
5dda3707ab
Remove event listener
2015-11-03 15:22:02 -08:00
Girish Ramakrishnan
13da4fe47e
unsubscribe from events
2015-11-03 15:19:06 -08:00
Girish Ramakrishnan
f6ec383eaf
debug only if error
2015-11-03 15:15:37 -08:00
Girish Ramakrishnan
7a2b9fe87f
resume tasks only if cloudron is activated
2015-11-03 15:14:59 -08:00
Girish Ramakrishnan
25b7ea7302
minor refactor
2015-11-02 17:45:38 -08:00
Girish Ramakrishnan
3716e176cf
send monotonic timestamp as well
2015-11-02 14:26:15 -08:00
Girish Ramakrishnan
5ea6c41ae7
fix typo
2015-11-02 14:23:02 -08:00
Girish Ramakrishnan
2255cf9c7a
disable logstream testing (since it requires journald)
2015-11-02 14:08:34 -08:00
Girish Ramakrishnan
02f7cb5671
Use journalctl to get app logs
2015-11-02 14:08:34 -08:00
Girish Ramakrishnan
c00795c4bc
name is a query parameter
2015-11-02 14:08:34 -08:00
Johannes Zellner
fc4db1ba97
Fix the avatar and brand label links in navbar
2015-11-02 21:27:52 +01:00
Girish Ramakrishnan
497982f99d
Give containers a name
2015-11-02 09:34:31 -08:00
Girish Ramakrishnan
c6c1334602
fix indexOf matching in addDnsRecords
2015-10-30 18:12:24 -07:00
Girish Ramakrishnan
16e689b98e
Fix casing of zone id
2015-10-30 18:05:08 -07:00
Girish Ramakrishnan
e7804752ea
add null check
2015-10-30 16:24:56 -07:00
Girish Ramakrishnan
29e9e75404
fix indexOf matching
2015-10-30 16:12:39 -07:00
Girish Ramakrishnan
2fcb0c345b
txtRecords is a single level array
2015-10-30 16:04:09 -07:00
Girish Ramakrishnan
10774714ef
dns resolve using the authoritative nameserver
2015-10-30 15:57:15 -07:00
Girish Ramakrishnan
52728f661e
sendHearbeat on init
2015-10-30 14:58:48 -07:00
Girish Ramakrishnan
a7a7edf7eb
ListResourceRecordSet returns items based on lexical sorting
2015-10-30 14:41:34 -07:00
Girish Ramakrishnan
7c04a45be2
rename function
2015-10-30 13:53:12 -07:00
Girish Ramakrishnan
2c8721e038
enable back spf
2015-10-30 13:48:46 -07:00
Girish Ramakrishnan
8888048ab8
leave a note on subdomains.update
2015-10-30 13:47:10 -07:00
Girish Ramakrishnan
38b0127279
subdomains.update now takes array
2015-10-30 13:45:10 -07:00
Girish Ramakrishnan
1ed2b74131
fix get call
2015-10-30 13:45:10 -07:00
Johannes Zellner
799de233b6
Remove leftover console.log()
2015-10-30 21:30:57 +01:00
Johannes Zellner
5d4aad1a06
Fix cloudron tests when run together
2015-10-30 21:30:57 +01:00
Girish Ramakrishnan
4d3437f249
subdomains.del now takes array values
2015-10-30 13:30:19 -07:00
Girish Ramakrishnan
a2cf7adfde
implement subdomains.get for route53
2015-10-30 13:23:43 -07:00
Girish Ramakrishnan
4ad293bd3c
subdomains.add takes array values
2015-10-30 13:23:43 -07:00
Johannes Zellner
772d91786c
Ensure the next buttons are properly disabled when the fields are invalid
2015-10-30 21:10:01 +01:00
Johannes Zellner
bb93502bc2
Do not use special wizard page controller for dns view
2015-10-30 21:10:01 +01:00
Johannes Zellner
166451f9d6
Fixup the enter focus flow
2015-10-30 21:10:01 +01:00
Girish Ramakrishnan
ac4a4a0e1d
prepare dns backends to accepts array of values
2015-10-30 13:04:43 -07:00
Girish Ramakrishnan
4f82110c3e
remove listeners on uninitialize
2015-10-30 12:52:33 -07:00
Girish Ramakrishnan
b939ae16e3
disable spf for testing
2015-10-30 12:50:47 -07:00
Girish Ramakrishnan
294619ad43
settings changed callback provides the changed setting as first argument
2015-10-30 12:50:47 -07:00
Johannes Zellner
8ec7ca27a5
Fix error message in set dns config
2015-10-30 20:32:58 +01:00
Girish Ramakrishnan
019aa7cc02
remove unused require
2015-10-30 11:43:40 -07:00
Girish Ramakrishnan
93c5aeefbd
caas: add subdomains.get
2015-10-29 16:41:04 -07:00
Girish Ramakrishnan
5301619541
remove unused subdomains.addMany
2015-10-29 16:39:07 -07:00
Girish Ramakrishnan
5438c2db01
minor rename of variable
2015-10-29 16:38:18 -07:00
Girish Ramakrishnan
d08417fc57
handle getSubdomain error
2015-10-29 16:27:01 -07:00
Girish Ramakrishnan
87660f2305
emit change event
2015-10-29 16:21:41 -07:00
Girish Ramakrishnan
f15c287792
add updateSubdomain in route53 backend
2015-10-29 15:37:51 -07:00
Girish Ramakrishnan
dce5241a08
debug message for update already in progress
2015-10-29 15:34:30 -07:00
Girish Ramakrishnan
71ceb41c04
addDnsRecords on restarts after activation
2015-10-29 15:00:53 -07:00
Girish Ramakrishnan
5464bd5f50
remove unused variable
2015-10-29 14:57:51 -07:00
Girish Ramakrishnan
4f3e9c16e8
implement dns updates for custom domains
2015-10-29 14:33:34 -07:00
Girish Ramakrishnan
e9da2b19bd
Add subdomains.update
2015-10-29 14:16:09 -07:00
Girish Ramakrishnan
50694c3fc5
Add get and update subdomain to caas
2015-10-29 14:15:54 -07:00
Girish Ramakrishnan
a8f1746d28
Add square bracket for empty string/no apps
2015-10-29 13:07:52 -07:00
Johannes Zellner
99f72154c8
Ensure we only show cert related ui parts for custom domain cloudrons
2015-10-29 21:01:24 +01:00
Girish Ramakrishnan
56de7d6e29
set non-custom domain provider as caas
2015-10-29 12:41:31 -07:00
Girish Ramakrishnan
5ca0b5f29a
dnsConfig provider can be caas
2015-10-29 12:33:10 -07:00
Girish Ramakrishnan
be3f8e1adf
use debug again
2015-10-29 12:28:50 -07:00
Girish Ramakrishnan
08dd67ae2b
use debug instead of console.error
2015-10-29 12:26:58 -07:00
Girish Ramakrishnan
aaa5cc83f7
do not emit fake activation event
...
cloudron is simply initialized the first thing
2015-10-29 12:18:25 -07:00
Johannes Zellner
e970ba546f
Only print an app alive digest
2015-10-29 19:54:20 +01:00
Girish Ramakrishnan
ea27fb5f5a
mailer: do not start until activated
2015-10-29 10:12:44 -07:00
Girish Ramakrishnan
0ba1cf2be2
ensure cloudron.js is initialized first
2015-10-29 10:11:05 -07:00
Girish Ramakrishnan
a589db1018
Fix typo
2015-10-29 09:00:31 -07:00
Girish Ramakrishnan
58be3dffcf
setup dns records on activation
...
do no wait for records to sync as well. the appstore does all the
waiting now (or the user in selfhosted case)
2015-10-29 08:43:25 -07:00
Girish Ramakrishnan
a9ad8211a2
send heartbeat regardless of activation
2015-10-29 08:40:52 -07:00
Johannes Zellner
ef8f06a3ca
Add a link to support page
2015-10-29 14:48:02 +01:00
Johannes Zellner
28a332597b
Adjust text
2015-10-29 14:41:59 +01:00
Johannes Zellner
7369fb0e14
Add missing =
2015-10-29 14:36:25 +01:00
Johannes Zellner
adf9494798
Show current dns config in settings ui
2015-10-29 14:34:43 +01:00
Johannes Zellner
fb7dbec539
Add Client.getDnsConfig()
2015-10-29 14:34:25 +01:00
Johannes Zellner
ee9be42f85
Add form logic for dns credentials
2015-10-29 13:53:48 +01:00
Johannes Zellner
ac2bb03d3a
Rename cert header
2015-10-29 12:56:12 +01:00
Johannes Zellner
0a160a2909
Add form feedback for cert forms in settings
2015-10-29 12:55:32 +01:00
Johannes Zellner
f06baca1be
Do not double submit the forms
2015-10-29 12:37:59 +01:00
Johannes Zellner
6af79be190
Fix typo in field name
2015-10-29 12:37:30 +01:00
Johannes Zellner
e9620142d2
Add client.setAdminCertificate()
2015-10-29 12:29:25 +01:00
Johannes Zellner
52d655438a
Add route to set the admin certificate
...
This route is separate until we can treat the webadmin just
like any other app
2015-10-29 12:27:57 +01:00
Johannes Zellner
478d6eee7a
streamline cert upload forms in settings
2015-10-29 11:52:53 +01:00
Girish Ramakrishnan
7e37dd4810
Do not subscribe to activation event if already activated
2015-10-28 17:07:13 -07:00
Girish Ramakrishnan
6eb197d1a4
remove gInitialized pattern
...
not sure why we initialize anything more than once
2015-10-28 17:05:28 -07:00
Girish Ramakrishnan
d75fef0dd7
console.error -> debug
2015-10-28 17:05:16 -07:00
Girish Ramakrishnan
ca3f3ed2ad
Change DKIM selector to cloudron
2015-10-28 16:16:15 -07:00
Girish Ramakrishnan
20c633d159
console.error to debug
2015-10-28 16:08:12 -07:00
Girish Ramakrishnan
3081371a21
Move dns backends to separate directory
2015-10-28 16:04:49 -07:00
Girish Ramakrishnan
59d77da5b3
remove unused digitalocean.js
2015-10-28 15:25:22 -07:00
Girish Ramakrishnan
04cc91e90f
remove unused require
2015-10-28 15:22:10 -07:00
Girish Ramakrishnan
f3d4f3c736
Fix debug message
2015-10-28 15:21:47 -07:00
Girish Ramakrishnan
4653021c06
Do not send email if SPF record is not setup correctly
2015-10-28 14:45:51 -07:00
Johannes Zellner
fc250727ba
Add cert form error reporting to app install form
2015-10-28 22:21:20 +01:00
Johannes Zellner
04aad3e2bd
Add cert and key to app install route
2015-10-28 22:09:19 +01:00
Johannes Zellner
2f7caf5576
Preselect current user for singleuser apps
2015-10-28 22:07:41 +01:00
Johannes Zellner
74a62a6977
Add user id to profile object
2015-10-28 22:07:30 +01:00
Johannes Zellner
566ece72eb
Make cert forms appear as a group
2015-10-28 21:20:59 +01:00
Johannes Zellner
2cc361e8e4
Mark cert fields as optional
2015-10-28 20:51:11 +01:00
Johannes Zellner
2bf5add67b
Add cert handling to install form
2015-10-28 20:50:55 +01:00
Johannes Zellner
6c5671e8d7
Remove unsed scope vars
2015-10-28 20:38:22 +01:00
Johannes Zellner
1c8e5021c6
Add form feedback for certs
2015-10-28 20:30:35 +01:00
Girish Ramakrishnan
9c903ecf0c
minor rewording
2015-10-28 10:17:46 -07:00
Johannes Zellner
8308142f59
Test certs are now simply embedded
2015-10-28 16:34:09 +01:00
Johannes Zellner
7fdb3c82ce
Ensure the test certs match domain and the folder is created
2015-10-28 16:33:45 +01:00
Johannes Zellner
c520984673
Fixup the tests for wildcard cert
2015-10-28 16:00:51 +01:00
Johannes Zellner
97cac6c804
Make sure the dns sync file is removed
2015-10-28 15:32:49 +01:00
Johannes Zellner
e19669e0b6
Move cert validation to settings and use it for wildcard cert
2015-10-28 14:35:39 +01:00
Johannes Zellner
ba091bd7cf
Add proper cert validator
2015-10-28 14:20:25 +01:00
Johannes Zellner
22f3bd0c37
Add x509 node module
2015-10-28 14:20:03 +01:00
Johannes Zellner
f6c2c0b7cd
Add missing fs.
2015-10-28 12:56:09 +01:00
Johannes Zellner
b0db56c3af
Set the cert and key dynamically when rendering nginx appconfig
2015-10-28 12:42:04 +01:00
Johannes Zellner
9f13404035
We name certs with .cert extension
2015-10-28 12:33:27 +01:00
Johannes Zellner
a8c1c03a7f
certs should be stored with app fqdn
2015-10-28 12:28:57 +01:00
Johannes Zellner
15b45ea8bf
Save the uploaded certs to app cert directory
2015-10-28 12:24:59 +01:00
Johannes Zellner
d301623720
Add per app cert dir
2015-10-28 12:23:16 +01:00
Johannes Zellner
83d7314eda
Add tests for app cert upload
2015-10-28 12:13:37 +01:00
Johannes Zellner
f243033f44
Adjust the settings view to upload certs as json body
2015-10-28 12:12:54 +01:00
Johannes Zellner
02a9219695
Make settings certificate upload route also just using the json body
2015-10-28 12:12:06 +01:00
Johannes Zellner
6aece9dc8f
Ensure cert and key are strings
2015-10-28 11:50:50 +01:00
Johannes Zellner
13d4fc71ed
No more dns view
2015-10-28 10:36:55 +01:00
Girish Ramakrishnan
6cb564072f
EE API is synchronous
2015-10-27 22:18:02 -07:00
Girish Ramakrishnan
e572484cdc
Add DNS records for non-custom domains before activation
2015-10-27 21:10:00 -07:00
Girish Ramakrishnan
44f8be87f7
fix unregisterSubdomain loop
2015-10-27 18:53:06 -07:00
Girish Ramakrishnan
c96c9175a4
send heartbeat immediately on startup
2015-10-27 17:05:56 -07:00
Girish Ramakrishnan
8755d399fa
hearbeat does not rely on dns sync
2015-10-27 16:42:24 -07:00
Girish Ramakrishnan
6385e5b35b
Do not add DNS records for custom domain
2015-10-27 16:23:08 -07:00
Girish Ramakrishnan
1a50a70fee
sendHeartbeat on activation event
2015-10-27 16:20:14 -07:00
Girish Ramakrishnan
059cc17c64
Add cloudron.isActivatedSync
2015-10-27 16:12:05 -07:00
Girish Ramakrishnan
f9880b5846
send heartbeats regardless of activation
2015-10-27 16:05:19 -07:00
Girish Ramakrishnan
e132064b84
create cron jobs only on activation
2015-10-27 16:04:29 -07:00
Girish Ramakrishnan
89dfff1566
add null check for all jobs
2015-10-27 16:02:42 -07:00
Girish Ramakrishnan
4cfbe187d3
Add dns records on activation
2015-10-27 16:00:31 -07:00
Girish Ramakrishnan
d4e530bc76
Do not set dns config if null
2015-10-27 12:41:13 -07:00
Girish Ramakrishnan
344ab316b2
remove unused variables
2015-10-27 12:39:06 -07:00
Girish Ramakrishnan
8547da1c91
$location is not defined
2015-10-27 12:37:01 -07:00
Girish Ramakrishnan
87e891712f
Add custom domain setup step
2015-10-27 12:04:27 -07:00
Girish Ramakrishnan
3991f7423c
Add Client.setDnsConfig
2015-10-27 12:02:47 -07:00
Girish Ramakrishnan
c842f84087
deploymentConfig is never used
2015-10-27 11:38:05 -07:00
Johannes Zellner
1382913829
Adjust the webadmin code for cert upload
2015-10-27 18:38:46 +01:00
Johannes Zellner
e33d9eb88e
Move cert upload route to /settings
2015-10-27 18:38:46 +01:00
Girish Ramakrishnan
9976f22ecb
awscredentials route is not called anymore
2015-10-27 10:24:42 -07:00
Girish Ramakrishnan
45fa690f3e
make apps-test partially work
2015-10-27 10:14:51 -07:00
Johannes Zellner
a97758c8cb
Send cert and key with configure
2015-10-27 18:11:48 +01:00
Girish Ramakrishnan
757801addf
make apptask-test work
2015-10-27 10:02:43 -07:00
Girish Ramakrishnan
68552d77dd
Use the aws backend for tests
2015-10-27 10:02:43 -07:00
Girish Ramakrishnan
6f24217c8b
Allow endpoint to be configured (for the tests)
2015-10-27 10:02:43 -07:00
Girish Ramakrishnan
4f31fab2a4
use aws backend for custom domains
2015-10-27 10:02:43 -07:00
Girish Ramakrishnan
ef3140605d
read dns config from settings
2015-10-27 10:02:43 -07:00
Johannes Zellner
d1c84fabdd
Pass certs down to apps.configure
2015-10-27 16:36:09 +01:00
Johannes Zellner
e397f783bf
Add cert and key to app configure route
2015-10-27 15:44:47 +01:00
Johannes Zellner
58eda036d8
Add test helper script to generate a selfsigned cert
2015-10-27 15:06:53 +01:00
Johannes Zellner
a720c30181
Use test-app image 10.0.0
2015-10-27 14:20:19 +01:00
Johannes Zellner
b61498c4b4
Add basic form elements for certificate in app configure
2015-10-27 12:26:55 +01:00
Johannes Zellner
33b3c34251
Remove unused dns views
2015-10-27 10:40:05 +01:00
Johannes Zellner
0c9d0d9094
Move certificate upload form from dns to settings
2015-10-27 10:39:02 +01:00
Johannes Zellner
2e0c013469
Remove useless console.log()
2015-10-27 10:38:11 +01:00
Girish Ramakrishnan
5a35cbb13f
add route for setting/getting dns settings
2015-10-26 16:52:59 -07:00
Girish Ramakrishnan
3ca3dff767
add settings.get/setDnsConfig
2015-10-26 16:35:50 -07:00
Girish Ramakrishnan
e42538bf95
separate out dns and backup credentials
2015-10-26 16:23:41 -07:00
Girish Ramakrishnan
d3196a6d7f
Fix redis hostname
2015-10-23 19:24:22 -07:00
Girish Ramakrishnan
a5ef4b9051
recreate docker containers for hostname change
2015-10-23 16:30:17 -07:00
Girish Ramakrishnan
b9c6e4618a
test the new env vars APP_*
2015-10-23 16:27:40 -07:00
Girish Ramakrishnan
5ed93d675a
Do not set hostname of app container
...
Some apps like pasteboard try to curl the public app url from inside
the container. This fails because we set the hostname and the hostname
maps to the internal docker IP.
To fix this, simply export two environment variables providing the
app's domain and origin. The hostname is set to the app location instead
of the FQDN for debugging.
Fixes #521
2015-10-23 16:17:35 -07:00
Girish Ramakrishnan
f3ceedd950
linter fixes
2015-10-23 16:06:55 -07:00
Johannes Zellner
4f38fd8a8c
Bring back 'Cloudron' in the login header
2015-10-23 20:21:31 +02:00
Johannes Zellner
83a51e6efc
Replace the ugly oauth proxy checkbox
2015-10-22 13:18:58 +02:00
Johannes Zellner
b1e5c11c2c
Check memory availability if an app can be installed or not
2015-10-22 11:16:55 +02:00
Johannes Zellner
c78c1c6a49
Provide the memory byte count with the cloudron config route
2015-10-22 11:16:55 +02:00
Johannes Zellner
5f63d5e07a
Add node module bytes
2015-10-22 11:16:55 +02:00
Johannes Zellner
a09c697f47
Add resource constrait view on app installation attempt
2015-10-22 11:16:55 +02:00
Johannes Zellner
9c09bcc112
Remove leftover console.log()
2015-10-22 11:16:55 +02:00
Girish Ramakrishnan
68538bdb16
update test image
2015-10-21 09:16:04 -07:00
Johannes Zellner
08ce92437b
A readable stream does not have .end()
2015-10-21 17:25:14 +02:00
Johannes Zellner
58edbd91d6
Make data/ directory writeable by yellowtent user
2015-10-21 17:18:45 +02:00
Johannes Zellner
0071c6b078
dns in sync file should be under data/
2015-10-21 17:18:39 +02:00
Johannes Zellner
5a34d28811
Use config.(set)dnsInSync()
...
Fixes #520
2015-10-21 16:44:03 +02:00
Johannes Zellner
4a8dc5ca3d
Use a persistent file for dns sync flag
2015-10-21 16:42:17 +02:00
Johannes Zellner
9199f236b6
Avoid network request for access token verification in oauth proxy
2015-10-21 16:23:15 +02:00
Johannes Zellner
526be0f897
Clear oauthproxy session in case the access token is invalid
2015-10-21 15:57:18 +02:00
Girish Ramakrishnan
59b27fd32e
use debug instead of console.error
2015-10-20 19:03:34 -07:00
Girish Ramakrishnan
7e763f84ac
VolumesFrom is part of HostConfig
2015-10-20 17:34:47 -07:00
Girish Ramakrishnan
f48f358f72
containerId does not mean it is running
2015-10-20 16:56:57 -07:00
Girish Ramakrishnan
cae6fe5047
bump infra version
2015-10-20 15:07:35 -07:00
Girish Ramakrishnan
0540df5c16
bump test image
2015-10-20 14:40:27 -07:00
Girish Ramakrishnan
ed1632bc0a
test the scheduler
2015-10-20 14:30:50 -07:00
Girish Ramakrishnan
bd817673f1
autodetect image id
2015-10-20 13:07:25 -07:00
Girish Ramakrishnan
0bff0beb20
addons is mandatory
2015-10-20 12:57:00 -07:00
Girish Ramakrishnan
b2b4bf174c
ensure boolean
2015-10-20 12:49:02 -07:00
Girish Ramakrishnan
7ed7dab178
appState can be null
2015-10-20 12:32:50 -07:00
Girish Ramakrishnan
ce4e8ca784
manifest always has addons
2015-10-20 12:27:23 -07:00
Girish Ramakrishnan
e3f7d73894
rename isSubcontainer -> isAppContainer
2015-10-20 10:55:06 -07:00
Girish Ramakrishnan
e862ad799d
ignore portBindings and exportPorts for subcontainers
2015-10-20 10:42:35 -07:00
Girish Ramakrishnan
fa7cccc94c
do not dump containerOptions
2015-10-20 10:27:53 -07:00
Girish Ramakrishnan
f09e88794f
do not kill containers on restart
2015-10-20 10:22:42 -07:00
Girish Ramakrishnan
09be0a2057
schedulerConfig cannot be null
2015-10-20 09:44:46 -07:00
Girish Ramakrishnan
f7262c52f4
scheduler: sync more often to catch bugs sooner
2015-10-20 09:36:55 -07:00
Girish Ramakrishnan
d39cecedef
scheduler: crash fixes
2015-10-20 09:36:30 -07:00
Johannes Zellner
10e2c9e9ab
Remove cloudron name from the setup wizard
2015-10-20 13:36:25 +02:00
Johannes Zellner
f9895e9ad5
The activate route does not take a cloudron name anymore
2015-10-20 13:12:37 +02:00
Johannes Zellner
4265a61340
Finally remove the cloudron name from the api wrapper and index page
2015-10-20 12:59:57 +02:00
Johannes Zellner
e84ff32a68
Remove cloudron name related UI in the settings view
2015-10-20 12:57:51 +02:00
Johannes Zellner
655e33a8dd
Remove cloudron name usage in error.html
2015-10-20 12:55:30 +02:00
Johannes Zellner
ee6d1d714d
Remove cloudron name usage in naked domain page
2015-10-20 12:46:45 +02:00
Johannes Zellner
bbc8bf6b3b
Do not use cloudron name in appstatus
2015-10-20 12:41:52 +02:00
Johannes Zellner
2daf746115
Stop using the cloudron name in the oauth views
2015-10-20 12:31:16 +02:00
Girish Ramakrishnan
fed03b5b2c
scheduler: do not save cronjob object in state
...
the cronjob object has lots of js stuff and stringify fails
2015-10-20 01:31:11 -07:00
Girish Ramakrishnan
d0fe4c7850
put back request
2015-10-20 00:20:21 -07:00
Girish Ramakrishnan
84ceb5574b
scheduler: make it work
2015-10-20 00:05:19 -07:00
Girish Ramakrishnan
50ba5948c3
stop all containers of an app
2015-10-20 00:05:19 -07:00
Girish Ramakrishnan
c694c70af1
fix debug tag
2015-10-19 23:38:55 -07:00
Girish Ramakrishnan
f3a024703a
scheduler: fix require
2015-10-19 22:42:13 -07:00
Girish Ramakrishnan
dea98a0972
scheduler: load/save state
2015-10-19 22:41:42 -07:00
Girish Ramakrishnan
5770e69582
explicitly specify all to 0 (this is the default)
2015-10-19 22:09:38 -07:00
Girish Ramakrishnan
a865ea7892
do not set container name (we use labels instead)
2015-10-19 22:09:38 -07:00
Girish Ramakrishnan
630a314384
delete all containers of an app
2015-10-19 22:09:34 -07:00
Girish Ramakrishnan
afb2654e74
scheduler: make stopJobs async
2015-10-19 21:36:55 -07:00
Girish Ramakrishnan
b83270d8be
scheduler: kill existing tasks if they are still running
2015-10-19 21:36:23 -07:00
Girish Ramakrishnan
8d24327453
merge start options into hostconfig
2015-10-19 21:35:02 -07:00
Girish Ramakrishnan
fb2c74d53f
Add docker.createSubcontainer
2015-10-19 21:33:53 -07:00
Girish Ramakrishnan
088e88867f
rename tasks to tasksConfig
2015-10-19 16:29:28 -07:00
Girish Ramakrishnan
ef8f0547c9
job -> cronJob
2015-10-19 16:27:03 -07:00
Girish Ramakrishnan
0f9fb02fbd
createContainer takes optional command
2015-10-19 16:22:35 -07:00
Girish Ramakrishnan
11f58c50e5
add labels to container
2015-10-19 16:01:04 -07:00
Girish Ramakrishnan
dd260eb705
createContainer only takes app object
2015-10-19 16:00:40 -07:00
Girish Ramakrishnan
60b3b180d9
add asserts
2015-10-19 15:51:02 -07:00
Girish Ramakrishnan
9363dfae29
make it work without app object
2015-10-19 15:45:43 -07:00
Girish Ramakrishnan
c7e04d5686
downloadImage only requires manifest now
2015-10-19 15:37:57 -07:00
Girish Ramakrishnan
ff438a1dee
implement scheduler
...
- scan for apps every 10 minutes and schedules tasks
- uses docker.exec
- there is no way to control exec container. docker developers
feel exec is for debugging purposes primarily
- future version will be based on docker run instead
part of #519
2015-10-19 14:53:34 -07:00
Girish Ramakrishnan
cc85fb047b
refactor container code into docker.js
2015-10-19 14:44:01 -07:00
Girish Ramakrishnan
16cac6a2ac
use docker.connection
2015-10-19 14:09:20 -07:00
Girish Ramakrishnan
542f672611
export a connection property from docker.js
2015-10-19 11:24:21 -07:00
Girish Ramakrishnan
ceff995fed
remove unused require
2015-10-19 11:18:50 -07:00
Girish Ramakrishnan
853793f899
Refactor docker.js to not have mac stuff
2015-10-19 11:14:11 -07:00
Girish Ramakrishnan
0fe390f043
remove unused require
2015-10-19 11:05:31 -07:00
Girish Ramakrishnan
6ef948ec2a
Remove vbox.js
...
... and all related mac code. It's totally untested at this point and
most likely doesn't work
2015-10-19 10:54:36 -07:00
Girish Ramakrishnan
67840e8a1d
Move HostConfig to createContainer
...
Newer docker has obsoleted HostConfig in start container
2015-10-19 10:38:46 -07:00
Girish Ramakrishnan
6f65720b56
getByAppIdAndType
2015-10-19 08:58:07 -07:00
Johannes Zellner
2d9215d40a
Cleanup some of the html form elements
2015-10-19 10:31:19 +02:00
Johannes Zellner
e20b2c7494
Indicate during app installation and configuration if the app is a single user app
2015-10-19 10:29:51 +02:00
Girish Ramakrishnan
6ca311f16c
keep addon listing alphabetical
2015-10-18 20:06:26 -07:00
Girish Ramakrishnan
c654ab688f
make callback noop
2015-10-17 13:57:19 -07:00
Johannes Zellner
09d1b8646e
Require exactly one user in accessRestriction for singleUser app installations
2015-10-16 20:01:45 +02:00
Johannes Zellner
c1d97e4f9e
Hide client secret field for simple auth
2015-10-16 19:41:50 +02:00
Johannes Zellner
660553fbc2
Adapt clients.getAllWithDetailsByUserId() to new client types
2015-10-16 19:36:12 +02:00
Johannes Zellner
7a339d4c03
Show user selection for singleUser apps
2015-10-16 18:06:49 +02:00
Johannes Zellner
e1edf6033f
Adjust the webadmin to the accessRestriction changes
2015-10-16 16:14:23 +02:00
Johannes Zellner
659f51909a
Fixup the unit tests for accessRestriction format change
2015-10-16 16:06:13 +02:00
Johannes Zellner
0c8ed2b4dd
Make accessRestriction a JSON format to prepare for group access control
2015-10-16 15:32:19 +02:00
Johannes Zellner
6a93925957
Taks accessRestriction and oauthProxy into account for an update through the cli
2015-10-16 14:50:00 +02:00
Johannes Zellner
38ac0ba410
Show oauthProxy and accessRestriction values at app installation and configuration
2015-10-16 14:50:00 +02:00
Johannes Zellner
4dfed98e68
Give developer tokens the correct scopes
2015-10-16 14:50:00 +02:00
Johannes Zellner
9975585401
roleDeveloper is no more
2015-10-16 14:50:00 +02:00
Johannes Zellner
9d7b4392cb
Only allow simple auth clients through simple auth
2015-10-16 14:49:51 +02:00
Johannes Zellner
40b5b44f75
Test using simple auth credentials in oauth
2015-10-16 11:48:12 +02:00
Johannes Zellner
2a4c13c41c
Fixup oauth to not allow simple auth clients
2015-10-16 11:27:42 +02:00
Johannes Zellner
6cee5441ff
use clientdb types in authorization endpoint
2015-10-16 11:22:16 +02:00
Johannes Zellner
fa4f3f28a7
Remove legacy test auth client type
2015-10-16 10:05:58 +02:00
Johannes Zellner
625de9216f
Fix indentation
2015-10-16 09:19:05 +02:00
Girish Ramakrishnan
c2a353c4a6
add type field to clients table
2015-10-15 17:35:47 -07:00
Girish Ramakrishnan
5aafad76c9
remove unused variable
2015-10-15 17:35:47 -07:00
Girish Ramakrishnan
ed8aa4ece7
remove updating clients
...
clients are immutable
2015-10-15 16:08:17 -07:00
Girish Ramakrishnan
9ac50f9332
minor rename
2015-10-15 15:51:51 -07:00
Girish Ramakrishnan
6e37f927ce
fix typo
2015-10-15 15:32:14 -07:00
Girish Ramakrishnan
af7dbfcf2d
fix debug tag
2015-10-15 15:19:28 -07:00
Girish Ramakrishnan
cf92adabb0
ignore any tmp cleanup errors
2015-10-15 14:47:43 -07:00
Girish Ramakrishnan
237a4842de
callback can be null
2015-10-15 14:25:38 -07:00
Girish Ramakrishnan
11ff68e381
Check error code of image removal
2015-10-15 14:06:05 -07:00
Girish Ramakrishnan
dc5fab4280
callback can be null
2015-10-15 12:06:38 -07:00
Girish Ramakrishnan
adafa449dc
Remove old addon images on infra update
...
Fixes #329
2015-10-15 12:01:31 -07:00
Girish Ramakrishnan
ac9f49dca6
update test image
2015-10-15 11:11:54 -07:00
Girish Ramakrishnan
4532ce2f18
addons do not write to /var/log anymore
2015-10-15 11:00:51 -07:00
Johannes Zellner
188eb5eb67
Do not fail in container.sh when trying to remove non-existing directories
2015-10-15 18:06:57 +02:00
Johannes Zellner
8081225b76
Handle the various appId types we have by now
2015-10-15 17:57:07 +02:00
Johannes Zellner
8460e9dd30
Get the oauth2 debug()s in shape
2015-10-15 16:55:48 +02:00
Johannes Zellner
53ac1633e5
Fixup the oauth tests with accessRestriction support
2015-10-15 16:50:05 +02:00
Johannes Zellner
cddae0f810
Adhere to accessRestriction for oauth authorization endpoint
2015-10-15 16:49:13 +02:00
Johannes Zellner
a0ef038c3a
Revert "Since we got fully rid of the decision dialog, no need to serialze the client anymore"
...
This is now again required, due to the accesRestriction check
This reverts commit 2c9ff1ee3b .
2015-10-15 16:33:05 +02:00
Johannes Zellner
01cc01a571
Fix typo in oauth test
2015-10-15 15:37:56 +02:00
Johannes Zellner
605d350255
Fixup the simpleauth tests
2015-10-15 15:19:01 +02:00
Johannes Zellner
db60d8e9a7
Adhere to accessRestriction in simple auth
2015-10-15 15:18:40 +02:00
Johannes Zellner
bee762ce15
Add apps.hasAccessTo()
2015-10-15 15:06:34 +02:00
Johannes Zellner
f64d686ea4
Prepare simpleauth test for accessRestriction
2015-10-15 13:29:44 +02:00
Johannes Zellner
a7e6639f85
roleUser is gone as well
2015-10-15 12:50:48 +02:00
Johannes Zellner
7737163adf
roleAdmin is gone
2015-10-15 12:37:42 +02:00
Johannes Zellner
396f903fa4
Rewrite accessRestriction validator
2015-10-15 12:37:42 +02:00
Girish Ramakrishnan
aea395d21f
make /var/log readonly
...
Expect apps to redirect logs of stdout/stderr
Part of #503
2015-10-15 00:46:50 -07:00
Girish Ramakrishnan
3b5b542c53
cleanup tmpdir in janitor
2015-10-14 23:21:03 -07:00
Girish Ramakrishnan
926c312395
Add janitor tests
2015-10-14 22:50:07 -07:00
Girish Ramakrishnan
b6bd12fe12
fold janitor into main box code cron job
...
the volume cleaner will now also come into janitor
2015-10-14 22:39:34 -07:00
Girish Ramakrishnan
7ebde347d0
do not use -f to logrotate
...
Normally, logrotate is run as a daily cron job. It will not modify a log
multiple times in one day unless the criterion for that log is based on
the log's size and logrotate is being run multiple times each day, or
unless the -f or --force option is used.
2015-10-14 15:10:53 -07:00
Girish Ramakrishnan
b788682238
Add docker volumes janitor
...
This cleans up tmp and logrotates /var/log every 12 hours.
Note that this janitor is separate from the box janitor because they
run as different users.
Fixes #503
2015-10-14 14:18:36 -07:00
Girish Ramakrishnan
10609224ae
show restore button if we have a lastBackupId
...
This is the only way to roll back even if you have a functioning app.
Use cases include:
1. You updated and something doesn't work
2. The app is in 'starting...' state (so it's installed) but no data yet
2015-10-14 11:36:12 -07:00
Johannes Zellner
21db949b64
Consolidate the oauth comments
2015-10-14 16:31:55 +02:00
Johannes Zellner
2c9ff1ee3b
Since we got fully rid of the decision dialog, no need to serialze the client anymore
2015-10-14 16:22:50 +02:00
Johannes Zellner
712ce0a033
Properly skip decision dialog
2015-10-14 16:16:37 +02:00
Johannes Zellner
b382de4272
Cleanup the client serialization
2015-10-14 16:15:51 +02:00
Johannes Zellner
32c3174e52
Add token exchange tests
2015-10-14 16:15:32 +02:00
Johannes Zellner
d8329cd17f
Remove unused session error route
2015-10-14 15:51:55 +02:00
Johannes Zellner
dd151aae67
Add oauth callback tests
2015-10-14 15:50:00 +02:00
Johannes Zellner
e559c7912e
Add oauth session logout test
2015-10-14 15:38:40 +02:00
Johannes Zellner
32f2fe67e9
Test for unkown client_id
2015-10-14 15:30:10 +02:00
Johannes Zellner
83b9c66e95
Add test for grant type requests
2015-10-14 15:08:04 +02:00
Johannes Zellner
ffa212c2f4
roleAdmin is not part of scopes anymore
2015-10-14 14:59:54 +02:00
Johannes Zellner
e6faff0d3f
Add oauth2 test when user is already logged in with his session
2015-10-14 14:46:25 +02:00
Johannes Zellner
1784e48ce6
Add tester tag
2015-10-14 14:46:03 +02:00
Johannes Zellner
1192ad7aa1
The oauth callback does not need a header and footer
2015-10-14 14:36:41 +02:00
Johannes Zellner
4d1d98212e
Also test loginForm submit with email
2015-10-14 14:31:10 +02:00
Johannes Zellner
1afffc1415
add loginForm submit tests
2015-10-14 14:30:53 +02:00
Johannes Zellner
3bb3e6a406
Also test oauth clients with oauth proxy
2015-10-14 13:38:37 +02:00
Johannes Zellner
e6a45d19e7
Do not handle addon-simpleauth in oauth
2015-10-14 13:35:33 +02:00
Johannes Zellner
1d5f40e213
Add oauth login form tests
2015-10-14 13:34:20 +02:00
Johannes Zellner
86c5bb4d26
Add more oauth tests for the authorization endpoint
2015-10-14 12:03:04 +02:00
Johannes Zellner
172e5c2883
Remove unused contentType middleware
2015-10-14 11:48:57 +02:00
Johannes Zellner
032adc937e
Fix typo to repair oauth and simple auth login
...
Second time breakage, time for a test ;-)
2015-10-13 21:55:02 +02:00
Johannes Zellner
de6033f147
Remove decision dialog related route
2015-10-13 20:39:08 +02:00
Johannes Zellner
d80f572bfc
Remove unused oauth decision dialog
2015-10-13 20:32:27 +02:00
Johannes Zellner
93dccd668e
Cleanup the authorization endpoint
2015-10-13 18:23:32 +02:00
Girish Ramakrishnan
6c76c5096a
SIMPLE_AUTH_URL -> SIMPLE_AUTH_ORIGIN
2015-10-13 08:40:41 -07:00
Johannes Zellner
489a43134c
We also allow non admins to use the webadmin
2015-10-13 15:13:36 +02:00
Johannes Zellner
529c0c3edf
Remove unused angular filter for accessRestrictionLabel
2015-10-13 15:11:30 +02:00
Johannes Zellner
a42f90c351
Also update the test image id
2015-10-13 14:24:53 +02:00
Johannes Zellner
49256db188
Fix test to support docker api up to 1.19 and v1.20
2015-10-13 14:24:41 +02:00
Johannes Zellner
092c3ff92b
Print error when apptask.pullImage() failed
2015-10-13 13:25:43 +02:00
Johannes Zellner
34a2bceab5
Do not crash if a boxVersionsUrl is not set
...
This prevents test failures when the cron job runs
2015-10-13 13:22:23 +02:00
Johannes Zellner
d7f8de2e77
Remove console.log
2015-10-13 13:06:50 +02:00
Johannes Zellner
006a580dd8
Update TEST_IMAGE_TAG
2015-10-13 12:30:02 +02:00
Johannes Zellner
18dcd77ada
Ensure we deal with booleans
2015-10-13 12:29:40 +02:00
Johannes Zellner
994bcbff03
Support oauthProxy in webadmin
2015-10-13 11:49:50 +02:00
Johannes Zellner
3c8b99605e
Fix apps-test.js
2015-10-13 10:41:57 +02:00
Johannes Zellner
dba16e0c8a
Addons take longer to startup
2015-10-13 10:41:57 +02:00
Johannes Zellner
be3d09916f
Fix settings-test.js
2015-10-13 10:41:57 +02:00
Johannes Zellner
28b8832d86
Fix backups-test.js
2015-10-13 10:41:57 +02:00
Johannes Zellner
5fc38bdb40
Fixup the apptask-test.js
2015-10-13 10:41:57 +02:00
Johannes Zellner
db8d4e62ec
Fix apps-test.js
2015-10-13 10:41:57 +02:00
Johannes Zellner
f33d1d68f4
Fix database tests
2015-10-13 10:41:57 +02:00
Johannes Zellner
64d70d0b20
use app.oauthProxy instead of app.accessRestriction
2015-10-13 10:41:57 +02:00
Johannes Zellner
d972acdc68
Add apps.oauthProxy
2015-10-13 10:41:57 +02:00
Girish Ramakrishnan
6773d5763f
pullImage: handle stream error
2015-10-12 21:56:34 -07:00
Girish Ramakrishnan
c39193b871
remove redundant log
2015-10-12 21:54:25 -07:00
Girish Ramakrishnan
f8723a21c0
check for 200 instead of 201
2015-10-12 21:54:18 -07:00
Girish Ramakrishnan
3dfd97c1b7
login must return 200
2015-10-12 20:21:27 -07:00
Girish Ramakrishnan
436e29bda3
signal redis to backup using SAVE
2015-10-12 13:30:58 -07:00
Johannes Zellner
c08f84cd1c
Ensure we only set the visibility in the progress bar on app restore to not break the layout
2015-10-12 20:32:43 +02:00
Johannes Zellner
aea7dd021f
Add navbar with avatar and name to oauth views
2015-10-12 19:56:04 +02:00
Johannes Zellner
69aab41d03
Make application name and cloudron name more apparent in oauth login
2015-10-12 17:26:02 +02:00
Johannes Zellner
29f2d2dc5c
Show app icon instead of cloudron avatar in oauth login
2015-10-12 16:50:49 +02:00
Johannes Zellner
20c7984345
Make app icon url public to be used in oauth login screen
2015-10-12 16:49:55 +02:00
Johannes Zellner
8b73fa1f37
Support the new oauth client id prefix
2015-10-12 15:18:51 +02:00
Johannes Zellner
24b4e1323c
Update to new manifestformat
2015-10-12 13:22:56 +02:00
Girish Ramakrishnan
6a145229d1
make a note of appid format
2015-10-11 14:19:38 -07:00
Girish Ramakrishnan
639dbc52fd
appId format has changed in clientdb
2015-10-11 14:16:38 -07:00
Girish Ramakrishnan
cb7017183d
apptest: remove mail addon
2015-10-11 13:53:50 -07:00
Girish Ramakrishnan
5fa87fd48a
start the mail addon
2015-10-11 13:48:23 -07:00
Girish Ramakrishnan
da1f53657d
print the values otherwise it gets very confusing
2015-10-11 13:45:02 -07:00
Girish Ramakrishnan
1a36d0c1ef
ensure redis container is stopped before removing it
...
this is required for the configure/update case where the redis container
might be holding some data in memory.
sending redis SIGTERM will make it commit to disk.
2015-10-11 12:08:35 -07:00
Girish Ramakrishnan
f4a220f07d
remove associated volumes
...
note that this does not remove host mounts
2015-10-11 11:37:23 -07:00
Girish Ramakrishnan
1469acf6b3
remove RSTATE_ERROR
...
if startContainer failed, it will still returning success because
it running the db update result
2015-10-11 11:18:30 -07:00
Girish Ramakrishnan
69e2d9d766
regenerate shrinkwrap with --no-optional for ldapjs
2015-10-11 10:39:41 -07:00
Girish Ramakrishnan
c6b08e569b
test image is now 5.0.0
2015-10-11 10:03:42 -07:00
Girish Ramakrishnan
7421a9caba
use latest docker images
2015-10-11 10:03:42 -07:00
Johannes Zellner
53c8c2ba1d
Do not log with morgan during test runs for simple auth server
2015-10-11 17:52:22 +02:00
Johannes Zellner
02fd0392d1
Merge branch 'simpleauth'
2015-10-11 17:40:10 +02:00
Johannes Zellner
c47945a03c
Update to new manifestformat version 1.9.0
2015-10-11 17:19:39 +02:00
Johannes Zellner
598586afc5
Prefix morgan logs with source
2015-10-11 17:19:39 +02:00
Johannes Zellner
47e6652ac8
Do not show http request logs during tests
2015-10-11 17:19:39 +02:00
Johannes Zellner
8130b28fbb
Remove serving up webadmin/ in test case
2015-10-11 17:19:39 +02:00
Johannes Zellner
9fc5dab8e3
Add simpleauth logging middleware
2015-10-11 17:19:39 +02:00
Johannes Zellner
d6a8bc90e7
read ldap port from config.js
2015-10-11 17:19:39 +02:00
Johannes Zellner
f8f6cf5b66
Specify addon env vars for simple auth
2015-10-11 17:19:39 +02:00
Johannes Zellner
46dd52403c
Fix the check install to keep up with the base image version
2015-10-11 17:19:39 +02:00
Johannes Zellner
e5713efd3c
Revert "Attach accessTokens to req for further use"
...
This reverts commit 895812df1e9226415640b74a001c1f8c1affab01.
2015-10-11 17:19:39 +02:00
Johannes Zellner
ef21abdf07
Fixup the simple auth unit tests
2015-10-11 17:19:39 +02:00
Johannes Zellner
cce3278c28
Remove the simpleauth route handler
2015-10-11 17:19:39 +02:00
Johannes Zellner
f39e6e7155
Move simple auth to separate express server
2015-10-11 17:19:39 +02:00
Johannes Zellner
fbefc76f48
Add simpleAuthPort to config.js
2015-10-11 17:19:39 +02:00
Johannes Zellner
a0e82835df
Fixup the simple auth logout route and add tests
2015-10-11 17:19:39 +02:00
Johannes Zellner
b5a60e8455
Attach accessTokens to req for further use
...
This helps with extracting the token, which can come
from various places like headers, body or query
2015-10-11 17:19:38 +02:00
Johannes Zellner
8c548709a7
add simple auth login unit tests
2015-10-11 17:19:38 +02:00
Johannes Zellner
762a35a83d
Fixup the simple login routes for unknown clients
2015-10-11 17:19:38 +02:00
Johannes Zellner
18b667ffb6
Handle 404 in case subdomain does not exist on delete attempt
2015-10-11 17:19:38 +02:00
Johannes Zellner
686af3d4cf
Add SIMPLE_AUTH_ORIGIN
2015-10-11 17:19:38 +02:00
Johannes Zellner
d6b80f1f74
Return correct error codes
2015-10-11 17:19:38 +02:00
Girish Ramakrishnan
57446fce45
Bump the graphite image
2015-10-10 09:57:07 -07:00
Girish Ramakrishnan
3666eabb98
fix oldConfig madness
...
There is a crash when:
* App is configured. So, oldConfig now has {loc, access, portb }
* Cloudron is restored. The restore code path accesses the oldConfig.manifest.addons.
oldConfig is basically a messaging passing thing. It's not really a
db field. With that spirit, we simply pass an empty message in setup_infra.sh
2015-10-09 11:59:25 -07:00
Girish Ramakrishnan
2e1e1632c5
fix comment
2015-10-09 11:48:59 -07:00
Girish Ramakrishnan
c804689673
code path applies to upgraded cloudrons as well
2015-10-09 11:08:54 -07:00
Girish Ramakrishnan
69894a6319
Add oldConfigJson in schema file
2015-10-09 11:08:16 -07:00
Girish Ramakrishnan
639ca54469
fix typo
2015-10-09 10:04:50 -07:00
Girish Ramakrishnan
7a91ffc275
mail: not required to expose port 25
2015-10-09 09:56:37 -07:00
Girish Ramakrishnan
52b59477b4
print mail server ip
2015-10-09 09:50:50 -07:00
Girish Ramakrishnan
30217e646a
mail now runs on port 2500
2015-10-09 09:29:17 -07:00
Girish Ramakrishnan
1af444c427
mail now runs on port 2500
2015-10-09 09:13:28 -07:00
Johannes Zellner
3578f41805
prefix oauth client id and app ids
2015-10-09 11:45:53 +02:00
Johannes Zellner
522df478bf
add simpleauth addon hooks
2015-10-09 11:44:32 +02:00
Johannes Zellner
7cc94df97e
Add simple auth routes
2015-10-09 11:37:46 +02:00
Johannes Zellner
13666a4a15
Add simple auth route handlers
2015-10-09 11:37:39 +02:00
Johannes Zellner
183b4407f8
Add simple auth logic for login/logout
2015-10-09 11:37:17 +02:00
Johannes Zellner
c3de4c2cd9
Update node modules to support v4.1.1
...
The sqlite3 versions we had used so far did not work with
new node versions
2015-10-09 10:15:10 +02:00
Girish Ramakrishnan
348436ba7f
Reword upgrade warning
2015-10-08 16:31:44 -07:00
Girish Ramakrishnan
b8ebad4b50
new test image 3.0.0
2015-10-08 16:07:14 -07:00
Girish Ramakrishnan
5155debbcc
make rootfs readonly based on targetBoxVersion
2015-10-08 11:48:33 -07:00
Girish Ramakrishnan
e1b98191eb
Launch apps with readonly rootfs
...
We explicitly mark /tmp, /run and /var/log as writable volumes.
Docker creates such volumes in it's own volumes directory. Note
that these volumes are separate from host binds (/app/data).
When removing the container the docker created volumes are
removed (but not host binds).
Fixes #196
2015-10-08 11:33:17 -07:00
Girish Ramakrishnan
8c4c1e5471
run addons as readonly
2015-10-08 11:07:28 -07:00
Girish Ramakrishnan
dd6891efcb
update mail image
2015-10-08 11:06:29 -07:00
Girish Ramakrishnan
8213f5e311
mongodb: readonly rootfs
2015-10-08 10:24:15 -07:00
Girish Ramakrishnan
ed3f22a6ff
mysql: readonly rootfs
2015-10-08 09:43:05 -07:00
Girish Ramakrishnan
15592bf6d1
postgresql: readonly rootfs
2015-10-08 09:20:25 -07:00
Girish Ramakrishnan
dbde03de14
redis: use readonly rootfs
2015-10-08 09:00:43 -07:00
Girish Ramakrishnan
54d87828a4
pass options param in setup call
2015-10-08 02:08:27 -07:00
Girish Ramakrishnan
e72755c1ae
Do not send app down mails for dev mode apps
...
Fixes #501
2015-10-07 18:46:48 -07:00
Girish Ramakrishnan
b83775f9de
pass addon options to all functions
2015-10-07 16:10:08 -07:00
Girish Ramakrishnan
ece4a9e938
rename setup and teardown functions of oauth addon
2015-10-07 15:55:57 -07:00
Girish Ramakrishnan
27999f1779
remove token addon, its a relic of the past
2015-10-07 15:44:55 -07:00
Johannes Zellner
22798339c3
Also unset the returnTo after login
2015-10-01 16:26:17 +02:00
Johannes Zellner
44b9e3b122
Reset the target url after oauth login
...
This is required for the cloudron button to work for users
which are not logged in
2015-10-01 16:16:29 +02:00
Johannes Zellner
4842856427
Keep checkInstall in sync
2015-09-30 16:12:51 +02:00
Girish Ramakrishnan
8a6ba963dc
fix test image version
2015-09-29 20:22:38 -07:00
Girish Ramakrishnan
2fbd1975c8
redirect stderr
2015-09-29 19:23:39 -07:00
Girish Ramakrishnan
7ff9d71ebb
Fix EE leak warning
2015-09-29 14:40:23 -07:00
Girish Ramakrishnan
b19cf05e89
use newer test image that dies immediately on stop/term
2015-09-29 14:33:07 -07:00
Girish Ramakrishnan
0383a036de
new version of mysql prints error with -p
2015-09-29 14:13:58 -07:00
Girish Ramakrishnan
4105c95c6a
refactor our test docker image details
2015-09-29 13:59:17 -07:00
Girish Ramakrishnan
fa8bbe4713
rename test iamge under cloudron/
2015-09-29 12:52:54 -07:00
Girish Ramakrishnan
35a0935ae0
retry pulling image
...
fixes #497
2015-09-29 12:47:03 -07:00
Girish Ramakrishnan
cd42dc9973
debug the status code as well
2015-09-28 23:18:50 -07:00
Girish Ramakrishnan
3ac9dc3d6f
stringify object when appending to string
2015-09-28 23:10:09 -07:00
Girish Ramakrishnan
3b2cf8fa79
new base image 0.4.0
2015-09-28 19:33:58 -07:00
Girish Ramakrishnan
911553c601
Use fqdn to generate domain name of txt records
2015-09-28 17:20:59 -07:00
Girish Ramakrishnan
4290471ac1
Ensure TXT records are added as dotted domains
...
Fixes #498
2015-09-28 16:35:58 -07:00
Girish Ramakrishnan
04170dd701
Send dns status requests in series
...
And abort status checking after the first one fails. Otherwise, this
bombards the appstore unnecessarily. And checks for status of other
things unnecessarily.
2015-09-28 16:23:39 -07:00
Girish Ramakrishnan
b446d83a55
ldap: allow non-anonymous searches
...
Add LDAP_BIND_DN and LDAP_BIND_PASSWORD that allow
apps to bind before a search. There appear to be two kinds of
ldap flows:
1. App simply binds using cn=<username>,$LDAP_USERS_BASE_DN. This
works swimmingly today.
2. App searches the username under a "bind_dn" using some admin
credentials. It takes the result and uses the first dn in the
result as the user dn. It then binds as step 1.
This commit tries to help out the case 2) apps. These apps really
insist on having some credentials for searching.
2015-09-25 21:28:47 -07:00
Girish Ramakrishnan
0ace396f17
Remove old app ids from updatechecker state
...
Fixes #472
2015-09-22 22:46:14 -07:00
Girish Ramakrishnan
bd0e19db48
debug message when notification is skipped
2015-09-22 22:41:42 -07:00
Girish Ramakrishnan
cf808659ba
Fix typo
2015-09-22 20:22:17 -07:00
Girish Ramakrishnan
f5207db447
Save version instead of boolean so we get notified when version changes
...
part of #472
2015-09-22 16:11:15 -07:00
Girish Ramakrishnan
9576b53414
save/restore notification state of updatechecker
...
part of #472
2015-09-22 16:11:04 -07:00
Girish Ramakrishnan
fcb2914a2a
Fix progress message
2015-09-22 13:02:09 -07:00
Johannes Zellner
7d76353527
Remove start/stop buttons in webadmin
...
Fixes #495
2015-09-22 22:00:42 +02:00
Johannes Zellner
f31207585d
app.js is no more
2015-09-22 22:00:42 +02:00
Girish Ramakrishnan
2ac7d64560
Do a complete backup for updates
...
The backup cron job ensures backups every 4 hours which simply does
a 'box' backup listing. If we do only a 'box' backup during update,
this means that this cron job skips doing a backup and thus the apps
are not backed up.
This results in the janitor on the CaaS side complaining that the
app backups are too old.
Since we don't stop apps anymore during updates, it makes sense
to simply backup everything for updates as well. This is probably
what the user wants anyway.
2015-09-22 12:51:58 -07:00
Girish Ramakrishnan
0c5ce31d88
better debugs
2015-09-21 16:02:58 -07:00
Girish Ramakrishnan
d09213c385
Fix typo
2015-09-21 15:57:06 -07:00
Girish Ramakrishnan
ec41918cbc
copy old backup as failed/errored apps
...
This ensures that
a) we don't get emails from janitor about bad app backups
b) that the backups are persisted over the s3 lifecycle
Fixes #493
2015-09-21 15:03:10 -07:00
Girish Ramakrishnan
1185ccf015
add backups.copyLastBackup
2015-09-21 14:14:43 -07:00
Girish Ramakrishnan
06bf1d084b
aws: add copyObject
2015-09-21 14:02:00 -07:00
Girish Ramakrishnan
924011e411
Add custom apparmor profile for cloudron apps
...
Docker generates an apparmor profile on the fly under /etc/apparmor.d/docker.
This profile gets overwritten on every docker daemon start.
This profile allows processes to ptrace themselves. This is required by
circus (python process manager) for reasons unknown to me. It floods the logs
with
audit[7623]: <audit-1400> apparmor="DENIED" operation="ptrace" profile="docker-default" pid=7623 comm="python3.4" requested_mask="trace" denied_mask="trace" peer="docker-default"
This is easily tested using:
docker run -it cloudron/base:0.3.3 /bin/bash
a) now do ps
b) journalctl should show error log as above
docker run --security-opt=apparmor:docker-cloudron-app -it cloudron/base:0.3.3 /bin/bash
a) now do ps
b) no error!
Note that despite this, the process may not have ability to ptrace since it does not
have CAP_PTRACE. Also, security-opt is the profile name (inside the apparmor config file)
and not the filename.
References:
https://groups.google.com/forum/#!topic/docker-user/xvxpaceTCyw
https://github.com/docker/docker/issues/7276
https://bugs.launchpad.net/ubuntu/+source/docker.io/+bug/1320869
This is an infra update because we need to recreate containers to get the right profile.
Fixes #492
2015-09-21 11:01:44 -07:00
Girish Ramakrishnan
4c0cb7be5b
Add custom debug.formatArgs to remove timestamp prefix in logs
...
Fixes #490
See also:
https://github.com/visionmedia/debug/issues/216
2015-09-21 09:05:14 -07:00
Girish Ramakrishnan
98287dd9f5
remove unnecessary supererror call
2015-09-21 09:04:16 -07:00
Girish Ramakrishnan
6e86d4cf84
use correct timezone in updater
...
fixes #491
2015-09-18 14:46:44 -07:00
Girish Ramakrishnan
cf813f053d
timezone detection is based on browser location/ip and not cloudron region intentionally
2015-09-18 13:40:22 -07:00
Girish Ramakrishnan
e616db6c5f
print body on failure
2015-09-18 12:03:48 -07:00
Girish Ramakrishnan
ad71662bf8
timezone is already determined automatically using activation
2015-09-18 12:02:36 -07:00
Girish Ramakrishnan
eab4c19d36
print tz for debugging
2015-09-18 10:51:52 -07:00
Girish Ramakrishnan
d41f6e2953
clear backup progress when initiating backup
...
this ensures that tools can do:
1. backup
2. wait_for_backup
without the synchronous clear, we might get the progress state of
an earlier backup.
2015-09-17 21:17:59 -07:00
Girish Ramakrishnan
1f2f6e5d60
cloudron.backup does not wait for backup to complete
2015-09-17 16:35:59 -07:00
Girish Ramakrishnan
1297b85cb8
add comment for purpose on internal server
2015-09-17 16:27:46 -07:00
Girish Ramakrishnan
a8522f6073
Store dates as iso strings in database
...
ideally, the database schema should be TIMESTAMP
2015-09-17 13:51:55 -07:00
Girish Ramakrishnan
44c153b5bd
Use the default timezone in settings
...
Fixes #485
2015-09-16 16:36:08 -07:00
Girish Ramakrishnan
ddde1f5a41
store timezone in config.js (part of provision data)
2015-09-16 15:54:56 -07:00
Girish Ramakrishnan
44d4d1fa67
Remove debug that is flooding the logs
2015-09-16 10:50:15 -07:00
Girish Ramakrishnan
40b6d7413d
Do not set process.env.NODE_TLS_REJECT_UNAUTHORIZED
...
Doing so will affect all https requests which is dangerous.
We have these options to solve this:
1. Use superagent.ca(). Appstore already provides wildcard certs
for dev, staging signed with appstore_ca. But we then need to
send across the appstore_ca cert across in the provision call.
This is a bit of work.
2. Convert superagent into https.request calls and use the
rejectUnauthorized option.
3. Simply use http. This is what is done in this commit.
Fixes #488
2015-09-16 10:36:03 -07:00
Girish Ramakrishnan
dccf9056e0
reserve the ldap and oauthproxy port
2015-09-16 10:12:59 -07:00
Girish Ramakrishnan
92e8af2434
Get oauth proxy port from the configs
2015-09-16 10:06:34 -07:00
Johannes Zellner
bdb674aed1
Do not show the update action button in non mobile view
2015-09-16 09:36:46 +02:00
Johannes Zellner
b91db1ea93
Add tooltip text for the app action icons
2015-09-16 09:36:22 +02:00
Johannes Zellner
3338200ab6
Show indicator when app update is available
...
Fixes #489
2015-09-16 09:28:43 +02:00
Girish Ramakrishnan
1d4d755491
journalctl seems to barf on this debug
2015-09-15 20:50:22 -07:00
Girish Ramakrishnan
f80a90813e
Make the times absurdly high but that is how long in takes
2015-09-15 18:56:25 -07:00
Girish Ramakrishnan
809a946ab5
error is undefined
2015-09-15 18:27:09 -07:00
Girish Ramakrishnan
dbab646c77
oldConfig.location can be null
...
If we had an update, location is not part of oldConfig. if we now do
an infra update, location is undefined.
2015-09-15 18:08:29 -07:00
Girish Ramakrishnan
5e8c3d2948
Explicity debug the fields
...
for some reason, journalctl barfs on this line
2015-09-15 14:55:20 -07:00
Girish Ramakrishnan
241fe10b7a
apptask: retry for external error as well
2015-09-14 21:45:27 -07:00
Girish Ramakrishnan
aad48ecbca
Return busy code for 420 response
2015-09-14 21:44:44 -07:00
Girish Ramakrishnan
20cc85a328
context is raw text
2015-09-14 17:25:27 -07:00
Girish Ramakrishnan
88f28c6fab
add note on how to test the oom
2015-09-14 17:20:30 -07:00
Girish Ramakrishnan
e967e50238
Print OOM context
2015-09-14 17:18:11 -07:00
Girish Ramakrishnan
e119acbfc4
Do not reconnect for now
2015-09-14 17:10:49 -07:00
Girish Ramakrishnan
02a55c2aaf
fix typo
2015-09-14 17:07:44 -07:00
Girish Ramakrishnan
c154ab42e5
Provide app information if possible
2015-09-14 17:06:04 -07:00
Girish Ramakrishnan
87301c8784
Add appdb.getByContainerId
2015-09-14 17:01:04 -07:00
Girish Ramakrishnan
73e3ae1665
Get notification on app oom
...
currently, oom events arrive a little late :
https://github.com/docker/docker/issues/16074
fixes #489
2015-09-14 16:51:32 -07:00
Girish Ramakrishnan
402956f200
apphealthmonitor.js is not executable
2015-09-14 16:51:32 -07:00
Girish Ramakrishnan
e415a3ac80
Remove supererror setup in oauthproxy and apphealthmonitor
2015-09-14 16:49:10 -07:00
Girish Ramakrishnan
d12af89e2e
set memory limits for addons
...
mysql, postgresql, mongodb - 100m each
mail, graphite, redis (each instance) - 75m
For reference, in yellowtent:
mongo - 5m
postgresql - 33m
mysql - 3.5m
mail: 26m
graphite - 26m
redis - 32m
2015-09-14 13:47:45 -07:00
Girish Ramakrishnan
bdb8c42696
fix require paths
2015-09-14 13:00:03 -07:00
Girish Ramakrishnan
c41cacd5e9
remove oauthproxy systemd configs
2015-09-14 12:02:38 -07:00
Girish Ramakrishnan
555c083f40
merge oauthproxy server into box server
2015-09-14 11:58:28 -07:00
Girish Ramakrishnan
ac90713a2f
refactor code to prepare for merge into box server
2015-09-14 11:28:49 -07:00
Girish Ramakrishnan
720b92a188
oauthproxy: refactor for readability
2015-09-14 11:22:33 -07:00
Girish Ramakrishnan
ca1e1aee65
apphealthmonitor is not a executable anymore
2015-09-14 11:09:58 -07:00
Girish Ramakrishnan
f13ad321ea
Fix typo in assert
2015-09-14 11:09:41 -07:00
Girish Ramakrishnan
4492ad6d18
Add apphealthmonitor.stop
2015-09-14 11:02:06 -07:00
Girish Ramakrishnan
d47eaa93f6
Add ldap.stop
2015-09-14 11:01:35 -07:00
Girish Ramakrishnan
5eb7a0b64f
Merge apphealthtask into box server
...
We used to run this as a separate process but no amount of node/v8 tweaking
makes them run as standalone with 50M RSS.
Three solutions were considered for the memory issue:
1. Use systemd timer. apphealthtask needs to run quiet frequently (10 sec)
for the ui to get the app health update immediately after install.
2. Merge into box server (this commit)
3. Increase memory to 80M. This seems to make apphealthtask run as-is.
2015-09-14 10:52:11 -07:00
Girish Ramakrishnan
22718cfb02
Rename app.js to box.js
2015-09-14 10:43:47 -07:00
Johannes Zellner
bcb8ebe9f1
choose aws subdomain backend for test purpose
2015-09-13 22:02:04 +02:00
Johannes Zellner
d5055ecde0
Also send data with the domain deletion
2015-09-13 22:02:04 +02:00
Johannes Zellner
8d7ba6418a
Use caas.js for subdomain business
2015-09-13 22:02:04 +02:00
Johannes Zellner
c17bc54ae4
Add initial caas.js
2015-09-13 22:02:04 +02:00
Girish Ramakrishnan
2ec6c4ec77
make janitor a systemd timer
...
one process lesser
2015-09-11 18:43:51 -07:00
Girish Ramakrishnan
a1ddad7b7a
limit node memory usage
...
node needs to be told how much space it can usage, otherwise it keeps
allocating and we cannot keep it under 50M. keeping old space to 30M,
lets the memory hover around 40M
there are many options to v8 but I haven't explored them all:
--expose_gc - allows scripts to call gc()
--max_old_space_size=30 --max_semi_space_size=2048 (old/new space)
node first allocates new objects in new space. if these objects are in use
around for some time, it moves them to old space. the idea here is that it
runs gc aggressively on new space since new objects die more than old ones.
the new space is split into two halves of equal size called semi spaces.
--gc_interval=100 --optimize_for_size --max_executable_size=5 --gc_global --stack_size=1024
http://erikcorry.blogspot.com/2012/11/memory-management-flags-in-v8.html
http://jayconrod.com/posts/55/a-tour-of-v8-garbage-collection
https://code.google.com/p/chromium/issues/detail?id=280984
http://stackoverflow.com/questions/30252905/nodejs-decrease-v8-garbage-collector-memory-usage
http://www.appfruits.com/2014/08/running-node-js-on-arduino-yun/
note: this is not part of shebang because linux shebang does not support args! so we cannot
pass node args as part of shebang.
2015-09-10 21:24:36 -07:00
Girish Ramakrishnan
d5b787b7f0
set memorylimit for crashnotifier as well
2015-09-10 14:19:44 -07:00
Girish Ramakrishnan
db6c9a8fbd
Fix app autoupdater logic
...
The main issue was that app.portBindings is never null but { }
2015-09-10 11:39:29 -07:00
Girish Ramakrishnan
eeb41d45d0
ssh is now on port 919
2015-09-10 10:08:40 -07:00
Johannes Zellner
691380162f
Warn the user when he performs an upgrade instead of update
...
Fixes #481
2015-09-10 14:33:00 +02:00
Johannes Zellner
ebbc1620c7
We do have global rest error handler which take care of re-login
2015-09-10 14:16:59 +02:00
Johannes Zellner
d8e85ee000
Force reload page if version has changed
...
Fixes #480
2015-09-10 13:58:27 +02:00
Johannes Zellner
a249315b0e
Ensure the stylesheets are in correct order
...
Fixes #484
2015-09-10 13:32:33 +02:00
Girish Ramakrishnan
1b87b4405e
Wait upto 3 seconds for the app to quit
...
Otherwise systemd will kill us and we get crash emails.
Fixes #483
2015-09-09 16:57:43 -07:00
Girish Ramakrishnan
610fb01ad2
make apps test work
2015-09-09 15:51:56 -07:00
Girish Ramakrishnan
4859db4919
lint
2015-09-09 15:03:43 -07:00
Girish Ramakrishnan
b112df7495
test: make unregister subdomain test work
2015-09-09 14:36:09 -07:00
Girish Ramakrishnan
d5751cc5cf
test: make register subdomain work
2015-09-09 14:32:05 -07:00
Girish Ramakrishnan
f84fc67913
error is already Error
2015-09-09 14:26:53 -07:00
Girish Ramakrishnan
1aacfd5ca0
make aws endpoint configurable for tests
2015-09-09 12:03:47 -07:00
Girish Ramakrishnan
d5b7313b2c
intercept delete calls to test image
2015-09-09 11:32:09 -07:00
Girish Ramakrishnan
afd6c6abaa
give taskmanager couple of seconds to kill all processes
2015-09-09 10:39:38 -07:00
Girish Ramakrishnan
c325406160
fix initialization of apps-test
2015-09-09 10:22:17 -07:00
Girish Ramakrishnan
8f480a1dee
remove dead code
2015-09-09 09:28:06 -07:00
Johannes Zellner
811c33b99b
Use memoryLimit from manifest for graphs if specified
2015-09-09 17:11:54 +02:00
Johannes Zellner
706ee6e1d8
Remove upgrade view altogether
2015-09-09 16:47:13 +02:00
Johannes Zellner
9b9f03123c
Remove upgrade link in the menu
2015-09-09 16:46:28 +02:00
Johannes Zellner
ca689b1091
Actually hand the backupKey over in an update
2015-09-09 12:37:09 +02:00
Girish Ramakrishnan
4c941a21cf
call iteratorDone when finished
2015-09-09 00:43:42 -07:00
Girish Ramakrishnan
f0745b0e6d
make cloudron-test pass
2015-09-08 22:13:50 -07:00
Girish Ramakrishnan
255cb31109
provide default backupPrefix for tests
2015-09-08 21:16:50 -07:00
Girish Ramakrishnan
103b7403d7
better debug messages
2015-09-08 21:11:46 -07:00
Girish Ramakrishnan
bba53fc6ff
awscredentials is now POST
2015-09-08 21:02:21 -07:00
Girish Ramakrishnan
b8ea97521d
disable failing subdomains test
...
This needs aws mock
2015-09-08 20:38:52 -07:00
Girish Ramakrishnan
3940c377b0
removeUser takes a userId and not username
2015-09-08 16:38:02 -07:00
Girish Ramakrishnan
a889eee925
retry registering and unregistering subdomain
2015-09-08 12:51:25 -07:00
Girish Ramakrishnan
f6b0d6b1c7
Remove ununsed error codes
2015-09-08 11:28:29 -07:00
Girish Ramakrishnan
095d06a2fc
Remove unused AWSError
2015-09-08 11:26:35 -07:00
Girish Ramakrishnan
995b95459a
Do not start apptask for apps that are installed and running
2015-09-08 10:24:39 -07:00
Girish Ramakrishnan
693fb1f7ef
Check if we have reached concurrency limit before locking
2015-09-08 10:20:34 -07:00
Johannes Zellner
1be1f2cb8e
Remove ... for labels while showing the progress bar
2015-09-08 15:49:10 +02:00
Johannes Zellner
4488da5f5f
Cleanup linter issues in updatechecker.js
2015-09-08 10:03:37 +02:00
Girish Ramakrishnan
a5e4d3cc86
systemd: fix crashnotifier
2015-09-07 21:40:01 -07:00
Girish Ramakrishnan
a259f97049
systemd: pass the instance name as argument
2015-09-07 21:16:22 -07:00
Girish Ramakrishnan
b32704a31b
Output some logs in crashnotifier
2015-09-07 21:10:00 -07:00
Girish Ramakrishnan
b5a51852d0
systemd: just wait for 5 seconds for box to die
2015-09-07 20:58:14 -07:00
Girish Ramakrishnan
6db422710e
systemd: do not restart crashnotifier
2015-09-07 20:54:58 -07:00
Girish Ramakrishnan
837860d138
200m is a more sane memory limit
2015-09-07 20:48:29 -07:00
Girish Ramakrishnan
d045ab2ec4
systemd: fix config files
2015-09-07 20:46:32 -07:00
Girish Ramakrishnan
1c83d32b26
disable pager when collecting logs
2015-09-07 20:27:27 -07:00
Girish Ramakrishnan
8718afb29a
Make crashnotifier.js executable
2015-09-07 20:15:13 -07:00
Girish Ramakrishnan
a596f2f385
systemd: Fix crashnotifier
2015-09-07 20:14:37 -07:00
Girish Ramakrishnan
43336d43db
Add memory limits on services
2015-09-07 19:16:34 -07:00
Girish Ramakrishnan
03325bfb0d
Move from supervisor to systemd
...
This removes logrotate as well since we use systemd logging
2015-09-07 14:31:25 -07:00
Girish Ramakrishnan
22bfa931a6
run upto 5 apptasks in parallel
...
fixes #482
2015-09-05 09:17:46 -07:00
Johannes Zellner
bdf221eb43
Revert "Add hack for broken app backup tarballs"
...
This reverts commit 9723951bfc .
2015-08-31 21:44:24 -07:00
Girish Ramakrishnan
9723951bfc
Add hack for broken app backup tarballs
2015-08-31 18:58:38 -07:00
Johannes Zellner
1740bb608b
Add missing records argument
2015-08-30 23:00:01 -07:00
Johannes Zellner
87e68e16cc
Fix debug tag
2015-08-30 22:54:52 -07:00
Johannes Zellner
2b7ee93259
Give default value to config.dnsInSync
2015-08-30 22:35:44 -07:00
Johannes Zellner
d1648ffa8c
Remove cloudron.config prior to every test run
2015-08-30 22:35:44 -07:00
Johannes Zellner
0df64a900f
Assert for dns record values
2015-08-30 22:35:44 -07:00
Johannes Zellner
e71e275493
Merge admin dns and mail dns setup
...
This now also checks if the mail records are in sync
2015-08-30 22:35:43 -07:00
Johannes Zellner
c3360d1538
give dns record changeIds as a result for addMany()
2015-08-30 22:35:43 -07:00
Johannes Zellner
ee546cd35d
Setup webadmin domain on the box side
2015-08-30 22:35:43 -07:00
Girish Ramakrishnan
642d759891
Fix css
2015-08-30 22:25:18 -07:00
Girish Ramakrishnan
4dae669802
reserved blocks are used
2015-08-30 22:24:57 -07:00
Girish Ramakrishnan
b30bff0342
Only display one donut for memory usage
2015-08-30 22:13:01 -07:00
Girish Ramakrishnan
5a392d309a
Reboot is a post route
2015-08-30 21:38:54 -07:00
Girish Ramakrishnan
48f93c50ab
Display upto 600mb for apps
2015-08-30 17:21:44 -07:00
Johannes Zellner
96f4b4463e
Reduce logging for aws credentials
2015-08-30 17:03:10 -07:00
Johannes Zellner
7d6763d4ef
Also always check for dns propagation
2015-08-30 17:00:23 -07:00
Johannes Zellner
788377fdf6
Remove wrong optimization for subdomain records
2015-08-30 16:54:33 -07:00
Johannes Zellner
a5770d879f
use config.appFqdn() to handle custom domains
2015-08-30 16:29:09 -07:00
Johannes Zellner
e8d7393135
Reuse dnsRecordId for record status id
2015-08-30 15:58:54 -07:00
Johannes Zellner
4fccc9a1f6
Query dns status with aws statusId
2015-08-30 15:51:33 -07:00
Johannes Zellner
367e9cfdc7
aws provides uppercase properties
2015-08-30 15:47:08 -07:00
Johannes Zellner
46164592cb
Fixup the zonename comparison
2015-08-30 15:37:18 -07:00
Johannes Zellner
391cc15540
Move subdomain management from appstore to box
2015-08-30 15:29:14 -07:00
Girish Ramakrishnan
6743dcf49f
Pass along aws config for updates
2015-08-27 22:45:04 -07:00
Girish Ramakrishnan
78e29004a5
Add missing quotes to cloudron.conf
2015-08-27 20:15:04 -07:00
Girish Ramakrishnan
600e8ecd49
Fix failing test
2015-08-27 11:43:36 -07:00
Girish Ramakrishnan
c7b8d287ff
check if response has credentials object
2015-08-27 11:43:02 -07:00
Girish Ramakrishnan
d7a8cda054
Fix backup response
2015-08-27 11:19:40 -07:00
Girish Ramakrishnan
fcbc4c421a
Fix backup test
2015-08-27 11:17:36 -07:00
Girish Ramakrishnan
416d53dccf
bash: quote the array expansion
2015-08-27 10:13:05 -07:00
Girish Ramakrishnan
e21f290468
bash: quoting array expansion because thats how it is
2015-08-27 09:49:44 -07:00
Girish Ramakrishnan
208f771672
bash: empty array expansion barfs with set -u
2015-08-27 09:33:40 -07:00
Girish Ramakrishnan
1ac1a40759
Fix coding style
2015-08-27 09:30:32 -07:00
Girish Ramakrishnan
fba445ded3
getSignedDownloadUrl must return an object with url and sessionToken
2015-08-27 09:26:19 -07:00
Johannes Zellner
c943989e47
pass full box data to the update
2015-08-26 10:59:17 -07:00
Johannes Zellner
942e97c7f7
Send new version to update to to the installer
2015-08-26 09:42:48 -07:00
Johannes Zellner
499a91a605
make restoreapp.sh support aws session tokens
2015-08-26 09:14:15 -07:00
Johannes Zellner
eba93f2b39
Generate app restore urls locally
2015-08-26 09:11:28 -07:00
Johannes Zellner
0203268ba4
appBackupIds are not needed for backup url generation
2015-08-26 09:06:45 -07:00
Johannes Zellner
ab127799bf
Load our style sheet as early as possible
2015-08-25 21:59:01 -07:00
Johannes Zellner
e597dae360
use backupKey from userData
2015-08-25 18:44:52 -07:00
Girish Ramakrishnan
c6a755d2b1
backupKey is a function
2015-08-25 18:37:51 -07:00
Johannes Zellner
1c5170fcea
Support optional aws related userData
2015-08-25 17:52:01 -07:00
Johannes Zellner
5d1422d69c
Use locally generate signed urls for app backup
2015-08-25 17:52:01 -07:00
Johannes Zellner
e96123ddc4
Support session tokens in backupapp.sh
2015-08-25 17:52:00 -07:00
Johannes Zellner
ab4ce684dd
Only federated tokens need session token
2015-08-25 17:52:00 -07:00
Johannes Zellner
6107e2da54
Also send the restoreKey for the backup done webhook
2015-08-25 17:52:00 -07:00
Johannes Zellner
75d9215f33
Also send the sessionToken when using the pre-signed url
2015-08-25 17:52:00 -07:00
Johannes Zellner
ec8ad39db3
Translate the federated credentials
2015-08-25 17:52:00 -07:00
Johannes Zellner
fd48b7805a
AWS credential creation returns 201
2015-08-25 17:52:00 -07:00
Johannes Zellner
a300f18742
AWS credentials are now dealt with a level down
2015-08-25 17:52:00 -07:00
Johannes Zellner
6632b89c2e
Use dev bucket for now as a default
2015-08-25 17:52:00 -07:00
Johannes Zellner
dbfa78ec59
Use signed urls for upload on the box side
2015-08-25 17:52:00 -07:00
Johannes Zellner
a223ae2118
Add config.aws().backupPrefix
2015-08-25 17:52:00 -07:00
Johannes Zellner
6cecc010df
Add getSignedUploadUrl() to aws.js
2015-08-25 17:52:00 -07:00
Johannes Zellner
189553dbfe
move aws-sdk from dev to normal dependencies
2015-08-25 17:52:00 -07:00
Johannes Zellner
576d2a9c1f
Return aws credentials from config.js
2015-08-25 17:52:00 -07:00
Johannes Zellner
f68344aba6
refactor backupBoxWithAppBackupIds()
2015-08-25 17:52:00 -07:00
Johannes Zellner
a80ad501f0
Add webhooks.js
2015-08-25 17:51:59 -07:00
Johannes Zellner
f820d8b113
Construct backupUrl locally
2015-08-25 17:51:59 -07:00
Johannes Zellner
c5cc03b200
Add initial aws object to config.js
2015-08-25 17:51:59 -07:00
Johannes Zellner
85cec833b4
Add backupKey to config
2015-08-25 17:51:59 -07:00
Johannes Zellner
afad9502a3
Add aws.js
2015-08-25 17:51:59 -07:00
Johannes Zellner
ee9d0f2eca
Fix typo in backupapp.sh help output
2015-08-25 17:51:59 -07:00
Girish Ramakrishnan
b0a2344507
Merge data into args
2015-08-25 15:55:52 -07:00
Girish Ramakrishnan
fb3c61d722
Fix boolean logic
2015-08-25 12:24:02 -07:00
Girish Ramakrishnan
2d784c0827
Add force argument
...
This fixes crash when auto-updating apps
2015-08-25 10:01:20 -07:00
Girish Ramakrishnan
cfecaba2cb
oldConfig can be null during a restore/upgrade
2015-08-25 09:59:44 -07:00
Girish Ramakrishnan
8b5e04d5e9
Update manifestformat@1.7.0
2015-08-24 22:56:02 -07:00
Girish Ramakrishnan
7ced2880d8
Read memoryLimit from manifest
2015-08-24 22:44:35 -07:00
Girish Ramakrishnan
db557fd241
Show upto 200mb
2015-08-24 22:39:06 -07:00
Girish Ramakrishnan
8a50a69a92
Set app memory limit to 200MB (includes 100 MB swap)
2015-08-24 21:58:19 -07:00
Girish Ramakrishnan
559ae64e38
Add RSTATE_ERROR
2015-08-24 21:58:19 -07:00
Girish Ramakrishnan
ce9566a72e
Rebase addons to use base image 0.3.3
2015-08-24 10:19:18 -07:00
Johannes Zellner
5b90a66e0f
Fix form submit with enter for update form
2015-08-22 17:21:25 -07:00
Johannes Zellner
932c427116
Use POST heartbeat route instead of GET
2015-08-22 16:51:56 -07:00
Johannes Zellner
985f0ccf85
Offset the footer in apps view
2015-08-20 23:50:52 -07:00
Girish Ramakrishnan
c1f7041273
Delete image only if it changed
...
This optimization won't work if we have two dockerImage with same
image id....
2015-08-19 14:24:32 -07:00
Girish Ramakrishnan
e372ebba92
Check for dockerImage in manifest in install/update/restore routes
2015-08-19 11:08:45 -07:00
Girish Ramakrishnan
b6ab08e133
restore without a backup is the same as re-install
2015-08-19 11:00:00 -07:00
Girish Ramakrishnan
3f83e94e96
CN of admin group is admins
2015-08-18 16:35:52 -07:00
Girish Ramakrishnan
58a0e8ecf8
Base image is now 0.3.3
2015-08-18 15:43:50 -07:00
Girish Ramakrishnan
14fe0461f7
containerId can be null
2015-08-18 15:43:50 -07:00
Girish Ramakrishnan
4a86351b4e
Clean up the old image and not the current one
2015-08-18 10:01:15 -07:00
Johannes Zellner
746438ab35
Hide update input fields and update button if it is blocked by apps
2015-08-18 16:59:36 +02:00
Johannes Zellner
5a0fee6441
Add note, why sendError() is required
2015-08-18 16:53:29 +02:00
Johannes Zellner
9ae95fe94e
Revert "remove obsolete sendError() function"
...
This reverts commit 5d9b122dd5 .
2015-08-18 16:49:53 +02:00
Girish Ramakrishnan
b389019588
leave a note about force_update
2015-08-17 21:30:56 -07:00
Girish Ramakrishnan
002450200f
Remove ununsed require
2015-08-17 21:23:32 -07:00
Girish Ramakrishnan
7069cd1061
Fix debug message
2015-08-17 21:23:27 -07:00
Girish Ramakrishnan
01de1ecb53
Do not remove icon for non-appstore installs
...
Fixes #466
2015-08-17 19:37:51 -07:00
Girish Ramakrishnan
ac711b76da
Add a note why oldConfig can be null
2015-08-17 10:05:07 -07:00
Johannes Zellner
5d9b122dd5
remove obsolete sendError() function
2015-08-17 14:55:56 +02:00
Johannes Zellner
2881024b20
Move appstore badges out of the way for the app titles
2015-08-17 11:50:31 +02:00
Johannes Zellner
cdf81f3125
Correctly mark apps pending for approval
...
Fixes #339
2015-08-17 11:50:08 +02:00
Girish Ramakrishnan
6cbd0b19d9
Print graphite container id
2015-08-13 15:57:36 -07:00
Girish Ramakrishnan
a09ebc64d1
fix graph issue finally
2015-08-13 15:54:27 -07:00
Girish Ramakrishnan
45f1d340d7
Use latest graphite
2015-08-13 15:53:36 -07:00
Girish Ramakrishnan
ea1b3d68a9
Create symlink in start.sh (and not container setup)
2015-08-13 15:36:21 -07:00
Girish Ramakrishnan
27789eab15
restart mysql in start.sh and not container setup
2015-08-13 15:16:01 -07:00
Girish Ramakrishnan
ed2a2dca73
restart collectd
2015-08-13 15:04:57 -07:00
Girish Ramakrishnan
4a29beafb3
fix graphs again
2015-08-13 15:03:44 -07:00
Girish Ramakrishnan
8a68b35594
Fix typo
...
remove thead_cache_size. it's dynamic anyways
2015-08-13 14:53:05 -07:00
Girish Ramakrishnan
b1c87dfa2a
Revert "Add hack to make graphs work with latest collectd"
...
This reverts commit a959418544 .
2015-08-13 14:42:47 -07:00
Girish Ramakrishnan
32f624bd27
limit threads and max connections
2015-08-13 14:42:36 -07:00
Girish Ramakrishnan
4a9f5a0466
Bump infra version
2015-08-13 14:22:39 -07:00
Girish Ramakrishnan
a959418544
Add hack to make graphs work with latest collectd
...
For some reason df-vda1 is not being collected by carbon. I have tried
all sorts of things and nothing works. This is a hack to get it working.
2015-08-13 13:47:44 -07:00
Girish Ramakrishnan
8bbfcea072
Turn off performance_schema in mysql 5.6
2015-08-13 13:47:44 -07:00
Girish Ramakrishnan
350c3e31c6
Remove unused nodejs-disks
2015-08-13 10:34:06 -07:00
Girish Ramakrishnan
f112293d45
systemd has moved around the cgroup hierarchy
...
https://github.com/docker/docker/issues/9902
There is some rationale here:
https://libvirt.org/cgroups.html
2015-08-13 10:21:33 -07:00
Girish Ramakrishnan
c62c9ef566
CpuShares is part of HostConfig
2015-08-12 23:47:35 -07:00
Girish Ramakrishnan
d73295d596
Add warning
2015-08-12 19:52:23 -07:00
Girish Ramakrishnan
003554ace8
Use BASE_IMAGE as well
2015-08-12 19:51:44 -07:00
Girish Ramakrishnan
8895a350ed
Fix graphite version
2015-08-12 19:51:08 -07:00
Girish Ramakrishnan
ae6c74ded1
Put image names in one place
2015-08-12 19:38:44 -07:00
Girish Ramakrishnan
373445bb70
Use latest images
2015-08-12 19:19:58 -07:00
Johannes Zellner
50eb677573
Prevent accessing oldConfig if it does not exist
2015-08-12 21:17:52 +02:00
Johannes Zellner
a647aecfa9
Add ldap 'users' group
2015-08-12 17:38:31 +02:00
Johannes Zellner
91d7869115
Add ldap search unit tests
2015-08-12 15:31:54 +02:00
Johannes Zellner
2a8c641a9e
Add ldap memberof attribute
2015-08-12 15:31:44 +02:00
Johannes Zellner
df71238ed6
Add initial ldap unit tests
2015-08-12 15:00:38 +02:00
Johannes Zellner
ae81938366
Ensure the focus is properly set when restoring
2015-08-12 14:35:51 +02:00
Johannes Zellner
156913fbc4
Better integrate the progress bar
2015-08-12 14:32:20 +02:00
Johannes Zellner
14185d7cc0
Improve login form layout
2015-08-12 14:23:13 +02:00
Johannes Zellner
4bd8a99aaa
Give appstore hover a different color
2015-08-12 14:07:40 +02:00
Johannes Zellner
24296b2649
Make webadmin pages a bit more streamlined with padding
2015-08-12 13:48:55 +02:00
Girish Ramakrishnan
9f2a10da31
Apps must only get 50% less cpu than system processes when there is a contention for cpu
2015-08-11 17:00:48 -07:00
Johannes Zellner
c56b3ab845
Increase installed app title
2015-08-11 15:22:30 +02:00
Johannes Zellner
ce77334ce6
Hide geeky toolbar in apps icons
2015-08-11 13:04:50 +02:00
Girish Ramakrishnan
00242922ed
Fix redis installation on 1.7
2015-08-10 23:00:24 -07:00
Girish Ramakrishnan
f69e7d2201
r -> ro (docker 1.7)
2015-08-10 21:14:28 -07:00
Girish Ramakrishnan
3043a6f335
Create docker volume directories since docker 1.7 does not create them
2015-08-10 21:00:56 -07:00
Girish Ramakrishnan
1cbee4d33b
addons can be null in apps.backupApp
...
addons.backup already takes care of null.
a future commit will give defaults for all non-default manifest fields
at some point and document them as so
2015-08-10 13:47:51 -07:00
Girish Ramakrishnan
d757ca02fb
Keep linter happy
2015-08-10 13:42:04 -07:00
Johannes Zellner
743e13fddc
Allow non published versions to be shown if explicitly requested
...
Fixes #468
2015-08-10 16:16:40 +02:00
Johannes Zellner
468dbfd353
Do not use table layout for login view
...
Fixes #458
2015-08-10 15:26:45 +02:00
Johannes Zellner
cc8105bd70
Show cloudron name in login screen
2015-08-10 15:04:12 +02:00
Johannes Zellner
8b1d58a4fb
Show cloudron avatar in login screen
2015-08-10 15:01:58 +02:00
Johannes Zellner
5840c35b19
Restructure the login page
2015-08-10 14:51:04 +02:00
Johannes Zellner
a93d26fdd1
Since addons are optional, ensure we have a valid empty object in the db
2015-08-10 10:37:55 +02:00
Johannes Zellner
009f1fe907
If we have an empty app search show modal dialog link
2015-08-09 15:19:21 +02:00
Johannes Zellner
9847c09df8
Make appstore feedback form a modal dialog
2015-08-09 14:48:00 +02:00
Girish Ramakrishnan
9039ca2123
collect logs using a sudo script
...
docker logs can only be read by root
2015-08-08 19:04:59 -07:00
Girish Ramakrishnan
430cc7e475
Update safetydance
2015-08-08 18:53:16 -07:00
Girish Ramakrishnan
4b8793dd3e
Update safetydance and lastmile
2015-08-06 13:54:15 -07:00
Girish Ramakrishnan
1c5291ccce
bump cloudron-manifestformat
2015-08-06 13:50:27 -07:00
Girish Ramakrishnan
fb1dfeceb8
Display settings path
...
Fixes #465
2015-08-06 13:44:09 -07:00
Johannes Zellner
e91ade2a02
If an app search is empty, show hint to give feedback
2015-08-06 18:35:08 +02:00
Johannes Zellner
703f9401e7
Show app feedback form in appstore
...
Fixes #461
2015-08-06 18:30:49 +02:00
Johannes Zellner
d5a517ac84
Properly offset the footer in support view
2015-08-06 18:30:25 +02:00
Johannes Zellner
2339e6ecea
Add app feedback category
2015-08-06 17:34:40 +02:00
Johannes Zellner
a67d0238e2
Cloudron prices are in cents
2015-08-06 16:24:19 +02:00
Girish Ramakrishnan
c7d8bb96c5
Remove ADMIN_ORIGIN
2015-08-05 17:27:55 -07:00
Johannes Zellner
7c82bb16b0
Use assert.strictEqual() to see the values
2015-08-05 17:49:19 +02:00
Johannes Zellner
de34aa8468
Unify feedback and ticket forms
2015-08-05 14:27:04 +02:00
Johannes Zellner
3bfe22ef7a
Fix setup step on ng-enter
2015-08-04 22:17:58 +02:00
Johannes Zellner
4a6d4fb9f0
New shrinkwrap for ldapjs without dtrace-provider
...
We have to install ldapjs with --no-optional
Fixes #460
2015-08-04 20:43:36 +02:00
Johannes Zellner
f24660480d
Put the correct faq and docs links
2015-08-04 19:36:05 +02:00
Johannes Zellner
51ad071f7a
Add unit tests for feedback route and fix the route
2015-08-04 16:59:35 +02:00
Johannes Zellner
b8e11ac222
Send feedback and tickets to support@cloudron.io
2015-08-04 16:05:20 +02:00
Johannes Zellner
a72a3a5f5f
Give support form headers more space
2015-08-04 16:04:44 +02:00
Johannes Zellner
0a73f7fac4
Add support form feedback
2015-08-04 16:01:50 +02:00
Johannes Zellner
8488a7ca34
Add text-bold class
2015-08-04 16:01:33 +02:00
Johannes Zellner
bd5a1a15cc
mailer functions only enqueue, respond immediately
2015-08-04 15:39:14 +02:00
Johannes Zellner
97403e99c6
Do not send adminEmail for feedback mails
2015-08-04 14:56:43 +02:00
Johannes Zellner
011c4dfcd8
add missing email format
2015-08-04 14:52:40 +02:00
Johannes Zellner
0184004106
Add missing %>
2015-08-04 14:49:43 +02:00
Johannes Zellner
c6e53ceda0
The requested function is in mailer
2015-08-04 14:45:42 +02:00
Johannes Zellner
0836cee3a7
Do the feedback and ticket form plumbing
2015-08-04 14:44:39 +02:00
Johannes Zellner
17327277f0
Add feedback route
2015-08-04 14:31:40 +02:00
Johannes Zellner
44c632f0f5
Add feedback email template
2015-08-04 14:31:33 +02:00
Johannes Zellner
cc69583068
Add initial support view
2015-08-04 11:33:36 +02:00
Girish Ramakrishnan
5d9461fe79
Copy the manifest because changes are made to it
...
Because of that, manifest verification fails (isNew property appears in manfiest)
2015-08-03 21:31:15 -07:00
Girish Ramakrishnan
94d954bfc7
Fix text
2015-08-02 19:02:45 -07:00
Girish Ramakrishnan
e2506cb60d
Send docker log in crash email
2015-08-01 21:42:34 -07:00
Johannes Zellner
63dacd6b30
Move avatar name below the selected avatar preview
2015-07-30 16:38:10 +02:00
Johannes Zellner
a1ba8d94e7
Revert "Actually remove dtrace dep"
...
This reverts commit 2b9bf6d019 .
2015-07-30 14:53:53 +02:00
Girish Ramakrishnan
113b8f0f96
previewAvatar seems to be defined in step1 and step2
2015-07-29 18:10:25 -07:00
Girish Ramakrishnan
7059f877ad
There is no step4
2015-07-29 17:09:05 -07:00
Girish Ramakrishnan
47edff7f0c
setPreviewAvatar only in avatar selection step
2015-07-29 16:30:32 -07:00
Girish Ramakrishnan
32dd4518df
randomize default avatar
2015-07-29 16:11:37 -07:00
Girish Ramakrishnan
2154122f0a
Decrease size of image preview
2015-07-29 16:11:20 -07:00
Girish Ramakrishnan
73f5a16968
Pick -> Choose
2015-07-29 15:55:41 -07:00
Girish Ramakrishnan
5d86a6d6d1
Ensure image got loaded before setting the preview
2015-07-29 15:53:58 -07:00
Girish Ramakrishnan
40e41389c5
Merge welcome step and step2
2015-07-29 15:11:34 -07:00
Girish Ramakrishnan
2b9bf6d019
Actually remove dtrace dep
...
Use --no-optional when installing dtrace
2015-07-29 10:15:25 -07:00
Johannes Zellner
be74309d38
Do not show the update page if update failed
2015-07-29 14:19:15 +02:00
Johannes Zellner
ff3ee2a1d1
Use angular in update dialog and show errors
2015-07-29 14:02:31 +02:00
Johannes Zellner
dd076e896d
Use -1 for progress to indicate an error
2015-07-29 13:53:36 +02:00
Johannes Zellner
65f942a370
Rename upgradeError to updateError in update
2015-07-29 13:52:59 +02:00
Johannes Zellner
c2a51ea599
Reset update progress on update failure
2015-07-29 12:41:19 +02:00
Johannes Zellner
f67b3febe7
Use new avatar set
...
Fixes #456
2015-07-29 11:13:59 +02:00
Girish Ramakrishnan
690ae9535f
This is probably obvious
2015-07-28 23:12:53 -07:00
Girish Ramakrishnan
4c821bce2c
Improve wording of wizard
2015-07-28 23:09:06 -07:00
Girish Ramakrishnan
c3cf8dbdec
model is queried from appstore
2015-07-28 17:08:32 -07:00
Girish Ramakrishnan
04c540ad0a
define adminOrigin in splashpage.sh
2015-07-28 16:52:27 -07:00
Girish Ramakrishnan
bc2345e891
Keep updater arguments sorted for readability
2015-07-28 16:03:32 -07:00
Girish Ramakrishnan
b183f8fc2f
Release update/upgrade lock only on error
2015-07-28 15:28:10 -07:00
Girish Ramakrishnan
55acadc88a
Check percent value before redirecting to update.html
2015-07-28 14:43:49 -07:00
Girish Ramakrishnan
d916b01513
Set progress completion error messages
2015-07-28 14:40:22 -07:00
Girish Ramakrishnan
f1b7f0543d
console.error any backup error message for now
2015-07-28 14:30:40 -07:00
Girish Ramakrishnan
1fc4800207
initialize percent
2015-07-28 14:28:53 -07:00
Girish Ramakrishnan
a275fa828c
Create error object properly
2015-07-28 14:22:34 -07:00
Girish Ramakrishnan
7b882e2ad0
Use progress.set in upgrade/update code paths
2015-07-28 14:22:08 -07:00
Girish Ramakrishnan
cd46cee90b
Add missing ;
2015-07-28 13:09:24 -07:00
Girish Ramakrishnan
db85811764
log update and upgrade errors
2015-07-28 10:03:52 -07:00
Johannes Zellner
ae36ff9151
Better support for active directory clients
2015-07-28 18:39:16 +02:00
Girish Ramakrishnan
db2e4c7a36
better debug on what is being autoupdated
2015-07-28 09:37:46 -07:00
Girish Ramakrishnan
4be9642d36
Remove unnecessary debug making logs very verbose
2015-07-28 09:32:19 -07:00
Johannes Zellner
0bea6954a9
No need to guess the apiOrigin anymore, we redirect now
...
Fixes #436
2015-07-28 14:03:48 +02:00
Johannes Zellner
be6246f534
Show link to referrer in appstatus
2015-07-28 14:01:51 +02:00
Johannes Zellner
13a5523391
Redirect on app error to webadmin appstatus page
...
Part of #436
2015-07-28 13:46:58 +02:00
Johannes Zellner
ceac96729f
Show testing badges in appstore view
2015-07-28 13:21:23 +02:00
Johannes Zellner
892144aea6
Fix the app icons in the install app grid
2015-07-28 13:06:55 +02:00
Johannes Zellner
a8f4eb3674
Show version and author in install dialog
2015-07-28 12:53:33 +02:00
Johannes Zellner
10d9b21716
Support ?version in direct appstore URLs
...
Fixes #454
2015-07-28 11:49:04 +02:00
Johannes Zellner
f3cf688e53
Ensure we have a fallback avatar
2015-07-28 11:28:06 +02:00
Johannes Zellner
ff1928102e
Also show avatar in nakeddomain error page
2015-07-28 11:19:13 +02:00
Johannes Zellner
2c006edd60
Use avatar in error page
2015-07-28 11:18:55 +02:00
Johannes Zellner
9a3b8f3db9
Fix long lasting navbar padding issue
2015-07-28 10:57:48 +02:00
Johannes Zellner
8bf0ba4a0d
Reload webadmin in case the avatar changes
...
Fixes #452
2015-07-28 10:50:33 +02:00
Johannes Zellner
eed86f2f30
Show avatar in navbar
2015-07-28 10:49:56 +02:00
Johannes Zellner
e010f1b194
Show avatar as favicon
2015-07-28 10:40:10 +02:00
Girish Ramakrishnan
2368fda691
Use ldapjs from github directly
...
The 0.7.x ldapjs is over a year old and uses dtrace as a dep which
causes issues when rebuilding.
2015-07-27 13:06:30 -07:00
Johannes Zellner
6c55750a17
Ensure the appstore ui can operate always on manifest.tags
2015-07-27 19:29:25 +02:00
Johannes Zellner
6c2771de65
Add testing section in appstore and mark testing apps
...
This is not some final design to indicate which app is in testing
but the logistics are there, mainly css from now
Fixes #451
2015-07-27 17:09:59 +02:00
Johannes Zellner
fd49c2fcd5
Show non published apps in webadmin
2015-07-27 16:34:37 +02:00
Johannes Zellner
971ca01654
Read apps from actual response body
2015-07-27 16:27:50 +02:00
Johannes Zellner
69295d7708
Add proxy api to get non approved app listings
2015-07-27 14:00:44 +02:00
Girish Ramakrishnan
835afe4a2b
Add mandatory addons object
2015-07-24 06:59:34 -07:00
Girish Ramakrishnan
3f7a5636a3
Add missing semicolon
2015-07-24 06:53:07 -07:00
Girish Ramakrishnan
da0f1907ca
Use BOX_ENV instead of NODE_ENV
...
Let NODE_ENV be used by node modules and always be set to production
Fixes #453
2015-07-24 01:42:28 -07:00
Girish Ramakrishnan
e4c5c88f6b
Better progress messages
2015-07-23 22:50:58 -07:00
Girish Ramakrishnan
4da2e3f0fc
Fix typo
2015-07-23 14:30:15 -07:00
Girish Ramakrishnan
f2f02694f6
Set server_names_hash_bucket_size
...
e2e tests fail like so when the hostnames are long
Thu, 23 Jul 2015 20:40:23 GMT box:apptask test8629 writing config to /home/yellowtent/data/nginx/applications/a3822f18-2f95-4b73-b8e9-2983dfcaae31.conf
Thu, 23 Jul 2015 20:40:23 GMT box:shell.js reloadNginx execFile: /usr/bin/sudo -S /home/yellowtent/box/src/scripts/reloadnginx.sh
Thu, 23 Jul 2015 20:40:24 GMT box:shell.js reloadNginx (stderr): nginx: [emerg] could not build the server_names_hash, you should increase server_names_hash_bucket_size: 64
Thu, 23 Jul 2015 20:40:24 GMT box:shell.js reloadNginx code: 1, signal: null
Thu, 23 Jul 2015 20:40:24 GMT box:apptask test8629 error installing app: Error: Exited with error 1 signal null
Thu, 23 Jul 2015 20:40:24 GMT box:apptask test8629 installationState: pending_install progress: 15, Configure nginx
^[[1m^[[31mERROR^[[39m^[[22m Exited with error 1 signal null ^[[1m[ /home/yellowtent/box/src/apptask.js:909:32 ]^[[22m
^[[32mstack: ^[[39m
"""
Error: Exited with error 1 signal null
at ChildProcess.<anonymous> (/home/yellowtent/box/src/shell.js:38:53)
at ChildProcess.emit (events.js:110:17)
at Process.ChildProcess._handle.onexit (child_process.js:1074:12)
"""
^[[32mmessage: ^[[39mExited with error 1 signal null
2015-07-23 13:55:46 -07:00
Johannes Zellner
c36304c510
Set no-cache for the avatar
2015-07-23 16:34:44 +02:00
Johannes Zellner
58d0f6b86e
Remove developerMode from update provisioning data
...
Finally fixes #442
2015-07-23 13:31:39 +02:00
Johannes Zellner
abf0113fec
Remove developerMode from config.js
2015-07-23 13:26:30 +02:00
Johannes Zellner
6dbee2d6c7
Fixup developers test with new developer mode setting
2015-07-23 13:19:51 +02:00
Johannes Zellner
64f142ddac
Fixup clients test with new developer mode setting
2015-07-23 13:16:36 +02:00
Johannes Zellner
bdf01a0e98
Fix apps-test to use settings developerMode
2015-07-23 12:59:47 +02:00
Johannes Zellner
ff0b4ac783
Use developerMode from settings instead of config
2015-07-23 12:52:04 +02:00
Johannes Zellner
98fa357884
Add developerMode to settings
...
Part of #442
2015-07-23 12:42:56 +02:00
Johannes Zellner
c044b51873
Add missing appId key to access app updateInfo
2015-07-23 07:21:05 +02:00
Johannes Zellner
77a2921c5a
Only log error if NOOP_CALLBACK got an error
2015-07-23 07:17:30 +02:00
Johannes Zellner
b988d76863
Add polyfill for chrome for canvas.toBlob()
...
Fixes #448
2015-07-21 15:29:43 +02:00
Girish Ramakrishnan
215b4d21cf
Add debugs
2015-07-20 11:05:30 -07:00
Girish Ramakrishnan
08dc18aad4
Disable removeIcon is apptask for now
2015-07-20 11:01:52 -07:00
Girish Ramakrishnan
d41846d51d
unusedAddons must be an object, not an array
2015-07-20 10:50:44 -07:00
Girish Ramakrishnan
42e2199145
Add text for force update
2015-07-20 10:43:19 -07:00
Girish Ramakrishnan
97642dabe8
Restoring app will lose all content if no backup
...
Maybe we should allow the user to force update if there is no backup?
We can add that as the need arises...
2015-07-20 10:39:30 -07:00
Girish Ramakrishnan
8b1f0186b8
Handle forced updates
2015-07-20 10:09:02 -07:00
Girish Ramakrishnan
d46c1aba29
Return error on unknown installation command
2015-07-20 10:03:55 -07:00
Girish Ramakrishnan
2edbce547a
Leave note on when lastBackupId can be null
2015-07-20 09:54:17 -07:00
Girish Ramakrishnan
45ee90e33b
Revert the manifest and portBindings on a failed update
...
Fixes #443
2015-07-20 09:48:31 -07:00
Girish Ramakrishnan
10dda6e032
During an update backup the old addons
...
Fixes #444
2015-07-20 00:50:36 -07:00
Girish Ramakrishnan
f7697cbf83
app.portBindings and newManifest.tcpPorts may be null
2015-07-20 00:10:36 -07:00
Girish Ramakrishnan
bac92d9eed
Restore may be called without a backup
...
This is the case when restoring from upgrades. If the app had an error,
then the backup won't have a lastBackupId. The upgrade script blindly
sets the app for restoration.
2015-07-19 22:06:32 -07:00
Girish Ramakrishnan
b5df9e31cd
Add comments on the purpose of installation states
2015-07-19 22:04:40 -07:00
Girish Ramakrishnan
91fdb81b71
Remove old collectd profile in update
2015-07-19 22:03:05 -07:00
Girish Ramakrishnan
50fc56665c
make subdomain changes only if location changed in configure
2015-07-19 22:01:02 -07:00
Girish Ramakrishnan
b33e5c8fcc
Fix debug
2015-07-19 21:59:02 -07:00
Girish Ramakrishnan
8820145316
Print error only if not ENOENT
2015-07-19 21:51:56 -07:00
Girish Ramakrishnan
aa326c10cd
Ensure aborted installs work
...
If the installation task was killed midway and we restart the installation,
it fails because we didn't clean up properly
Fixes #440
2015-07-19 21:51:51 -07:00
Girish Ramakrishnan
ef93dfda97
remove superfluous addons.updateAddons
2015-07-19 17:15:27 -07:00
Girish Ramakrishnan
57c4e5e8b8
addons.js does not use manifest anymore
2015-07-19 17:10:01 -07:00
Johannes Zellner
3403e70295
Ensure we use the correct VolumesFrom type when creating containers
...
https://github.com/apocas/dockerode/pull/147
2015-07-19 10:41:51 +02:00
Johannes Zellner
8e31e0bc75
Update to current dockerode
2015-07-19 10:41:30 +02:00
Johannes Zellner
eb3b1023ed
Also move constants.js into src/
...
Only executeable scripts should be at /
2015-07-19 10:26:00 +02:00
Johannes Zellner
5204e34d95
Fix settings tests since avatar has moved to assets/
2015-07-19 09:35:42 +02:00
Johannes Zellner
a10208ca5e
Remove random '+' in test file
2015-07-19 09:35:42 +02:00
Johannes Zellner
0c55b3f0c5
Move config.js finally into src/
2015-07-19 09:35:38 +02:00
Johannes Zellner
dbba23d52e
Remove unused requires
2015-07-19 09:03:31 +02:00
Johannes Zellner
9680db3967
remove unused getStats()
2015-07-19 09:03:30 +02:00
Girish Ramakrishnan
dbeca95882
Use res.status
2015-07-18 21:02:52 -07:00
Girish Ramakrishnan
a512e93e61
Set upload limit to 1mb (in sync with nginx)
2015-07-18 21:01:55 -07:00
Girish Ramakrishnan
bb5081db62
Try to update 4 times a day
2015-07-18 20:41:40 -07:00
Girish Ramakrishnan
a3d2b8ded7
Update connect-lastmile
2015-07-18 20:35:14 -07:00
Girish Ramakrishnan
8eac706f67
Default cloudron value must be provided by model code
2015-07-18 20:06:59 -07:00
Girish Ramakrishnan
dc2d9e2a5c
Fix settings.getAll
2015-07-18 19:48:40 -07:00
Girish Ramakrishnan
0640fba546
Move avatar into assets/
2015-07-18 19:39:13 -07:00
Girish Ramakrishnan
1327652240
Add FAVICON_FILE to standard paths
2015-07-18 19:38:18 -07:00
Girish Ramakrishnan
5759eb83e7
Remove ununsed image
2015-07-18 19:37:56 -07:00
Girish Ramakrishnan
4f35761adc
Remove default from db migration code
...
Move defaults into the code instead. This is the only way to know
if the user set the values or not.
Fixes #438
2015-07-18 19:35:17 -07:00
Girish Ramakrishnan
3eae9a5c68
Remove ununsed requires
2015-07-18 19:04:11 -07:00
Girish Ramakrishnan
5faf5f41d1
bare domains must be registered but not unregistered
2015-07-17 23:41:14 -07:00
Girish Ramakrishnan
cfd2c5617a
Print bare domain properly in debug output
2015-07-17 23:33:12 -07:00
Johannes Zellner
0babd5405f
Store graphite data in data/
...
This means we don't backup graphite data
2015-07-17 18:50:30 +02:00
Johannes Zellner
1e7174a943
Bump INFRA_VERSION to 4
2015-07-17 18:11:32 +02:00
Johannes Zellner
653ce7a3d1
Use new graphite image
2015-07-17 18:10:26 +02:00
Johannes Zellner
3bb39b4974
Remove artificial setup timeout, we got stuff to do now
2015-07-17 17:47:05 +02:00
Johannes Zellner
1f5f9799e3
Fix setup issues with missing DOM elements for the avatar
...
Fixes #431
2015-07-17 17:46:01 +02:00
Johannes Zellner
c0879a29f7
Store cloudron avatar after activation
2015-07-17 16:56:37 +02:00
Johannes Zellner
cb80da87d5
Add avatar selector ui to setup views
2015-07-17 15:50:45 +02:00
Johannes Zellner
732a35036a
Scale avatar client side to avoid huge image uploads
2015-07-17 15:21:26 +02:00
Johannes Zellner
191c454e01
Do not use the collectd filecount plugin
...
This anyways has to be done in conjunction with the localstorage addon
2015-07-17 13:20:22 +02:00
Johannes Zellner
9ed488c6d6
Ensure the avatar is not slightly off
2015-07-17 12:28:11 +02:00
Johannes Zellner
df10e81f11
bootstrap is already part of our theme
2015-07-17 12:27:07 +02:00
Johannes Zellner
02c4497515
Improve avatar selector
2015-07-17 12:25:54 +02:00
Johannes Zellner
72e79b97cb
Add plus.png
2015-07-17 12:25:42 +02:00
Johannes Zellner
1279dca7d3
Try to detect the api origin for error pages
...
This does fix our current approach, but will break with custom domains or
even non custom domains provided by us containing a dash.
The real fix is somewhat bigger, as we have to inject the api origin from the server side.
Part of #436
2015-07-17 12:01:45 +02:00
Johannes Zellner
b40081aa87
Add missing /
2015-07-17 11:16:51 +02:00
Johannes Zellner
14f1592451
Send 200 instead of 302 to make the browser accept the error page correctly
2015-07-17 11:16:20 +02:00
Johannes Zellner
60263f719b
Set page title with plain old javascript
...
Fixes #435
2015-07-17 10:45:47 +02:00
Johannes Zellner
4118b72e4f
Fix typo in appstore git category
2015-07-17 09:33:52 +02:00
Girish Ramakrishnan
af7cf51765
Fix linter warnings
2015-07-16 23:21:04 -07:00
Girish Ramakrishnan
b7caeb844a
Add assert
2015-07-16 23:00:39 -07:00
Girish Ramakrishnan
f7d1dcfe3e
define NOOP_CALLBACK
2015-07-16 23:00:36 -07:00
Girish Ramakrishnan
36496b9a59
Cleanup design document
2015-07-16 20:11:51 -07:00
Girish Ramakrishnan
96f1aef4f3
Fix typo
2015-07-16 14:23:07 -07:00
Girish Ramakrishnan
1b90b3d1dd
Remove internal app fields
2015-07-16 12:45:27 -07:00
Girish Ramakrishnan
71b895a515
backup failure should not cause install error
2015-07-16 12:45:27 -07:00
Girish Ramakrishnan
b347483c46
Add a way to reinstall errored apps
...
The restore code path only works if you have a backup. Forced update
means you can update apps that have install errors and also apps
that failed a previous update for some reason.
2015-07-16 11:46:26 -07:00
Girish Ramakrishnan
85a2b09cf2
Add migration lock
2015-07-16 11:39:05 -07:00
Johannes Zellner
d4365f7748
Add avatar picker
2015-07-16 20:03:10 +02:00
Johannes Zellner
8829aed2b9
Add a bunch of default avatars
2015-07-16 20:03:10 +02:00
Johannes Zellner
1dcd9e0a1a
Provide a default cloudron name if record is not in db
2015-07-16 20:03:10 +02:00
Johannes Zellner
1c0caa1200
Also use default buffer for avatar upload
2015-07-16 20:03:10 +02:00
Girish Ramakrishnan
7ebc830531
External error now returns 503
2015-07-16 10:57:34 -07:00
Girish Ramakrishnan
9fd52608e9
add missing require
2015-07-16 10:51:53 -07:00
Girish Ramakrishnan
16e3afc57d
Fix typo
2015-07-16 10:38:51 -07:00
Johannes Zellner
99f220527c
Fixup copy and paste error
2015-07-16 16:07:00 +02:00
Johannes Zellner
283709128e
Add rudimentary avatar change ui
2015-07-16 16:03:23 +02:00
Johannes Zellner
993c1d9f2a
Allow to change the Cloudron name in the settings
2015-07-16 15:32:01 +02:00
Johannes Zellner
7fdbf3406a
Send back buffers for image
2015-07-16 15:01:20 +02:00
Johannes Zellner
ef364b5aae
Show avatar and name in settings view
2015-07-16 14:50:12 +02:00
Johannes Zellner
38c1ce2674
Do not add a default cloudron name to the db
2015-07-16 13:59:10 +02:00
Johannes Zellner
f860148e58
Serve default avatar if none set
2015-07-16 13:40:21 +02:00
Johannes Zellner
1f27a12498
Add default cloudron avatar
2015-07-16 13:11:44 +02:00
Johannes Zellner
c9f7e7eeb5
take cloudron avatars via multipart
2015-07-16 13:09:16 +02:00
Johannes Zellner
e91253fde3
Add stubs for avatar get/post
2015-07-16 13:01:56 +02:00
Johannes Zellner
f3f4989db0
Add avatar route
2015-07-16 12:51:03 +02:00
Girish Ramakrishnan
1786eabcec
fight the good fight against meaningless comments
2015-07-16 01:25:53 -07:00
Girish Ramakrishnan
0a966530a1
Remove unreferenced values
2015-07-16 01:21:52 -07:00
Girish Ramakrishnan
24f28482f7
Return 503 for external error
2015-07-16 00:31:04 -07:00
Girish Ramakrishnan
e9d558a790
Add 30 seconds for clock skew
2015-07-16 00:07:35 -07:00
Girish Ramakrishnan
b1fb6b58c0
cloudron update route must return error code based on whether it started update
2015-07-15 23:37:33 -07:00
Girish Ramakrishnan
f0fd1d8814
Fix typo
2015-07-15 23:37:33 -07:00
Girish Ramakrishnan
7b30de53f8
cloudron.backup return value must be based on whether it started backup task
2015-07-15 23:37:32 -07:00
Girish Ramakrishnan
bf460e8018
Add pending backup state
2015-07-15 23:37:32 -07:00
Johannes Zellner
77c731780c
Add comment for backup button trigger feedback
2015-07-16 08:25:15 +02:00
Girish Ramakrishnan
88dfe6fdfb
Clear installation progress when setting a new command
2015-07-15 22:46:19 -07:00
Girish Ramakrishnan
a072b15256
Listen on unlock events to start the next task
2015-07-15 22:23:00 -07:00
Girish Ramakrishnan
fe0b152936
Make Locker an event emitter
2015-07-15 22:12:55 -07:00
Girish Ramakrishnan
a164c3d92d
Add missing define
2015-07-15 21:25:56 -07:00
Girish Ramakrishnan
8eda3ae4a3
Print the operation
2015-07-15 21:10:00 -07:00
Girish Ramakrishnan
9935221de9
Add missing require
2015-07-15 21:07:55 -07:00
Girish Ramakrishnan
cb152a2cc8
Implement locker
2015-07-15 21:00:01 -07:00
Girish Ramakrishnan
c8e5f7ccd3
Fix typos
2015-07-15 20:12:29 -07:00
Girish Ramakrishnan
be51caddbc
rename updater to updatechecker since that's all it does
2015-07-15 18:21:01 -07:00
Girish Ramakrishnan
72c19c9940
Rework backup and update code
2015-07-15 18:20:57 -07:00
Girish Ramakrishnan
5521779d1c
Remove ununsed require
2015-07-15 17:00:22 -07:00
Girish Ramakrishnan
95c7381024
Separate cron jobs for box and app updates
2015-07-15 16:57:14 -07:00
Girish Ramakrishnan
1ea55c2aac
add cloudron.ensureBackup
2015-07-15 14:51:25 -07:00
Girish Ramakrishnan
d44c8d270d
Add cloudron.backup to schedule a backup
2015-07-15 14:44:26 -07:00
Girish Ramakrishnan
bd22d13993
Remove unused function
2015-07-15 14:24:51 -07:00
Girish Ramakrishnan
c8e451f759
Move box update login to cloudron.js
2015-07-15 14:24:22 -07:00
Girish Ramakrishnan
e4a0923357
debug the progress
2015-07-15 14:13:22 -07:00
Girish Ramakrishnan
ab8d06c2a1
Remove ununsed function (it has moved to apps.js)
2015-07-15 13:32:30 -07:00
Girish Ramakrishnan
98b79926d2
lock before updating a cloudron
2015-07-15 13:28:12 -07:00
Girish Ramakrishnan
6a378302be
Add locker.js with dummy api
2015-07-15 13:27:49 -07:00
Girish Ramakrishnan
7d13a307ff
INVALID_STATE -> BAD_STATE
2015-07-15 13:24:16 -07:00
Girish Ramakrishnan
742fcdd470
routes must not access updater directly
2015-07-15 11:23:25 -07:00
Girish Ramakrishnan
7b5626f54b
Remove updater.hasBoxUpdate
2015-07-15 11:14:37 -07:00
Girish Ramakrishnan
980c65ef31
Remove updater.init/uninit
2015-07-15 11:08:27 -07:00
Girish Ramakrishnan
06aaa39405
Fix apps test
2015-07-15 11:08:16 -07:00
Girish Ramakrishnan
96c8659551
Move app autoupdate logic to apps.js
2015-07-15 11:02:50 -07:00
Girish Ramakrishnan
2957649d28
Fix failing apps test
...
we now delete images by id and not tag
2015-07-15 11:01:33 -07:00
Girish Ramakrishnan
ed05f1ee46
Fix failing settings test
2015-07-15 10:48:15 -07:00
Johannes Zellner
47851754cd
Add - for the memory timeline
2015-07-15 18:13:14 +02:00
Johannes Zellner
5d0eb89323
Sync chart colors for apps
2015-07-15 17:59:16 +02:00
Johannes Zellner
f279f7ebc9
Show detailed memory usage when selecting an app in the pie doughnut chart
2015-07-15 17:57:44 +02:00
Johannes Zellner
d6e6449bcb
let the linter know Chart is defined externally
2015-07-15 17:35:58 +02:00
Johannes Zellner
b3ec6300bd
Combine buffered and cached memory usage
2015-07-15 17:35:39 +02:00
Johannes Zellner
c4b23bcb2f
Show memory in MB
2015-07-15 17:28:57 +02:00
Johannes Zellner
47e5273549
Show current memory usage for system and for apps
2015-07-15 17:26:58 +02:00
Johannes Zellner
fe56748080
Ensure we can run through setup without mouse focus interaction
2015-07-15 16:47:20 +02:00
Johannes Zellner
17fbe279a3
Ensure we go for the apiOrigin with ajax requests
2015-07-15 16:27:38 +02:00
Johannes Zellner
dcc7b062f8
Also style the appstatus page like other status pages
2015-07-15 16:05:29 +02:00
Johannes Zellner
e6c532cb60
Use coherent style for error and status pages
2015-07-15 16:05:17 +02:00
Johannes Zellner
76a1d6a75b
Style the nakeddomain page
2015-07-15 15:42:05 +02:00
Johannes Zellner
8db35eeada
Use full theme also for error and status pages
2015-07-15 15:38:00 +02:00
Johannes Zellner
90f811e934
Appstatus page is no longer a ejs template
2015-07-15 15:36:48 +02:00
Johannes Zellner
8dfb811a02
Add a reduced basic css theme file
...
This is used for error pages
2015-07-15 15:31:12 +02:00
Johannes Zellner
71c508c442
Show cloudron name in nakeddomain placeholder page
2015-07-15 15:25:04 +02:00
Johannes Zellner
7f403661a0
Forward the real error instead of some string
2015-07-15 15:18:10 +02:00
Johannes Zellner
a779da0980
Send the cloudronName with the /status route
2015-07-15 15:17:51 +02:00
Johannes Zellner
1961e3731e
Also set the page title to the cloudron's name
2015-07-15 15:14:08 +02:00
Johannes Zellner
754fe2d343
Show cloudron name in webadmin navbar
2015-07-15 15:07:58 +02:00
Johannes Zellner
9610c8e828
set config defaults in webadmin
2015-07-15 15:06:34 +02:00
Johannes Zellner
80be03866d
Report cloudron name with config
2015-07-15 15:05:27 +02:00
Johannes Zellner
e75909e9aa
Add setup step to give a name for the cloudron
2015-07-15 14:49:37 +02:00
Johannes Zellner
af14632454
Allow to specify cloudron name in activation call
2015-07-15 14:17:27 +02:00
Johannes Zellner
4a43df84d7
Add CLOUDRON_DEFAULT_NAME to constants
2015-07-15 14:17:05 +02:00
Johannes Zellner
fd1406c567
Fixup linter errors in settings.js
2015-07-15 13:54:52 +02:00
Johannes Zellner
778cf9b7a7
Add cloudron name setting with routes
2015-07-15 13:53:41 +02:00
Johannes Zellner
60149fb3f5
Add settingsdb cloudron_name default value
2015-07-15 13:50:57 +02:00
Girish Ramakrishnan
6c10506902
Do not register or unregister bare domains
...
Fixes #434
2015-07-14 16:48:14 -07:00
Johannes Zellner
c1d4cae2c4
Use graphite summarize() instead of client size summarizing
2015-07-14 20:48:17 +02:00
Girish Ramakrishnan
67f81f3366
restore must do all install tasks since it is also called during upgrade
2015-07-14 11:42:14 -07:00
Girish Ramakrishnan
ae71f2f046
reregister subdomain during restore
2015-07-14 10:47:14 -07:00
Girish Ramakrishnan
55658b248a
One more backward compat fix for restore
2015-07-14 09:41:56 -07:00
Johannes Zellner
2b7ba8be38
Remove superflous console.log()
2015-07-14 18:29:38 +02:00
Johannes Zellner
16f8ccd3b8
Rename Cloudron to Data in graphs
2015-07-14 17:43:21 +02:00
Johannes Zellner
2eb29acf8c
Show a bit more details on memory
2015-07-14 17:27:01 +02:00
Johannes Zellner
4387d4ce96
Improve memory graphs and add overall system memory usage
...
In order to give some useful graphs the overall available memory for apps and
the system is vague and currently dynamic for the system and 100MB for apps.
This is just random really
2015-07-14 17:20:42 +02:00
Johannes Zellner
b5f8f65b11
First attempt to show per app memory usage
2015-07-14 15:30:01 +02:00
Johannes Zellner
aa903ad6fc
Remove rickshaw
2015-07-14 14:55:06 +02:00
Johannes Zellner
f18cd7bd57
Remove old graphs
2015-07-14 14:55:06 +02:00
Johannes Zellner
376011d6ca
Use Chart.js instead of Ricksaw to display basic disk usage
2015-07-14 14:55:06 +02:00
Johannes Zellner
f382be8f7c
Add Chart.js
2015-07-14 14:55:06 +02:00
Johannes Zellner
471f6d9f4b
Reenable and fix the old graphs page
2015-07-14 14:55:06 +02:00
Johannes Zellner
4230fa8a90
Use normal log file for collectd logs
2015-07-14 14:55:06 +02:00
Girish Ramakrishnan
9cd24b9409
Add backward compat code
2015-07-14 02:38:43 -07:00
Johannes Zellner
0b1781847d
Remove install button from the top and make description scrollable
...
This still assumes a max-height, which does not fully make use of the whole window
height. Not yet sure how to properly calculate this with the various dialog components.
Fixes #433
2015-07-14 10:08:49 +02:00
Girish Ramakrishnan
df158b111f
Delete image by id
...
docker possibly has a bug where "docker pull repo:tag" pulls down
_all_ the tags which has the same image id. This means that when
we delete the tag, there are still images around since they are
referenced by the other tags. Deleting the image by id seems to
untag and delete everything.
This does cause a problem when an app updates to the same image id
but different tag (we will end up refetching). This seems a minor
price to pay compared to hogging space with useless docker images.
One option is possibly to run some docker image cleaner as a cron job
but I have seen that docker lets you delete images even if there are
containers using it (without even using rmi -f). Scary.
2015-07-13 21:51:01 -07:00
Girish Ramakrishnan
e0341af44b
Fix typo
2015-07-13 16:17:56 -07:00
Girish Ramakrishnan
88ba7ce64d
Delete the correct docker image in update/restore
2015-07-13 14:46:14 -07:00
Girish Ramakrishnan
9798134774
Add config.isDev
2015-07-13 14:34:27 -07:00
Johannes Zellner
27daaeb8e1
Do not specify protocol for external css in update.html
2015-07-13 15:55:30 +02:00
Johannes Zellner
965502eaed
Avoid overflow as much as possible in users listing
...
Fixes #408
2015-07-13 15:40:54 +02:00
Johannes Zellner
1040aadb8e
Restore is a positive action
2015-07-13 15:26:40 +02:00
Johannes Zellner
dccad15c53
Do not specify protocol for external libs
2015-07-13 15:14:31 +02:00
Johannes Zellner
cb90d7745b
No need for collapsed app details with install button on top
2015-07-13 15:13:28 +02:00
Johannes Zellner
e09941b008
Add additional install button on the dialog top
...
Fixes #422
2015-07-13 15:00:43 +02:00
Johannes Zellner
b6ca37fcf6
Also collapse the app description when user clicks install
2015-07-13 14:21:35 +02:00
Johannes Zellner
fa4eba1a52
Use ejs to allow smoother local webadmin development
2015-07-13 14:06:58 +02:00
Johannes Zellner
cfc4233e16
add yargs node module
2015-07-13 14:06:19 +02:00
Johannes Zellner
d017c2ec53
Add a prettier naked domain error page
...
Fixes #418
2015-07-12 19:16:20 +02:00
Johannes Zellner
5c365f32a5
Add inverted cloud logo
2015-07-12 19:15:32 +02:00
Johannes Zellner
bd01f6f6bc
Serve up temporarily the appstatus error page for naked domain
...
Part of #418
2015-07-12 17:39:34 +02:00
Girish Ramakrishnan
45dad2a974
AutoUpdate -> Autoupdater
2015-07-11 09:28:36 -07:00
Girish Ramakrishnan
966b7d1a09
Mark app as installed after restoration
2015-07-11 00:13:55 -07:00
Girish Ramakrishnan
a27973d54e
Default restore callbacks to setup calls
...
Without this restoring these addons won't set up the env variables!
2015-07-11 00:10:46 -07:00
Girish Ramakrishnan
6a9db4abc5
Add missing bind call
2015-07-11 00:03:12 -07:00
Girish Ramakrishnan
244c680916
Make addons take manifest argument so that restore can pass manifest for teardown
...
Most of the functions really only needs appId but some of them need
the location and it's also nice for debugging.
2015-07-11 00:03:12 -07:00
Girish Ramakrishnan
3c3cb5ce8c
Fix restore
...
Fixes #424
2015-07-11 00:03:06 -07:00
Girish Ramakrishnan
3edc44e268
Can only restore apps that have a restore point
2015-07-10 15:11:05 -07:00
Girish Ramakrishnan
a0b599880b
Add note on why we validate port bindings
2015-07-10 15:09:39 -07:00
Girish Ramakrishnan
4eebf2d30b
Delete old image on update if it changed
2015-07-10 14:30:02 -07:00
Girish Ramakrishnan
9aa1665a4d
Setup things in a specific order
2015-07-10 14:25:36 -07:00
Girish Ramakrishnan
c459059015
Add progress report for nginx configuration
2015-07-10 14:06:14 -07:00
Girish Ramakrishnan
6f07174b65
Remove superfluous comments
2015-07-10 14:05:12 -07:00
Girish Ramakrishnan
122dff4034
Verify manifest as the first thing
2015-07-10 14:04:50 -07:00
Girish Ramakrishnan
3c0b5fac22
Remove old oauth creds on a reinstall
2015-07-10 14:02:26 -07:00
Girish Ramakrishnan
0bc3a2ef55
Validate portBindings and manifest before restore
2015-07-10 13:42:03 -07:00
Girish Ramakrishnan
1884804cd0
Save old manifest in oldConfig
2015-07-10 13:14:36 -07:00
Girish Ramakrishnan
c5a2ed9dc4
Fix failing test
2015-07-10 13:01:23 -07:00
Girish Ramakrishnan
5486f1e372
apps.update needs to read in old values to update config
2015-07-10 11:53:31 -07:00
Girish Ramakrishnan
9eb2feb90f
lastConfig -> lastBackupConfig
...
Having a lastBackupConfig allows us to do rest API validation
in the restore route without having to download the backup and
extracting the config.json
So, this is really just an optimization for the 'last backup'.
2015-07-10 10:47:52 -07:00
Girish Ramakrishnan
bdb5d965bb
Pass old app config to app task
...
Girish 1 OCD 1
Creating a pure task based approach is not very easy with our current
approach. We use the app table entry to track status and all validation.
So, the approach of keeping old config in the table and passing around
a newConfig package is not happenning without touching lots of code.
The current approach simply stashes the old config in the apps table
itself. We could potentially move this to another 'tasks' table but
this then raises cleanup issues (should the taskmanager crash after
the apps has been removed...)
Fixes #416
2015-07-10 10:47:51 -07:00
Johannes Zellner
bbff663d88
Fix webserver help link in error page
2015-07-10 14:40:34 +02:00
Girish Ramakrishnan
c69ae602c2
Remove ununsed require
2015-07-10 01:55:40 -07:00
Girish Ramakrishnan
30dbc11a6c
unregisterSubdomain does not require old subdomain anymore
2015-07-10 01:53:12 -07:00
Girish Ramakrishnan
664c1312d8
Add missing NOOP_CALLBACK define
2015-07-10 01:09:11 -07:00
Girish Ramakrishnan
ae6403611c
Make cloudron token an addon
2015-07-09 23:48:20 -07:00
Girish Ramakrishnan
f413cd1678
Store the last app config and not just the manifest
...
This will make it possible to restore the app's location, port bindings
and manifest (i.e app version)
2015-07-09 21:57:31 -07:00
Girish Ramakrishnan
29d93b5679
Explicitly specify what is saved in config.json
2015-07-09 21:57:28 -07:00
Girish Ramakrishnan
a9fd5299f9
Add missing export
2015-07-09 17:16:56 -07:00
Girish Ramakrishnan
3e900a966f
Fix up exports (again)
...
Girish 0, OCD 1
2015-07-09 17:01:11 -07:00
Girish Ramakrishnan
7f9d266fd5
Make app updates automatic
...
Fixes #421
2015-07-09 11:35:07 -07:00
Girish Ramakrishnan
c85b4248e4
Make a copy of boxUpdateInfo
...
There is a possibility that gBoxUpdateInfo gets updated by the
periodic update checker midway when an update is progressing.
2015-07-09 11:20:51 -07:00
Girish Ramakrishnan
085a3091bb
Update users apps.js instead of appdb.js
2015-07-08 19:54:31 -07:00
Girish Ramakrishnan
52f3bd2076
Revert "updater already verifies version"
...
This doesn't work because updater does not realize that app
is updated...
This reverts commit ca6214aa12 .
2015-07-08 19:50:28 -07:00
Girish Ramakrishnan
ca6214aa12
updater already verifies version
2015-07-08 19:41:15 -07:00
Girish Ramakrishnan
e8a4ee7d1f
apps.js does not user updater anymore
...
This creates an unncessary circular dep between updater and apps
2015-07-08 19:28:54 -07:00
Girish Ramakrishnan
c5e5dfc823
Do not delete container again in restore
2015-07-08 12:17:02 -07:00
Girish Ramakrishnan
be3dc7fd91
Fixup the installation label based on health
2015-07-08 11:23:14 -07:00
Girish Ramakrishnan
ef9e1b7555
reset health to null after installation
...
Part of #423
a health of null indicates lack of information
2015-07-08 11:13:39 -07:00
Girish Ramakrishnan
5c9bdba74f
Mark unhealthy apps are errored apps
...
This will make the restore button appear for these apps
This, however, doesn't solve the case of an app that doesn't install
properly in a certain location (for example, the naked domain). It's
a corner case we have to live with for now.
Part of #423
2015-07-08 11:13:29 -07:00
Girish Ramakrishnan
8b41179716
Do not mark app as unhealthy until threshold
...
Part of #423
2015-07-08 09:54:00 -07:00
Girish Ramakrishnan
5af218a2db
gLastSeen -> gHealthInfo
2015-07-08 08:14:45 -07:00
Girish Ramakrishnan
159cb635b0
Fix failing backup test
2015-07-08 07:20:17 -07:00
Girish Ramakrishnan
2747e151de
Check every 4 hours if we had a successful backup
...
Fixes #420
2015-07-07 13:07:29 -07:00
Girish Ramakrishnan
058aca6f3d
Put invitor email in invite
...
Also make the invitee username more explicit
Fixes #411
2015-07-06 21:40:15 -07:00
Girish Ramakrishnan
9e88a7349e
Filter out null ids
2015-07-06 15:27:43 -07:00
Girish Ramakrishnan
0418c5e3a5
Output the response text in various places
2015-07-06 15:19:59 -07:00
Girish Ramakrishnan
36b2ed7af0
Ensure removeOAuthCredentials always unset addon config
...
Part of #416
2015-07-05 21:46:49 -07:00
Girish Ramakrishnan
651efc3de1
Update the app object values only if db update succeeded
2015-07-05 21:46:44 -07:00
Girish Ramakrishnan
00ded22d49
Filter out backup ids of apps that were never backed up
2015-07-05 15:29:40 -07:00
Girish Ramakrishnan
44b3cb1c39
Fix formatting
2015-07-05 15:26:25 -07:00
Girish Ramakrishnan
1053211f79
Format string does not work in console.log
2015-07-05 09:34:23 -07:00
Johannes Zellner
30bec63b64
We replaced categories with tags
...
The UI now just lists some manually selected tags as categories
Fixes #410
2015-07-04 17:12:17 +02:00
Johannes Zellner
8b46b5f8c2
Give description text slightly more space
2015-07-04 16:35:03 +02:00
Johannes Zellner
dc0e5a4968
Make description text fade out when collapsed
2015-07-04 16:29:23 +02:00
Johannes Zellner
8ed7152bf6
Handle userinfo like apps and config
...
Fixes #413
2015-07-04 13:48:59 +02:00
Johannes Zellner
4ab17babc1
Hide backup button in non dev
...
Fixes #417
2015-07-04 13:34:59 +02:00
Johannes Zellner
bb9183754c
Make app description expandable
...
Fixes #419
2015-07-04 13:22:15 +02:00
Johannes Zellner
7899714ad0
Allow deep linking to directly show app install popup in webadmin
2015-07-04 12:57:34 +02:00
Girish Ramakrishnan
e0d149a908
Remove tagline, email and website
...
This can come from the description
email and website are sort of for our reference anyways (?)
2015-07-02 23:20:37 -07:00
Girish Ramakrishnan
966b6d72a0
Convert description from markdown
2015-07-02 23:15:12 -07:00
Girish Ramakrishnan
90181b14f9
mailUsername -> adminEmail
2015-07-02 19:22:37 -07:00
Johannes Zellner
4ddff44c42
Remove my- from hostname in setup step1
2015-07-02 16:58:54 +02:00
Girish Ramakrishnan
3845764341
Use mailUsername instead for naked domain apps
2015-07-02 00:45:46 -07:00
Girish Ramakrishnan
dce325ecd4
app.location can be empty
2015-07-01 15:14:25 -07:00
Johannes Zellner
1821a2a39f
Last wizard page needs a different conroller
2015-07-01 12:17:58 +02:00
Johannes Zellner
6add2d062c
Condense the setup views
2015-07-01 12:06:52 +02:00
Johannes Zellner
8471a0f15c
Remove domain indicator in setup
2015-07-01 11:38:46 +02:00
Girish Ramakrishnan
9030a73f98
Use console.error to print the error
2015-06-30 22:13:22 -07:00
Girish Ramakrishnan
a496fe5441
Better error reporting
2015-06-30 22:06:24 -07:00
Johannes Zellner
6a7acd3ba0
Remove pointless text in setup
2015-06-30 21:27:47 +02:00
Johannes Zellner
6bce0c93d7
Update to new manifest format
2015-06-30 15:55:28 +02:00
Johannes Zellner
0499010433
IE does not support Number.parseInt()
2015-06-30 13:43:12 +02:00
Johannes Zellner
1ed8b95451
Internet explorer does not support window.location.origin
2015-06-30 12:32:22 +02:00
Johannes Zellner
f55f9cf85f
Our username length has a minimum of 3
2015-06-29 14:39:58 +02:00
Johannes Zellner
71bdbe0784
Ensure we only ever call back once from database.initialize()
2015-06-29 11:12:44 +02:00
Johannes Zellner
48831d669d
Add some slight style to the setup
2015-06-29 00:24:07 +02:00
Johannes Zellner
2bbefd1cc7
Properly center the elements in the setup screen
2015-06-28 23:51:02 +02:00
Johannes Zellner
53e2af457f
Only add OAUTH_ORIGIN if oauth addon is active
2015-06-28 23:16:50 +02:00
Girish Ramakrishnan
a62242d53a
Check for updates less aggressively
2015-06-27 22:32:07 -07:00
Girish Ramakrishnan
5ba383f0cc
Output cloudron version
2015-06-26 19:46:36 -07:00
Girish Ramakrishnan
61d0fea610
Remove mongodb after test
2015-06-26 19:09:53 -07:00
Girish Ramakrishnan
1e38caf2b2
start mongodb
2015-06-26 19:06:48 -07:00
Girish Ramakrishnan
4df902f5f2
patch the dockerImage
2015-06-26 18:18:50 -07:00
Girish Ramakrishnan
b4159e36cc
Use manifest directly from test-app repo
2015-06-26 18:03:02 -07:00
Girish Ramakrishnan
e1dd83845c
Use test image 0.2.0
2015-06-26 18:01:34 -07:00
Girish Ramakrishnan
7074b39c75
Change image names
2015-06-26 17:08:06 -07:00
Johannes Zellner
61e3aaa6e9
Support oauth2 state argument
...
This is optional and may be used to prevent csrf
http://tools.ietf.org/html/rfc6749#page-72
Fixes #405
2015-06-26 12:20:12 +02:00
Johannes Zellner
eb6c83984b
Add basic loggin for ldap
2015-06-25 11:44:41 +02:00
Girish Ramakrishnan
6f50f7586c
ensure credentials is a string
2015-06-24 15:34:14 -07:00
Girish Ramakrishnan
9caebb0d49
cn can be undefined if the app makes bad request
2015-06-24 15:34:14 -07:00
Johannes Zellner
614b723bb8
Add missing require for BackupsError
2015-06-24 22:59:20 +02:00
Johannes Zellner
6c0a00b782
Handle conflicting ports for app update
2015-06-24 22:56:47 +02:00
Girish Ramakrishnan
f281bba3ca
Remove spurious debugs
2015-06-24 10:15:15 -07:00
Girish Ramakrishnan
d0f2110521
Add some envs
2015-06-24 08:35:29 -07:00
Johannes Zellner
c2f90545a5
Use export. instead of assigning an object
2015-06-24 17:20:47 +02:00
Johannes Zellner
2f3968a4b0
Remove unused require()
2015-06-24 15:54:36 +02:00
Johannes Zellner
411d372336
The user id is now in cn= not dn=
2015-06-24 15:28:41 +02:00
Johannes Zellner
c998ca8ac2
Add LDAP_GROUPS_BASE_DN for ldap addon
2015-06-24 14:39:24 +02:00
Johannes Zellner
6d47ae2d8a
Return uid for memberuid instead of object
2015-06-24 14:38:06 +02:00
Johannes Zellner
b7fc64d921
Put groups and users on separate searches
2015-06-24 14:10:34 +02:00
Johannes Zellner
7268f37520
Also send admin group through ldap
2015-06-24 13:50:57 +02:00
Johannes Zellner
919268a771
Filter ldap results also for dn
2015-06-24 13:41:55 +02:00
Johannes Zellner
2482aefb16
Reduce debug()s in ldap.js
2015-06-24 13:19:30 +02:00
Girish Ramakrishnan
336c85e911
Allow basic auth for getting token
...
The Go oauth module uses this
2015-06-23 16:06:29 -07:00
Girish Ramakrishnan
1ef7741510
Enable exec only in developer mode
2015-06-22 14:16:00 -07:00
Girish Ramakrishnan
b85674cce0
Add LDAP_URL and LDAP_USERS_BASE_DN
2015-06-22 11:07:29 -07:00
Johannes Zellner
95be6984ae
Rename manifestformat requires()
2015-06-22 19:12:41 +02:00
Johannes Zellner
9cf40a3512
The cloudron manifest is now on npm
2015-06-22 19:10:57 +02:00
Johannes Zellner
5e2ec5eba4
Set docker0 interface IP for now
2015-06-22 18:41:27 +02:00
Johannes Zellner
c607d0545c
Correct the dn order
2015-06-22 17:52:20 +02:00
Johannes Zellner
c4a9e15547
Make ldap addon known
2015-06-22 16:28:54 +02:00
Johannes Zellner
05d4c7d595
Fix require()
2015-06-22 16:28:38 +02:00
Johannes Zellner
0e39656c29
Start ldap server from app.js
2015-06-22 16:17:49 +02:00
Johannes Zellner
c087db1436
Add very basic ldap server implementation
2015-06-22 15:36:48 +02:00
Johannes Zellner
a7e739ddd9
Add ldapjs node module
2015-06-22 15:36:26 +02:00
Johannes Zellner
659def2a0e
Log unhandled mysql connection errors in oauthproxy
2015-06-22 08:32:07 +02:00
Johannes Zellner
d1c56e5b82
Show correct program name in crashlog
2015-06-22 08:27:36 +02:00
Girish Ramakrishnan
abf0294b4a
Better accessRestriction text
...
Fixes #321
2015-06-19 11:05:03 -07:00
Johannes Zellner
95b5d8121c
Move start/stop buttons into configure
2015-06-19 11:32:50 +02:00
Girish Ramakrishnan
6dc4d43c67
Do not add text to internal errors
2015-06-19 02:09:33 -07:00
Girish Ramakrishnan
d8aa095b5b
transform lastManifest as well
2015-06-19 02:07:40 -07:00
Girish Ramakrishnan
0f085d29db
return error if setRestorePoint fails
2015-06-19 01:59:38 -07:00
Girish Ramakrishnan
817c967682
Various fixes
2015-06-18 23:51:25 -07:00
Girish Ramakrishnan
d4146e1029
Add route to backup app
2015-06-18 23:03:16 -07:00
Girish Ramakrishnan
ad78621f88
remove unused vars
2015-06-18 22:46:55 -07:00
Girish Ramakrishnan
92ef71e0a5
move backup logic to backups.js
2015-06-18 22:45:45 -07:00
Girish Ramakrishnan
bebd70368f
create -> scheduleBackup
2015-06-18 22:36:11 -07:00
Girish Ramakrishnan
66bd5d0f37
mailer does not require cloudron
2015-06-18 22:02:55 -07:00
Girish Ramakrishnan
76c8d0a5ef
Move getIp to sysinfo.js
2015-06-18 21:59:40 -07:00
Girish Ramakrishnan
1932628083
Move getBackup/RestoreUrl to backups.js
2015-06-18 21:08:19 -07:00
Girish Ramakrishnan
cd1286056b
update nock
2015-06-18 20:25:24 -07:00
Girish Ramakrishnan
f5fe23a158
Update more modules
2015-06-18 19:39:05 -07:00
Girish Ramakrishnan
5ec4e58840
Update many node modules
2015-06-18 19:17:28 -07:00
Girish Ramakrishnan
89139b02a9
Make migrate backup apps
...
Part of #404
2015-06-18 19:09:25 -07:00
Girish Ramakrishnan
c21383639a
Make tests pass
2015-06-18 19:06:08 -07:00
Girish Ramakrishnan
0ea7411e63
Add debug message for skipped apps
2015-06-18 16:54:50 -07:00
Girish Ramakrishnan
28f141b9e8
Better debugging in apphealthtask
2015-06-18 16:45:51 -07:00
Girish Ramakrishnan
4033293054
Send the appVersion as part of backup url call
2015-06-18 15:06:26 -07:00
Girish Ramakrishnan
cead0d4826
lastManifestJson -> lastManifest
2015-06-18 15:00:52 -07:00
Girish Ramakrishnan
b8e311af81
restore from lastManifestJson if available
...
Fixes #395
2015-06-18 13:01:48 -07:00
Girish Ramakrishnan
a3ee3ab0ce
Save the manifest during backup for restores
2015-06-18 12:25:07 -07:00
Girish Ramakrishnan
458d199533
Add lastBackupId to schema.sql
2015-06-18 10:59:18 -07:00
Johannes Zellner
0f1a5f047d
Add dmesg output to crash notifier mails
...
Fixes #401
2015-06-18 13:57:53 +02:00
Johannes Zellner
9b98e57bd7
Do not check app health if runState is not running
2015-06-18 13:46:55 +02:00
Johannes Zellner
50a2513b65
Fix the app state labels
2015-06-18 13:08:19 +02:00
Johannes Zellner
54c9c7d4b0
Show app start/stop buttons
...
Fixes #400
2015-06-18 13:02:37 +02:00
Johannes Zellner
ff4b910fca
Always show update button if an update is available
...
If the update is blocked due to apps being in wrong state,
we show them in the dialog.
Fixes #402
2015-06-18 12:34:00 +02:00
Johannes Zellner
e6ff7dbe30
Add inProgressApps angular filter
2015-06-18 12:33:59 +02:00
Johannes Zellner
a55583c4e2
Fix indentation
2015-06-18 12:33:59 +02:00
Girish Ramakrishnan
81e361353d
Revert "Add hack for manifest upgrade"
...
This reverts commit 5832e0f050 .
Not needed now that apps are updated
2015-06-17 18:35:12 -07:00
Girish Ramakrishnan
5832e0f050
Add hack for manifest upgrade
...
two hacks:
1. disable manifest validation for 'author' field
2. add localstorage binds by default
2015-06-17 17:28:07 -07:00
Girish Ramakrishnan
43ee441bb6
Fix quoting (to expand $script)
2015-06-17 17:28:07 -07:00
Girish Ramakrishnan
f685c6fa99
Add mandatory author field
2015-06-17 13:57:31 -07:00
Girish Ramakrishnan
f282535a18
Update manifestformat to 1.2.0
2015-06-17 13:53:41 -07:00
Girish Ramakrishnan
e425ac1f66
Update manifestformat to 1.2.0
2015-06-17 13:53:11 -07:00
Girish Ramakrishnan
1c5d74e17c
Reserve the api location
...
Part of #403
2015-06-17 12:00:18 -07:00
Girish Ramakrishnan
07735cf0c6
Fix tags
2015-06-17 08:17:23 -07:00
Johannes Zellner
6202eef15d
Adjust to new /backups route
2015-06-17 13:24:13 +02:00
Johannes Zellner
805e5bc3a8
Add basic backup creation tests
2015-06-17 13:23:57 +02:00
Johannes Zellner
d96c198d92
Consolidate the /backup routes
...
Fixes #396
2015-06-17 13:23:31 +02:00
Johannes Zellner
4d434946a3
Revert "Update the shrinkwrap to reflect the manifestformat version"
...
This was already done.
This reverts commit 1ec988c020 .
2015-06-17 11:26:52 +02:00
Johannes Zellner
91974cc5bd
Ensure the backupswap.sh is allowed with sudo
2015-06-17 10:18:45 +02:00
Johannes Zellner
40338f6720
Remove husky as dev dependency
...
This can now be done with the setupgithooks command in tools/
2015-06-17 10:12:20 +02:00
Johannes Zellner
1ec988c020
Update the shrinkwrap to reflect the manifestformat version
2015-06-17 10:11:42 +02:00
Johannes Zellner
66908d7a89
Add some backup mount logs
2015-06-17 09:51:59 +02:00
Johannes Zellner
93e25aaf9b
Mount and unmount the backup swap as needed
2015-06-17 09:49:51 +02:00
Johannes Zellner
2917f7308c
Do not mount backup swap in the backup scripts
2015-06-17 09:24:04 +02:00
Johannes Zellner
862aed7044
Add backupswap.sh to on/off the backup swap
2015-06-17 09:22:41 +02:00
Girish Ramakrishnan
22fb979e42
Update manifest format version
2015-06-16 19:45:28 -07:00
Girish Ramakrishnan
ff476a3acf
Make localstorage a separate addon
2015-06-16 19:45:19 -07:00
Girish Ramakrishnan
ae6d8fb991
Add note on what backups call returns
2015-06-16 12:22:08 -07:00
Girish Ramakrishnan
a8caa087f7
Resize the exec container
2015-06-16 10:07:26 -07:00
Johannes Zellner
9ad2294a7f
Fix migration api tests
2015-06-16 16:57:00 +02:00
Johannes Zellner
6778c64109
Do not wait for the migration to be triggered
...
Fixes #393
2015-06-16 16:47:43 +02:00
Girish Ramakrishnan
33628bbae4
Send resetToken as part of create user response
...
This is useful for e2e testing
2015-06-15 12:24:54 -07:00
Johannes Zellner
21820c3ee5
Send a heartbeat immediately once the cloudron is up and running
2015-06-15 15:56:32 +02:00
Johannes Zellner
352f440110
Fix database tests to adhere to new email constraints
2015-06-15 15:53:41 +02:00
Johannes Zellner
126809f1b7
Add missing NOT NULL constraints for email and username
2015-06-15 15:49:25 +02:00
Johannes Zellner
01b78fe654
Remove apiServerOrigin check used for local mode
...
We always have that set, when deployed. If not we
fail in a lot of places, so if we want to check that,
it should be done in config.js
2015-06-15 15:40:00 +02:00
Johannes Zellner
5a7017c71f
Refactor the relocation form
2015-06-15 12:46:35 +02:00
Johannes Zellner
f6ec979b8b
Separate relocation and upgrade
2015-06-15 12:33:59 +02:00
Johannes Zellner
d3ca71f3cf
Show placeholder if we cannot upgrade further
2015-06-15 12:15:43 +02:00
Johannes Zellner
931af4c545
Disable backup button if backup is in progress
...
Fixes #389
2015-06-15 12:10:16 +02:00
Johannes Zellner
39c26745a2
Fix typo
2015-06-15 12:09:17 +02:00
Johannes Zellner
2771444c52
Give feedback on wrong password in migration dialog
2015-06-15 12:06:37 +02:00
Johannes Zellner
3337c44307
Disable move button if region is unchanged
2015-06-15 12:02:13 +02:00
Johannes Zellner
c7fa92bdaf
Ask user for his password on migration
2015-06-15 11:41:11 +02:00
Johannes Zellner
1bed3f0e22
Require admin and a password for migration api
2015-06-15 11:27:36 +02:00
Johannes Zellner
881f9239a9
Show error if username or email already taken
2015-06-15 10:31:49 +02:00
Johannes Zellner
b78b6c7d90
Decrease email and username db fields and add UNIQUE constriants
...
Fixes #392
2015-06-15 10:17:16 +02:00
Johannes Zellner
5d3a136bba
Remove overly outdated comments
2015-06-15 09:55:36 +02:00
Johannes Zellner
e7d170416b
Show error if login failed
...
Fixes #387
2015-06-15 09:55:36 +02:00
Girish Ramakrishnan
b1e0c573ac
portBindings can now be left out in configure command
2015-06-13 21:29:04 -07:00
Girish Ramakrishnan
80d5be9b59
replace assert with assert.strictEqual
...
git grep -l assert | xargs /usr/local/bin/gsed -i -e 's/assert(\([^&=><|]*\) === \([^&=><|]*\))/assert.strictEqual(\1, \2)/'
2015-06-13 21:01:44 -07:00
Johannes Zellner
57213c2f95
Rework more parts of the upgrade view
2015-06-13 12:56:06 +02:00
Johannes Zellner
f9f5891d1e
Show error if mandatory query params are missing for oauth
...
Fixes #386
2015-06-12 19:23:40 +02:00
Johannes Zellner
8743cf0bea
Make cloudron-test nock vars pickup from the config
2015-06-12 14:48:58 +02:00
Johannes Zellner
6a6c5b4e53
Remove unused LOCAL mode
...
This mode was to run the box code locally but
given our hotfix functionality this works well enough.
2015-06-12 14:48:58 +02:00
Johannes Zellner
4c200895e8
Remove unused LOCAL mode
...
This mode was to run the box code locally but
given our hotfix functionality this works well enough.
2015-06-12 14:07:59 +02:00
Johannes Zellner
2b60af103b
Initial rework of the upgrade view
2015-06-12 13:26:23 +02:00
Johannes Zellner
3ccf4e302d
Add migration images
2015-06-12 13:14:57 +02:00
Johannes Zellner
f654682677
Rework the oauth credentials check to support test credentials
2015-06-12 11:20:48 +02:00
Johannes Zellner
82cdc238dc
Special case oauth test credentials
2015-06-12 11:20:48 +02:00
Johannes Zellner
5fb3899581
Add oauth test client credentials
...
Those can only be used locally as the redirect is to 127.0.0.1
ClientID: cid-test
ClientSecret: cid-secret
Callback: http://127.0.0.1:5000
2015-06-12 11:20:47 +02:00
Girish Ramakrishnan
1226557da2
Add updater.hasBoxUpdate
2015-06-11 21:11:56 -07:00
Girish Ramakrishnan
1f20b9ff5c
Make portBindings optional in configure (like install)
2015-06-11 19:20:32 -07:00
Girish Ramakrishnan
19d327722a
Fix assert when portBindings is not part of request
2015-06-11 18:58:37 -07:00
Johannes Zellner
a878fd0c11
Fixup the migration tests not requiring a restoreKey
2015-06-11 20:00:25 +02:00
Johannes Zellner
54e0ccfc75
Add some debug()
2015-06-11 19:59:56 +02:00
Johannes Zellner
9670dcce1f
The migration now creates a restoreKey on server side
2015-06-11 18:34:44 +02:00
Johannes Zellner
b6940b3383
Adjust migration unit tests
2015-06-11 18:32:13 +02:00
Johannes Zellner
197368ef3d
Create a backup prior to migration
2015-06-11 18:30:02 +02:00
Johannes Zellner
2cc721b410
Do not crash if messageOrObject is null or undefined
2015-06-11 17:42:03 +02:00
Johannes Zellner
57feb9a362
Do not crash if there are no backups yet
2015-06-11 14:46:03 +02:00
Johannes Zellner
2668a9499f
Show appstore icon in case the cloudron does not have one
...
Fixes #384
2015-06-11 13:52:46 +02:00
Johannes Zellner
1b1afcb536
Make app items wider to avoid clipping
2015-06-11 13:18:32 +02:00
Johannes Zellner
c0e65a902c
Hide rating in appstore view
2015-06-11 13:14:47 +02:00
Johannes Zellner
724d4e28e2
Show about information in settings view
...
Fixes #382
2015-06-11 09:35:04 +02:00
Girish Ramakrishnan
ed8cd74a52
gPendingTasks is an array
2015-06-10 13:30:22 -07:00
Girish Ramakrishnan
30f4233b9e
Add waiting text
...
Fixes #378
2015-06-10 09:49:12 -07:00
Johannes Zellner
6c7a41ee2e
Send region information to appstore on migrate
2015-06-10 16:58:40 +02:00
Johannes Zellner
3b9cc77d38
Send the region slug for the migration call
2015-06-10 16:55:18 +02:00
Johannes Zellner
02fa528e36
model information is a string
2015-06-10 16:49:34 +02:00
Johannes Zellner
39176e6f9e
Add optional 'model' property to provisioning
2015-06-10 15:42:30 +02:00
Johannes Zellner
71480a40bc
Only send crash mails every 5min
...
Fixes #381
2015-06-10 15:30:25 +02:00
Johannes Zellner
693ff20a26
Move mailer exports ahead of requires()
2015-06-10 14:14:43 +02:00
Girish Ramakrishnan
502e0bdbae
Use preallocated backup swap file of the base image
...
The code assumes there is only one backup task active
at a time
Part of #378
2015-06-09 21:03:33 -07:00
Girish Ramakrishnan
dd47f33807
Leave a note on why the concurrently level is 1
2015-06-09 16:42:51 -07:00
Girish Ramakrishnan
a697a3ca6f
Refactor task management into taskmanager.js
2015-06-09 16:35:42 -07:00
Girish Ramakrishnan
aaed9eb3f5
Set apptask concurrency to 1
2015-06-09 15:58:21 -07:00
Girish Ramakrishnan
baf42863a6
Rename gTasks to gActiveTasks
2015-06-09 14:21:09 -07:00
Girish Ramakrishnan
e8d6055ea2
Add apps.restartTask
2015-06-09 14:18:26 -07:00
Johannes Zellner
c50d7213f3
Add selection for region in migrate view
2015-06-09 22:27:35 +02:00
Johannes Zellner
f41ac7a555
Add appstore.getRegions()
2015-06-09 22:27:13 +02:00
Johannes Zellner
6b8d202dcc
Show real data what the cloudron currently is
2015-06-09 22:09:46 +02:00
Johannes Zellner
4dbd944136
Adjust tests for config route
2015-06-09 21:57:04 +02:00
Johannes Zellner
cd2d82c1f2
Fix migrate route tests
2015-06-09 21:52:36 +02:00
Johannes Zellner
0484ee2ba4
Add cloudron details to config route
2015-06-09 21:47:05 +02:00
Johannes Zellner
3c8dc539e6
migrate route now takes a restoreKey
2015-06-09 20:50:52 +02:00
Johannes Zellner
19fcce6afe
Send the restoreKey for migration
2015-06-09 18:45:21 +02:00
Johannes Zellner
9243c71bd7
Redirect the user on error to the origin, not the callback url
2015-06-09 18:30:20 +02:00
Johannes Zellner
862e2fbd49
Do not redirect user if oauth client is unknown
...
This would leave the without a chance to see the error
2015-06-09 18:27:04 +02:00
Johannes Zellner
bb46e780f0
Add migration confirm dialog
2015-06-09 16:59:16 +02:00
Johannes Zellner
4c55b67fe0
Add client.migrate()
2015-06-09 16:16:16 +02:00
Johannes Zellner
20beda3e19
Add migrate route tests
2015-06-09 16:06:29 +02:00
Johannes Zellner
60aa648d9c
Add a cloudron migrate route
2015-06-09 15:56:34 +02:00
Johannes Zellner
df55218db0
Add cloudron.migrate()
2015-06-09 15:56:17 +02:00
Johannes Zellner
59358c1ad3
Fill migration combobox with available sizes
2015-06-09 14:51:42 +02:00
Johannes Zellner
adfb58c29f
Add appstore.getSizes()
2015-06-09 14:48:08 +02:00
Johannes Zellner
be3446f47a
Add upgrade view to navbar menu
2015-06-09 14:00:26 +02:00
Johannes Zellner
cf0a0b68c5
Add route for upgrade view
2015-06-09 14:00:09 +02:00
Johannes Zellner
e4c4226bd5
Add initial upgrade view
2015-06-09 13:59:42 +02:00
Johannes Zellner
62aaaf9be3
Rename oauthproxy log file to be consistent
2015-06-09 13:17:15 +02:00
Johannes Zellner
8c010faac8
Support all supervisor programs for crash logs
2015-06-09 13:10:26 +02:00
Johannes Zellner
64bee78515
Collect and send crash logs with email
2015-06-09 13:01:38 +02:00
Girish Ramakrishnan
b585a5ca76
Backup failure should abort update and leave app running
...
Fixes #379
2015-06-08 17:57:46 -07:00
Johannes Zellner
dba2c3539f
Fix crashes in crash notification mail
2015-06-08 22:08:18 +02:00
Johannes Zellner
9fb81d2d06
Take crashnotifier into use with supervisor
2015-06-08 22:08:18 +02:00
Johannes Zellner
91197738b1
Add initial crashnotifier.js
2015-06-08 22:08:18 +02:00
Johannes Zellner
02972a73ae
Add mailer.sendCrashNotification()
2015-06-08 22:08:18 +02:00
Johannes Zellner
4f82b52e24
Add supervisord-eventlistener
2015-06-08 22:08:18 +02:00
Girish Ramakrishnan
0917da9924
configure does not require appId
2015-06-05 10:30:55 -07:00
Johannes Zellner
7d9b231d81
Align appstore search vertically
2015-06-05 08:31:27 +02:00
Johannes Zellner
0af916b55d
Decrease category font size
2015-06-04 16:33:04 +02:00
Johannes Zellner
1730a0e465
Alphabetic order for categories
2015-06-04 12:48:49 +02:00
Johannes Zellner
6171b50447
Fix category names
2015-06-04 12:47:08 +02:00
Johannes Zellner
355e8dc8fe
Update to new manifest version 1.0.11
2015-06-04 11:54:32 +02:00
Johannes Zellner
239f747b27
Ensure we show the currently active category
2015-06-04 11:42:00 +02:00
Johannes Zellner
66a32b0ad3
Add basic search in appstore
2015-06-04 11:28:31 +02:00
Johannes Zellner
7a3e23b115
Add getAppsFast() from cache
2015-06-04 11:28:18 +02:00
Johannes Zellner
77f880105a
Improve category links
2015-06-04 11:16:53 +02:00
Johannes Zellner
97b02948c2
Add appstore filtering by category
2015-06-04 11:11:47 +02:00
Johannes Zellner
5f376fd56f
make getApps() return an array
2015-06-04 11:11:30 +02:00
Johannes Zellner
c0cde3b94c
Add real categories
2015-06-04 10:43:19 +02:00
Johannes Zellner
f94f2e9d84
Add categories and search mockup to appstore view
2015-06-03 21:01:23 +02:00
Johannes Zellner
9292eac737
Use new manifest version 1.0.10
2015-06-03 17:27:51 +02:00
Johannes Zellner
3e63dddc17
Properly center the appstore grid
2015-06-03 13:21:32 +02:00
Johannes Zellner
c9b0e2b3fd
Set max-width for app title
2015-06-03 13:17:07 +02:00
Johannes Zellner
1caac82777
Offset the footer in appstore view
2015-06-03 13:11:57 +02:00
Johannes Zellner
ea7abb6d80
Show exactly two lines for taglines
2015-06-03 13:11:42 +02:00
Johannes Zellner
c949a26575
Refactor the appstore grid items
2015-06-02 18:01:40 +02:00
Johannes Zellner
551a817673
Separate style for appstore and apps grid items
2015-06-02 16:14:04 +02:00
Johannes Zellner
dd06ec5ad2
Remove global backup dialog
2015-06-02 16:10:38 +02:00
Johannes Zellner
28b90966e7
Remove stale code in dns view
2015-06-02 16:10:07 +02:00
Johannes Zellner
489d2266b1
Fix app icon urls to be absolute
2015-06-02 16:05:46 +02:00
Johannes Zellner
f1970ebb12
Show real progress based on progress.json
2015-06-02 15:25:39 +02:00
Johannes Zellner
89f0e4e1b6
Do not wait for backup to succeed in backup route
2015-06-02 14:43:07 +02:00
Johannes Zellner
ef0476ecff
Report backup progress via progress.json
2015-06-02 14:05:08 +02:00
Johannes Zellner
166a30b8f9
Show backup progress in-line instead of modal dialog
2015-06-02 13:54:42 +02:00
Johannes Zellner
89eb58cee5
Override bootstrap progress bar margin
2015-06-02 13:54:17 +02:00
Johannes Zellner
1a87e24488
Simplify case where no backups have been made yet
2015-06-02 13:42:52 +02:00
Johannes Zellner
870ac74a09
reorder member properties for clarity
2015-06-02 13:24:10 +02:00
Johannes Zellner
4536259843
Avoid further noise during tests from EventEmitters
2015-06-02 11:51:27 +02:00
Johannes Zellner
88bb464c27
Fixup oauth password reset test
2015-06-02 11:44:02 +02:00
Johannes Zellner
c94ca6fde6
Send 202 when a backup was triggered
2015-06-02 11:27:50 +02:00
Johannes Zellner
7cc722f248
take reserved ports for servers from config
2015-06-02 10:59:11 +02:00
Johannes Zellner
b58e6a5891
Start internal express server
2015-06-02 10:58:00 +02:00
Johannes Zellner
fa958c8940
add internalPort to config
2015-06-02 10:57:30 +02:00
Johannes Zellner
a58115ee2e
Add internal route handler
2015-06-02 10:57:15 +02:00
Johannes Zellner
f81a7d7750
Update gulp css modules and improve error reporting
2015-06-01 22:39:34 +02:00
Johannes Zellner
724f279b70
Use the accessToken from the query in case there is one
2015-06-01 21:15:07 +02:00
Johannes Zellner
3d8ddaa71a
Generate token after password reset
2015-06-01 19:09:08 +02:00
Johannes Zellner
58ce5fd1cf
Remove superflous debug()
2015-06-01 18:52:11 +02:00
Johannes Zellner
64b5b2f2d7
Add route comments for clarification
2015-06-01 18:06:17 +02:00
Johannes Zellner
cb700cf9ce
We not have a cloudron.js anymore
2015-06-01 17:59:18 +02:00
Johannes Zellner
1cee63cfd9
Fix typo in password reset view
2015-06-01 17:54:51 +02:00
Johannes Zellner
370baa192e
Fix nginx restart logic in run.sh
2015-06-01 17:31:48 +02:00
Johannes Zellner
f9e2c95a9c
Fixup linter issues
2015-06-01 12:02:08 +02:00
Johannes Zellner
75996ba164
Increase max listeners on events
2015-06-01 11:31:18 +02:00
Johannes Zellner
03530beded
Ensure we only initialize cron.js once
2015-06-01 11:08:55 +02:00
Johannes Zellner
172911661a
Reset restore dialog form correctly
...
Fixes #370
2015-06-01 10:32:08 +02:00
Johannes Zellner
75d1048444
Actually concat the error string
2015-05-29 14:08:29 +02:00
Girish Ramakrishnan
fd2bb2c174
Change backup schedule to everyday instead of 4 hours
...
Fixes #368
2015-05-28 15:20:54 -07:00
Johannes Zellner
d756cc3003
Adjust checkInstall script to reflect new location
2015-05-28 10:59:11 +02:00
Johannes Zellner
ef97038908
Refetch backups after createing one
...
Fixes #356
2015-05-28 10:51:25 +02:00
Johannes Zellner
a14426a2ee
Add some margin on the backups
2015-05-28 10:45:26 +02:00
Johannes Zellner
4cd34f2b10
Actually use creationTime
2015-05-28 10:41:03 +02:00
Johannes Zellner
3ccee928fc
Show proper label if no backups exist
2015-05-28 10:29:07 +02:00
Johannes Zellner
f6cd6f2135
Fetch available backups in webadmin
2015-05-28 10:00:50 +02:00
Johannes Zellner
f0d4e4566f
Add Client.getBackups()
2015-05-28 09:50:15 +02:00
Johannes Zellner
1654930af6
Add backup route tests
2015-05-28 09:49:24 +02:00
Johannes Zellner
623df102a0
Add route to get all backups
2015-05-28 09:49:05 +02:00
Johannes Zellner
554befcdd1
add route/backups.js
2015-05-28 09:48:42 +02:00
Johannes Zellner
95ccd4d4cb
Add backups.js
2015-05-28 09:48:13 +02:00
Girish Ramakrishnan
4df37baa9c
Move test scripts into src/test
2015-05-27 16:37:47 -07:00
Girish Ramakrishnan
a70e0e05eb
Move makeDocs script
2015-05-27 16:23:54 -07:00
Girish Ramakrishnan
7b0534ed56
Move createSourceTarball to installer repo
2015-05-27 15:25:38 -07:00
Girish Ramakrishnan
796ca4528d
SOURCE_DIR -> source_dir
2015-05-27 15:21:26 -07:00
Girish Ramakrishnan
6c1815693d
Add some footer css (taken from appstore)
2015-05-27 14:48:28 -07:00
Girish Ramakrishnan
c2ae42a2ce
Add footer and move version to footer
2015-05-27 07:15:23 -07:00
Johannes Zellner
5b6837f062
Fix the swap test in backupapp and backupbox
2015-05-26 22:51:34 +02:00
Johannes Zellner
ce66ef1575
publish.sh is now merged with release
2015-05-26 17:58:59 +02:00
Johannes Zellner
ac84c1ad05
Mount a backup swap during app and box backups
2015-05-26 16:35:24 +02:00
Girish Ramakrishnan
5be84c7207
Change s3 bucket names
2015-05-19 00:47:41 +05:30
Girish Ramakrishnan
f423923ee9
Use 256-bit tokens everywhere
2015-05-17 14:24:17 +05:30
Girish Ramakrishnan
7b7df404b7
Move mongodb to 0.3.0
2015-05-15 14:53:32 +05:30
Girish Ramakrishnan
ace61c541c
Add error handlers to pipe
...
If the cp died, then the pipe barfs with ECONNRESET
2015-05-15 05:49:30 +05:30
Girish Ramakrishnan
09c24d2cbf
Add missing require
2015-05-15 02:25:02 +05:30
Girish Ramakrishnan
c9ede0c2ac
Setup addons when restoring from empty backup
2015-05-15 02:18:03 +05:30
Girish Ramakrishnan
67b29a3b5f
Use debugApp in cloudron.js
2015-05-15 02:16:33 +05:30
Girish Ramakrishnan
11a30633a8
Fix error message
2015-05-15 02:10:12 +05:30
Girish Ramakrishnan
e5dd22d2fc
Mark apptask crash as errors
2015-05-15 02:02:12 +05:30
Girish Ramakrishnan
18e1daba61
replace debug with debugApp
2015-05-15 01:47:59 +05:30
Girish Ramakrishnan
6607d35422
Fix comment
2015-05-04 19:27:57 -07:00
Girish Ramakrishnan
7ab94d798d
Remove unused export
2015-05-04 15:17:06 -07:00
Girish Ramakrishnan
15b568e777
Do not backup apps that are not installed and running
...
Rest of the apps are in some intermediate state and we should
consider the data to be in some transient state that is not
worth backing up.
Note that we check the health and not the run state because the
app that is running could still be in middle of running some
db upgrade script. Healthy implies the app is up and running.
2015-05-04 14:23:46 -07:00
Johannes Zellner
27e5474823
Use 256bit tokens
...
Fixes #236
2015-05-04 20:34:27 +02:00
Johannes Zellner
d799fe721b
Sync cron definition of heartbeat and updater
2015-05-04 17:53:37 +02:00
Johannes Zellner
efd04ccf40
Remove remainders of oauth popup support
2015-05-04 15:45:16 +02:00
Johannes Zellner
2b7a984875
Remove reference to oauth library
2015-05-04 15:33:35 +02:00
Johannes Zellner
319b199a81
Remove stale oauth2 example code
2015-05-04 15:32:24 +02:00
Johannes Zellner
2515f7bde1
oauth client side library is not needed anymore
2015-05-04 15:31:38 +02:00
Johannes Zellner
2f2bf5429a
Remove unused oauth client library
2015-05-04 15:30:28 +02:00
Johannes Zellner
00b9232a05
Use grant type token instead of code to avoid leaking of secret
2015-05-04 15:20:59 +02:00
Johannes Zellner
6ce4d90b0d
Do not create tarball in verbose mode
2015-05-04 15:06:03 +02:00
Johannes Zellner
af443b0c0e
Allow also access token grants
2015-05-04 15:04:41 +02:00
Johannes Zellner
6c714161ac
Add normal token grant
2015-05-04 14:01:28 +02:00
Johannes Zellner
e1646174b9
Prepare webadmin to run with non relative api url
2015-05-04 13:28:48 +02:00
Johannes Zellner
e07b8e7655
Run development server to serve up the webadmin in gulp
2015-05-04 13:25:37 +02:00
Johannes Zellner
52da720a4b
Add gulp-serve as dev dependency
2015-05-04 13:25:21 +02:00
Johannes Zellner
f6a2003d05
Fixup the oauth client tests
2015-05-04 13:23:50 +02:00
Johannes Zellner
c4370c3d04
Allow to specify oauth scopes when creating credentials
2015-05-04 13:23:36 +02:00
Johannes Zellner
799ec56fb1
Show fqdn in case location is empty
...
Fixes #360
2015-05-04 11:23:00 +02:00
Johannes Zellner
401575261e
Show fqdn instead of app location in case it is empty
...
Fixes #361
2015-05-04 11:15:09 +02:00
Girish Ramakrishnan
a3fa745859
Change restart policy to always
...
It looks like containers with a restart policy of 'on-failure'
do not get restarted if docker crashes (guessing that it's because
docker doesn't record it as a container failure).
apps have a restart policy of 'on-failure' and they don't get restarted
whereas addons with a restart policy of 'always' do get restarted.
So, change restart policy of app to 'always' for now.
2015-05-03 21:29:51 -07:00
Girish Ramakrishnan
fcf3f4e147
Copy contents of dir and not dir itself
2015-05-01 13:44:58 -07:00
Girish Ramakrishnan
8916295574
Do not unregister subdomain in configure
...
We don't have the old subdomain. So we end up unregistering the
new subdomain which breaks the appstore's resue subdomain id
optimization
2015-05-01 13:36:48 -07:00
Girish Ramakrishnan
015d016cb6
Remove dead code to generate naked_domain.conf
2015-05-01 13:16:18 -07:00
Girish Ramakrishnan
4d2f2b9d44
Rework naked domain code
...
This greatly simplifies naked domain setup. We simply treat
'' location as a special case. If conflicts happen, we should
report it just like any other location.
naked domain is also not part of settings anymore
Fixes #351
2015-05-01 12:53:08 -07:00
Girish Ramakrishnan
e30e978b88
Cache node_modules
...
This greatly speeds up packaging
2015-05-01 12:52:57 -07:00
Girish Ramakrishnan
5e1417e958
exit if there are local changes
...
we use git to create the tarball. Often I make changes and
not commit them and they do not end up in the tarball.
2015-05-01 12:28:18 -07:00
Girish Ramakrishnan
0d41f85b5b
deploymentConfig is never used
2015-05-01 12:28:18 -07:00
Girish Ramakrishnan
a01d8b6cf7
installationProgress can be null
2015-05-01 11:14:58 -07:00
Girish Ramakrishnan
9c98ac35cf
Better nginx detection
2015-05-01 10:31:06 -07:00
Girish Ramakrishnan
766f8bf659
Fix copy/paste error
2015-04-30 20:47:10 -07:00
Girish Ramakrishnan
bb99dc0a7b
Add missing require
2015-04-30 14:40:58 -07:00
Girish Ramakrishnan
abad2b90a0
Add default timezone from /etc/timezone
2015-04-30 14:12:08 -07:00
Girish Ramakrishnan
a6a9f28c64
Fix typo
2015-04-30 14:05:52 -07:00
Girish Ramakrishnan
c0879494c5
Store tz in db instead of settings sytem tz
...
This makes restore trivial since we handle tz now in the node
framework and libraries instead of relying on system timezone.
Otherwise, start.sh has to now read the db and set the system
timezone which is not nice since it increases db and start.sh
dependancy.
Fixes #359
2015-04-30 13:29:23 -07:00
Girish Ramakrishnan
1cf34693d5
Add set/getTimeZone
2015-04-30 13:20:32 -07:00
Girish Ramakrishnan
489d8f44a3
Add API to set the autoupdate pattern
...
Part of #355
2015-04-30 11:10:39 -07:00
Girish Ramakrishnan
8079ed09d2
Move update checker as cronjob as well
2015-04-29 16:38:54 -07:00
Girish Ramakrishnan
8b1dab008d
Make backup and heartbeat as cron jobs
2015-04-29 16:38:54 -07:00
Johannes Zellner
0a0bd42323
We now use api.dev.cloudron.io
2015-04-29 15:42:35 +02:00
Johannes Zellner
90c93667f2
Let token_1 expire much later
...
Fixes #350
2015-04-28 18:42:31 +02:00
Johannes Zellner
1c7ac37232
Purchase api fails with 402 not 500
2015-04-28 18:42:17 +02:00
Johannes Zellner
5f61219372
Fix error message
2015-04-28 18:41:09 +02:00
Johannes Zellner
85b93b7137
Purchase api returns 402 not 401
2015-04-28 18:28:31 +02:00
Johannes Zellner
a59df0ed44
Cleanup linter errors
2015-04-28 18:09:20 +02:00
Johannes Zellner
37569c83f1
Add favicons
...
Fixes #354
2015-04-28 12:03:13 +02:00
Johannes Zellner
ce812e8f03
Show more descriptive error in case app purchase failed
2015-04-28 12:03:12 +02:00
Johannes Zellner
0058366898
Use ngSanitize in the webadmin
2015-04-28 12:03:12 +02:00
Johannes Zellner
f86416c9bf
Add angular sanitize module
2015-04-28 12:03:12 +02:00
Johannes Zellner
cb1e852088
Do not set gBoxUpdateInfo as empty object but null
2015-04-28 12:03:12 +02:00
Girish Ramakrishnan
69f51e1948
Update the box everyday at 1am
...
Part of #355
2015-04-27 23:44:16 -07:00
Girish Ramakrishnan
84f8d5add0
Add cron
2015-04-27 23:06:02 -07:00
Girish Ramakrishnan
bf280bcd65
Set cloudron timezone based on ip
...
Part of #355
2015-04-27 22:57:40 -07:00
Girish Ramakrishnan
4d2c51f1a3
refactor code into user.createOwner
2015-04-27 22:37:43 -07:00
Girish Ramakrishnan
0fb73b296e
Fix coding style
2015-04-27 22:19:32 -07:00
Johannes Zellner
0a21553efb
On a 402 we don't have an error object
2015-04-27 18:27:35 +02:00
Johannes Zellner
493d7a2b2e
Handle 402 during app install
2015-04-27 18:11:26 +02:00
Johannes Zellner
e4b9b85091
Add test to install already purchased app
2015-04-27 16:17:31 +02:00
Johannes Zellner
7895382a46
Fixup the tests for app purchase
2015-04-27 15:54:27 +02:00
Johannes Zellner
d0054770e5
Perform app purchase on app install
2015-04-27 14:59:55 +02:00
Girish Ramakrishnan
88bbe86000
Upgrade code path must backup box and apps
2015-04-24 19:45:31 -07:00
Girish Ramakrishnan
712bd59146
change ownership of addons since it is used by redis addon
2015-04-24 19:40:23 -07:00
Girish Ramakrishnan
11aecac6fd
Fix typo
2015-04-24 16:54:47 -07:00
Girish Ramakrishnan
125e60f125
Do not generate new password for addons on each update
...
They need to be generated only on infra upgrade. But start.sh was
generating it all the time and hence the existing addon containers
and the root passwords is going out of sync
Fixes #352
2015-04-24 16:14:34 -07:00
Girish Ramakrishnan
7abf941b82
Add retire option
2015-04-24 13:48:35 -07:00
Girish Ramakrishnan
c17688bb8d
Box needs 0.12.x atleast
2015-04-24 12:01:12 -07:00
Girish Ramakrishnan
69f9bee677
Bump the infra version because why not
2015-04-24 10:33:52 -07:00
Girish Ramakrishnan
576ab7bcfe
Add --publish option to createSourceTarball
2015-04-24 10:20:39 -07:00
Johannes Zellner
cd1ed45845
Do not crash in case the update check fails to deliver a result
2015-04-24 10:26:48 +02:00
Johannes Zellner
0a6bb9c531
Fix escaping
...
Fixes #349
2015-04-24 09:54:33 +02:00
Girish Ramakrishnan
3ff438ba43
Fix update badge display logic
2015-04-23 13:23:12 -07:00
Girish Ramakrishnan
7bb9358646
Change ownership carefully
...
With the previous approach, addon data got their ownership changed
(and the addons are still running!)
2015-04-23 12:04:02 -07:00
Girish Ramakrishnan
26ba9f999b
Simply make INFRA_VERSION a sourceable file
...
This makes it possible to put comments
2015-04-23 12:04:02 -07:00
Johannes Zellner
03d6db1550
Only allow upating when all apps are in good state
...
Fixes #348
2015-04-23 14:20:15 +02:00
Johannes Zellner
1e453f32b8
Add readToUpdate angular filter
2015-04-23 14:20:07 +02:00
Johannes Zellner
999b343885
Use angular.copy()
2015-04-23 14:13:27 +02:00
Johannes Zellner
fdfa837f16
Add some documentation about the developer mode
2015-04-23 13:03:06 +02:00
Johannes Zellner
8ed1933089
Remove backup ability from navbar menu
2015-04-23 12:54:31 +02:00
Johannes Zellner
b21d92e7a3
Add backup ability to settings view
2015-04-23 12:52:04 +02:00
Johannes Zellner
c29a20d8d1
Add prettyDate filter
2015-04-23 12:51:17 +02:00
Johannes Zellner
d8f955b405
Remove developer mode settings from account view
2015-04-23 12:26:29 +02:00
Johannes Zellner
77cbc15f01
Only allow admins to see the settings
2015-04-23 12:26:19 +02:00
Johannes Zellner
e67d3501e0
Show settings view in menu
2015-04-23 12:24:32 +02:00
Johannes Zellner
905eb138d5
Add settings view
2015-04-23 12:24:19 +02:00
Johannes Zellner
26bd7f0c5d
Adjust run.sh appconfig.ejs usage
2015-04-23 12:16:22 +02:00
Johannes Zellner
571588a6b1
Remove naked domain in run.sh
2015-04-23 12:15:28 +02:00
Girish Ramakrishnan
820f53b9e3
Revert "010254399a2e21e186b234624ac8f9590c8f0d9f"
...
Need to recreate admin.conf since splash has overwritten it
2015-04-23 02:25:23 -07:00
Girish Ramakrishnan
a84253e3e8
Make splash code override nginx configs based on retire and infra change
...
Fixes #346
2015-04-23 01:53:54 -07:00
Girish Ramakrishnan
010254399a
Create nginx config only for restore and new code paths
...
In the update code path, the configs are already uptodate
2015-04-23 01:03:27 -07:00
Girish Ramakrishnan
ec56b785e8
Save INFRA_VERSION in a file
...
The splash code needs to access this as well
2015-04-22 23:50:04 -07:00
Girish Ramakrishnan
a68a146fe9
Specify an enum for ejs template
2015-04-22 22:40:32 -07:00
Girish Ramakrishnan
578ca176bf
Fix tests
2015-04-22 22:38:27 -07:00
Girish Ramakrishnan
a36d6d864f
Box update only backs up the box now
2015-04-22 18:26:34 -07:00
Girish Ramakrishnan
83a438e004
create var for mysql root password
2015-04-22 18:09:14 -07:00
Girish Ramakrishnan
719c5f5414
mysql needs to be setup for new cloudrons
2015-04-22 18:05:57 -07:00
Girish Ramakrishnan
60eb2d6fbd
-p makes the mkdir safe to use if dir exists
2015-04-22 18:01:51 -07:00
Girish Ramakrishnan
371733bd19
mysql does not need to run as yellowtent user
2015-04-22 16:11:14 -07:00
Girish Ramakrishnan
2c6bec2654
Rename variables
2015-04-22 16:11:14 -07:00
Girish Ramakrishnan
cc49cf00a0
Restart collectd
2015-04-22 16:11:11 -07:00
Girish Ramakrishnan
70376fa475
remove unused variable
2015-04-22 15:45:55 -07:00
Girish Ramakrishnan
8909ad08ea
Ensure addons dir has correct permissions
2015-04-22 15:45:42 -07:00
Girish Ramakrishnan
97f99623cc
Get rid of box_src_tmp_dir
...
This code is based on old installer logic
2015-04-22 15:38:05 -07:00
Girish Ramakrishnan
7c8b4bdea7
No need to change ownership of BOX_SRC_DIR
2015-04-22 15:36:09 -07:00
Girish Ramakrishnan
b3f611ade2
Do not restart apps and containers on update
...
(do not delete data dir)
Fixes #342
2015-04-22 14:56:02 -07:00
Girish Ramakrishnan
73de1a7c4e
Make nginx and collectd dynamic config
...
With nginx and collect being dynamic, we do no need to regenerate
this for updates where the cloud version does not change
Part of #342
2015-04-22 12:43:05 -07:00
Girish Ramakrishnan
95d22c8986
Move app/addon configuration to separate file
...
Part of #342
2015-04-21 23:56:10 -07:00
Girish Ramakrishnan
dfe40c4594
Add DESIGN doc
...
Part of #342
2015-04-21 23:44:32 -07:00
Girish Ramakrishnan
418ac43f16
Fix various bugs in 0579226b98
2015-04-21 23:42:51 -07:00
Girish Ramakrishnan
f17aba3a61
merge reload supervisor into main code
...
Part of #342
2015-04-21 23:39:59 -07:00
Girish Ramakrishnan
c314eca0d2
Remove config dir
...
Part of #342
2015-04-21 23:39:59 -07:00
Girish Ramakrishnan
50c53fb7e5
Setup nginx in container.sh
...
Part of #342
2015-04-21 23:39:55 -07:00
Girish Ramakrishnan
c654c0fbdf
CONFIG_DIR is inside container
...
Part of #342
2015-04-21 23:03:16 -07:00
Girish Ramakrishnan
b51d7193ff
Move collectd into container configuration
...
Part of #342
2015-04-21 23:03:01 -07:00
Girish Ramakrishnan
0579226b98
Move logrotate, supervisor, sudo into static setup
...
Part of #342
2015-04-21 23:02:55 -07:00
Johannes Zellner
b22136f11b
Ensure we allow an app to use our oauthproxy callback uri as well
2015-04-21 15:51:02 +02:00
Johannes Zellner
6e8616c898
Disable the body size check
2015-04-21 15:51:02 +02:00
Girish Ramakrishnan
68b808031a
Minor refactor
2015-04-21 00:12:28 -07:00
Girish Ramakrishnan
7333d13d29
postInstall -> handleRunCommand
2015-04-20 20:22:02 -07:00
Girish Ramakrishnan
73ba63da00
Run the app in restore code path
2015-04-20 20:22:02 -07:00
Girish Ramakrishnan
2930849f52
Delete container during restore
...
Without this the btrfs subvolume won't unlink
2015-04-20 19:42:49 -07:00
Girish Ramakrishnan
07dfdaba96
Typo
2015-04-20 19:42:49 -07:00
Girish Ramakrishnan
75ff513aef
Fix debug scoping
2015-04-20 18:35:53 -07:00
Girish Ramakrishnan
4abd1845cb
Add app restore backend api
...
Part of #312
2015-04-20 16:58:09 -07:00
Girish Ramakrishnan
fc23322ccb
Add UI to restore app
...
Fixes #312
2015-04-20 16:41:54 -07:00
Girish Ramakrishnan
c9023ed479
Fix box installation state rules
...
Fixes #312
2015-04-20 13:37:47 -07:00
Girish Ramakrishnan
dee2d73e11
Initialize as empty object
2015-04-20 13:36:47 -07:00
Girish Ramakrishnan
69b7f59710
Handle empty appStoreId
...
appStoreId is '' for dev apps
2015-04-19 13:12:55 -07:00
Johannes Zellner
ea98622170
Allow up to 512mb body size for file uploads
...
We might want to make that configurable by the app?
2015-04-19 14:37:21 +02:00
Girish Ramakrishnan
439e1c0e27
I think this reads better
2015-04-18 14:10:02 -07:00
Girish Ramakrishnan
3f7a292d86
Provide webadminUrl in the mails
2015-04-18 13:48:33 -07:00
Girish Ramakrishnan
4b552a6284
More debug in apptask
2015-04-18 13:44:05 -07:00
Girish Ramakrishnan
a322fb516c
Implement app update emails
2015-04-18 13:36:42 -07:00
Girish Ramakrishnan
97febdc143
Fix debugApp
2015-04-18 13:34:44 -07:00
Girish Ramakrishnan
1356439c62
Rename to boxUpdateAvailable
2015-04-18 10:32:57 -07:00
Girish Ramakrishnan
c75ab5c341
Do no html escape the changelog text
2015-04-17 17:56:35 -07:00
Girish Ramakrishnan
7dc5658dbc
Email admin when new box version is available
...
Didn't do app updates because it's a lot of work. We need
to clear notifications when an app updates.
Fixes #343
2015-04-17 17:09:01 -07:00
Girish Ramakrishnan
c92cb477a7
app can be null
2015-04-17 13:39:15 -07:00
Girish Ramakrishnan
6cd316f4f1
Start apptask with an arbitrary 0-10secs delay
2015-04-17 13:33:58 -07:00
Girish Ramakrishnan
1a8b705bc2
better debug messages
2015-04-17 12:50:48 -07:00
Girish Ramakrishnan
6b87c69147
Remove spurious debug
2015-04-17 12:09:00 -07:00
Girish Ramakrishnan
12c56a8324
debug the app's location
2015-04-17 12:07:06 -07:00
Johannes Zellner
c9b7d9a018
Add Rickshaw and d3 for graphs
2015-04-16 15:39:06 +02:00
Girish Ramakrishnan
9c58a79aed
Update manifestformat
2015-04-15 23:34:43 -07:00
Girish Ramakrishnan
d428ac7bc2
docker addon support
...
socat UNIX-CONNECT:/var/run/docker.sock STDIN to test the connection
2015-04-15 23:34:43 -07:00
Girish Ramakrishnan
5fb3c17cf3
Make backup and teardown explicitly noop
2015-04-15 23:34:43 -07:00
Girish Ramakrishnan
6ad490c3c6
Allow addons to provide binds
2015-04-15 23:34:40 -07:00
Girish Ramakrishnan
b4f8e426d7
dockerImage is mandatory again
2015-04-15 22:02:38 -07:00
Girish Ramakrishnan
7f114abd2a
Do not build images on cloudron
...
This approach does not work nicely because the cloudrons
do not have the horse power for compilation (even on 1GB
droplets). Things like gem install and npm install just
hang for very long time. docker keeps crashing because of
OOM.
Initially, we suspected some btrfs issue but creating an
image without btrfs for docker has the same issues.
Plan is to create a build server for this purpose
imageName is now derived from convention
This reverts 4a31b6c2ff
Revert "Update route read tarball as well"
This reverts commit 965ddb86c3 .
Revert "Make app sources a constant"
This reverts commit fdb74cc5e3 .
Revert "Copy tarball into sources dir"
This reverts commit b534019398 .
Revert "Make update route multipart"
This reverts commit 079b3a50e3 .
Revert "Make install route multipart request"
This reverts commit e61392269c .
Revert "Add ?build query param for logs"
This reverts commit 4544a86846 .
Remove tail-stream
This reverts commit 8c6510b4f4
2015-04-15 12:03:36 -07:00
Johannes Zellner
ad913b25e7
Use tail-stream for build log streaming
2015-04-14 15:12:23 +02:00
Johannes Zellner
8c6510b4f4
Add tail-stream
2015-04-14 14:42:22 +02:00
Johannes Zellner
6878f839c8
Add newlines in build logs
2015-04-14 14:21:15 +02:00
Johannes Zellner
eb80416dd9
Do not automatically close the build logs file stream on end
2015-04-14 13:51:15 +02:00
Johannes Zellner
a1beffc22b
Strip off docker related output in logs
2015-04-14 13:47:02 +02:00
Johannes Zellner
939d115147
Add basic build log streaming
2015-04-14 13:35:54 +02:00
Johannes Zellner
06fde8a374
only check if the query param exists
2015-04-14 13:15:33 +02:00
Johannes Zellner
0fb47edb49
Fix typo
2015-04-14 13:05:10 +02:00
Johannes Zellner
4544a86846
Add ?build query param for logs
2015-04-14 12:52:43 +02:00
Johannes Zellner
a49dbe6d90
Create build log alongside with the app tarball
2015-04-14 12:40:56 +02:00
Girish Ramakrishnan
afe4890a08
Update manifestformat (dockerImage is not required anymore)
2015-04-14 02:17:14 -07:00
Girish Ramakrishnan
4a31b6c2ff
Build the docker image from source
2015-04-14 02:09:57 -07:00
Girish Ramakrishnan
965ddb86c3
Update route read tarball as well
2015-04-14 02:04:47 -07:00
Girish Ramakrishnan
fdb74cc5e3
Make app sources a constant
2015-04-14 02:02:02 -07:00
Girish Ramakrishnan
b534019398
Copy tarball into sources dir
2015-04-14 01:34:44 -07:00
Girish Ramakrishnan
4f0b2a27fb
Up the field limit to 2mb
2015-04-13 23:58:08 -07:00
Girish Ramakrishnan
079b3a50e3
Make update route multipart
...
We can then use this route to send source code as well
2015-04-13 23:28:26 -07:00
Girish Ramakrishnan
e61392269c
Make install route multipart request
...
We can then use this route to send source code as well
2015-04-13 23:28:26 -07:00
Girish Ramakrishnan
aea2af9553
Check if addons is valid
2015-04-13 23:28:26 -07:00
Girish Ramakrishnan
debf713fa7
Fix deprecation warning
2015-04-13 21:51:24 -07:00
Girish Ramakrishnan
ea2560feea
Revert "Add hack to convert addon in manifest"
...
This reverts commit b01fb43e99 .
Hack not needed now that cloudrons have migrated
2015-04-13 13:41:06 -07:00
Johannes Zellner
d8ac0330e8
Ensure we wait for gulp tasks to complete
2015-04-13 20:18:26 +02:00
Girish Ramakrishnan
b01fb43e99
Add hack to convert addon in manifest
2015-04-13 11:23:20 -07:00
Girish Ramakrishnan
cc3f1b4802
better log message
2015-04-13 10:59:56 -07:00
Johannes Zellner
d663fb3f00
Make appstatus a single file page
...
Fixes #332
2015-04-13 19:01:36 +02:00
Johannes Zellner
f52d2bcb15
Revert "Redirect to appstatus.html in the webadmin on apperror"
...
This reverts commit c6a355cf1a .
2015-04-13 18:24:46 +02:00
Johannes Zellner
b51f97c372
Revert "Set the adminOrigin for nginx configs also in start.sh"
...
This reverts commit 247892466e .
2015-04-13 18:24:39 +02:00
Johannes Zellner
d4baee3650
Revert "Do not make a permanent redirect for appstatus"
...
This reverts commit 3537dd2f93 .
2015-04-13 18:24:32 +02:00
Johannes Zellner
3537dd2f93
Do not make a permanent redirect for appstatus
2015-04-13 17:08:44 +02:00
Johannes Zellner
247892466e
Set the adminOrigin for nginx configs also in start.sh
2015-04-13 16:53:08 +02:00
Johannes Zellner
8c401fffcd
Also use adminOrigin for appconfig.ejs in run.sh
2015-04-13 16:53:00 +02:00
Johannes Zellner
c6a355cf1a
Redirect to appstatus.html in the webadmin on apperror
...
Fixes #332
2015-04-13 15:17:29 +02:00
Johannes Zellner
79b0408186
Do not skip step4 when pressing enter in setup
2015-04-13 14:07:58 +02:00
Johannes Zellner
d6c40bb1d7
Check app health every 10 seconds
...
Fixes #336
2015-04-13 12:55:31 +02:00
Johannes Zellner
ec94441cab
Remove unused require
2015-04-13 12:52:05 +02:00
Johannes Zellner
15416a3a61
Mark apps as unhealthy after not responding to healthcheck for 10 minutes
2015-04-13 12:51:49 +02:00
Girish Ramakrishnan
5e56d4c960
Update manifestformat to 1.0.5
...
This makes addons an object instead of an array
2015-04-12 23:39:35 -07:00
Girish Ramakrishnan
9bf536d743
Clean snapshots in setup script
...
chown -R yellowtent.yellowtent fails because we have old failed
backup snapshots sometimes
2015-04-12 23:22:35 -07:00
Girish Ramakrishnan
0a82fcb15f
Write icon file only if 200
...
Fixes #316
2015-04-12 20:25:45 -07:00
Girish Ramakrishnan
66c82b42d5
Make app update take an icon
...
Part of #316
2015-04-12 20:24:54 -07:00
Girish Ramakrishnan
8fffbd7252
Allow a base64 icon to provided as part of install
...
Part of #316
2015-04-12 20:24:44 -07:00
Johannes Zellner
c3aaad63ce
Specify proxy buffers for nginx configs
...
Fixes #333
2015-04-12 12:04:52 +02:00
Girish Ramakrishnan
e96d80e2f8
Add option to keep the local tarball around
2015-04-11 22:16:23 -07:00
Girish Ramakrishnan
443be4073f
Add tests for shell.js
...
Fixes #334
2015-04-11 11:08:45 -07:00
Girish Ramakrishnan
e7fe7cf46f
Implement shell.exec using spawn
...
execFile buffers the output and bombs with EPERM (kill) when
that buffer overflows
Part of #334
2015-04-11 11:08:37 -07:00
Girish Ramakrishnan
44e136e91e
Refactor execFile into shell.js
...
Part of #334
2015-04-11 10:29:19 -07:00
Girish Ramakrishnan
26c87b16ce
Add ssl_session_cache
2015-04-10 23:01:51 -07:00
Girish Ramakrishnan
37216faee1
stderr and stdout are not defined
2015-04-10 21:12:55 -07:00
Girish Ramakrishnan
e3d7eceaeb
Refactor into cloudron.reboot
2015-04-10 20:00:57 -07:00
Girish Ramakrishnan
aad330b04c
Wrap execFile
2015-04-10 20:00:46 -07:00
Girish Ramakrishnan
3d55e6313e
Print the error code and signal
2015-04-10 19:08:34 -07:00
Girish Ramakrishnan
a168846a05
Remove sudo
2015-04-10 16:14:57 -07:00
Girish Ramakrishnan
53a925374b
Containers are not semver based
2015-04-10 15:15:53 -07:00
Girish Ramakrishnan
f196088aa0
test app version is now 0.1.0
2015-04-10 14:41:29 -07:00
Johannes Zellner
2b7d28191c
Rework parts of the setup wizard
...
Fixes #318
2015-04-10 15:33:57 +02:00
Johannes Zellner
09431040f4
Make email query param in setup mandatory
2015-04-10 15:07:41 +02:00
Johannes Zellner
0e4baf18eb
Reset the password model to '' instead of {}
...
Fixes #329
2015-04-10 14:32:43 +02:00
Johannes Zellner
0be98c300f
App icon urls now require an access token
2015-04-10 13:41:09 +02:00
Johannes Zellner
9c960a7e89
Only show apps as running if health check passes
...
Fixes #309
2015-04-10 13:19:31 +02:00
Johannes Zellner
1570d1d3bf
Make app state filter work off the app object
2015-04-10 13:11:16 +02:00
Johannes Zellner
d86533ebc6
Separate password input from regular form
...
Fixes #330
2015-04-10 13:05:03 +02:00
Johannes Zellner
5b07c5e372
Remove password requirement for app installation form
2015-04-10 12:58:34 +02:00
Johannes Zellner
e321c4ab54
Do not require a password for app installation
2015-04-10 12:53:50 +02:00
Johannes Zellner
c8da586890
Show error messages for 5seconds
...
Fixes #328
2015-04-10 12:09:38 +02:00
Johannes Zellner
29fd79e471
Add tests for non admins using the apps api
...
Fixes #317
2015-04-10 12:07:58 +02:00
Johannes Zellner
0affa769ac
Show update badge only for admins
2015-04-10 11:53:55 +02:00
Johannes Zellner
ac836dec22
Fix account page gravatar usage
2015-04-10 11:53:17 +02:00
Johannes Zellner
d56990a5f5
Do not show app actions for non admins
2015-04-10 11:47:58 +02:00
Johannes Zellner
94ddd51e91
Allow non admins to view the appstore but hide install action
2015-04-10 11:37:52 +02:00
Johannes Zellner
7e5669fbbb
Only admins should do app actions
2015-04-10 11:28:12 +02:00
Johannes Zellner
fd5fd610a7
We do now rely on girish/redis:0.4 for tests
2015-04-10 11:26:58 +02:00
Johannes Zellner
ab831ab8e1
/tmp/mysql_vars.sh is not owned by the user
...
I am not sure if the whole script can safely run as root.
Currently this is a bit annoying having to provide the password in
npm test...
2015-04-10 11:24:23 +02:00
Girish Ramakrishnan
038ae04f9e
Fix typo that breaks backup and restore
...
Fixes #322
2015-04-09 16:38:17 -07:00
Girish Ramakrishnan
c8a855427d
Continue if redis container was not found
2015-04-09 15:49:26 -07:00
Girish Ramakrishnan
6ce0101b86
Add a hack to make script work with subdirectories
...
Should probably rename this script rimraf.sh
2015-04-09 14:52:51 -07:00
Girish Ramakrishnan
1f71063183
Remove any existing directory from previous failed tests
2015-04-09 08:53:58 -07:00
Girish Ramakrishnan
67cf39fd2a
Update addons
2015-04-09 08:26:31 -07:00
Johannes Zellner
567c77226f
Give the setup more space
2015-04-09 14:31:18 +02:00
Johannes Zellner
28d7a47c63
Provider better padding for content
2015-04-09 14:29:58 +02:00
Johannes Zellner
bfb44f0d1e
Ensure the redirectTo url is passed around the form submit
2015-04-09 13:53:02 +02:00
Johannes Zellner
4ba35caa0e
Send the returnTo url in the query in addition to the session in case we hit an issue
...
Fixes #314
2015-04-09 13:40:06 +02:00
Johannes Zellner
490d22c601
Provide link back to the webadmin on login form issues
2015-04-09 13:28:49 +02:00
Johannes Zellner
c477cdcc87
Clarify why the user needs to provide a password
...
Fixes #320
2015-04-09 11:32:45 +02:00
Johannes Zellner
0406b740be
Add padding to apps grids
2015-04-09 11:26:55 +02:00
Girish Ramakrishnan
d00016021f
Installer now saves the start output in it's logs
2015-04-08 20:47:32 -07:00
Girish Ramakrishnan
f39368bb99
Remove backup.log
...
Part of #324
2015-04-08 19:24:57 -07:00
Girish Ramakrishnan
475d88ef9f
Remove backupapp.log and restoreapp.log
...
Part of #324
2015-04-08 19:23:33 -07:00
Girish Ramakrishnan
2435ced2d1
Do not unconditionally return true
2015-04-08 18:25:31 -07:00
Girish Ramakrishnan
fbc1ccf58f
Reload collected only on cloudron
2015-04-08 18:23:52 -07:00
Girish Ramakrishnan
d921a43674
Reload nginx only on cloudron
2015-04-08 18:21:46 -07:00
Girish Ramakrishnan
ae2309f30c
Dump stdout and stderr for better debugging
2015-04-08 18:15:19 -07:00
Girish Ramakrishnan
d2a5709791
Show percent
2015-04-08 18:15:19 -07:00
Johannes Zellner
3b7ca63ed0
Also fixup the installed apps view for icon size
2015-04-08 18:01:12 +02:00
Johannes Zellner
0b112ca488
Allow non square app icons to extend in width
2015-04-08 17:59:08 +02:00
Johannes Zellner
c440d9f7b4
Support external developer applications in login form
2015-04-07 17:43:17 +02:00
Johannes Zellner
f7e226150f
Avoid deprecation warning
2015-04-07 17:40:40 +02:00
Johannes Zellner
bc4ac0e41e
Do not clip mediaLinks
...
Fixes #310
2015-04-07 10:50:34 +02:00
Girish Ramakrishnan
c33d3cba60
Typo
2015-04-06 08:45:35 -07:00
Girish Ramakrishnan
29d0f57b8d
save/restore mongodb
2015-04-05 23:53:54 -07:00
Girish Ramakrishnan
4e16b76cc2
Add mongodb addon support
2015-04-05 21:55:28 -07:00
Johannes Zellner
e3c2059cdd
Preven grid items to change size due to progress bar
2015-04-05 16:06:29 +02:00
Johannes Zellner
207500eadb
Just set the progress to 0 initially
2015-04-05 15:58:27 +02:00
Johannes Zellner
da5b9f3abc
Apparently TIMESTAMP(2) is not supported everywhere
2015-04-05 15:26:58 +02:00
Johannes Zellner
5183ec4b7c
Add fake progress together with installationProgress labels
2015-04-05 11:02:50 +02:00
Johannes Zellner
4119eac684
Place a progress bar in grid item during installation
2015-04-05 10:07:21 +02:00
Johannes Zellner
df4a143036
Add appsdb.createdAt timestamp
...
Fixes #307
2015-04-04 11:37:07 +02:00
Johannes Zellner
0f85b4f412
Fixup link to the appstore in error.html
...
Fixes #308
2015-04-04 11:35:55 +02:00
Johannes Zellner
b79a61f240
Hide access restrictions dropdown on installation
...
Fixes #305
2015-04-04 11:06:05 +02:00
Johannes Zellner
54c3ed3ec5
Also return better response if we cannot get logstream due to wrong app state
2015-04-04 10:37:46 +02:00
Johannes Zellner
f72b9d7890
Return better response if we cannot get logs due to wrong app state
2015-04-04 10:36:15 +02:00
Girish Ramakrishnan
9cbaef5b41
Send params in body instead of query
2015-04-02 16:23:53 -07:00
Girish Ramakrishnan
cd550b1807
Expose http port
...
This is require for images that do not EXPOSE the http port. Without
EXPOSE, portBindings won't work
2015-04-01 12:56:38 -07:00
Johannes Zellner
d4d41dcdd5
Ensure the app grit item buttons are properly positioned
2015-04-01 16:43:41 +02:00
Johannes Zellner
354b004c78
Do not use redirects for session login due to chrome not sending cookies
...
Fixes #303
2015-04-01 16:19:09 +02:00
Johannes Zellner
8518fc3d3f
Explicitly set cookie settings and a maxAge
2015-04-01 14:45:02 +02:00
Girish Ramakrishnan
0db08cf3ef
Revert "Add hacks to migrate legacy data"
...
This reverts commit b1381263d3 .
Staging Cloudrons have migrated
2015-04-01 01:34:29 -07:00
Girish Ramakrishnan
b1381263d3
Add hacks to migrate legacy data
2015-04-01 00:48:49 -07:00
Girish Ramakrishnan
29624c8a30
move version file to box dir
2015-03-31 17:18:15 -07:00
Johannes Zellner
2bc88ebeb6
Rename authCode to code
...
Fixes #300
2015-03-31 15:20:01 +02:00
Johannes Zellner
c7fa8b9268
Remove unused oauth2 assets
2015-03-31 15:18:36 +02:00
Johannes Zellner
ef253a6b30
Let tokens be valid for one day
2015-03-31 12:48:52 +02:00
Johannes Zellner
ac4e6931e8
Validate redirectURI for oauth client routes
2015-03-31 12:46:01 +02:00
Johannes Zellner
a38aae5d8f
Add valid-url node module
2015-03-31 12:45:46 +02:00
Johannes Zellner
4770b8bbf1
Give developer tokens also the settings scope
2015-03-31 12:37:07 +02:00
Johannes Zellner
a712157ed3
Move client token tests into clients-test.js
2015-03-31 12:00:47 +02:00
Johannes Zellner
3fd5415c46
Move /api/v1/oauth/clients/:clientId/tokens DELETE into clients.js
2015-03-31 11:57:55 +02:00
Johannes Zellner
8cb65ecc8e
Move /api/v1/oauth/clients/:clientId/tokens GET into clients.js
2015-03-31 11:49:02 +02:00
Johannes Zellner
6454378543
Move /api/v1/oauth/clients GET into clients.js
2015-03-31 11:42:05 +02:00
Johannes Zellner
d6254b8a97
Add /api/v1/oauth/clients/ DELETE tests
2015-03-31 11:32:35 +02:00
Johannes Zellner
8d87d02942
Add /api/v1/oauth/clients/ PUT tests
2015-03-31 11:28:21 +02:00
Johannes Zellner
f887a6b466
Add /api/v1/oauth/clients/ GET tests
2015-03-31 11:18:14 +02:00
Johannes Zellner
5983526605
Add new oauth clients developer routes
2015-03-31 10:48:07 +02:00
Johannes Zellner
fc040b6b54
Add clients business logic
2015-03-31 10:47:57 +02:00
Johannes Zellner
d3049c90a4
Add clientdb.update()
2015-03-31 09:05:48 +02:00
Girish Ramakrishnan
065452760d
Resize exec window on start
...
We should make this more dynamic someday using an oob channel
to communicate window resize
Fixes #296
2015-03-30 22:45:02 -07:00
Girish Ramakrishnan
0f5ffd4caf
Update manifestformat to 1.0.3
2015-03-30 21:17:33 -07:00
Girish Ramakrishnan
ef209d48a7
Write app config as part of backup
...
part of #280
2015-03-30 17:17:41 -07:00
Girish Ramakrishnan
3abf107413
mail data is now part of box data
...
part of #280
2015-03-30 17:11:47 -07:00
Girish Ramakrishnan
e5d5e256b8
typo
2015-03-29 22:46:33 -07:00
Girish Ramakrishnan
2b81160071
Fix rmappdir
2015-03-29 22:15:41 -07:00
Girish Ramakrishnan
63ca7f0715
Use NODE_ENV in sudo scripts
2015-03-29 21:22:09 -07:00
Girish Ramakrishnan
cbf9354537
Preserve NODE_ENV in sudo scripts
2015-03-29 21:10:09 -07:00
Girish Ramakrishnan
b93f394ea0
make backupbox uploads snapshot
...
btrfs snapshotting does not really give us much in terms of atomicity
since the addons are dumped non-atomically.
The only way to make it all atomic is to stop the app. Snapshot and
let the app start asap. Because we don't stop apps when taking a backup (atm),
the whole btrfs snapshotting thing is superfluous.
part of #280
2015-03-29 19:16:23 -07:00
Girish Ramakrishnan
76365b652e
Create data/box subvolume
2015-03-29 19:16:23 -07:00
Girish Ramakrishnan
c21022367b
Ensure directories as root since they are chown'ed later anyway
2015-03-29 19:16:23 -07:00
Girish Ramakrishnan
d2bdfc3e48
Upload snapshot of apps data
...
btrfs snapshotting does not really give us much in terms of atomicity
since the addons are dumped non-atomically.
The only way to make it all atomic is to stop the app. Snapshot and
let the app start asap. Because we don't stop apps when taking a backup (atm),
the whole btrfs snapshotting thing is superfluous.
Part of #280
2015-03-29 19:16:19 -07:00
Girish Ramakrishnan
4cb846f7d6
Make each app directory a subvolume
...
Part of #280
2015-03-29 18:54:40 -07:00
Johannes Zellner
9212218bd1
Update the shrinkwrap file
2015-03-27 17:04:55 +01:00
Johannes Zellner
52ce5a2e27
Fix update badge visibility on mobile
...
Fixes #297
2015-03-27 15:18:43 +01:00
Johannes Zellner
aefa843d54
Slick carousel does not work correctly with only one item
...
Fixes #295
2015-03-27 14:58:26 +01:00
Johannes Zellner
b953e60f15
If we get 503s check if we should switch to splash mode
...
Fixes #298
2015-03-27 14:58:18 +01:00
Johannes Zellner
6cd53700b4
Add Client.progress() to fetch the current update/backup progress
2015-03-27 13:11:51 +01:00
Johannes Zellner
1b9e71d96e
Also allow accessing theme.css in splash nginx
2015-03-27 11:47:51 +01:00
Johannes Zellner
41f0fdc1b7
Waiting for dns propagation is not an error
2015-03-27 08:56:51 +01:00
Girish Ramakrishnan
444c5742c2
Fix various issues
2015-03-26 22:29:33 -07:00
Girish Ramakrishnan
37c14342f5
Remove addon data on startup
...
The restore code will repopulate addons
2015-03-26 21:24:35 -07:00
Girish Ramakrishnan
585fc5c92b
Add log for succesful backup
2015-03-26 20:51:37 -07:00
Girish Ramakrishnan
5cfdf54401
Make restoreAddons setup addons as well
2015-03-26 18:56:05 -07:00
Girish Ramakrishnan
517e6737fb
Remove addons dep from cloudron.js
2015-03-26 18:51:34 -07:00
Girish Ramakrishnan
fe1523a092
convert backup code to use spawn
2015-03-26 17:55:52 -07:00
Girish Ramakrishnan
f5b96c3d47
Give up on dockerode exec and use spawn instead
2015-03-26 17:43:21 -07:00
Girish Ramakrishnan
9bb77c62bd
Try to fix restore of app
2015-03-26 13:59:24 -07:00
Girish Ramakrishnan
8781fbcde1
Fix app restore
2015-03-26 13:48:21 -07:00
Girish Ramakrishnan
1052396e5f
Restore addons when restoring app
2015-03-26 13:19:30 -07:00
Girish Ramakrishnan
3e765f79dc
Fix typo
2015-03-26 12:25:02 -07:00
Girish Ramakrishnan
0afdb29628
Change ownership of files after restore
2015-03-26 12:01:08 -07:00
Girish Ramakrishnan
cd09d6762b
Restore app from last known backup
2015-03-26 10:48:43 -07:00
Girish Ramakrishnan
91064c0eae
Add missing require
2015-03-26 08:21:27 -07:00
Johannes Zellner
e5f4f22fbf
Fixup nock usage in apptask tests
2015-03-26 16:14:34 +01:00
Johannes Zellner
2d00298a24
We are using nock.isDone() the wrong way
2015-03-26 16:08:51 +01:00
Girish Ramakrishnan
3ec2fe41e5
Fix typos
2015-03-26 06:48:35 -07:00
Girish Ramakrishnan
3bf332f01e
Send appBackupIds in backup call
2015-03-26 05:44:05 -07:00
Girish Ramakrishnan
9be8e7433d
Store the last backup id
2015-03-26 05:42:10 -07:00
Girish Ramakrishnan
f290b3bee4
Add lastBackupId field in apps table
2015-03-26 05:28:30 -07:00
Girish Ramakrishnan
0b55b7025b
Create backup of box separately from apps
2015-03-26 05:27:14 -07:00
Johannes Zellner
420f860e81
Do not show cloudron app version in appstore view
...
The cloudron app version is so far unintersting,
everything else can be shown depending on the app by the author
in the description.
2015-03-26 11:10:29 +01:00
Girish Ramakrishnan
4686279697
Move backupApp into cloudron.js
2015-03-26 00:15:47 -07:00
Girish Ramakrishnan
f35a1b1d47
finish is only emitted for pipe
2015-03-26 00:08:04 -07:00
Girish Ramakrishnan
0ba2288803
demux docker stream since it is interlaced
2015-03-26 00:01:47 -07:00
Girish Ramakrishnan
d8d590c24c
Fix typo
2015-03-25 23:49:52 -07:00
Girish Ramakrishnan
7d37d0a221
Fix container.exec usage
2015-03-25 23:49:41 -07:00
Girish Ramakrishnan
1dd47db64f
Use colon in chown instead of dot
2015-03-25 23:00:57 -07:00
Girish Ramakrishnan
40f474e5ed
Backup app before update
2015-03-25 22:52:06 -07:00
Girish Ramakrishnan
9b38e9a6f2
Create redis volume inside the app dir
2015-03-25 20:01:19 -07:00
Girish Ramakrishnan
8bcab8d084
Delegate data volume creation to script
...
This will be used to create a btrfs subvolume for each app later
2015-03-25 19:36:44 -07:00
Girish Ramakrishnan
872be78c68
Bump addon versions
2015-03-25 18:15:28 -07:00
Girish Ramakrishnan
a51bbeed26
Remove temp data migration code now that cloudrons have migrated
2015-03-25 16:54:11 -07:00
Girish Ramakrishnan
d609c0b305
More migration script fixing
2015-03-25 12:01:59 -07:00
Girish Ramakrishnan
4f902bc3a4
Move box mysql dump
2015-03-25 11:19:54 -07:00
Girish Ramakrishnan
4f452332ff
Fix migration script
2015-03-25 11:09:14 -07:00
Girish Ramakrishnan
b35999aa2e
Fix apps-test failures
2015-03-25 09:51:02 -07:00
Girish Ramakrishnan
792bf84e41
Remove debug
2015-03-25 09:34:01 -07:00
Girish Ramakrishnan
a50d820146
Fix failing createVolume test
2015-03-25 09:33:28 -07:00
Girish Ramakrishnan
8b7d6b3fa5
appicons is now under $DATA/box
2015-03-25 09:32:33 -07:00
Johannes Zellner
c6d8145b1e
appicons are now in box/ subfolder
2015-03-25 17:16:31 +01:00
Johannes Zellner
261e34e87f
Only list active oauth clients per user
...
Fixes #293
2015-03-25 16:50:53 +01:00
Johannes Zellner
68af723503
Add unit tests for the oauth client and token functions
2015-03-25 16:22:19 +01:00
Johannes Zellner
da2a23c08a
Add missing angular notification source file to setup
2015-03-25 15:22:37 +01:00
Girish Ramakrishnan
fa4dcca4b9
Add temporary migration script
2015-03-25 02:02:51 -07:00
Girish Ramakrishnan
be62b76186
create archive of version and not HEAD
2015-03-25 02:02:51 -07:00
Girish Ramakrishnan
7e1c0655ce
Restructure app data
...
This prepares the code to use separate volumes for each app
appicons are moved into box/appicons/{appid}.png. Note that
these icons are not app specific data and are actually data
of the webadmin.
data
{app.id}
data/
2015-03-25 02:02:45 -07:00
Girish Ramakrishnan
5c1fb62adb
We have moved away from sqlite
2015-03-25 00:48:17 -07:00
Girish Ramakrishnan
4d02e4154c
Update mysql and postgresql addons
2015-03-25 00:48:17 -07:00
Johannes Zellner
f8bd995234
Ensure we show busy indicators and disable buttons for app configure/install/update/uninstall
2015-03-24 15:45:14 +01:00
Johannes Zellner
d68d0cf8e2
Hide the screenshow carousel when the install form is visible
2015-03-24 13:05:52 +01:00
Johannes Zellner
6497b62175
Add Client.error() to display notifications
...
This is hooked into the default error handler in the Client
and will thus display nice errors in case we get >=500 errors
from requests.
Fixes #291
2015-03-24 12:59:52 +01:00
Johannes Zellner
a94fa9bdae
Add angular-ui-notification module
2015-03-24 12:59:32 +01:00
Johannes Zellner
1c92bd3435
None of this randomly setting the appstore token during tests anymore
2015-03-24 12:22:56 +01:00
Johannes Zellner
b6c7f34ea3
Fixup the apptask subdomain tests
2015-03-24 12:08:55 +01:00
Johannes Zellner
3a1ae4e9ec
Respond correctly when we hit a port conflict on app configure
...
Fixes #290
2015-03-24 11:51:30 +01:00
Johannes Zellner
3ea11a55ba
Fixup the form feedback on app configuration
...
Fixes #292
2015-03-24 11:50:48 +01:00
Johannes Zellner
4e4344a9c4
Fix input focus on app uninstall form
2015-03-24 11:04:10 +01:00
Johannes Zellner
1a74cac9c3
camelCase appUpdate and appUninstall
2015-03-24 11:02:15 +01:00
Johannes Zellner
d44b95e625
Also hock the app icon route
2015-03-24 10:58:02 +01:00
Johannes Zellner
305b81eb55
Fixup unit tests for app reconfiguration
2015-03-24 10:46:33 +01:00
Johannes Zellner
8cb10ad4a6
Skip subdomain registering in LOCAL mode
...
For test we have a hock instance
2015-03-24 10:46:09 +01:00
Johannes Zellner
ab14a2fe5d
Skip dns propagation check based on config.CLOUDRON
2015-03-24 10:06:53 +01:00
Johannes Zellner
96fe2aafa4
Make location a mandatory property for app configure
2015-03-24 10:06:46 +01:00
Johannes Zellner
408babce05
Use camelCasing for appConfigure
2015-03-24 10:06:46 +01:00
Johannes Zellner
4a5d40c2a9
Report ER_DUP_ENTRY errors correctly
2015-03-24 10:06:46 +01:00
Girish Ramakrishnan
327f3ccc36
Use subdomain status API to check if dns propagated
...
Fixes #285
2015-03-23 21:09:36 -07:00
Girish Ramakrishnan
69307fe3e8
Set value for A records
2015-03-23 18:46:31 -07:00
Girish Ramakrishnan
83c7317f86
Be more explicit on the states that are resumed
2015-03-23 14:53:24 -07:00
Girish Ramakrishnan
82bdd8a3dd
Only restore installed apps
...
Fixes #279
2015-03-23 14:52:51 -07:00
Girish Ramakrishnan
31617a0a4b
Make health a string instead of a boolean
...
One of the ideas here is that we use installationState and runState
for basically apptask <-> box code messaging.
If you want the true runState of a container, we should query docker.
2015-03-23 14:25:14 -07:00
Johannes Zellner
fd83beca5a
We already got the manifest in the applisting no need to fetch again
2015-03-23 20:48:01 +01:00
Johannes Zellner
04ec22bf63
Only show one mediaLink in the carousel, we might only have one
2015-03-23 20:41:24 +01:00
Johannes Zellner
b07fd3bfee
Finish the error reporting on app install
2015-03-23 20:29:53 +01:00
Johannes Zellner
69f6a6b841
Add proper response for port conflicts on installation
2015-03-23 18:37:32 +01:00
Girish Ramakrishnan
bfc27c95a2
Be more conservative about sending appdown mails
...
Fixes #269
2015-03-23 10:31:40 -07:00
Johannes Zellner
baa44ffffa
Ensure we show progress until we have fetched the new app manifest
2015-03-23 17:03:23 +01:00
Johannes Zellner
b11dcadbb8
Fix the modal dialog backdrop for changing dialog sizes
2015-03-23 16:50:45 +01:00
Johannes Zellner
6fc611b116
Make the whole app icon clickable
2015-03-23 16:38:30 +01:00
Johannes Zellner
263dffaa42
Remove 'Admins Only' access restriction
...
Fixes #287
2015-03-23 16:31:33 +01:00
Girish Ramakrishnan
7deb525864
Check update every min and put a timeout in superagent requests to prevent overlap
2015-03-23 08:20:46 -07:00
Johannes Zellner
21272df5e5
Update to new manifest format
2015-03-23 15:44:08 +01:00
Johannes Zellner
e205e3c878
Do not crash locally
2015-03-23 15:43:27 +01:00
Johannes Zellner
8b08648863
Add initial carousel for mediaLinks
2015-03-23 15:19:20 +01:00
Johannes Zellner
2405adecc5
Guard for empty urls
2015-03-23 13:21:23 +01:00
Johannes Zellner
6aa1e90069
Initial style of the appdetails
2015-03-23 13:00:41 +01:00
Johannes Zellner
8e094e5367
Do not show the form initially
2015-03-23 12:45:41 +01:00
Johannes Zellner
360252e005
Show unstyled application details in appstore view
2015-03-23 12:21:20 +01:00
Johannes Zellner
a47bcf7312
Give apps more space
2015-03-23 12:03:09 +01:00
Johannes Zellner
e2a632692e
Show app website instead of installation label
2015-03-23 11:56:10 +01:00
Johannes Zellner
71f23fdfb7
Ensure the applications are not clickable during installation
2015-03-23 11:47:51 +01:00
Johannes Zellner
3840bbb2bf
Check updates in interval rather than depend on the update function to always setup the timer
...
Fixes #286
2015-03-23 11:11:37 +01:00
Girish Ramakrishnan
d19af1ff6a
Update manifestformat to 1.0.1
2015-03-22 22:50:12 -07:00
Girish Ramakrishnan
4cabe44e99
Remove version from apps table
...
It's confusing and redundant
2015-03-22 21:45:32 -07:00
Girish Ramakrishnan
b3fd39569e
Fix app updates
2015-03-22 21:21:23 -07:00
Girish Ramakrishnan
ab0f9f6911
Make mysql data backup checkpoint
...
--single-transaction produces a checkpoint that allows the dump to capture all data prior to the checkpoint while receiving incoming changes. Those incoming changes do not become part of the dump. That ensures the same point-in-time for all tables.
--routines dumps all stored procedures and stored functions
--triggers dumps all triggers for each table that has them
2015-03-22 15:58:51 -07:00
Girish Ramakrishnan
53767b4b44
Update manifestformat repo
2015-03-22 14:22:12 -07:00
Girish Ramakrishnan
5afab7663b
Add manifestformat
2015-03-22 13:19:46 -07:00
Girish Ramakrishnan
989e1729b1
Appstore icon url has changed
2015-03-22 12:26:41 -07:00
Girish Ramakrishnan
4a6f92c8e2
Latest manifestformat.js
2015-03-21 13:08:10 -07:00
Girish Ramakrishnan
3d36e62a72
Add node-sass
2015-03-20 23:34:29 -07:00
Girish Ramakrishnan
3beb9a399a
Fix Appstore.getManifest
2015-03-20 23:15:46 -07:00
Girish Ramakrishnan
07986466fc
Use manifestformat.js to parse the manifest
2015-03-20 23:04:43 -07:00
Girish Ramakrishnan
d9472fa684
Add manifestformat.js and dependancies
2015-03-20 18:09:09 -07:00
Johannes Zellner
7134ab13b5
The application title is now part of the manifest
2015-03-20 16:46:28 +01:00
Girish Ramakrishnan
da7ac8284f
Remove "appstore" from REST url path
2015-03-19 10:04:56 -07:00
Johannes Zellner
1c2ba7225a
Remove leftover from development
...
So dangerous! Simple thing might break a whole update possiblity for the user
2015-03-19 16:56:12 +01:00
Johannes Zellner
533207481b
Further improve form validation and input focus handling
2015-03-19 16:43:08 +01:00
Johannes Zellner
6414f7b33d
Give visual feedback on update form submission
2015-03-19 16:18:44 +01:00
Johannes Zellner
d0e0d8c82c
Give visual feedback on form submission in users view
2015-03-19 15:44:20 +01:00
Johannes Zellner
7cc8bd1dbe
Ensure we check for password min-length of 5, just like on the server
2015-03-19 15:28:35 +01:00
Johannes Zellner
70dfc26c6d
Give visual feedback on form submission
...
Also several small fixes
2015-03-19 15:28:00 +01:00
Johannes Zellner
9bc594324e
Update unit tests to test for bad passwords and emails
2015-03-19 15:27:04 +01:00
Johannes Zellner
f27e36b9e7
Also handle BAD_EMAIL correctly
2015-03-19 15:24:35 +01:00
Johannes Zellner
7582a8e3c9
Handle BAD_PASSWORD in password change route correctly
2015-03-19 15:18:02 +01:00
Johannes Zellner
854f47e90b
Workaround for ng-hide on animated spinner
2015-03-19 15:05:09 +01:00
Johannes Zellner
494ab7d068
Use server side session store for oauthproxy
2015-03-19 13:33:41 +01:00
Johannes Zellner
ed8d6d5af7
Refresh oauth client list after removing tokens
...
Fixes #284
2015-03-19 13:00:49 +01:00
Johannes Zellner
b87c270654
Check the access token for each request in proxy
2015-03-19 12:58:41 +01:00
Johannes Zellner
ab832868a0
Fix remove access token button states
2015-03-19 12:58:16 +01:00
Johannes Zellner
e073073669
Finish the oauth flow for the oauth proxy
...
Fixes #282 and fixes #283
2015-03-19 11:03:32 +01:00
Johannes Zellner
9258747e0b
Wait for modal dialog to be closed before moving on to a different view
...
Fixes #281
2015-03-19 10:17:16 +01:00
Girish Ramakrishnan
fa8c02cfac
Delete container in restore code path
...
createContainer should not check for 409. If it does, it then needs to
get the containerId somehow.
2015-03-17 17:51:02 -07:00
Girish Ramakrishnan
4ef0020684
Fix sql syntax
2015-03-17 16:11:58 -07:00
Johannes Zellner
27c1e0c52e
Ensure we check for token type in routes where we rely on req.user to be of a certain type
...
Fixes #276
2015-03-17 18:23:02 +01:00
Johannes Zellner
e9d72a75ab
Name the property in the profile properly to tokenType
2015-03-17 18:17:37 +01:00
Johannes Zellner
552468b1e1
Return stripped down profile if access token is an app
2015-03-17 17:00:52 +01:00
Johannes Zellner
b1a2a2009e
Make token types and prefix tokendb 'consts'
2015-03-17 16:49:54 +01:00
Johannes Zellner
746f27247c
Prefix the token identifier correctly with 'user-'
...
Fixes #273
2015-03-17 16:27:36 +01:00
Johannes Zellner
062f94b335
Visually improve the users view to avoid flickering
...
Fixes #270
2015-03-17 14:55:09 +01:00
Johannes Zellner
f270eca303
Finally detect new ports based on old and new manifest
...
Fixes #266
2015-03-17 10:45:56 +01:00
Johannes Zellner
6394d34378
Allow enable/disable port bindings in during update
2015-03-17 10:34:33 +01:00
Johannes Zellner
da87116ca4
Handle holes in portBindings and allow to disable/enable port bindings on configure
2015-03-17 10:25:25 +01:00
Johannes Zellner
fc10dc9518
Allow to disable port bindings during app installation
2015-03-17 10:24:10 +01:00
Johannes Zellner
1676e2462d
Mention the connection between start.sh code and login_callback.html
2015-03-17 09:28:37 +01:00
Johannes Zellner
383829eafa
Remove useless console.debug() and fix up code issues
2015-03-17 09:28:13 +01:00
Johannes Zellner
3324657b15
Add the generated webadmin assets to .gitignore
2015-03-16 20:50:47 +01:00
Johannes Zellner
2a9376d6c9
Generate webadmin assets on release tarball creation
...
Fixes #271
2015-03-16 18:40:09 +01:00
Johannes Zellner
e61c868a0e
Remove built assets from webadmin and splash page
2015-03-16 18:20:40 +01:00
Johannes Zellner
59918a506c
Prepare for removing generated assets from the repo
2015-03-16 18:15:03 +01:00
Johannes Zellner
d53ba78953
Ensure we can also deal with empty app.portBindings
...
This is part of #266 only the support for holes in portBindings is missing
2015-03-16 11:37:13 +01:00
Johannes Zellner
629358cbcf
Ensure we can deal with an empty manifest.tcpPorts
2015-03-16 11:20:36 +01:00
Johannes Zellner
d57a45883c
Sync port bindings handling with install/configure and move obsolete ones out of the model
2015-03-16 11:12:30 +01:00
Johannes Zellner
f80226d440
Sync logic for app install and configure for port bindings
2015-03-16 10:34:44 +01:00
Johannes Zellner
7e456f25ab
Take defaultValue for port bindings into use in the UI
2015-03-16 10:30:11 +01:00
Johannes Zellner
c2283c0c3b
Add missing built stylesheets
2015-03-16 10:03:41 +01:00
Girish Ramakrishnan
e1ee9962d7
validate tcpPorts in manifest
2015-03-15 13:06:17 -07:00
Johannes Zellner
249770e427
Remove obsolete obsolete port listing in app update
2015-03-15 20:18:37 +01:00
Johannes Zellner
f1e6f95315
Fixup some linter issues
2015-03-15 13:16:04 +01:00
Johannes Zellner
72200796f2
Rename ACCESS_TOKEN to CLOUDRON_TOKEN for apps environment
2015-03-15 13:15:40 +01:00
Girish Ramakrishnan
7175804f63
Remove spurious debugs
2015-03-14 13:44:52 -07:00
Girish Ramakrishnan
c67fab1e6b
leave a note that we can remove vbox.js later
2015-03-14 11:53:14 -07:00
Girish Ramakrishnan
fc903ed48f
Fix forwarding with boot2docker
...
Looks like they changed how ports are exposed. There are two
interfaces now:
1. nat network which we use currently to explicitly open ports.
this was how it was before.
2. the new host based network which exposes all ports to mac.
we just use boot2docker ip. this is quite nice but we don't use this.
https://github.com/boot2docker/boot2docker#container-port-redirection
2015-03-14 11:53:14 -07:00
Girish Ramakrishnan
d3f54a4e9c
Fix debug tag
2015-03-14 11:53:14 -07:00
Girish Ramakrishnan
7d75bc83f7
Fix configure form to show port bindings
...
Part of #266
2015-03-14 11:53:14 -07:00
Girish Ramakrishnan
9807901880
hostPort is saved as int
...
Part of #266
2015-03-14 11:53:14 -07:00
Girish Ramakrishnan
034475851c
portBindings.containerPort is now int
...
Part of #266
2015-03-14 11:53:13 -07:00
Girish Ramakrishnan
f574edf20d
cloudron has moved to 0.12
2015-03-14 11:53:13 -07:00
Girish Ramakrishnan
1bc2645ad0
manifest.httpPort is now integer
...
Part of #266
2015-03-14 11:53:13 -07:00
Girish Ramakrishnan
d711276d17
run gulp
2015-03-13 20:51:44 -07:00
Girish Ramakrishnan
c3b0248e0d
Make developerMode survive updates
...
Making developer mode survive upgrades can be done by storing
it in the db (and thus backed up). But this also makes it a
minor security issue - the user restores to a random backup
and he doesn't realize it's in developer mode.
It's best to keep this flag in cloudron.conf for now.
Fixes #265
2015-03-13 15:53:35 -07:00
Girish Ramakrishnan
101a2803f4
Use req.params.id instead of appId in data in configure
2015-03-13 14:20:21 -07:00
Girish Ramakrishnan
6b61beb6dd
Do not verify password again in configure
2015-03-13 14:05:12 -07:00
Girish Ramakrishnan
4034498fb8
Allow cmd to be configurable
2015-03-13 10:46:14 -07:00
Johannes Zellner
8b79379f16
Inject Number.MAX_SAFE_INTEGER for older node versions
2015-03-13 17:26:28 +01:00
Johannes Zellner
aa8d4c243f
Fixup some linter issues
2015-03-13 16:06:11 +01:00
Johannes Zellner
0273c63f55
Inject ACCESS_TOKEN into container environment
...
Fixes #264
2015-03-13 16:00:20 +01:00
Johannes Zellner
2858b5c8cc
Actually allocate access tokens for apps in apptask
2015-03-13 15:51:48 +01:00
Johannes Zellner
104b110e54
Show app progress spinner at beginning of label
2015-03-13 15:51:25 +01:00
Johannes Zellner
2d60aa6767
Implement access token allocation helpers in apptask
2015-03-13 15:25:18 +01:00
Johannes Zellner
e3ba058c01
Only show port settings in app update if they changed
2015-03-13 14:53:19 +01:00
Johannes Zellner
994e3f1463
Remove useless comment
2015-03-13 14:53:04 +01:00
Johannes Zellner
6149777ea5
Filter out obsolete portbindings when attempting the update
...
Fixes #254
2015-03-13 14:46:08 +01:00
Johannes Zellner
06b11f3d47
Show port bindings if an update causes a change
2015-03-13 14:40:48 +01:00
Johannes Zellner
62573127d8
Do not add dummy app in run.sh as we can now install via cli tool
2015-03-13 14:04:12 +01:00
Johannes Zellner
78bbb02e33
Make use of the developerMode property in config
2015-03-13 13:21:22 +01:00
Johannes Zellner
f0ea214d1d
Add UI to change the developer mode in accounts view
...
This is only visible for adminsA
Fixes #262
2015-03-13 13:21:22 +01:00
Johannes Zellner
17b5f381f1
Rename develop scope to developer to be consistent
...
Fixes #263
2015-03-13 13:21:11 +01:00
Johannes Zellner
7741da31de
Add developerMode property to cloudron config
2015-03-13 13:17:54 +01:00
Johannes Zellner
3a2541946c
Give developer scope to webadmin tokens
2015-03-13 13:15:23 +01:00
Johannes Zellner
921bf6a68e
Use 'develop' oauth scope and add route to set developer mode
2015-03-13 12:13:47 +01:00
Johannes Zellner
730ddaf7ae
Check for developerMode in developer login route
...
The developerMode's default is:
LOCAL: true
TEST: false
CLOUDRON: false
2015-03-13 11:46:45 +01:00
Johannes Zellner
d678c0d553
Add route to query developerMode
2015-03-13 11:40:21 +01:00
Johannes Zellner
64b92fe5bb
Print error if exec route errors
2015-03-13 10:06:38 +01:00
Girish Ramakrishnan
4e639ee7ec
Revert "Bump proxy read timeout to accomodate ws connections"
...
This reverts commit 44b7af14e8 .
2015-03-12 23:02:02 -07:00
Girish Ramakrishnan
816bba8dae
Make sure we have an upgrade connection for exec
2015-03-12 22:52:50 -07:00
Girish Ramakrishnan
44b7af14e8
Bump proxy read timeout to accomodate ws connections
2015-03-12 22:50:17 -07:00
Girish Ramakrishnan
fe817efd1f
Clear express timeout
2015-03-12 18:18:52 -07:00
Girish Ramakrishnan
e95c7a78f0
Make exec work
2015-03-12 17:42:14 -07:00
Girish Ramakrishnan
7c393b7d6b
Get rid of gApp
2015-03-12 17:17:47 -07:00
Girish Ramakrishnan
e204056187
Fix formatting
2015-03-12 12:06:54 -07:00
Johannes Zellner
e78548e93b
Remove developer related functionality from cloudron.js
2015-03-12 17:07:51 +01:00
Girish Ramakrishnan
8469561fc1
Remove developer.initialize
...
This pattern is a thing of the past. We needed it when our db
handle needed to be passed all around, I think.
Besides, uninitialize was never called :)
2015-03-12 08:52:02 -07:00
Johannes Zellner
6b0bc141c5
Remove leftover from appupdate testing
2015-03-12 16:46:26 +01:00
Johannes Zellner
300e87152f
Let developer tokens only expire every day
2015-03-12 16:38:25 +01:00
Johannes Zellner
f020a98518
Prefix all token identifiers
2015-03-12 16:31:36 +01:00
Johannes Zellner
a73a68e51c
Allow application tokens through auth
...
Those token identifiers are prefixed with 'app-'
2015-03-12 16:24:25 +01:00
Johannes Zellner
dc1dadf634
Add UI for app update to show port binding changes
...
Part of #254
2015-03-12 15:58:39 +01:00
Johannes Zellner
581dd99e22
Add domain hint in setup page
...
Fixes #247
2015-03-12 14:34:15 +01:00
Johannes Zellner
0abee4ca8d
Allow developer tokens to perform actions without password
2015-03-12 12:06:08 +01:00
Johannes Zellner
70302a661d
Break out developer tests to their own file
2015-03-12 11:24:16 +01:00
Johannes Zellner
358b8dca2a
Move developer route handling into separate files
2015-03-12 11:21:21 +01:00
Girish Ramakrishnan
fa5972630d
Implement exec (does not work)
2015-03-12 01:40:16 -07:00
Girish Ramakrishnan
4771e53d91
Handle BAD_FIELD error in app update
2015-03-11 22:08:12 -07:00
Girish Ramakrishnan
96de8390b7
Parse log timestamp
2015-03-11 19:32:04 -07:00
Girish Ramakrishnan
a9b916376a
Implement logstream like tail -n
2015-03-11 18:48:48 -07:00
Girish Ramakrishnan
66ba222fec
login route must be a post
2015-03-11 15:56:47 -07:00
Girish Ramakrishnan
3d7fea1285
Rename to CloudronManifest.json
2015-03-11 11:05:36 -07:00
Johannes Zellner
5723d54533
Allow dev- tokens in auth
2015-03-11 16:57:28 +01:00
Johannes Zellner
4c1ca10ad1
Ensure we use correct button style
...
Fixes #250
2015-03-11 14:31:54 +01:00
Johannes Zellner
45619a78ad
Add developer login route using username:password
2015-03-11 14:25:40 +01:00
Johannes Zellner
ec1e912808
Show error page if login was attempted without a returnTo url
2015-03-11 13:34:14 +01:00
Johannes Zellner
01a4889b89
Adjust tokendb to reflect userId->identifier change
2015-03-11 13:34:14 +01:00
Johannes Zellner
cb3dada8f7
Add migration script to rename tokens.userId to tokens.identifier
2015-03-11 13:34:14 +01:00
Girish Ramakrishnan
b8ba1f8b57
Delete old container before creating new one in install task
...
Without this app installation won't work after restart if installation
did not succeed or was mid-way previously
Fixes #259
2015-03-10 20:33:36 -07:00
Girish Ramakrishnan
aa6d527bb4
Change ownership selectively
...
If we had some old backup snapshot which wasn't cleaned up properly,
this code barfs because backup snapshots are readonly fs.
2015-03-10 13:01:05 -07:00
Girish Ramakrishnan
1523075072
order is everything
2015-03-10 12:40:04 -07:00
Girish Ramakrishnan
e0fd1ffe45
Delete backup snapshot if backup fails
2015-03-10 12:26:52 -07:00
Girish Ramakrishnan
b50692fc67
Revert "Always return a url and do not check fs"
...
This reverts commit a3099606cb .
This doesn't work because the UI then starts showing the default icon
initially (since the icon gets download on the box after sometime)
and never gets around to updating it.
2015-03-10 11:40:24 -07:00
Girish Ramakrishnan
381315e224
Store update manifest separately
...
Otherwise, it gets overwritten when the app object gets updated
2015-03-10 11:31:17 -07:00
Girish Ramakrishnan
f89c07e8e4
Add debug message to indicate update
2015-03-10 10:37:43 -07:00
Girish Ramakrishnan
4444a56f35
Use constants in installationActive
2015-03-10 10:34:40 -07:00
Girish Ramakrishnan
65ab105dbd
webadmin: Update installationStateLabel filter
2015-03-10 10:28:01 -07:00
Girish Ramakrishnan
a3099606cb
Always return a url and do not check fs
...
If we return null, then the UI code needs to check for nullness
and show default image. It's a no win.
2015-03-10 10:10:06 -07:00
Johannes Zellner
695a2ba745
webadmin: Use route param and userId for user deletion
2015-03-10 16:12:25 +01:00
Johannes Zellner
634102c096
User deletion route now operates on userId as a url param
...
The userid is still equivalent to the username though!
2015-03-10 16:07:20 +01:00
Johannes Zellner
28fb336734
Refresh userinfo after changing the email address
...
Fixes #255
2015-03-10 14:31:38 +01:00
Johannes Zellner
4f1d917b55
Actually make /users api respect the :userId param
...
This requires some other fixes. The problem is,
that the api works currently based of req.user which is
determined by the access token. That is wrong.
This only is correct for the /profile route. Otherwise
the requested resource should be specified via :userId
route param.
2015-03-10 14:22:38 +01:00
Johannes Zellner
98eaf18e79
Avoid deprecation warning on res.sendfile()
2015-03-10 12:25:20 +01:00
Johannes Zellner
419e2e8b61
Skip dns check in apptask if zoneName is localhost
2015-03-10 12:16:10 +01:00
Girish Ramakrishnan
9e9c585261
stderr is not accessible for normal user
2015-03-09 21:43:25 -07:00
Girish Ramakrishnan
5aac5bd56f
Expose the ports when creating container
2015-03-09 19:17:44 -07:00
Girish Ramakrishnan
bbe982f14f
Specify HostIp explicitly
2015-03-09 15:23:44 -07:00
Girish Ramakrishnan
fbb46c51c8
Try upto 5 times to upload backup
2015-03-09 15:22:19 -07:00
Johannes Zellner
21e0d38afc
Show error in app installation if port is reserved
...
This is part of #225
2015-03-09 11:02:53 +01:00
Johannes Zellner
40f38102b8
Report 409 with appropriate reserved port message on appinstall
2015-03-09 11:01:53 +01:00
Johannes Zellner
d298ffe7ae
Make local development list apps against dev environment
2015-03-09 10:25:27 +01:00
Johannes Zellner
317c462f39
Do not rely on config.token to be set for deciding if we are deployed
2015-03-09 10:12:09 +01:00
Girish Ramakrishnan
f9a2c786b3
webadmin: Fix code to use changed portBindings API
2015-03-09 01:02:06 -07:00
Girish Ramakrishnan
49b88fc9be
Just call it portBindings, ui changes are too many otherwise
2015-03-09 00:43:09 -07:00
Girish Ramakrishnan
c04463f568
update takes portConfig as argument
...
Fixes #253
2015-03-09 00:04:02 -07:00
Girish Ramakrishnan
c40d13a8a1
validate port config against a manifest
2015-03-08 23:56:34 -07:00
Girish Ramakrishnan
07146c5373
Replace portBindings instead of just update
...
This fixes the issue when different set of portConfigs are provided
in configure app.
2015-03-08 23:28:00 -07:00
Girish Ramakrishnan
74ce828df0
Add a FIXME to database.commit
2015-03-08 23:02:32 -07:00
Girish Ramakrishnan
92e3e5f6e0
Refactor transaction logic
2015-03-08 23:00:28 -07:00
Girish Ramakrishnan
e9990b00b8
Remove arg detection logic
2015-03-08 22:00:07 -07:00
Girish Ramakrishnan
6a6216df6d
Drop containerPort from appPortBindings
2015-03-08 19:53:25 -07:00
Girish Ramakrishnan
011f77b645
oops, change migration name
2015-03-08 19:31:54 -07:00
Girish Ramakrishnan
e5aec11fc6
Update schema file
2015-03-08 19:30:31 -07:00
Girish Ramakrishnan
64296ee1fe
Leave note on portConfigs
...
it is OK if there is no 1-1 mapping between values in manifest.tcpPorts and portConfigs. missing values implies
that the user wants the service disabled
2015-03-08 19:28:04 -07:00
Girish Ramakrishnan
a62800791d
Change format of portBindings
2015-03-08 19:19:45 -07:00
Girish Ramakrishnan
f2463a721e
Leave a note on why this test might be failing
2015-03-08 18:54:13 -07:00
Girish Ramakrishnan
ee299cad81
Set a token for the unregister domain testcase to work
2015-03-08 18:38:41 -07:00
Johannes Zellner
5665316afb
Align text correctly in app grid item for apps.html
2015-03-08 11:24:11 +01:00
Johannes Zellner
e807beb2ba
Allow accepting autofill suggestions with enter
2015-03-08 11:19:37 +01:00
Johannes Zellner
6ad71ae503
Prefill setup form with email
2015-03-08 11:18:52 +01:00
Johannes Zellner
64a138439a
Ensure we reset the dialog forms in apps/ and appstore/
2015-03-08 11:15:02 +01:00
Johannes Zellner
526ee1c212
decode query params in setup.js
2015-03-08 10:48:29 +01:00
Girish Ramakrishnan
f010186b75
Fix typo
2015-03-07 15:12:30 -08:00
Johannes Zellner
a7bf23e50f
Make default button less pop out
2015-03-06 21:46:31 +01:00
Girish Ramakrishnan
5b21996fad
pipefail all scripts
...
This makes bash fail the shell if any part of cmd1 | cmd2 | cmd3 fails
(not just the last cmd3 one)
2015-03-05 13:54:11 -08:00
Johannes Zellner
ca35631f8d
user info and profile should be separate apis
...
The /profile api returns the profile of the user,
the access token was given out for.
The /users/:username api shall return the info for the
user with :username if the access token provided allows
that
2015-03-05 14:09:47 +01:00
Johannes Zellner
cbf6340657
Do not make users view 100% site width
...
Fixes #242
2015-03-05 14:03:16 +01:00
Johannes Zellner
04633e0dd6
Fixup cloudron config tests for npm test
2015-03-05 13:38:09 +01:00
Johannes Zellner
23b567a007
Show correct app - fqdn separator
...
Fixes #245
2015-03-05 13:14:34 +01:00
Johannes Zellner
877636f681
Send isCustomDomain via the /config route and add unit tests
2015-03-05 13:13:38 +01:00
Johannes Zellner
fd5963ce8b
Hide oauth clients if there are no active access tokens
...
Fixes #243
2015-03-05 12:34:06 +01:00
Johannes Zellner
4477a1fdd8
Apps state UI filter: installed to running and add pending_configure
...
Fixes #244
2015-03-05 12:28:38 +01:00
Johannes Zellner
22d7f53b16
Fix typo on first apps view
2015-03-05 12:19:01 +01:00
Johannes Zellner
4018cd2c96
Remove 'x' to close dialogs
...
Fixes #241
2015-03-05 12:18:06 +01:00
Johannes Zellner
95c0207117
Set default app icon height to avoid reflow
2015-03-05 12:09:33 +01:00
Johannes Zellner
15579d3b48
Add missing comment
2015-03-05 12:05:18 +01:00
Johannes Zellner
3bcf1e0172
Fix local mode for firefox
...
Firefox has stricter rules for certs and the domain
2015-03-05 12:04:45 +01:00
Girish Ramakrishnan
0b5b4535de
Add fqdn
2015-03-03 23:02:53 -08:00
Girish Ramakrishnan
942ad04e6d
Set the rendering format
2015-03-03 22:58:28 -08:00
Girish Ramakrishnan
54f7bee183
Fix formatting in mail templates
2015-03-03 22:50:35 -08:00
Girish Ramakrishnan
ee577c9981
Fix welcome mail template
2015-03-03 22:42:16 -08:00
Girish Ramakrishnan
3bfba8a3f6
Fix user event mail template
2015-03-03 22:29:06 -08:00
Girish Ramakrishnan
dd7673b35f
Fix app down email template
2015-03-03 22:04:44 -08:00
Girish Ramakrishnan
9fb4b84f47
Fix reset password mail template
2015-03-03 21:23:59 -08:00
Girish Ramakrishnan
513830a494
handle optinal args: restoreUrl and restoreKey are optional
2015-03-03 15:53:43 -08:00
Girish Ramakrishnan
2576355aef
Remove set -x in scripts
2015-03-03 15:07:55 -08:00
Johannes Zellner
0a48132962
Fixup the focus handling for webadmin
...
Fixes #238
2015-03-03 23:24:09 +01:00
Girish Ramakrishnan
1856a44b1b
move data restore to box code instead of installer
...
Fixes #219
2015-03-03 12:56:48 -08:00
Johannes Zellner
fe91f80f30
Make the janitor cleanup expired authcodes
...
Fixes #236
2015-03-03 18:24:20 +01:00
Johannes Zellner
5a179bb9f8
Check for authcode expiration
2015-03-03 18:22:42 +01:00
Johannes Zellner
2458f9e0e9
Add authcodes.exiresAt
2015-03-03 18:19:03 +01:00
Johannes Zellner
c1d6afaf56
Check for token expiration in SQL tokens.get() directly
2015-03-03 18:10:17 +01:00
Johannes Zellner
866b2e3e7d
Reset the resettoken if password was set
...
Fixes #232
2015-03-03 17:49:58 +01:00
Johannes Zellner
42a248a184
Do not use SQL NOW() but the javascript version to be correct
2015-03-03 17:33:03 +01:00
Johannes Zellner
a1f31b8ce5
Add initial janitor version
...
This version only removes stale access tokens so far
Fixes #221
2015-03-03 17:30:49 +01:00
Johannes Zellner
d8fc00d9ee
Add tokens.delExpired()
2015-03-03 17:24:33 +01:00
Johannes Zellner
c64d26d4a0
Use BIGINT instead of VARCHAR for tokens.expires
2015-03-03 17:18:51 +01:00
Johannes Zellner
a2ea310418
Remove /login route using basic auth
...
This was only used in our tests everywhere as it is convenient.
Was replaced by oauth. In oauth we can't acquire tokens without
user interventions, thus all tests are now based on the initial
token which we give out during cloudron setup.
Fixes #239
2015-03-03 15:48:39 +01:00
Johannes Zellner
c805d6bb47
Remove stray console.error()
2015-03-03 15:34:46 +01:00
Johannes Zellner
1504c49a7b
Remove user logout route
...
This was only used for tests and got replaced by the oauth logout
2015-03-03 14:37:16 +01:00
Johannes Zellner
c3dbe5480f
Check expiration for accessTokens and fixup tests
...
Fixes #231
2015-03-03 14:32:21 +01:00
Johannes Zellner
e428da6794
Also verify that the resetToken works for new users
2015-03-03 13:58:40 +01:00
Johannes Zellner
228ea8c535
Verify that we got successfully redirected from a password finished reset
2015-03-03 13:57:02 +01:00
Johannes Zellner
05bb268492
This is not how a html comment looks like
2015-03-03 13:29:06 +01:00
Johannes Zellner
9a750aef82
Replace in-memory resetToken store with db
...
Fixes #235
2015-03-03 13:08:17 +01:00
Johannes Zellner
afc32973c1
Add userdb.getByResetToken()
2015-03-03 13:00:00 +01:00
Johannes Zellner
796781bd12
Make use of resetToken in userdb
2015-03-03 12:56:05 +01:00
Johannes Zellner
64b59f4e9a
Add resetToken field to users
2015-03-03 12:48:18 +01:00
Johannes Zellner
3b8121cefa
Add initial set of unit tests for oauth2 password reset handling
2015-03-03 12:38:19 +01:00
Johannes Zellner
8f6bf76639
Password reset route shall not take two passwords
...
Fixes #234
2015-03-03 11:50:41 +01:00
Johannes Zellner
c1cca255d9
Remove stray console.log()
2015-03-03 11:50:06 +01:00
Johannes Zellner
34a85cd2c2
Validate password reset token
...
Fixes #233
2015-03-03 11:48:34 +01:00
Johannes Zellner
15c0e54f68
Provide the application name/location during login dialogs
...
Fixes #228
2015-03-02 14:42:02 +01:00
Johannes Zellner
d1d801263d
Use btn-success not btn-danger for good cases
2015-03-02 14:41:53 +01:00
Johannes Zellner
35d4266a42
Add UI to let the user change his email
2015-03-02 14:10:08 +01:00
Johannes Zellner
21f1cf2a75
Implement email change
...
Fixes #223
2015-03-02 13:17:39 +01:00
Johannes Zellner
5cd43abe07
Implement user.update() in preparation of email change
2015-03-02 12:14:37 +01:00
Johannes Zellner
6bb69e9661
Fix the oauth clients route to properly handle addons-
...
Fixes #226
2015-03-02 11:44:31 +01:00
Johannes Zellner
42adf54237
Visually separate the oauth clients in /accounts
2015-03-02 11:44:19 +01:00
Johannes Zellner
e5f3a99dbc
Add the webadmin UI name to constants
2015-03-02 11:22:24 +01:00
Johannes Zellner
f471e8faa1
Remove separate security views
2015-03-02 10:33:09 +01:00
Johannes Zellner
2de0613848
Put access token removal code into accounts view
2015-03-02 10:31:37 +01:00
Johannes Zellner
0b471f4094
Remove security link from account menu
2015-03-02 10:30:00 +01:00
Johannes Zellner
cdcb7fde2e
Move security credentials to /accounts view
...
Fixes #230
2015-03-02 10:14:36 +01:00
Johannes Zellner
24788edfce
App version is part of the manifest
2015-02-28 19:31:43 +01:00
Johannes Zellner
7def8da583
Add UI for app updates
...
Fixes #227
2015-02-28 19:08:46 +01:00
Johannes Zellner
b4b1148763
Send updateVersion in case we have an update for an app in /apps route
2015-02-28 18:44:20 +01:00
Johannes Zellner
b0283c0ef7
Put app update UI stub in place
...
The logic to detect an update is still missing
2015-02-28 16:38:51 +01:00
Girish Ramakrishnan
ef6b500ba9
Remove unused variable
2015-02-27 20:12:05 -08:00
Girish Ramakrishnan
4f9c2f7538
icon -> iconUrl
2015-02-27 19:49:49 -08:00
Girish Ramakrishnan
b2e6c07007
superagent provides binary data in res.body
2015-02-27 19:42:17 -08:00
Girish Ramakrishnan
a53e30e7a6
Run gulp
2015-02-27 19:15:04 -08:00
Girish Ramakrishnan
d0612a0107
Cache manifest.iconUrl if it is present
2015-02-27 18:40:23 -08:00
Girish Ramakrishnan
f42653d714
validate manifest.iconUrl
2015-02-27 18:29:40 -08:00
Girish Ramakrishnan
a26c8ab2a8
Update safetydance
2015-02-27 18:20:16 -08:00
Girish Ramakrishnan
a9fa1f37f8
Add fallback icon
2015-02-27 17:49:18 -08:00
Girish Ramakrishnan
fc07c5a564
install and update app using manifest instead of verison
...
Part of #224
2015-02-27 15:09:18 -08:00
Johannes Zellner
ff8f84c79c
New setup wizard
...
Fixes #198
2015-02-27 23:15:44 +01:00
Girish Ramakrishnan
472f6540ef
Move validateManifest into apps
2015-02-27 13:34:17 -08:00
Girish Ramakrishnan
b8efc62110
Fix test after moving to hat()
2015-02-27 13:30:46 -08:00
Johannes Zellner
de2c5b2cec
Stupid angular not accepting strings
2015-02-27 18:32:37 +01:00
Johannes Zellner
d45b2beea6
Fix embarrassing typo which broke update
2015-02-27 17:05:31 +01:00
Johannes Zellner
c5aeffafc0
Fixup the port bindings
2015-02-27 16:58:14 +01:00
Johannes Zellner
0c167ac299
Make app status not overflow
2015-02-27 16:52:21 +01:00
Johannes Zellner
5dd919f88a
Add label for appstate pending_restore
2015-02-27 16:50:41 +01:00
Johannes Zellner
15d126d5f5
Make update UI also ask for the password
2015-02-27 16:47:26 +01:00
Johannes Zellner
09956256fe
Remove unused code in users routes
2015-02-27 16:46:48 +01:00
Johannes Zellner
18167d4191
Require password for update route
...
Fixes #217
2015-02-27 16:43:04 +01:00
Johannes Zellner
7d4446cd94
Use hat() instead of uuid() where we want tokens
...
Fixes #218
2015-02-27 16:25:12 +01:00
Johannes Zellner
0df1ad5491
Remove unused password change view
2015-02-27 15:28:52 +01:00
Johannes Zellner
b2b81d0a5d
Move password change into a modal dialog
2015-02-27 15:27:45 +01:00
Johannes Zellner
c2558a9263
Wait for Client ready to decide if the user is allowed here
2015-02-27 15:06:37 +01:00
Johannes Zellner
cedf12b0c4
Rename userlist to users
2015-02-27 15:04:28 +01:00
Johannes Zellner
df6f070007
Rename applist to apps
2015-02-27 15:00:01 +01:00
Johannes Zellner
56802ed6a6
Remove all views which got replaced by a dialog
2015-02-27 14:57:49 +01:00
Johannes Zellner
1b5ccd1f18
Also show ports config for app configure
2015-02-27 14:50:10 +01:00
Johannes Zellner
36006f6998
Add app uninstallation dialog
2015-02-27 14:26:07 +01:00
Johannes Zellner
78f3298abf
Ensure we use the tcpports from the manifest
2015-02-27 13:47:37 +01:00
Johannes Zellner
93ba376992
Fix typo while accessing the app
2015-02-27 13:33:35 +01:00
Johannes Zellner
b5ef132c5f
Show email in userlist
2015-02-27 13:33:26 +01:00
Johannes Zellner
c5c9d507a3
Fixup the user deletion dialog
2015-02-27 13:24:02 +01:00
Johannes Zellner
e3cf36c23e
Style user view
2015-02-27 13:01:21 +01:00
Johannes Zellner
36b21979ed
Move add user into modal dialog
2015-02-27 12:48:21 +01:00
Johannes Zellner
7b42de404a
Give the client some means to react on a failure
2015-02-27 12:47:46 +01:00
Johannes Zellner
78d2c29631
Make the manifest available for appinstall
2015-02-27 12:21:26 +01:00
Johannes Zellner
0ec42d84bd
Fixup form reset for app configure and install
2015-02-27 11:25:54 +01:00
Johannes Zellner
4ba806a97a
Use modal dialog for appinstall
2015-02-27 10:31:17 +01:00
Johannes Zellner
e685e3de62
Use app configure dialog, not a full page
2015-02-27 10:18:43 +01:00
Girish Ramakrishnan
f256f98a35
wait for container after stopping it
...
It's not clear if stop container actually waits but I assume not
2015-02-27 01:11:17 -08:00
Girish Ramakrishnan
c9a64e342d
Allow app to be (re)configured after error
...
This is the only way to move forward should reconfigure error for
some weird reason
Fixes #220
2015-02-27 00:27:44 -08:00
Girish Ramakrishnan
f2fc845b0b
Fix coding style
2015-02-26 20:04:51 -08:00
Johannes Zellner
572409d061
Fixup the account layout
2015-02-26 23:09:28 +01:00
Johannes Zellner
802e6c2a6d
Rename settings to dns and only show in dev
...
Fixes #204
2015-02-26 21:11:19 +01:00
Johannes Zellner
5ebfb55474
Replace custom css rules with proper bootstrap ones
2015-02-26 18:27:12 +01:00
Johannes Zellner
67ca44df95
Use new bootstrap javascript in all our views
2015-02-26 17:27:41 +01:00
Johannes Zellner
382cdda9d5
Use bootstrap javascript library from bootstrap-sass
2015-02-26 17:25:36 +01:00
Johannes Zellner
7b9d80a66b
Remove obsolete theme.css
2015-02-26 17:20:10 +01:00
Johannes Zellner
28c451c88e
Use unified theme.css which now includes bootstrap
2015-02-26 17:19:51 +01:00
Johannes Zellner
7c9584b83f
Use sass to build a unified theme.css including bootstrap
2015-02-26 17:16:44 +01:00
Johannes Zellner
488b5ea19d
Hide /settings on non dev environments
...
Fixes #212
2015-02-26 16:30:41 +01:00
Johannes Zellner
bff5b735bf
Fix icons of installed apps
...
Fixes #216
2015-02-26 16:23:12 +01:00
Johannes Zellner
b66d156e5f
Improve responsiveness of grid items for apps
2015-02-26 15:29:36 +01:00
Johannes Zellner
7a7d244c5e
Rework the settings view
2015-02-26 15:05:26 +01:00
Johannes Zellner
5a06c6e1d4
Rework the account details page
2015-02-26 14:55:49 +01:00
Johannes Zellner
f96c8a4118
Remove panel for empty appstore
2015-02-26 14:34:19 +01:00
Johannes Zellner
2d0320f152
Remove Software from Settings view
...
Fixes #209
2015-02-26 14:18:08 +01:00
Johannes Zellner
e7bbfe3ca8
Main entry point is ./app.js
2015-02-26 13:53:42 +01:00
Johannes Zellner
3c48e9da54
Move backup from settings to profile menu, only for admin and only on dev
2015-02-26 13:52:43 +01:00
Johannes Zellner
8203a8174c
Also set config.isDev when running locally
2015-02-26 13:52:08 +01:00
Johannes Zellner
d215cdb801
Show update badge in navbar if available
2015-02-26 13:42:06 +01:00
Johannes Zellner
e875ab7b24
Use the loading banner in all views which show loading screens
2015-02-26 13:32:09 +01:00
Johannes Zellner
62ec348c7f
Use loading state for security view
2015-02-26 13:31:46 +01:00
Johannes Zellner
da96c1404e
Remove reboot progress bar
2015-02-26 13:30:49 +01:00
Johannes Zellner
1ce6dbd657
Introduce .loading-banner
2015-02-26 13:30:30 +01:00
Johannes Zellner
a8dde33d06
Actually return a result array when asking for clientdb.getAllWithDetails()
2015-02-26 13:24:02 +01:00
Johannes Zellner
9926ffc6c9
Reduce possible states in appstore view
2015-02-26 13:01:11 +01:00
Johannes Zellner
959da7eeeb
Move userlist view over to new theme
2015-02-26 12:53:31 +01:00
Johannes Zellner
cb0866b744
Remove font-awesome copy in 3rdparty
2015-02-26 12:51:28 +01:00
Johannes Zellner
f243182799
Also use a cdn for font-awesome
2015-02-26 12:50:05 +01:00
Johannes Zellner
da464f9690
Some very basic styling for outlined buttons
2015-02-26 12:23:29 +01:00
Johannes Zellner
f1291ded62
Add our own theme.css
2015-02-26 12:00:01 +01:00
Johannes Zellner
792634f8d1
Remove unused fonts in webadmin
2015-02-26 11:46:46 +01:00
Johannes Zellner
5e675f23b6
Use roboto font from google cdn
2015-02-26 11:45:44 +01:00
Johannes Zellner
258d041e39
Remove sb-admin-2
2015-02-26 11:39:50 +01:00
Johannes Zellner
4b1d69cb65
We use jquery.min.js
2015-02-26 11:37:14 +01:00
Johannes Zellner
592bd14082
Remove unused bootstrap in 3rdparty/css
2015-02-26 11:33:14 +01:00
Johannes Zellner
88a37a4f80
Use standalone 3rdparty resources in all of webadmin
2015-02-26 11:32:13 +01:00
Johannes Zellner
80b287fe9e
Use standlone versions of 3rdparty resources in oauth views
2015-02-26 11:29:06 +01:00
Johannes Zellner
f129cc660b
Add jquery standalone to 3rdparty
2015-02-26 11:27:00 +01:00
Johannes Zellner
0e1a291761
Add bootstrap standalone to 3rdparty
2015-02-26 11:24:08 +01:00
Johannes Zellner
ade7b40827
Add roboto font to 3rdparty
2015-02-26 11:23:15 +01:00
Johannes Zellner
5d9197bf79
Add font-awesome as a standalone 3rdparty
2015-02-26 11:22:37 +01:00
Johannes Zellner
62070c7bbc
Show some nice text when no apps are installed
2015-02-26 10:13:03 +01:00
Johannes Zellner
bc7cb018bc
Remove usage of panels in appstore and applist
2015-02-26 10:03:58 +01:00
Johannes Zellner
3e565ee11f
Ensure we never let errors of arbitrary type bubble up in /activation route
2015-02-26 09:42:48 +01:00
Johannes Zellner
bfedf543b3
Make changes to adapt to admin -> my
...
The local /etc/hosts file also needs tweaking!
2015-02-26 09:28:42 +01:00
Girish Ramakrishnan
abcec9bf47
Add note for updating appstore repo
2015-02-25 16:44:37 -08:00
Girish Ramakrishnan
e8d177ab82
Add mysql to reserved ports
2015-02-25 16:39:51 -08:00
Girish Ramakrishnan
00dbdddce7
Ensure oauth addon can be setup twice
...
Fixes #215
2015-02-25 15:26:40 -08:00
Girish Ramakrishnan
f96f7ea96c
db does not use _ convention anymore
2015-02-25 14:59:51 -08:00
Girish Ramakrishnan
054cb0a07a
With strict mode this now triggers ER_BAD_NULL_ERROR
2015-02-25 14:52:55 -08:00
Girish Ramakrishnan
a277a60874
Rename FIELD_ERROR to BAD_FIELD
2015-02-25 14:46:35 -08:00
Girish Ramakrishnan
fb47c7b5bd
Change default admin location to 'my'
...
Fixes #119
2015-02-25 13:31:27 -08:00
Girish Ramakrishnan
285cd1a198
The value for naked domains is the appid and not the location
...
This means that if we change the constant ADMIN_LOCATION the update
scripts will automatically fix up correctly
Part of #119
2015-02-25 13:31:27 -08:00
Girish Ramakrishnan
e0ff349e5a
Leave not on how naked domain is fixed up
2015-02-25 13:31:27 -08:00
Girish Ramakrishnan
d367500dc3
Pass isAdmin instead of appid to render the appconfig.ejs
...
Becuase the ejs file does not know about constants
Part of #199
2015-02-25 13:31:27 -08:00
Girish Ramakrishnan
890a06c4c5
Move admin related constants to separate file
...
Part of #199
2015-02-25 13:31:22 -08:00
Girish Ramakrishnan
4d13390855
Reserve 'my' location
...
Part of #199
2015-02-25 12:23:17 -08:00
Girish Ramakrishnan
7f8fb44795
Cleanup migration scripts
...
Rationale for setupTest: migration scripts are are meant to add one time entries
and schema changes and not for 'updated' values 'updated' values belong in setup
script because migration scrips are only run once
2015-02-25 11:41:05 -08:00
Johannes Zellner
906a52e206
Ensure we use ellipsis if app details text would break the layout
2015-02-25 20:34:56 +01:00
Johannes Zellner
d5a017aa38
Use REPLACE for upsert in run.sh
2015-02-25 20:21:05 +01:00
Girish Ramakrishnan
3ef7e75078
Add note that 20141021235251-clients-add-webadmin.js should be removed
2015-02-25 11:18:13 -08:00
Girish Ramakrishnan
2845c1b2c0
mysql: Fix error handling
...
https://github.com/felixge/node-mysql#error-handling
2015-02-25 11:13:42 -08:00
Girish Ramakrishnan
f08d8a66b0
Enable strict mode in sql sessions
2015-02-25 11:13:42 -08:00
Girish Ramakrishnan
750b9ea6f7
Remove migrations baggage
2015-02-25 11:13:42 -08:00
Johannes Zellner
0da8001d62
Show contactEmail instead of app details
2015-02-25 18:30:12 +01:00
Johannes Zellner
fa05315c33
Remove /api/v1/cloudron/stats route
2015-02-25 18:07:26 +01:00
Johannes Zellner
89c969232d
Remove stats for filesystem in settings view and from Client
2015-02-25 18:06:38 +01:00
Johannes Zellner
c5220ad665
Rename gulp watch to gulp develop to use the same pattern as appstore
2015-02-25 18:02:00 +01:00
Johannes Zellner
b5e78bf9ba
Remove footer and move version on the top
2015-02-25 17:58:37 +01:00
Johannes Zellner
fce20cba74
More similarities to other well known store
2015-02-25 17:37:05 +01:00
Johannes Zellner
f0d1613458
Do not use those panels but simple rectangles for appstore and applist
2015-02-25 17:30:23 +01:00
Johannes Zellner
535ba65097
Make run.sh use correct migration script
2015-02-25 16:59:15 +01:00
Girish Ramakrishnan
273cf06559
Add TODO
2015-02-24 22:02:36 -08:00
Girish Ramakrishnan
1e5ff33e29
Rename mysql dump file
2015-02-24 21:39:17 -08:00
Girish Ramakrishnan
1fc344a1e5
apphealthtask: ensure db is initialized before run
2015-02-24 20:46:25 -08:00
Girish Ramakrishnan
6c787fb1a3
Remove ununsed variable
2015-02-24 20:36:45 -08:00
Girish Ramakrishnan
ba6722f493
Remove last traces of sqlite3
...
Fixes #195
2015-02-24 20:26:51 -08:00
Girish Ramakrishnan
8ac272247e
call db-migrate script correctly
2015-02-24 19:37:15 -08:00
Girish Ramakrishnan
734d8acc9e
Setup mysql on cloudron
2015-02-24 17:30:28 -08:00
Girish Ramakrishnan
241a30092d
Not necessary to export these ports since addons are linked
2015-02-24 14:35:46 -08:00
Johannes Zellner
e87770f46e
Remove side tabbar
...
Fixes #206
2015-02-24 19:22:46 +01:00
Johannes Zellner
3c83de3845
Actually show installed apps in applist
...
This is only a temporary design
Fixes #213
2015-02-24 19:16:41 +01:00
Johannes Zellner
822dc51bb4
Add initial applist view
2015-02-24 19:05:24 +01:00
Johannes Zellner
a111beddb5
Show installed apps immediately
2015-02-24 18:45:53 +01:00
Johannes Zellner
30c8fffd8f
Move settings link to navbar
2015-02-24 18:42:08 +01:00
Johannes Zellner
db188ea1c4
Move appstore link to navbar
2015-02-24 18:40:01 +01:00
Johannes Zellner
316b5ec2da
Remove IP and Domain in settings view
...
Fixes #208
2015-02-24 18:35:01 +01:00
Johannes Zellner
d5b5e09224
Create footer to display the cloudron version
...
Fixes #207
2015-02-24 18:31:02 +01:00
Johannes Zellner
a19148447a
Add some more defaults for LOCAL development
...
Very useful for webadmin UI development
2015-02-24 18:29:40 +01:00
Johannes Zellner
df3a2f7e65
Move Users to Navbar
...
Fixes #205
2015-02-24 18:02:24 +01:00
Johannes Zellner
5b73b5af48
Remove the Graphs menu entry
...
Fixes #203
2015-02-24 17:59:27 +01:00
Johannes Zellner
4d28ddd12d
Move Account and Security to the profile dropdown menu
...
Fixes #200 #201 #202
2015-02-24 17:55:43 +01:00
Johannes Zellner
f06bf2a0cc
Allow any setupToken when running locally
2015-02-24 17:23:29 +01:00
Johannes Zellner
452a913aeb
Ensure we use mysql instead of sqlite in run.sh
2015-02-24 17:23:19 +01:00
Johannes Zellner
28a9c0eee9
Allow to contextualize the error.html
2015-02-24 16:57:11 +01:00
Johannes Zellner
2ef8f02445
Make error.html an angular app
2015-02-24 16:23:33 +01:00
Girish Ramakrishnan
df36f1591a
Allocate oauth creds with addon- prefix
2015-02-24 02:09:35 -08:00
Girish Ramakrishnan
09b607b08a
Give different prefixes for id
2015-02-24 01:57:03 -08:00
Girish Ramakrishnan
037b11d585
Revert "Setup logrotate automatically for all apps"
...
This reverts commit ed67f9d494 .
This was committed unintentionally
2015-02-24 01:50:28 -08:00
Girish Ramakrishnan
8a79c08b45
Print oauth addon config as well
2015-02-24 01:18:49 -08:00
Girish Ramakrishnan
343a77f18a
Add debugs for setup/teardown addons
2015-02-24 01:13:41 -08:00
Girish Ramakrishnan
e47fcec0d6
Make sure we start afresh
2015-02-24 01:10:17 -08:00
Girish Ramakrishnan
0e2dcaf21a
debug the installationProgress
2015-02-24 00:38:55 -08:00
Girish Ramakrishnan
875f7d6c4a
Move code to use mysql
...
GLOB is not supported in mysql. So uses LIKE
password in users table needs 1024 (512 * 2 bytes since it's saved in hex)
just use drop column syntax to remove private/publicPem since the code was replacing with wrong schema for password
change collation to case sensitive
foreign key size must match size http://verysimple.com/2006/10/22/mysql-error-number-1005-cant-create-table-mydbsql-328_45frm-errno-150/
Part of #195
2015-02-24 00:27:22 -08:00
Girish Ramakrishnan
91d908d68b
Use async.map instead
2015-02-23 23:42:52 -08:00
Girish Ramakrishnan
36274935e0
Add migrate_test npm task
...
Part of #195
2015-02-23 23:42:43 -08:00
Girish Ramakrishnan
5b48c44ed3
Move from sqlite3 to mysql
...
* key is reserved keyword in mysql
Part of #195
2015-02-23 23:42:08 -08:00
Girish Ramakrishnan
3c854403ff
debug output as utf8
2015-02-23 23:42:04 -08:00
Girish Ramakrishnan
858258c161
Verify password and salt are never sent out
2015-02-23 21:09:46 -08:00
Girish Ramakrishnan
0eae09efd9
Remove database.removePrivates
...
Terrible convention that we will easily forget
2015-02-23 21:05:42 -08:00
Girish Ramakrishnan
956d545a3a
Fix typo
2015-02-23 19:23:17 -08:00
Girish Ramakrishnan
9134429003
clear -> _clear to signify they are internal
2015-02-23 19:22:07 -08:00
Girish Ramakrishnan
fabdb355da
Check for manifestVersion mandatory field
2015-02-23 16:13:38 -08:00
Girish Ramakrishnan
ed67f9d494
Setup logrotate automatically for all apps
...
Fixes #150
2015-02-20 21:35:49 -08:00
Girish Ramakrishnan
3a19496cda
Use graphite:0.3
...
Fixes #168
2015-02-20 15:57:39 -08:00
Girish Ramakrishnan
310df39c96
Add copytruncate config to supervisor logrotate
...
logrotate moves files by default. Supervisor appears to keep the log
file handle open throghout and thus ends up continuing logging to rotated
file. copytruncate should fix that.
2015-02-20 10:53:38 -08:00
Girish Ramakrishnan
aeb769ae5c
retab config files
2015-02-20 10:52:52 -08:00
Johannes Zellner
e2511f41cc
Let the api server know that we got setup
2015-02-20 13:25:45 +01:00
Johannes Zellner
ae98658046
Fixup the unit tests after activation route changes
2015-02-20 12:21:16 +01:00
Johannes Zellner
f2968d2084
Do the setup token verification agains the api server
2015-02-20 11:28:52 +01:00
Johannes Zellner
09870ba39a
Add stub setupTokenAuth to activation route
2015-02-20 10:44:42 +01:00
Johannes Zellner
e24321a574
Make use of the setupToken in setup.html
2015-02-20 10:13:46 +01:00
Girish Ramakrishnan
94383e9859
callback can be null
2015-02-18 15:47:14 -08:00
Girish Ramakrishnan
28f8596bf0
invalidate update info
2015-02-18 13:03:17 -08:00
Johannes Zellner
87505c773b
Allow both email and username for password resets
...
Fixes #193
2015-02-18 21:42:35 +01:00
Johannes Zellner
7583d4a9a3
Be a bit more chatty in case the user misspelled his email while resetting the pw
2015-02-18 21:42:35 +01:00
Girish Ramakrishnan
e8f5b2da8e
Check version is semver for app update
2015-02-18 12:46:03 -08:00
Girish Ramakrishnan
a99248d5db
Show update modal dialog when update button is clicked
2015-02-18 12:46:03 -08:00
Johannes Zellner
0ef33896fc
Make sure we clear the password field after submit
2015-02-18 21:27:37 +01:00
Johannes Zellner
df9e143369
Also allow email to be used for login next to username
...
Fixes #192
2015-02-18 21:15:12 +01:00
Johannes Zellner
091c341c2b
Add comment about s3 header for authenticated user access via signed urls
2015-02-18 20:55:53 +01:00
Johannes Zellner
8ae99fc155
Do not poll for apps on any config change
2015-02-18 18:25:12 +01:00
Johannes Zellner
79a6a85a9b
Also fixup appstore.js breakage due to uglifyjs
2015-02-18 17:58:27 +01:00
Johannes Zellner
3040c55036
Require a password for app updates
...
Fixes #190
2015-02-18 17:39:45 +01:00
Johannes Zellner
d75cecc801
Ask for password and send for app update
2015-02-18 17:37:03 +01:00
Johannes Zellner
955abc72de
Require a password for app uninstallation
2015-02-18 17:22:48 +01:00
Johannes Zellner
856ac4967b
Add form feedback in case wrong password was given
2015-02-18 17:07:00 +01:00
Johannes Zellner
e28863382a
Ask for password and send for app uinstallation
2015-02-18 16:51:49 +01:00
Johannes Zellner
9568c5de04
Add test app in run.sh to be able to exercise more of the webadmin
2015-02-18 16:49:10 +01:00
Johannes Zellner
da67f0c40f
Rename all delete/removeApp to uninstallApp
2015-02-18 16:28:15 +01:00
Johannes Zellner
6b0c3e3029
Upload sourceTarballs now with acces to AuthorizedUsers
...
Old sourceTarballs are still public!
This finally fixes #175
2015-02-18 15:56:08 +01:00
Johannes Zellner
e0aa207569
Enable uglification for our javascript files
...
Fixes #189
2015-02-18 14:12:38 +01:00
Johannes Zellner
860557b3a8
Streamline gulpfile
2015-02-18 12:51:15 +01:00
Girish Ramakrishnan
43428cd063
Send version when updating app
...
Fixes #169
2015-02-17 21:32:11 -08:00
Girish Ramakrishnan
824fa4ac54
Add TODO that getManifest should use boxVersion at some point
2015-02-17 21:26:46 -08:00
Girish Ramakrishnan
130ff6bad0
send app version when installing
...
Part of #169
2015-02-17 21:16:15 -08:00
Girish Ramakrishnan
003ca01123
Refuse to install app if manifest constraints are not satisfied
2015-02-17 21:11:05 -08:00
Girish Ramakrishnan
00515ed9f5
Store app version in db at install time
...
It used to be saved in db at manifest download time. This is inherently
racy because the app version the user intended to download might be
different from what he ends up installing.
Same race applies to the update case.
This also ensures that we restore to the correct version during the restore
phase should the manifest never have gotten downloaded.
Part of #169
2015-02-17 21:10:03 -08:00
Girish Ramakrishnan
2d2c308dac
Set sourceTarballUrl correctly
2015-02-17 18:36:40 -08:00
Girish Ramakrishnan
3629a8994d
Remove unused username, password arguments
2015-02-17 16:37:00 -08:00
Girish Ramakrishnan
c789045a35
Add tests for validateManifest
2015-02-17 12:00:36 -08:00
Girish Ramakrishnan
2be5214df9
If targetBoxVersion exists in manifest, it has to be valid semver
2015-02-17 10:51:41 -08:00
Girish Ramakrishnan
f885b3940f
Check if app version is valid semver
2015-02-17 10:43:30 -08:00
Johannes Zellner
c234637259
Use a signed sourceTarballUrl for updates
2015-02-17 12:45:08 +01:00
Girish Ramakrishnan
0c0a5163fd
validate min/maxBoxVersion in manifest
2015-02-16 20:33:39 -08:00
Girish Ramakrishnan
ff170c9630
Send boxVersion when querying for appupdates
...
appstore will use this information to filter out supported apps
2015-02-16 15:20:37 -08:00
Girish Ramakrishnan
dcf09b8814
Send boxVersion when requesting app listing
...
appstore uses this to filter out apps
2015-02-16 15:16:42 -08:00
Johannes Zellner
fd3aa3aa4e
Update the progress.json creation in splashpage.sh
...
Fixes #188
2015-02-16 14:20:01 +01:00
Johannes Zellner
cb9dbf4956
Remove account settings from settings view
...
Fixes #187
2015-02-16 14:11:21 +01:00
Johannes Zellner
0d79351773
Also migrate the oauth views which use angular
2015-02-16 14:00:20 +01:00
Johannes Zellner
918389b5fd
Remove double includes in oauth views
2015-02-16 13:58:58 +01:00
Johannes Zellner
f07d0db07a
Fixup angular issues from migrating to 1.3
2015-02-16 13:57:25 +01:00
Johannes Zellner
e9c875e964
Add accounts page
2015-02-16 13:27:50 +01:00
Johannes Zellner
fe19032f5f
Update to angular 1.3.13
...
Note that angular-md5 is not an official extension
https://github.com/gdi2290/angular-md5
Fixes #186
2015-02-16 13:24:02 +01:00
Johannes Zellner
77015dabee
Remove non minified versions of angular and its extensions
2015-02-16 13:01:31 +01:00
Johannes Zellner
5d275e5fab
Remove unused async.js
2015-02-16 12:45:17 +01:00
Johannes Zellner
aee36b8998
Since non admins are now allowed in webadmin it is no longer only for admins
...
Fixes #131
2015-02-16 11:15:29 +01:00
Johannes Zellner
9458c0f472
Bring a non admin back to / if he accesses an admin ui
2015-02-16 11:00:34 +01:00
Johannes Zellner
0ec738409e
Do not show admin ui components if user is not an admin
...
Note that the REST API anyways would fail if the token is not
associated with an admin
2015-02-16 10:55:31 +01:00
Johannes Zellner
26f9318aea
Add global watch to gulpfile
2015-02-16 10:54:42 +01:00
Johannes Zellner
bbb02ecee0
Allow non admins to login into the webadmin
2015-02-16 10:41:46 +01:00
Johannes Zellner
6cb256a538
Use a tag instead of li for oauth views navbar
2015-02-16 10:38:25 +01:00
Johannes Zellner
c7e15e8e99
Get rid of unused requires and vars in server.js
2015-02-16 10:31:51 +01:00
Johannes Zellner
0f6351fe57
Use new morgan api instead of deprecated form
2015-02-16 10:30:56 +01:00
Johannes Zellner
842ef40947
Give a bit more feedback on the update progress in update.js
2015-02-16 09:28:40 +01:00
Johannes Zellner
ee35ec5349
Further remove unused includes in update.html and define background
2015-02-16 09:28:40 +01:00
Girish Ramakrishnan
df4683e6d4
Fix failing postgresql addon test
2015-02-16 00:01:40 -08:00
Girish Ramakrishnan
cc7970b441
Test postgresql and mysql addons
...
Fixes #173
2015-02-15 23:07:51 -08:00
Girish Ramakrishnan
371f4b6416
Update safetydance
2015-02-15 21:49:27 -08:00
Johannes Zellner
2107ce4976
Remove unused styles for update.html
2015-02-15 22:15:33 +01:00
Johannes Zellner
4d554d1142
Use logrotate with 100k file size for cloudron and supervisor logs
...
Fixes #166
2015-02-15 22:00:49 +01:00
Johannes Zellner
845faa544f
Also set the mime-type for an file served up with alias
2015-02-15 21:49:23 +01:00
Johannes Zellner
b6f3a9a5e3
Generate the new style progress.json in start.sh
2015-02-15 21:45:03 +01:00
Johannes Zellner
f3ec565546
nginx alias command needs absolute paths
2015-02-15 21:30:06 +01:00
Johannes Zellner
3009f675ca
Serve up /progress.json to allow smooth update
2015-02-15 21:12:38 +01:00
Johannes Zellner
ea2427964f
Only clear the update progress in the updater if there was an error
2015-02-15 21:05:02 +01:00
Johannes Zellner
f306ca7861
Add missing semicolon
2015-02-15 20:47:21 +01:00
Johannes Zellner
182f978f27
Replace isUpdating with a more generic progress API
...
/api/v1/cloudron/progress -> 200
{
update: null | { percent: 13, message: 'foobar' },
backup: null | { percent: 37, message: 'great' }
}
the start splash server also serves up that API endpoint,
by serving up the /progress.json file
Fixes #185
2015-02-15 19:47:11 +01:00
Johannes Zellner
f5d915e4b1
Ensure we also copy over the sourcemap files with gulp
...
Fixes #182
2015-02-15 12:26:53 +01:00
Johannes Zellner
a287c2d2e3
Use angular-md5 minified
2015-02-15 12:19:13 +01:00
Johannes Zellner
be7a380315
Remove unused angular-base64
2015-02-15 12:13:57 +01:00
Johannes Zellner
6ba3c55060
Always use the minified version of angular.js
2015-02-15 12:11:25 +01:00
Johannes Zellner
e4c77ca3ac
Remove legacy ejs filter
2015-02-15 12:06:50 +01:00
Girish Ramakrishnan
ee4a49e48e
Update db-migrate ( #226 is fixed)
2015-02-14 10:06:52 -08:00
Girish Ramakrishnan
e45a792435
Update db-migrate
...
We cannot move to 0.9.x since it's broken with sqlite3
- see https://github.com/kunklejr/node-db-migrate/issues/226
2015-02-14 00:32:18 -08:00
Girish Ramakrishnan
2283908a16
Update hock
2015-02-13 23:47:30 -08:00
Girish Ramakrishnan
dc2dbcf1a3
Update superagent
2015-02-13 23:26:50 -08:00
Girish Ramakrishnan
caa8853a0d
Move to caret based versions instead of tilde
...
http://fredkschott.com/post/2014/02/npm-no-longer-defaults-to-tildes/
2015-02-13 23:16:57 -08:00
Girish Ramakrishnan
540b4dcd09
Update sinon, gulp and aws-sdk
2015-02-13 23:02:24 -08:00
Girish Ramakrishnan
dd9653776e
Update memorystream, multiparty, sqlite3, validator
2015-02-13 23:00:53 -08:00
Girish Ramakrishnan
201873ad8f
rimraf is not used
2015-02-13 22:56:54 -08:00
Girish Ramakrishnan
18cea1780e
Update json, ejs, memorystream, mime, morgan, native-dns, node-uuid, once, semver, serve-favicon
2015-02-13 22:55:05 -08:00
Girish Ramakrishnan
f49cc80ac4
Remove readdirp
2015-02-13 22:53:29 -08:00
Girish Ramakrishnan
9853330c0c
Update proxy-middleware, split
2015-02-13 22:50:02 -08:00
Girish Ramakrishnan
2cef521e13
Fix deprecation warnings from express-session
2015-02-13 22:45:44 -08:00
Girish Ramakrishnan
2a16c3305d
Remove js-yaml
2015-02-13 21:56:32 -08:00
Girish Ramakrishnan
f6e4be5ff0
Update modules express, express-session and nock
2015-02-13 21:53:44 -08:00
Girish Ramakrishnan
ff03f5dfdc
Remove encfs
2015-02-13 21:51:16 -08:00
Girish Ramakrishnan
76a6ba4c8a
Update modules
...
"async" can be updated from ^0.6.2 to ^0.9.0 (Installed: 0.6.2, Latest: 0.9.0)
"body-parser" can be updated from ~1.9.3 to ~1.12.0 (Installed: 1.9.3, Latest: 1.12.0)
"connect-lastmile" can be updated from 0.0.8 to 0.0.10 (Installed: 0.0.8, Latest: 0.0.10)
"connect-timeout" can be updated from ~1.4.0 to ~1.5.0 (Installed: 1.4.0, Latest: 1.5.0)
"cookie-parser" can be updated from 1.1.0 to 1.3.3 (Installed: 1.1.0, Latest: 1.3.3)
"csurf" can be updated from ^1.6.1 to ^1.6.6 (Installed: 1.6.6, Latest: 1.6.6)
"debug" can be updated from ~0.8.1 to ~2.1.1 (Installed: 0.8.1, Latest: 2.1.1)
"dockerode" can be updated from ~2.0.5 to ~2.0.7 (Installed: 2.0.6, Latest: 2.0.7)
2015-02-13 21:50:56 -08:00
Girish Ramakrishnan
56b3561b42
Remove unused commander
2015-02-13 21:43:10 -08:00
Girish Ramakrishnan
d410c93aaf
Remove ursa
2015-02-13 21:06:14 -08:00
Johannes Zellner
2b621e9c1d
Remove update dialog from webadmin
...
This is now handled in update.html
2015-02-13 17:34:00 +01:00
Johannes Zellner
e9b19878c0
Uncomment accidentally commented line
2015-02-13 17:33:38 +01:00
Johannes Zellner
0e05f91475
Finally go back to the webadmin
2015-02-13 16:30:28 +01:00
Johannes Zellner
354fa3fefd
isUpdate is actually called isUpdating
2015-02-13 16:19:52 +01:00
Johannes Zellner
4e2031dafb
Also add update.js to dist/
2015-02-13 16:13:46 +01:00
Johannes Zellner
045d2b5263
Remove stray whitespace
2015-02-13 15:42:43 +01:00
Johannes Zellner
7d886c0981
Serve up 3rdpart of setup/splash/website
2015-02-13 15:33:55 +01:00
Johannes Zellner
62ecd7df09
Update the update.html
2015-02-13 15:33:38 +01:00
Johannes Zellner
189cb7fa24
Include 3rdparty for setup/splash/website
2015-02-13 15:32:08 +01:00
Johannes Zellner
d50d062ad1
Add 3rdparty for setup/splash/website
...
Those are generated via 'gulp update'
2015-02-13 15:31:34 +01:00
Johannes Zellner
50ff1aeb3e
Unify the update site to update.html
...
This still needs tweaking of the splash nginx config
2015-02-13 14:04:25 +01:00
Johannes Zellner
778fb507ca
Smoothen out the update dialogs
...
Fixes #140
2015-02-13 11:17:06 +01:00
Johannes Zellner
ff4a347c7f
Adjust run.sh to match current nginx setup
2015-02-13 10:58:56 +01:00
Girish Ramakrishnan
aa42067f9f
Track update status
...
After clicking update, the box webadmin returns to webadmin page. This is because the update has
started but the updater is busy download and building stuff for sometime before it sets up the
nginx to show upload progress.
Part of #140 . The UI doesn't work properly.
2015-02-12 20:42:17 -08:00
Girish Ramakrishnan
1ce5893a54
Add config.isUpdating
2015-02-12 19:53:57 -08:00
Girish Ramakrishnan
20e43bdf9c
Update nginx ssl settings
...
Fixes #172
2015-02-12 13:52:42 -08:00
Girish Ramakrishnan
188c69102f
initialize progress.json with valid json
2015-02-12 13:31:10 -08:00
Girish Ramakrishnan
e785fb9043
Add --ssl flag to s3cmd (works only in 1.5.2)
2015-02-12 13:24:23 -08:00
Girish Ramakrishnan
48aef2f217
update dist of error.html
2015-02-12 13:14:41 -08:00
Girish Ramakrishnan
e7bfb948d0
Reload root url after some time
2015-02-12 13:14:16 -08:00
Girish Ramakrishnan
c327600c3c
Fix typo in backup.sh
2015-02-12 12:52:13 -08:00
Girish Ramakrishnan
8230374d66
Fix naked domain settings when app is reconfigured
...
Fixes #149
2015-02-12 12:28:56 -08:00
Girish Ramakrishnan
b950daea89
reload status page if we get 404
...
Part of #141
2015-02-12 11:37:41 -08:00
Girish Ramakrishnan
55779fb3c3
Add few debug
2015-02-12 11:32:02 -08:00
Johannes Zellner
3575fc6d18
Use progress.json to update the page
...
Fixes #141
2015-02-12 16:35:01 +01:00
Johannes Zellner
a8f9f71807
Call backup.sh with backupKey
2015-02-12 12:47:42 +01:00
Girish Ramakrishnan
2a8adad994
Add some TODO
2015-02-12 02:55:07 -08:00
Girish Ramakrishnan
8148072e1c
Remove _setNakedDomain
2015-02-12 02:48:03 -08:00
Girish Ramakrishnan
9f9de96d82
Reset naked domain config when unconfiguring and during restore
2015-02-12 02:43:19 -08:00
Girish Ramakrishnan
dbe1baafe7
Refactor code into settings.js
2015-02-12 02:04:45 -08:00
Johannes Zellner
27586b7484
Add backup encryption
2015-02-12 11:02:42 +01:00
Girish Ramakrishnan
498259597e
Add few comments
2015-02-12 01:39:09 -08:00
Johannes Zellner
e6afa57b25
Add encryption for backups
2015-02-12 10:34:40 +01:00
Girish Ramakrishnan
bc60c1a7fc
Generate naked_domain.conf out of appconfig.ejs
...
Set admin as default naked domain in db
It's no different than any other app now
2015-02-12 01:03:26 -08:00
Johannes Zellner
85c118f6fd
Check if user is set in error.ejs
...
Fixes #180
2015-02-12 08:58:02 +01:00
Johannes Zellner
905c24aab1
Some jslint cleanup
2015-02-12 08:22:44 +01:00
Girish Ramakrishnan
b37ca8701e
Use safe.query instead since tcpPorts can be undefined
2015-02-11 18:39:13 -08:00
Girish Ramakrishnan
a669fd33aa
APP_ORIGIN is redundant
...
With latest docker, APP_ORIGIN is not required
https://github.com/docker/docker/issues/7851
hostname now returns the FQDN and os.hostname() in node returns
the set hostname as well.
So things have changed since 3458f0f068
In general, an app should use hostname for some static config settings.
For everything else, X-Forwarded-Host should be prefered since it allows
mounting the app from multiple locations.
2015-02-11 17:23:43 -08:00
Girish Ramakrishnan
e6d9996466
URL -> Url
2015-02-11 17:08:59 -08:00
Girish Ramakrishnan
6218f251c0
Unify the admin and app nginx configs
...
In an ideal world, admin should have been like any other app
2015-02-11 16:09:22 -08:00
Girish Ramakrishnan
0cacf1d25a
Manifest can be null if it was never downloaded
2015-02-11 16:09:22 -08:00
Girish Ramakrishnan
35107ebd63
Manifest may not exist
2015-02-11 16:06:12 -08:00
Girish Ramakrishnan
feeb7947d6
Make curl fail if upload failed
2015-02-11 13:27:29 -08:00
Girish Ramakrishnan
d95937fe98
updater: offer updating to latest version if current version is not found
...
This is useful in dev where we keep resetting versions
2015-02-11 12:55:51 -08:00
Girish Ramakrishnan
bfb33726f8
Use separate buckets for dev/staging
2015-02-11 11:42:08 -08:00
Girish Ramakrishnan
79250cd0ec
Use s3cmd instead of s3-cli since we can pass keys as arg
2015-02-11 10:54:36 -08:00
Girish Ramakrishnan
a83cc0f647
s/yellowtent/cloudron
2015-02-11 10:07:21 -08:00
Girish Ramakrishnan
41b3117aa8
Use npm run instead
2015-02-10 23:47:29 -08:00
Girish Ramakrishnan
9b25205dcb
create config.json that can be used in error.html
...
Fixes #171
2015-02-10 23:46:37 -08:00
Girish Ramakrishnan
5b9c09a227
Add ejs-cli
2015-02-10 22:43:49 -08:00
Girish Ramakrishnan
ca927bbd1d
Remove redundant container removal
...
start.sh already removes all containers at the start of script
2015-02-10 19:31:31 -08:00
Girish Ramakrishnan
f7a562b07b
Use apiServerOrigin and webServerOrigin
...
Part of #171
2015-02-10 18:23:03 -08:00
Girish Ramakrishnan
e0ebd2b585
app icon is now already prefixed with appServerUrl
2015-02-10 17:30:30 -08:00
Johannes Zellner
dbe4ca881c
We now get apiServerOrigin and webServerOrigin via provisioning
...
!! appServerUrl is now deprecated and replaced with apiServerOrigin
2015-02-10 23:22:34 +01:00
Girish Ramakrishnan
d735ff9bf1
Fix root path
2015-02-09 20:21:06 -08:00
Girish Ramakrishnan
f48fc0e5a6
Bump addon versions to 0.3
2015-02-09 19:55:21 -08:00
Girish Ramakrishnan
c41d432fc2
Bump redis version
2015-02-09 19:52:51 -08:00
Girish Ramakrishnan
1d4b6ded94
Set dmarc-report@cloudron.io as the dmarc report destination
...
Fixes #167
2015-02-09 17:50:30 -08:00
Girish Ramakrishnan
11b56d9355
config.js values are not persisted by design
...
values in cloudron.conf are basically a cache. the code needs to
deal with it if the values are not present. for persistent config,
one has to use the sqlite db.
Fixes #139
2015-02-09 17:40:03 -08:00
Johannes Zellner
3bd5a9530a
Remove serving up all of graphite
2015-02-09 18:40:23 +01:00
Johannes Zellner
dcb021776d
Fixup the url replacing for graphs
...
Fixes #124
2015-02-09 18:31:14 +01:00
Johannes Zellner
a850a9a813
Update .gitignore
2015-02-09 17:16:39 +01:00
Johannes Zellner
782f868962
Remove stray console.log()
2015-02-09 13:25:12 +01:00
Johannes Zellner
950283f2fd
Add form validation for appinstall and appconfig views
...
Fixes #118
2015-02-09 11:51:03 +01:00
Johannes Zellner
e6248017ac
Show location instead of app name for naked domain select
...
Fixes #151
2015-02-09 11:15:13 +01:00
Johannes Zellner
06c0da895b
Fix broken db migration script
2015-02-09 11:10:02 +01:00
Johannes Zellner
355d5f6de2
Remove users.publicPem usage
...
Fixes #160
2015-02-09 10:53:17 +01:00
Johannes Zellner
8129b9737c
Remve users._privatePemCipher usage
2015-02-09 10:53:08 +01:00
Johannes Zellner
f71b96daac
Add db migration for removal of _privatePemCipher and publicPem
2015-02-09 10:53:08 +01:00
Girish Ramakrishnan
36fb4798aa
Split out redis url into separate env vars
...
Fixes #163
2015-02-08 22:23:54 -08:00
Girish Ramakrishnan
774d433e62
Set CLOUDRON=1 in all apps
...
This is useful for testing containers locally and in cloudron
Part of #163
2015-02-08 22:23:54 -08:00
Johannes Zellner
ad37b2a501
webadmin: Some poormans attempt to fix the cert upload with bootstrap
2015-02-08 23:26:05 +01:00
Johannes Zellner
078082f56f
webadmin: do not use bootstrap select style as it breaks more than it helps here
2015-02-08 22:44:30 +01:00
Johannes Zellner
fd4228667f
Remove redundant semver reference in devDependencies
2015-02-08 22:27:08 +01:00
Johannes Zellner
192aebc1db
Rename yellowtent occurances in the package.json
2015-02-08 22:26:32 +01:00
Johannes Zellner
7bc75c41e1
Also adjust the run.sh to use ~/.cloudron
2015-02-08 22:26:14 +01:00
Johannes Zellner
f22c8374fa
use ~/.cloudron[_test] as LOCAL and TEST config folder
2015-02-08 22:22:10 +01:00
Johannes Zellner
7cbd79f9f3
Rename oauth library yellowtent.js to cloudron.js
2015-02-08 22:16:19 +01:00
Johannes Zellner
866fdad5ab
Align oauth views html layout
2015-02-08 21:35:12 +01:00
Johannes Zellner
6bd38ed21e
Use angular for password setup view form validation
2015-02-08 21:32:53 +01:00
Johannes Zellner
f8370cd75f
Use angular for password reset view form validation
2015-02-08 21:28:58 +01:00
Johannes Zellner
9d2a20b031
Also adjust the webadmin client code to not use a password for create user
2015-02-08 21:09:52 +01:00
Johannes Zellner
b2286cb4fd
We do not need a password for user creation anymore
2015-02-08 21:02:32 +01:00
Johannes Zellner
6807759b9e
Do not allow multiple activations
...
Fixes #162
2015-02-08 20:10:33 +01:00
Johannes Zellner
453529a6a0
New users do not get a password but a password setup link
2015-02-08 16:19:32 +01:00
Johannes Zellner
190ab75b92
Improve unit tests for password reset
2015-02-07 08:43:49 +01:00
Johannes Zellner
90706f79b8
Move password reset logic into user.js to be more reusable
2015-02-07 07:59:38 +01:00
Girish Ramakrishnan
91293e3694
Use gnu sed on mac
...
Mac also does not have /run, so move pid file to /tmp
2015-02-06 18:26:47 -08:00
Johannes Zellner
c32fdad0a9
Do only send the location of webadmin for client credentials
...
Fixes #158
2015-02-06 22:14:15 +01:00
Girish Ramakrishnan
94ae6044f1
release folder has moved to installer repo
2015-02-06 11:37:57 -08:00
Johannes Zellner
f2b6340c32
Show contactEmail instead of app author id
...
Fixes #156
2015-02-06 19:57:55 +01:00
Johannes Zellner
5b369d2b78
Manifest is already parsed in the appdb postprocess...doh
2015-02-06 17:12:28 +01:00
Johannes Zellner
5a84fa7363
Display more information in security page for each client
2015-02-06 16:59:42 +01:00
Johannes Zellner
d0034764ca
Remove clients.clientId and clients.name from the database
...
clients.clientId is now the same as clients.id and the name will
be provided from the apps.manifest.title
2015-02-06 14:31:55 +01:00
Johannes Zellner
9d5643bb63
Hardcode webadmin clients.id in start.sh
2015-02-06 11:23:26 +01:00
Johannes Zellner
28d91ba3de
webadmin: Use unique id field for accordion identifier
2015-02-06 10:39:02 +01:00
Johannes Zellner
2af56ac335
Use appstore generate_certificate.sh for local development
2015-02-06 10:39:02 +01:00
Girish Ramakrishnan
d77b80ce2f
Fix sql queries missing ON clause for joins
2015-02-06 01:30:53 -08:00
Girish Ramakrishnan
ada35c141b
Do not add redis port since it's redundant
2015-02-05 16:55:20 -08:00
Girish Ramakrishnan
840d91d53f
Use latest test image
2015-02-05 14:31:15 -08:00
Girish Ramakrishnan
b2ae65b085
Leave a note that about setupRedis function
2015-02-05 07:54:23 -08:00
Girish Ramakrishnan
96a6d7a3c1
setupRedis should not teardown old redis data
...
A future commit will move all this to a script
2015-02-04 21:27:25 -08:00
Girish Ramakrishnan
e79eb1368f
pass oldManifest
2015-02-04 20:25:44 -08:00
Girish Ramakrishnan
00185f309d
remove old addon configs
2015-02-04 20:16:30 -08:00
Girish Ramakrishnan
5ac4be823b
updateAddons instead of setupAddons in restore
...
This is because the manifest we download might be different from the
manifest that was present at backup time.
2015-02-04 20:15:51 -08:00
Girish Ramakrishnan
2b67a6c232
Restart failing apps 100 times
2015-02-04 20:03:58 -08:00
Girish Ramakrishnan
b3e353fe09
Set restart policy of redis to always correctly
2015-02-04 18:30:39 -08:00
Girish Ramakrishnan
7faa0ba10d
name app container with their appid
2015-02-04 18:12:00 -08:00
Girish Ramakrishnan
e7bf0f4b29
restart redis always
2015-02-04 18:00:52 -08:00
Girish Ramakrishnan
8b788e351b
Make app test work
2015-02-04 01:48:32 -08:00
Girish Ramakrishnan
7de38ec6fd
Refactor vbox port forwarding logic
2015-02-04 01:04:49 -08:00
Girish Ramakrishnan
7328cf6290
Check for redis:0.2
2015-02-03 23:33:42 -08:00
Girish Ramakrishnan
4e2fde9c26
Do not tear down addons in restore, update and configure
...
Tearing it means losing the data!
2015-02-03 23:32:08 -08:00
Girish Ramakrishnan
4ea62c04e2
Mount variables file as readonly
2015-02-03 22:45:50 -08:00
Girish Ramakrishnan
48ca911dab
Fix debug
2015-02-03 19:29:37 -08:00
Girish Ramakrishnan
764959a4e1
Generate addon vars file in config dir instead of data dir
...
No reason to back these up since password can be reset
Part of #147
2015-02-03 18:27:29 -08:00
Girish Ramakrishnan
735d6a6acb
Link redis container to apps
...
Part of #147
2015-02-03 18:27:17 -08:00
Girish Ramakrishnan
fc3d9918cc
Link mail container to addons
...
This allows us to adapt to dynamic IPs for the mail container
Part of #147
2015-02-03 17:44:40 -08:00
Girish Ramakrishnan
17c9716004
Link postgresql addon
...
Part of #147
2015-02-03 14:52:57 -08:00
Girish Ramakrishnan
00068e9484
Continue if graphite pull failed because of network issues
2015-02-03 14:21:11 -08:00
Girish Ramakrishnan
3d9f4ce2c5
Link the mysql addon into apps
...
This should give a hostname 'mysql' in the apps
Part of #147
2015-02-03 13:26:55 -08:00
Girish Ramakrishnan
d4b0698609
Pass mysql credentials in a file instead of env var
...
Part of #147
2015-02-03 13:13:23 -08:00
Johannes Zellner
2b470bb042
The release scripts are now located in the installer repo
2015-02-03 21:16:30 +01:00
Girish Ramakrishnan
585740a806
Move directory creation into setup script
...
test code now creates all dirs before the tests are run
run.sh creates all dirs before starting in local mode
2015-02-02 16:33:03 -08:00
Girish Ramakrishnan
d90b76882f
apphealthtask: allow 2xx and 3xx responses
...
Some apps like wordpress, mediawiki redirect to https urls. Following
the redirect results in DEPTH_ZERO_SELF_SIGNED_CERT since we use self
signed certificates.
An alternate fix is to set the X-FORWARD-* headers.
2015-02-01 20:34:56 -08:00
Girish Ramakrishnan
956f941f7d
Polling through docker network is the right thing to do
2015-02-01 20:26:55 -08:00
Girish Ramakrishnan
18dbb1608c
Print the error or res.status
2015-02-01 20:19:59 -08:00
Girish Ramakrishnan
9581ae3b7b
Rename sendmail addon env variables
2015-01-31 21:49:26 -08:00
Girish Ramakrishnan
fc5d1a5acf
allocate oauth proxy credentials after downloading manifest
2015-01-30 14:45:54 -08:00
Girish Ramakrishnan
106ef288e8
Move to new containers
2015-01-29 11:12:10 -08:00
Girish Ramakrishnan
5c2928f97f
stage.sh: Parse change logs
2015-01-27 22:49:08 -08:00
Girish Ramakrishnan
200fecab9c
Add use strict
2015-01-27 22:35:15 -08:00
Girish Ramakrishnan
364a2dc19b
Add script to create a release in staging
...
Fixes #145
2015-01-27 18:40:13 -08:00
Girish Ramakrishnan
9d404b7832
Allow manipulating staging release files
2015-01-27 18:12:34 -08:00
Girish Ramakrishnan
36869cb236
parametrize the download_current function
2015-01-27 18:12:34 -08:00
Girish Ramakrishnan
8d848d5b38
Remove obsolete comment
2015-01-27 16:13:17 -08:00
Girish Ramakrishnan
318e203511
Combine set flags into single command
2015-01-27 16:05:22 -08:00
Girish Ramakrishnan
8bef7c0b05
Add date field to versions.json
...
Part of #145
2015-01-27 15:31:27 -08:00
Girish Ramakrishnan
fd52179fcf
Remove unused certs
...
Fixes #146
2015-01-27 14:14:47 -08:00
Girish Ramakrishnan
7a89f38f8d
Add tests for custom domain processing in config.js
2015-01-27 10:49:56 -08:00
Girish Ramakrishnan
2bf481dcd0
When using custom domains, the zone name is the fqdn
2015-01-27 09:21:11 -08:00
Johannes Zellner
5a84681ef3
Adjust run.sh to accomodate postinstall -> start rename
2015-01-27 14:49:47 +01:00
Johannes Zellner
ad0929e622
Do not use deprecated api in cors.js
2015-01-27 13:50:58 +01:00
Girish Ramakrishnan
c015457747
Add UI to upload custom certificate
2015-01-25 21:53:25 -08:00
Girish Ramakrishnan
700fe9a161
Add upgrade flag to versions file
...
When set, the box will issue an upgrade request instead of an update
request. The intention here is that if the updater is broken then
we can just create a new source tarball without having to create a
new image.
2015-01-25 19:43:41 -08:00
Girish Ramakrishnan
762a0a93ed
Cleanup debug messages
2015-01-25 19:34:23 -08:00
Girish Ramakrishnan
09377062f8
Pass isCustomDomain in opaque data from update code
2015-01-25 19:13:45 -08:00
Girish Ramakrishnan
ec45f25038
Implement REST API to upload custom certificate
2015-01-24 21:50:47 -08:00
Girish Ramakrishnan
4288eb3ea4
Remove dead code
2015-01-24 21:25:57 -08:00
Girish Ramakrishnan
88a1f83aa6
Add multipart middleware (uses multiparty)
2015-01-24 17:51:05 -08:00
Girish Ramakrishnan
1e057de8c5
Use HttpSuccess instead of res.send
2015-01-24 15:24:26 -08:00
Girish Ramakrishnan
db12133592
Add support for custom domains
2015-01-24 09:36:55 -08:00
Girish Ramakrishnan
953ca61507
Move appFqdn to config.js
2015-01-24 08:26:04 -08:00
Girish Ramakrishnan
16ad270587
adminOrigin can be derived from fqdn
...
config.js does this already
2015-01-24 07:37:06 -08:00
Girish Ramakrishnan
eed8c39a1e
haraka does not backup anything
2015-01-24 01:19:00 -08:00
Girish Ramakrishnan
d36252e634
Suppress echo error output
2015-01-24 01:15:29 -08:00
Girish Ramakrishnan
6af415c83b
Implement setup code new design
2015-01-23 23:11:22 -08:00
Girish Ramakrishnan
f9a8916254
wrap in double quotes as changelog can have single quotes
2015-01-23 21:25:10 -08:00
Girish Ramakrishnan
2455975a46
bash scripts: merge the set lines
2015-01-23 15:01:10 -08:00
Girish Ramakrishnan
9f5a7cc1c2
Leave a note that args depend on various components
2015-01-23 14:40:08 -08:00
Girish Ramakrishnan
367b088193
Remove unnecessary variables
2015-01-23 09:11:49 -08:00
Girish Ramakrishnan
80d4a78a9f
Verify sourceTarballUrl is https and a tar.gz
2015-01-23 00:16:08 -08:00
Girish Ramakrishnan
d98fe190a3
Parse tls cert and key separately
...
Since those keys contain newlines
2015-01-23 00:09:36 -08:00
Girish Ramakrishnan
0be2c7be8c
Add hotfix to ensure directory for progress.json
2015-01-22 23:56:33 -08:00
Girish Ramakrishnan
edb49868a0
more script cleanup
2015-01-22 23:50:28 -08:00
Girish Ramakrishnan
240c98d654
Actually commit preinstall directory
2015-01-22 23:48:22 -08:00
Girish Ramakrishnan
d3a20853d0
Add default changelog
2015-01-22 23:46:15 -08:00
Girish Ramakrishnan
de6a34df98
rework script because getopt does not support optional args
2015-01-22 23:43:42 -08:00
Girish Ramakrishnan
a9fa5b37a4
Use sudo -k on Mac
2015-01-22 23:01:49 -08:00
Girish Ramakrishnan
ec728dbf65
tls cert and key are part of data
...
installer has no clue about certs anymore
2015-01-22 22:47:03 -08:00
Girish Ramakrishnan
d33c7ffb9b
move preinstall code to separate dir
2015-01-22 22:37:04 -08:00
Girish Ramakrishnan
959981516b
Update progress indicator
2015-01-22 22:31:10 -08:00
Girish Ramakrishnan
a033a62e06
Shutdown requires mandatory time argument
2015-01-22 17:30:37 -08:00
Girish Ramakrishnan
3953b96626
set -u all the scripts
2015-01-22 17:04:37 -08:00
Girish Ramakrishnan
7d8575b628
Rename stopbox.sh to preinstall.sh
...
Also, make startbox.sh just a helper script
2015-01-22 16:24:20 -08:00
Girish Ramakrishnan
1f04a4f41c
Add --revision
2015-01-22 16:24:20 -08:00
Girish Ramakrishnan
37a9df931b
Rename supervisor config for oauthproxy
2015-01-22 16:24:19 -08:00
Girish Ramakrishnan
357617997e
Configure nginx to show update page when stopping box
...
This code was moved from the installer code
2015-01-22 16:24:19 -08:00
Johannes Zellner
117f4580ab
Purge the Readme.md from outdated or otherwise handled content
2015-01-23 01:12:17 +01:00
Johannes Zellner
7506746892
Remove .sh extension for executable shell scripts
2015-01-23 01:10:56 +01:00
Johannes Zellner
2a06533703
Fix the checkInstall.sh by checking the error
2015-01-23 01:08:02 +01:00
Girish Ramakrishnan
b78380f8ba
Add missing shift
2015-01-22 11:41:29 -08:00
Girish Ramakrishnan
382d25c192
Remove obsolete update mode
2015-01-22 11:14:37 -08:00
Girish Ramakrishnan
40b4b9624c
Provide changelog array as part of box update info
2015-01-22 11:14:37 -08:00
Girish Ramakrishnan
4b75f5738f
Clear app update info if response was null
2015-01-22 11:14:37 -08:00
Girish Ramakrishnan
7302546640
Allow adding a changelog
2015-01-22 11:14:33 -08:00
Girish Ramakrishnan
cbf68a41e9
Send version information as part of heartbeat
...
Will help us analyze what version each cloudron is on
2015-01-22 10:42:36 -08:00
Girish Ramakrishnan
550eaa755c
Keep package.json sorted
2015-01-22 10:34:38 -08:00
Girish Ramakrishnan
38c5110460
Add script to run gulp
2015-01-22 10:29:30 -08:00
Girish Ramakrishnan
4d4483661f
Change button text depending on upgrade/update
2015-01-22 10:29:20 -08:00
Girish Ramakrishnan
1a81409006
reuse fqdn instead of querying hostname from system
2015-01-22 10:11:17 -08:00
Girish Ramakrishnan
3ef6a146f4
Create the version file for bookkeeping
2015-01-22 09:39:32 -08:00
Girish Ramakrishnan
fc99bb9b96
Move postinstall scripts under setup
2015-01-22 08:45:02 -08:00
Girish Ramakrishnan
b76fe0f9b2
Rename proxy.js to oauthproxy.js
2015-01-22 08:42:30 -08:00
Girish Ramakrishnan
401fb9e024
Move deploymentConfig.json into webadmin
2015-01-22 06:59:40 -08:00
Girish Ramakrishnan
24abe44327
Remove version.json and store version in cloudron.conf
2015-01-22 06:57:09 -08:00
Girish Ramakrishnan
23a483edf3
Remove dead comment
2015-01-22 06:56:34 -08:00
Johannes Zellner
97c3d691e7
Ignore webadmin source when createing a release
2015-01-22 10:24:00 +01:00
Johannes Zellner
dccd64b3c3
webadmin: replace broken appstatus.hml with a static error page for now
2015-01-22 10:22:09 +01:00
Johannes Zellner
05f62a673e
webadmin: concatenate all js files per page
2015-01-22 10:17:12 +01:00
Johannes Zellner
0abb15994d
webadmin: concatenate all view js files
2015-01-22 10:04:08 +01:00
Johannes Zellner
7098c6f816
webadmin: split up into src/ and dist/
2015-01-22 09:47:03 +01:00
Johannes Zellner
de202aa755
webadmin: manage javascript via gulp
2015-01-22 09:37:52 +01:00
Johannes Zellner
e3ca163d30
webadmin: process 3rdparty in gulp
2015-01-22 09:24:13 +01:00
Johannes Zellner
476f65b24e
webadmin: Use gulp to process html files
2015-01-22 09:11:08 +01:00
Girish Ramakrishnan
4bb372122a
Better log output
2015-01-21 21:31:32 -08:00
Girish Ramakrishnan
5f5a2e2e46
Clear update info when no update is available
2015-01-21 21:25:35 -08:00
Girish Ramakrishnan
c8abab3bca
Add --revert to remove the last release
2015-01-21 21:20:59 -08:00
Girish Ramakrishnan
9de5cf289b
rename COUNT to install_count
2015-01-21 18:26:30 -08:00
Girish Ramakrishnan
7ddf858cbb
postinstall.sh - Fix coding style
2015-01-21 16:59:00 -08:00
Girish Ramakrishnan
326bad1bc9
Fix coding style of postinstall helper scripts
2015-01-21 16:03:12 -08:00
Girish Ramakrishnan
06f83b51ba
Only mark constants as readonly
...
This is just a coding style thing because bash gets all worked up
if we reuse these variable names in functions as local
example:
func() {
local VAR="value" # does not work even if this is local since VAR is readonly
echo "${VAR}"
}
readonly VAR="deal"
func
2015-01-21 15:52:14 -08:00
Girish Ramakrishnan
ede5fe69c1
Coding style fixes to scripts
2015-01-21 15:34:09 -08:00
Girish Ramakrishnan
64333fd21d
backup.sh: fix coding style
2015-01-21 15:11:11 -08:00
Girish Ramakrishnan
11cadc9f32
run.sh: Fix coding style
2015-01-21 15:07:01 -08:00
Girish Ramakrishnan
1a9589c976
publish.sh - fix coding style
2015-01-21 14:49:38 -08:00
Girish Ramakrishnan
82d14bd1a5
Use double brackets
2015-01-21 14:33:41 -08:00
Girish Ramakrishnan
feb748e9b5
checkInstall.sh - fix coding style
2015-01-21 14:32:45 -08:00
Girish Ramakrishnan
d149519fc1
createSourceTarball: fix coding style
2015-01-21 14:29:45 -08:00
Girish Ramakrishnan
a2f7a837d0
Ping the MAIL_SERVER to ensure connectivity
2015-01-21 09:47:48 -08:00
Johannes Zellner
99283967e9
Add gulp to allow templating of static webadmin content
...
Currently only webadmin/error.ejs is templated. gulp html
will generated a error.html based on the values in
deploymentConfig.json
Currently we also commit the templating output to the relevant
branch (eg. for development branch master). This means if a
templated file was changed, prior to committing a change we have
to run gulp to generate the output.
Fixes #132
2015-01-21 17:09:40 +01:00
Johannes Zellner
8090f83e7e
webadmin: only include yellowtent.js once
2015-01-21 16:54:10 +01:00
Johannes Zellner
48dcec8d87
Remove old oauth proxy code
2015-01-21 15:28:32 +01:00
Johannes Zellner
cbefb773c9
Serve better error pages when we hit an oauth issue
...
Fixes #129
2015-01-21 15:26:24 +01:00
Johannes Zellner
282b5dbb15
Display error page if csrf tokens are invalid
...
Fixes #135
2015-01-21 13:34:12 +01:00
Johannes Zellner
51131ce346
Improve logging for updater and fix linter complaints
2015-01-21 11:22:26 +01:00
Johannes Zellner
25c0cf216f
Print emails to terminal in case email sending failed and we are running locally
2015-01-21 11:06:17 +01:00
Johannes Zellner
8c865b4f3c
Skip PtrRecord check in local mode
2015-01-21 11:05:54 +01:00
Johannes Zellner
e565e959da
Reduce logging in auth and oauth paths
2015-01-21 11:05:25 +01:00
Johannes Zellner
402f9e44d7
Support three execution environments
...
They can be switched using NODE_ENV.
NODE_ENV="cloudron": config.CLOUDRON is true, we are running on a deployed cloudron
NODE_ENV="test": config.TEST is true, we are running unit tests
NODE_ENV="": config.LOCAL is true, we are running locally
2015-01-21 10:40:48 +01:00
Girish Ramakrishnan
cf6364d487
Send app up/down mail only if app is down for more than 2 mins
2015-01-20 19:27:35 -08:00
Girish Ramakrishnan
2ba0b3ca71
Send mail when app is down
...
Fixes #123
2015-01-20 17:34:58 -08:00
Girish Ramakrishnan
4f53871fb7
Update shrinkwrap file
2015-01-20 17:32:45 -08:00
Girish Ramakrishnan
914e57583d
Rename mailAdmins to mailUserEventToAdmins
2015-01-20 16:30:33 -08:00
Girish Ramakrishnan
775ebff2c2
Sprinkle asserts in mailer code
2015-01-20 16:28:08 -08:00
Girish Ramakrishnan
f77fbe6dcd
Move apphealthtask to top level
2015-01-20 15:53:12 -08:00
Girish Ramakrishnan
a23a654836
Run apphealthtask via supervisor
2015-01-20 15:29:05 -08:00
Johannes Zellner
91f1ebdca2
A few steps closer to running the cloudron code locally
2015-01-21 00:22:56 +01:00
Johannes Zellner
b82e6045b4
Delete routes respond with 204 and no data
...
Fixes #136
2015-01-21 00:16:39 +01:00
Girish Ramakrishnan
140a695a69
Ignore network issues when pulling docker
...
postinstall.sh should never use the network in the first place. The
pull exists merely for dev convenience where we can test those images
using a forced push but not having to new build a new base image
2015-01-20 13:23:25 -08:00
Girish Ramakrishnan
988a418613
fix typo
2015-01-20 12:20:36 -08:00
Girish Ramakrishnan
1353b514f9
Just print out latest version instead of dumping entire version file
2015-01-20 10:48:38 -08:00
Girish Ramakrishnan
46e67a035b
Add semver module
2015-01-20 10:48:37 -08:00
Johannes Zellner
ffdaea4205
Fix crash in case the error object is not set
2015-01-20 19:38:30 +01:00
Johannes Zellner
8e3da37fc2
proxy: add missing proxy- prefix
2015-01-20 17:48:48 +01:00
Johannes Zellner
663523c7e3
Add supererror to the proxy
2015-01-20 17:42:40 +01:00
Johannes Zellner
b9d770e74f
webadmin: allow to print the error in case we forward to error.html
2015-01-20 17:27:24 +01:00
Johannes Zellner
6879824477
Do not fail in apptask if client id record is not found
2015-01-20 17:26:22 +01:00
Johannes Zellner
76fda3c3ab
Add proxy OAuth credential handling in apptask
2015-01-20 13:01:58 +01:00
Johannes Zellner
78a625602a
webadmin: force a reload from server on update
2015-01-20 11:51:58 +01:00
Johannes Zellner
81fb667e4f
webadmin: guard http calls in case the response is not json
2015-01-20 11:49:57 +01:00
Johannes Zellner
26cbbd8855
webadmin: add missing errorhandler in getApps()
2015-01-20 11:28:15 +01:00
Girish Ramakrishnan
452c0cce8a
Reload supervisor in startbox
2015-01-20 00:43:50 -08:00
Girish Ramakrishnan
a2e185735e
set -e on the scripts
2015-01-20 00:40:03 -08:00
Girish Ramakrishnan
45fcdd7eaf
Add start/stop box scripts
...
These will be used by the installer to start and stop the box
2015-01-19 20:58:00 -08:00
Johannes Zellner
a8eb90b12e
Use the new OAuth proxy in nginx app template
2015-01-19 23:37:27 +01:00
Johannes Zellner
4987810ee6
Add proxy supervisor config
2015-01-19 23:27:44 +01:00
Johannes Zellner
3d49667fbf
Move NODE_ENV to supervisor configs instead of app.js logic
2015-01-19 23:26:18 +01:00
Johannes Zellner
d8b1687c31
Add debug messages to proxy
2015-01-19 23:19:24 +01:00
Johannes Zellner
248a3e5a4e
Replace hardcoded URLs with real data from config
2015-01-19 22:24:36 +01:00
Johannes Zellner
5626f490e6
Get OAuth client ID from db
2015-01-19 21:14:22 +01:00
Johannes Zellner
328c3f137a
Add database support to proxy
2015-01-19 19:39:48 +01:00
Johannes Zellner
bb600a1896
Use regular OAuth flow for proxy auth
2015-01-19 19:25:40 +01:00
Johannes Zellner
697d30a0f2
Create a dummy version.json for running locally
2015-01-19 19:20:37 +01:00
Johannes Zellner
1a88433d0c
Add appdb.getByHttpPort()
2015-01-19 19:18:22 +01:00
Johannes Zellner
9749c70659
Initial version of standalone OAuth proxy
2015-01-19 16:26:46 +01:00
Johannes Zellner
b6e7dacf78
webadmin: add error.html in case the box server is down
2015-01-19 13:48:44 +01:00
Girish Ramakrishnan
d4a493ae74
Add optional versions file argument to new
2015-01-18 15:50:25 -08:00
Girish Ramakrishnan
d3623aa534
This line should not exit
...
Got committed by mistake
2015-01-18 11:58:00 -08:00
Girish Ramakrishnan
8cc249417e
Include certificates.conf inline
2015-01-18 11:49:13 -08:00
Girish Ramakrishnan
409f919d4d
Ensure top level directory is readable by others
...
tar --list --verbose --file=box.tar now shows:
drwxr-xr-x girishra/staff 0 2015-01-17 16:57 ./
Without this change, mktemp was creating directories have no r,x for
others and group. This meant that nginx which was running www-user
was unable to access the website inside box code.
2015-01-17 13:59:58 -08:00
Girish Ramakrishnan
fd41451d55
Use system nginx service
...
* do not use supervisor
* nginx.conf modifications to run as daemon
2015-01-17 12:51:59 -08:00
Girish Ramakrishnan
ffd6653869
Try using the system location for nginx configuration
...
This will help us use the system nginx service
2015-01-17 12:12:18 -08:00
Girish Ramakrishnan
3830c10090
Remove dead text
2015-01-16 23:42:03 -08:00
Girish Ramakrishnan
1babdec464
appstore now sends tls info as non-opaque data
2015-01-16 23:26:01 -08:00
Girish Ramakrishnan
cff828b352
Leave a note that versions need to be semver sorted
2015-01-16 20:26:24 -08:00
Girish Ramakrishnan
fa8b51139d
Do not use SSLv3
2015-01-16 15:36:30 -08:00
Girish Ramakrishnan
47eb5b0612
Fix .gitattributes
2015-01-15 22:02:59 -08:00
Girish Ramakrishnan
17cd4f7fec
Check length of imageName
2015-01-15 12:22:07 -08:00
Girish Ramakrishnan
8fffb9778b
Add imageName to versions file
...
This is primarily for documentation/readability. We are able to
tell the version of installer by looking at the version file (instead
of an image id which tell us nothing).
Fixes #120
2015-01-15 12:19:29 -08:00
Girish Ramakrishnan
cb70b38e38
Add --list command
2015-01-15 12:13:32 -08:00
Girish Ramakrishnan
d5f9c12042
Make new and rerelease as commands
2015-01-15 12:11:02 -08:00
Girish Ramakrishnan
0dbfce184d
Ignore various paths during archiving
2015-01-15 11:39:35 -08:00
Girish Ramakrishnan
edbb153c71
Move supervisor start to installer
2015-01-14 15:32:59 -08:00
Girish Ramakrishnan
9d111694ea
Make redis test work on Mac
...
This required exporting the redis port out of the virtual box
image.
2015-01-14 14:06:05 -08:00
Girish Ramakrishnan
f7639fd347
Cannot use format strings in Error object
2015-01-13 13:09:16 -08:00
Girish Ramakrishnan
6fd6d6e198
Send version instead of imageId for upgrade request
2015-01-13 10:50:10 -08:00
Girish Ramakrishnan
5db02143db
Make text less verbose
2015-01-13 09:55:29 -08:00
Girish Ramakrishnan
4313f3a5ff
Remove references to revision
2015-01-13 09:33:32 -08:00
Girish Ramakrishnan
2a779eb5bb
Remove dead references to installer
2015-01-13 08:58:31 -08:00
Girish Ramakrishnan
70786be2e9
Remove "Update to master" button since we are not git based anymore
2015-01-13 08:57:24 -08:00
Johannes Zellner
cfaaf7ebe6
Also warn on unused vars in jshint
2015-01-13 11:58:06 +01:00
Girish Ramakrishnan
8161ff2f8b
Fix various bugs
2015-01-13 00:04:28 -08:00
Girish Ramakrishnan
afc5745b82
Updater now passes opaque data to the installer
2015-01-12 21:40:27 -08:00
Girish Ramakrishnan
ffd233b2a2
Parse variables from data argument
2015-01-12 21:32:12 -08:00
Girish Ramakrishnan
63d315ed32
Move image creation scripts to installer repo
2015-01-12 17:10:44 -08:00
Girish Ramakrishnan
101fbcdbd0
Move installer to separate repo
2015-01-12 16:58:52 -08:00
Girish Ramakrishnan
e96e00fd8a
Create package.json for the installer
2015-01-12 16:57:05 -08:00
Girish Ramakrishnan
71cb6753f3
Move middleware under src/
2015-01-12 16:23:51 -08:00
Girish Ramakrishnan
9ecd85d827
Create versions.json in data dir to make tests work
2015-01-12 14:44:15 -08:00
Girish Ramakrishnan
6d30b894e5
version.json must be written in DATA dir
2015-01-12 09:42:14 -08:00
Girish Ramakrishnan
883c78e2b1
force -> rerelease
2015-01-12 09:23:34 -08:00
Johannes Zellner
b6bf78b364
Using configS as this is the one used in JavaScript and the tests
2015-01-12 16:20:06 +01:00
Johannes Zellner
f114e1f10c
Add missing closing bracket when writing version.json
2015-01-12 16:18:26 +01:00
Johannes Zellner
0f782e8b11
Sync main script variables in postinstall.sh and installer.sh
...
Triggered by typo of "configs" vs. "config"
2015-01-12 15:49:06 +01:00
Girish Ramakrishnan
3629d6e1d4
Implement --new (and remove --reset)
2015-01-11 20:57:15 -08:00
Girish Ramakrishnan
fba5ac81ac
Set the mime type of versions file to json
2015-01-11 20:42:31 -08:00
Girish Ramakrishnan
0fe48ea40c
Add --reset to start afresh from 0.0.1
2015-01-11 20:01:13 -08:00
Girish Ramakrishnan
0e210d8f7c
Use gnu-getopt on Mac
2015-01-11 19:35:17 -08:00
Girish Ramakrishnan
1325451d94
Print error when wget fails
2015-01-11 19:15:02 -08:00
Girish Ramakrishnan
276a1caf02
mktemp requires prefix argument on mac
2015-01-11 19:13:18 -08:00
Girish Ramakrishnan
4433857092
Write the installed version in data/version.json
...
The installed version is different from package.json because the version
is bumped for plain image changes as well
The updater is now simplified to only allow updates when there is a change
in versions file.
2015-01-11 18:36:29 -08:00
Girish Ramakrishnan
0be8a1b207
Add --force and fix command line parsing
...
--force merely bumps the version up. This is useful when testing box
updates (like a change in docker images)
2015-01-11 12:35:49 -08:00
Girish Ramakrishnan
a87ad700bd
Comment out set -x
2015-01-11 00:58:09 -08:00
Girish Ramakrishnan
d561649f08
New release script: publish.sh
...
It takes arguments --image <image_id> or --code <source_code_url>
image_id is generated using scripts/createDigitalOceanImage.sh
source_code_url is generated using scripts/createSourceTarball.sh
2015-01-11 00:44:28 -08:00
Girish Ramakrishnan
341d4638e6
Die early if there is no s3cfg
2015-01-10 21:37:31 -08:00
Girish Ramakrishnan
8b5f91da29
Auto-detect mode only if not provided in command line
2015-01-10 20:20:48 -08:00
Girish Ramakrishnan
f193b889ab
install server never dies
...
The install server is now always started by the init script.
When started up, it determines it's mode based on the exitence
of box srcdir. If it does not exist, it starts an external
listening provision/restore server. Once the appstore, provisions
the box, it switches to update mode.
If the box srcdir does exist, the installer starts out in update mode.
In update mode, the server listens on localhost:2020. In this
mode, the web interface can ask it to update the box.
Fixes #115
2015-01-09 22:25:37 -08:00
Girish Ramakrishnan
85101e1ed0
Rename UPDATE_URL to INSTALLER_UPDATE_URL
2015-01-09 21:30:56 -08:00
Girish Ramakrishnan
8a35644518
Implement tarball based installation
...
* The base image contains only installer code. Installer code
can only be changed with a base image change
* The box code is download from s3 instead of git. The s3 tarball
consists of node dependancies already
Part of #115
2015-01-09 15:25:28 -08:00
Girish Ramakrishnan
259747fcdc
Check exit status immediately because of set -e
2015-01-09 13:57:55 -08:00
Girish Ramakrishnan
5112bcfdde
Add bundle.sh
...
bundle creates a tarball out of the box source code with dependancies
and uploads it to S3
It uses s3-cli which requires a file ~/.s3cfg like so:
[default]
access_key = AKIAJ3GNZ2C7W5XKAH7Q
secret_key = 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
2015-01-09 13:38:36 -08:00
Girish Ramakrishnan
f0f996729f
Add s3-cli
2015-01-09 12:43:04 -08:00
Johannes Zellner
922dc5e0e1
Use new image id for dev
2015-01-08 13:57:13 +01:00
Johannes Zellner
db0f6d3631
Fix typo on postinstall script
2015-01-08 10:40:07 +01:00
Girish Ramakrishnan
1c71143dc5
Check if redis and test images are present
2015-01-07 22:31:17 -08:00
Girish Ramakrishnan
e922915ead
Test redis addon
2015-01-07 22:26:32 -08:00
Girish Ramakrishnan
2e64d6cadc
Fix query
2015-01-07 21:14:21 -08:00
Girish Ramakrishnan
d138e9676e
Handle 404 in container removal
2015-01-07 21:07:58 -08:00
Girish Ramakrishnan
6a9b4a4ace
Generate the redis url in addons.js instead of relying on container
...
The main reason for this approach is that otherwise we have to monitor the
stdout stream of the container until the url is outputted.
2015-01-07 21:01:46 -08:00
Girish Ramakrishnan
681ee6c8c4
Add password-generator module
2015-01-07 20:03:47 -08:00
Girish Ramakrishnan
ce7f928e3a
setup and teardown redis addon
2015-01-07 15:28:34 -08:00
Girish Ramakrishnan
1b483bfb62
Pull latest redis on every update
2015-01-07 13:50:55 -08:00
Girish Ramakrishnan
27364458a7
Fix typo
2015-01-07 13:45:55 -08:00
Girish Ramakrishnan
f42c838c4a
Pull in redis image
2015-01-07 13:43:53 -08:00
Johannes Zellner
2db84be8ee
Sync image creation defaults with heroku config
2015-01-07 22:10:15 +01:00
Johannes Zellner
a5d680fd0d
Allow specify regions for cloudron images
...
This reuses the 'regions' argument to transfer the
new image to the list specified. The first entry is the
region, where the temporary droplet is being created.
eg. --regions="ams3 ny2 sfo1"
The image droplet is created in Amsterdam.
The script currently does not wait for all images to be
fully transferred, yet.
2015-01-07 15:57:47 +01:00
Johannes Zellner
91fe4d4f1d
Further form validation for app install with ports
...
We have to use a custom directive to achieve the
dynamic form validation. See
http://stackoverflow.com/questions/23616578/issue-registering-form-control-with-interpolated-name#answer-23617401
2015-01-07 11:25:13 +01:00
Johannes Zellner
98d211b5a0
Add visual form validation to app install view
2015-01-07 10:23:39 +01:00
Girish Ramakrishnan
3782cbc06f
Fix typo in README.md
2015-01-06 19:31:59 -08:00
Girish Ramakrishnan
71e1efcd2b
barf on error
2015-01-06 11:30:08 -08:00
Girish Ramakrishnan
f4cfaeacb9
Use the GNU getopt on Mac
...
getopts - bash built-in that supports only short form
getopt - separate program and there are two variants - GNU and BSD. The BSD one
does not support long options.
2015-01-06 11:27:36 -08:00
Girish Ramakrishnan
7d70c52863
createDigitalOceanImage: Add --revision, --size, --region args
...
Possible region slugs as of today are:
nyc1
ams1
sfo1
nyc2
ams2
sgp1
Possible size slugs are:
512mb
1gb
2gb
4gb
8gb
16gb
32gb
48gb
64gb
2015-01-06 11:02:03 -08:00
Girish Ramakrishnan
2a53f8e532
Implement postgresql setup and teardown
2015-01-06 08:53:58 -08:00
Girish Ramakrishnan
b8be2ab2e1
Add stubs for postgresql setup and teardown
2015-01-05 21:42:03 -08:00
Girish Ramakrishnan
39c6f1dc34
Run postgresql addon
2015-01-05 21:42:03 -08:00
Girish Ramakrishnan
ae2abd9162
Add postgresql to base image
2015-01-05 21:42:03 -08:00
Johannes Zellner
d905d413c0
Mention APP_SERVER_URL in Readme
2015-01-05 14:55:03 +01:00
Johannes Zellner
2eaac28576
Give full feedback to the user in setup.html
...
Replace the submit-time check with form validation
pre submit.
2015-01-04 18:15:49 +01:00
Johannes Zellner
90e4269428
Add initial project specific .jshintrc
2015-01-04 18:15:12 +01:00
Johannes Zellner
281903be2e
Actually allow passwords as the error message says
2015-01-04 18:03:30 +01:00
Girish Ramakrishnan
f8a308fb9d
Order of arguments in service.sh has changed
2014-12-30 06:27:21 -08:00
Girish Ramakrishnan
08ff79ea6b
addons: Remove trailing newline when parsing stdout
2014-12-29 17:29:20 -08:00
Girish Ramakrishnan
d3df0b65e4
Update image
2014-12-29 12:09:53 -08:00
Girish Ramakrishnan
10be724519
Put incremental counter in the logfile instead of bash pid
2014-12-29 10:27:11 -08:00
Johannes Zellner
e04575b46c
Improve error reporting for setup.html
2014-12-29 12:00:11 +01:00
Johannes Zellner
0d0587d2ca
Replace assert for mail dns record with 'if' for local development
...
The assert may have served a purpose but it was too annoying for me
locally. Can always be reverted if there is a neater solution.
2014-12-29 09:45:52 +01:00
Johannes Zellner
3134dfd390
Report more fine grained error at activation route
2014-12-29 09:43:38 +01:00
Girish Ramakrishnan
eefe8e46d7
Pull the latest docker images in the postinstall script
...
This way an 'update' will allow us to test the docker images easily
2014-12-28 15:54:23 -08:00
Johannes Zellner
33481e70ad
Remove unused includes in setup.html
2014-12-27 17:53:35 +01:00
Johannes Zellner
152cf1be46
Create separate setup angular application to avoid side effects
...
This also adds a loading indicator during cloudron admin
creation.
2014-12-27 17:52:09 +01:00
Johannes Zellner
6fa7d1cff9
Fix UserError reference issue
2014-12-27 17:48:52 +01:00
Johannes Zellner
6330223d20
Create .yellowtent/data in db migrate in case it does not exist
2014-12-27 17:24:13 +01:00
Johannes Zellner
6a05222722
Remove node module doubles in package.json
2014-12-27 14:00:24 +01:00
Girish Ramakrishnan
c955edf362
Demux docker.exec stream output properly
2014-12-24 20:31:59 -08:00
Girish Ramakrishnan
360cdaa19a
Update husky
2014-12-24 20:31:59 -08:00
Girish Ramakrishnan
d15a199f72
Install memorystream
2014-12-24 20:24:21 -08:00
Girish Ramakrishnan
ebb996f3a1
Upgrade dockerode
2014-12-24 18:53:34 -08:00
Girish Ramakrishnan
6f6d0bbf87
Publish newer dev image
2014-12-24 18:47:11 -08:00
Girish Ramakrishnan
d04e37084d
data chunks need not be line separated
...
This also allows the env data to be interpersed with set -e output
2014-12-24 17:53:00 -08:00
Girish Ramakrishnan
941303cefe
Ignore stderr from addon script output
2014-12-22 11:30:11 -08:00
Johannes Zellner
b0d2a18a94
Temporarily disable browser forward to / in case we get an oauth login error
...
This prevents an endless loop of redirects/forwards.
We need a real OAuth error page.
2014-12-18 08:10:27 +01:00
Johannes Zellner
721803ed84
Harmonize the webadmin oauth client secret to fix broken login
2014-12-18 08:09:30 +01:00
Johannes Zellner
47fdaf543e
Adjust initial setup documentation
2014-12-17 20:10:45 +01:00
Johannes Zellner
c83d482185
webadmin: add hack for autofocus on setup.html
2014-12-17 14:38:53 +01:00
Johannes Zellner
a2438ed105
husky seems to not ignore missing scripts anymore
2014-12-17 14:24:28 +01:00
Johannes Zellner
182f409fd8
Update README.md info for initial setup
2014-12-17 14:23:57 +01:00
Johannes Zellner
39c428c7d8
webadmin: Fix exception due to non existing error variable in login callback
2014-12-16 11:41:05 +01:00
Girish Ramakrishnan
69ce049704
Use supererror@0.6
2014-12-10 20:10:50 +05:30
Johannes Zellner
6ac3f4eae2
Fixup the sudoers doc in README.md
2014-12-09 17:01:00 +01:00
Girish Ramakrishnan
b732076999
x
2014-12-07 18:23:10 +05:30
Girish Ramakrishnan
ee819921b5
Make attaches to stdout and stderr explicit
2014-12-07 18:22:38 +05:30
Girish Ramakrishnan
4503c1c6e3
Add debugs
2014-12-07 18:19:59 +05:30
Girish Ramakrishnan
7dea380ea7
Implement mysql addon
2014-11-29 22:44:57 -08:00
Girish Ramakrishnan
254cdcb147
Use safe.query to implement config.get
2014-11-29 13:08:06 -08:00
Girish Ramakrishnan
292fc5c451
Update safetydance
2014-11-29 13:04:04 -08:00
Girish Ramakrishnan
02a3df1875
Store addon settings hierarchically
2014-11-29 12:06:25 -08:00
Girish Ramakrishnan
8ee557e0a7
Keep a map of known addons
2014-11-29 11:31:55 -08:00
Girish Ramakrishnan
a2ce26b4a3
Set restart policy to always so that they get restarted on reboot
2014-11-28 22:47:51 -08:00
Girish Ramakrishnan
b9dfd9a1bb
Fix debug messages
2014-11-28 22:37:16 -08:00
Girish Ramakrishnan
2960a3a5a3
Fix container removal
...
The installer script shouldn't have to remove the containers because
it's already removed in the update script
2014-11-28 22:37:10 -08:00
Girish Ramakrishnan
23b8e0d775
addons can be undefined
2014-11-28 21:46:11 -08:00
Girish Ramakrishnan
7db03535d1
Format code better
2014-11-28 16:55:00 -08:00
Girish Ramakrishnan
853621cc1d
Make sendmail an addon as well
2014-11-28 16:54:02 -08:00
Girish Ramakrishnan
4a0065e8d4
validate the manifest to contain an optional array of strings for addons
2014-11-28 16:44:21 -08:00
Girish Ramakrishnan
5df0aed9fa
Add addons to manifest file
2014-11-28 16:28:30 -08:00
Girish Ramakrishnan
16dd15f7b4
Use addons.getEnvironment in apptask
2014-11-28 16:19:25 -08:00
Girish Ramakrishnan
87beff97c7
Add getters/setter for addon config
2014-11-28 12:53:07 -08:00
Girish Ramakrishnan
93310f53d4
Do not use get/add pattern. It is racy
...
If we really want credentials to be only once, this should possibly
come from the schema
2014-11-28 12:50:38 -08:00
Girish Ramakrishnan
8aa7ae3ff6
Delegate setup of addons to addons code
2014-11-28 10:48:53 -08:00
Girish Ramakrishnan
f8bd298d2c
Initial step in making oauth as an addon
...
move oauth allocation code to addons.js
2014-11-28 10:04:42 -08:00
Girish Ramakrishnan
c29e8bc47c
Add appAddonConfigs table
2014-11-28 09:54:54 -08:00
Girish Ramakrishnan
311fd6793a
Announce on startup
2014-11-27 21:13:42 -08:00
Girish Ramakrishnan
77e9f0d4ca
Set MYSQL_ROOT_HOST to allow root connections from that host
2014-11-27 21:13:39 -08:00
Girish Ramakrishnan
32c4a01a4e
Get hostname and port from DOCKER_HOST env
2014-11-27 16:52:15 -08:00
Girish Ramakrishnan
d0a565948a
Make tests work with boot2docker 1.3.x
...
boot2docker now runs https based docker daemon :(
2014-11-27 16:44:46 -08:00
Girish Ramakrishnan
6cd562a683
Pass real docker connect options to test code
2014-11-27 16:29:55 -08:00
Girish Ramakrishnan
b8a3d9de0a
Move docker connection creation logic to separate file
2014-11-27 16:10:43 -08:00
Girish Ramakrishnan
e30361f252
Add missing \
2014-11-26 17:13:59 -08:00
Girish Ramakrishnan
a572914231
Install pwgen in base image required by postinstall script
2014-11-26 17:09:27 -08:00
Girish Ramakrishnan
6e4bdcbe7a
New release
2014-11-26 16:59:08 -08:00
Girish Ramakrishnan
44ad297d15
Add hack to update installer as well
...
Otherwise it's painful to test installer changes
2014-11-26 16:33:43 -08:00
Girish Ramakrishnan
3ebaf951f2
Simplify log filename
2014-11-26 16:28:10 -08:00
Girish Ramakrishnan
fc4614f583
Fix debug
2014-11-26 16:18:27 -08:00
Girish Ramakrishnan
b8fc8639a7
Setup mysql addon
...
Also, move the deletion of containers into the installer script.
This is the place where supervisor is stopped, so it's a good idea
to stop the apps and containers there as well.
The actual container removal happens in postinstall because the
postinstall can decide to reuse apps if it wants
2014-11-26 16:03:32 -08:00
Girish Ramakrishnan
b28d64dc57
Install mysql addon image
2014-11-26 14:25:23 -08:00
Girish Ramakrishnan
2f3c2ff108
Remove unused requires
2014-11-25 10:34:29 -08:00
Girish Ramakrishnan
8c9c9362b0
Add csurf to standard middleware
2014-11-25 10:33:02 -08:00
Girish Ramakrishnan
b066b22c47
Fix debugs
2014-11-25 10:31:04 -08:00
Girish Ramakrishnan
b4850cc9d0
Escape $ and fix heremarker
2014-11-24 21:15:55 -08:00
Girish Ramakrishnan
b795684791
Only add webadmin client entry in test mode
2014-11-24 19:25:29 -08:00
Girish Ramakrishnan
7c54335746
Add webadmin client correctly in the database
2014-11-24 19:21:42 -08:00
Girish Ramakrishnan
f70953063e
Kill apps only if there are any
2014-11-24 18:07:23 -08:00
Girish Ramakrishnan
a43ef96c99
set the modes for internal bash script
2014-11-24 18:03:07 -08:00
Girish Ramakrishnan
b9a5352a46
api server does not impose limit anymore
2014-11-24 16:59:22 -08:00
Girish Ramakrishnan
d653c7c9b9
Move postinstall.sh to the top
...
src/scripts/* is meant for scripts that are invoked by the server
code.
2014-11-24 16:38:15 -08:00
Girish Ramakrishnan
da8aa6f5c7
Use node-proxy for private app proxy
...
Part of #106
2014-11-24 16:28:19 -08:00
Girish Ramakrishnan
172f34ed39
Remove logApiRequests config option
2014-11-24 08:39:58 -08:00
Girish Ramakrishnan
7e15cab21a
Add tests for admin user
2014-11-24 08:33:52 -08:00
Girish Ramakrishnan
f1671697bb
Add userdb tests
2014-11-24 08:26:17 -08:00
Girish Ramakrishnan
639d5fd1ad
userInfo is not sent as part of activation anymore
2014-11-23 22:59:41 -08:00
Girish Ramakrishnan
0a98ba5159
Fix circular dep
2014-11-23 22:57:58 -08:00
Girish Ramakrishnan
bf191d56af
Make Server code function based
...
Use the class based pattern only if we expect multiple instances
2014-11-23 22:45:01 -08:00
Girish Ramakrishnan
4844f7899c
createadmin -> cloudron/activate
2014-11-23 22:06:08 -08:00
Girish Ramakrishnan
0eea3f0e57
Use routes.user.verifyPassword to verify password
2014-11-23 21:39:10 -08:00
Girish Ramakrishnan
04c57ee196
Better error handling
2014-11-23 21:35:57 -08:00
Girish Ramakrishnan
51a80a5c36
Add userdb.adminCount
2014-11-23 19:57:56 -08:00
Girish Ramakrishnan
c1ad249eea
Merge firsttime and version routes into status
2014-11-23 19:42:33 -08:00
Girish Ramakrishnan
aec65fadd8
Move version into cloudron routes
2014-11-23 19:11:40 -08:00
Girish Ramakrishnan
c17e063025
namespace apis under cloudron/
2014-11-23 18:50:24 -08:00
Girish Ramakrishnan
aaf143736a
Add a FIXME
2014-11-23 18:43:46 -08:00
Girish Ramakrishnan
8d9f57e0b1
Fix url (plural)
2014-11-23 18:37:26 -08:00
Girish Ramakrishnan
3df66f2b2e
Use plural in routes
2014-11-23 18:32:41 -08:00
Girish Ramakrishnan
8546387aee
Remove distracting comments
2014-11-23 18:15:24 -08:00
Girish Ramakrishnan
8b98e7102d
Initialize auth module in start
2014-11-23 18:10:13 -08:00
Girish Ramakrishnan
0ef7b3ebf6
Make the uninitialize funcs async
2014-11-23 14:23:17 -08:00
Girish Ramakrishnan
9a1013896c
Make initialize async
2014-11-23 14:15:29 -08:00
Girish Ramakrishnan
959ae1882a
Remove existing containers and restore them
...
This is required should an update change the nginx config or docker
launch config
2014-11-23 13:22:44 -08:00
Girish Ramakrishnan
b53db12cc8
Set X-Cloudron-Proxy-Port only for oauth proxy case
2014-11-23 12:40:16 -08:00
Girish Ramakrishnan
4bdbfeff00
Remove unused variables
2014-11-23 12:24:22 -08:00
Girish Ramakrishnan
497766082e
Rename proxy to applicationProxy
...
A future patch is going to use the name proxy for something else :-)
2014-11-23 11:47:22 -08:00
Girish Ramakrishnan
214a3e781d
Set busy timeout on main connection as well
...
cool fact: In sqlite, every command is actually wrapped with an automatic
transaction.
2014-11-23 09:45:49 -08:00
Girish Ramakrishnan
238606aff8
Add code to debug transaction timings
2014-11-23 09:28:54 -08:00
Girish Ramakrishnan
82f462b0cf
Rename newTransaction to beginTransaction
2014-11-23 08:58:46 -08:00
Girish Ramakrishnan
4c7a6c6ad6
Update and upgrade both return 202
2014-11-23 01:04:13 -08:00
Girish Ramakrishnan
c5af7a53d5
Update supererror version
2014-11-23 00:57:24 -08:00
Girish Ramakrishnan
62335b35cc
Keep trying forever until we get the versions file
2014-11-23 00:41:26 -08:00
Girish Ramakrishnan
9598ae77d0
Add latest supererror until PR 2 is merged
2014-11-23 00:23:48 -08:00
Girish Ramakrishnan
d4c7f5a8f6
Enable splatchError option of supererror
2014-11-23 00:16:00 -08:00
Girish Ramakrishnan
97f6a1a8ea
Rename internalError to nestedError
2014-11-23 00:11:46 -08:00
Girish Ramakrishnan
2794be118e
Rename restrictAccessTo to accessRestriction
...
Doing a db migration for a column rename is too complex in sqlite,
so the initial schema itself is modified.
(you have to create a new table and copy things over)
2014-11-22 22:16:42 -08:00
Girish Ramakrishnan
3cf53820ff
Update favicon module
2014-11-22 19:18:04 -08:00
Girish Ramakrishnan
a965756e53
Fix deprecation
...
https://github.com/expressjs/body-parser/blob/3f1b02247702c2966d33ee73610a98d54cf32fe8/lib/types/urlencoded.js#L41-L44
2014-11-22 19:16:34 -08:00
Girish Ramakrishnan
bbbdc68a95
Update to latest connect-lastmile
2014-11-22 19:13:21 -08:00
Girish Ramakrishnan
e6301af1d5
More module updates
2014-11-22 18:45:59 -08:00
Girish Ramakrishnan
633a20f225
Update packages
2014-11-22 18:40:21 -08:00
Girish Ramakrishnan
0c85fbb453
Output connect-lastmile logs as well
2014-11-22 17:32:58 -08:00
Girish Ramakrishnan
723f6d73ce
Use connect-lastmile for express last mile response handling
2014-11-22 17:29:34 -08:00
Girish Ramakrishnan
ca6664d619
Use Http* classes to respond to requests
2014-11-22 17:26:24 -08:00
Girish Ramakrishnan
f0c5f064fd
Add express handlers to middlewares
2014-11-22 17:20:22 -08:00
Girish Ramakrishnan
755146fcc4
Delete any cookie before forwarding to graphite
2014-11-22 17:06:31 -08:00
Girish Ramakrishnan
49ea1c20cb
Move graphite proxy to separate routes file
2014-11-22 16:52:02 -08:00
Girish Ramakrishnan
ae45f1616a
Add a FIXME to remove unauth graphite calls before release
2014-11-22 11:15:06 -08:00
Girish Ramakrishnan
9655943cf6
util.format is our friend
2014-11-22 10:34:07 -08:00
Girish Ramakrishnan
c63cf55dba
Output the response body
2014-11-22 10:29:13 -08:00
Girish Ramakrishnan
b67a87fd16
Fix call to missing callback
2014-11-22 10:26:16 -08:00
Girish Ramakrishnan
d9725be93c
supervisor config has moved
2014-11-22 10:15:11 -08:00
Girish Ramakrishnan
ba18a53357
Remove unused delay
2014-11-22 00:28:39 -08:00
Girish Ramakrishnan
94ca4c2402
Remove dead reference to installer
2014-11-22 00:05:45 -08:00
Girish Ramakrishnan
8c504952fb
Fix path to supervisor script
2014-11-21 23:37:50 -08:00
Girish Ramakrishnan
d64786d98f
Remove unused dir
2014-11-21 23:32:10 -08:00
Girish Ramakrishnan
329e3b068a
Fix template path
2014-11-21 23:30:34 -08:00
Girish Ramakrishnan
d8f871fb6b
Move nginx configs into postinstall
2014-11-21 23:27:19 -08:00
Girish Ramakrishnan
620e8bc1af
Move supervisor scripts into postinstall
2014-11-21 23:18:11 -08:00
Girish Ramakrishnan
79d5135946
Only mark apps for restore when restoring
...
Otherwise, it ends up restoring already running apps for the update
case.
2014-11-21 23:08:37 -08:00
Girish Ramakrishnan
a3eda9c8a0
Set cwd to dirname
2014-11-21 22:57:22 -08:00
Girish Ramakrishnan
1a290968ae
stdout_logfile needs absolute path
2014-11-21 22:53:46 -08:00
Girish Ramakrishnan
9b4965b22f
Set logfile name explicitly
...
From the docs:
AUTO log files and their backups will be deleted when supervisord restarts.
This has the result that log files disappear after every update
2014-11-21 22:37:16 -08:00
Girish Ramakrishnan
29eaeb1609
Output lastmile debug output
2014-11-21 21:30:32 -08:00
Girish Ramakrishnan
bec9baf5d0
Namespace installer debugs
2014-11-21 21:29:34 -08:00
Girish Ramakrishnan
1e6c5cce34
Distinguish hostnames and domain names
...
hostname - name of an actual addressable thing on the internet
domain name - the name of a network
root domain - this is actually "." or empty. the top most thing
tld, gtld - this is thing under root domain which has an entry in the root servers - com, co.uk etc
fqdn - this is really fully qualified hostname. so the full name in a host
sub domain - refers to a network rather a hostname. example.foo.com is a sub domain iff it's a network. otherwise it would be a hostname. foo.com is a subdomain of com.
zone - a concept of DNS where entries under a sub domain are delegated to a nameserver.
2014-11-21 21:01:56 -08:00
Girish Ramakrishnan
8aa973511a
Move supervisor restart to supervisor setup script
2014-11-21 15:57:54 -08:00
Girish Ramakrishnan
d5b5c3f28d
Fix typo
2014-11-21 15:55:03 -08:00
Girish Ramakrishnan
6dbd6b3607
Add debug
2014-11-21 15:52:52 -08:00
Girish Ramakrishnan
f44436ca18
Add callback arg to start
2014-11-21 15:50:43 -08:00
Girish Ramakrishnan
21bd146a3b
Make setup script executable
2014-11-21 14:24:58 -08:00
Girish Ramakrishnan
f4f24e7347
Make installer run across reboots
...
The installer is run in provision-mode in the init script
The installer is run as update-mode by supervisor by postinstall
Previously, we used to run the *same* installer code, which was
part of the base image, in both modes. However, after a reboot,
the old installer code is 'gone' and thus we start running the
newer installer code. This distinction is very subtle and this change
makes it more obvious.
If we want the same installer code to run in both modes, then we
really need to split out installer into a separate repository. This
can be done if required later.
This also makes it clear that announce is a feature of the provision
mode.
2014-11-21 14:18:59 -08:00
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
Girish Ramakrishnan
43aba840a9
Add missing require
2014-11-06 09:41:47 -08:00
Girish Ramakrishnan
92fdc2c84d
Check body param type in apps.configure
2014-11-06 09:36:44 -08:00
Girish Ramakrishnan
aa585dc4f0
Check the data type of values in the post request
2014-11-06 09:34:48 -08:00
Girish Ramakrishnan
fa58516421
Fixup Error classes
2014-11-06 06:50:16 -08:00
Girish Ramakrishnan
5c77d82335
Move to string based error codes
2014-11-05 22:00:42 -08:00
Girish Ramakrishnan
0205e6cfa1
Fix DatabaseError to take errorOrMessage
2014-11-05 15:54:31 -08:00
Girish Ramakrishnan
86c36efcf8
Call callback on error
2014-11-05 14:58:33 -08:00
Girish Ramakrishnan
1fb701ba23
Fix routes/* error handling
2014-11-05 14:50:30 -08:00
Girish Ramakrishnan
48b51e1190
Fix routes/apps error handling
2014-11-05 14:30:31 -08:00
Girish Ramakrishnan
a393fda9e0
Use instanceOf instead of util.inherits
2014-11-05 14:27:47 -08:00
Girish Ramakrishnan
aa968f903f
Change assert pattern coding style
2014-11-05 14:07:50 -08:00
Girish Ramakrishnan
c311d48310
Volumes code has been moved out of box
2014-11-05 14:03:52 -08:00
Girish Ramakrishnan
fc86bb2262
boxupdate route has been renamed in appstore
2014-11-05 09:45:55 -08:00
Girish Ramakrishnan
9306a7a127
Fix error handling
...
Express uses res.status. HttpSuccess and HttpError now use the same property
instead of statusCode
HttpError now requires an error object or string as second argument
HttpError now marks all calls with error object as internal errors
Everything else should have a proper message anyway (giving proper
contextual information). This way we don't leak random app information
through our REST API.
HttpSuccess has optional body
204 does not require a body
2014-11-04 15:29:31 -08:00
Girish Ramakrishnan
399d836c18
Better debug messages
2014-11-04 11:31:29 -08:00
Girish Ramakrishnan
a6ea73d41a
initialize passport explicitly
2014-11-04 11:06:04 -08:00
Girish Ramakrishnan
07e5dc145d
Move syncer code to separate repository
2014-11-04 09:30:02 -08:00
Girish Ramakrishnan
7db983afc0
Do not run the installer scripts in test mode
2014-11-04 09:30:01 -08:00
Girish Ramakrishnan
2249da603b
Do not dns mail records in test mode
2014-11-04 09:30:01 -08:00
Girish Ramakrishnan
6e0aab8bf8
Make release
2014-11-04 00:02:06 -08:00
Girish Ramakrishnan
9f09f8e7a8
Pass boxVersionsUrl to update script
2014-11-03 22:47:39 -08:00
Girish Ramakrishnan
e7fdaac4a1
token is already set when cloudron runs
2014-11-03 22:39:14 -08:00
Girish Ramakrishnan
01c19726f0
Make isDev a feature of the updater
...
Makes for one less provisioning parameter
2014-11-03 14:19:12 -08:00
Girish Ramakrishnan
2f8f3ee030
Get BOX_VERSIONS_JSON as provision parameter
2014-11-03 14:15:37 -08:00
Girish Ramakrishnan
9b496ff3ac
Add separate versions file for dev and stable
2014-11-03 13:32:53 -08:00
Girish Ramakrishnan
1cfe0bfa5f
Ensure package.json version is the latest
2014-11-03 13:25:19 -08:00
Girish Ramakrishnan
cff2051899
Make 0.2 release
2014-11-03 08:51:48 -08:00
Girish Ramakrishnan
61cbebf7ae
retry backup download because of flaky network
2014-11-01 22:47:03 -07:00
Girish Ramakrishnan
cd6b034410
ensure next <= current version
2014-11-01 22:16:48 -07:00
Girish Ramakrishnan
a7367cb352
Initial update check is 10 seconds after startup
2014-11-01 10:20:17 -07:00
Girish Ramakrishnan
4d101e7972
webadmin: Use box.upgrade instead of imageId
2014-11-01 09:40:22 -07:00
Girish Ramakrishnan
d05a73d4ee
Check isDev key existence
2014-10-31 23:11:12 -07:00
Girish Ramakrishnan
ef40c12554
This marks the first version the updater works
2014-10-31 22:37:17 -07:00
Girish Ramakrishnan
e1a35ce514
supervisord init script lies about stopping
...
Check the pidfile by hand to see if the process is running.
the pidfile sometimes exists and sometimes not when stopping :(
2014-10-31 22:15:37 -07:00
Girish Ramakrishnan
49ff6150d5
Add a comment about the placement of export
2014-10-31 17:53:23 -07:00
Girish Ramakrishnan
b039123daa
Make updates to use the installer code
2014-10-31 17:50:32 -07:00
Girish Ramakrishnan
cf3e98a3f6
Start supervisor by default in the base image
...
This is nice to have for the update case where we can just stop
all the apps
2014-10-31 16:59:02 -07:00
Girish Ramakrishnan
d98bd4c84a
Split the app update and box update checker
2014-10-31 16:57:02 -07:00
Girish Ramakrishnan
c14e6d1a15
Fix various bash programming errors
...
1) getopt needs a shortform -o.
2) Need to break out when $1 becomes null
3) remove unnecessary semicolons
4) some magic incantation to pass all args to the postinstall script
2014-10-31 16:28:59 -07:00
Girish Ramakrishnan
527818feda
restoreUrl can be empty
2014-10-31 13:43:31 -07:00
Girish Ramakrishnan
95401bf4f2
env is not used anymore
2014-10-31 13:41:00 -07:00
Girish Ramakrishnan
7e748f6fd5
Use cmd line args instead of env vars
...
It's more work to get env vars through sudo. Besides, env vars
prevent inadvertent collisions with bash variable names anyway.
2014-10-31 12:54:25 -07:00
Girish Ramakrishnan
8726e5eabe
backup can now take a callback since it does not restart server
2014-10-31 07:09:16 -07:00
Girish Ramakrishnan
0f1e951499
Run installer as sudo
...
This is required for the update code to work
2014-10-31 07:01:15 -07:00
Girish Ramakrishnan
8bffd93ab7
Fix typo
2014-10-31 06:59:50 -07:00
Girish Ramakrishnan
a393ec63b6
coding style: prefix module globals with g
2014-10-30 19:14:41 -07:00
Girish Ramakrishnan
542062e07f
Make release
2014-10-30 17:52:34 -07:00
Girish Ramakrishnan
bb646c3c89
APPSTORE_URL is not part of image anymore
...
The installer now gets the appStoreUrl from the droplet metadata
2014-10-30 14:02:12 -07:00
Girish Ramakrishnan
d44c22e3b0
Get appServerUrl from metadata if not provided in cmd line
...
This allows us to use the same image for both dev and prod.
provisioning is what decides whether something is a dev or prod.
2014-10-30 13:58:59 -07:00
Girish Ramakrishnan
6ab1763d0a
restore.sh is not used anymore
2014-10-30 06:21:09 -07:00
Girish Ramakrishnan
a8091b6d48
check if package.json version exists in versions.json
2014-10-29 22:40:40 -07:00
Girish Ramakrishnan
30846e7887
Fix code formatting
2014-10-29 22:37:57 -07:00
Girish Ramakrishnan
601df4b515
installer.js should return correct error codes
2014-10-29 22:02:59 -07:00
Girish Ramakrishnan
3e28f86b6c
Return success immediately
...
There is no telling how long the install script takes because
DO networking is so flaky.
This also allows appstore to have a short timeout for the provision
call.
2014-10-29 21:52:28 -07:00
Girish Ramakrishnan
1879b18c6f
Stop announce once we get a request
2014-10-29 21:52:25 -07:00
Girish Ramakrishnan
52573f3745
Do not remove config dir itself
2014-10-29 21:12:47 -07:00
Girish Ramakrishnan
13d3b40992
restore: DATA_DIR itself cannot be removed
2014-10-29 20:56:26 -07:00
Girish Ramakrishnan
2b41aa9440
Add installer tests
2014-10-29 20:30:55 -07:00
Girish Ramakrishnan
b36fe96040
Fix up package.json
2014-10-29 18:53:26 -07:00
Girish Ramakrishnan
779c9c1392
Rework provisioning
...
The previous provisioning scheme had issues with updates. Because,
configuration was already part of the base bootstrap, providing an
update meant creating a new image.
The key insight in this new provisioning scheme is to treat config
files used by our code as something that can always be regenerated
on demand. Every update kills the config and recreates it all over.
Current flow is thus:
1. bootstrap init code starts up install/server.js. This server merely
listens for provision and restore calls.
2. The installer calls install.sh. This script simply checks out the
requested revision. Note that the installer is from what is in the
base image. Changing the installer requires a new base image. If a
restore url is provided, this downloads the restore data.
3. The install.sh calls postinstall.sh of the requested revision.
It setups the code calling npm install, migrates any data and creates
configs - collectd, graphite, nginx etc. This also creates cloudron.conf.
Because postinstall.sh is from requested revision, all the data, configs
are all based on the requested revision.
Note that installation of new packages should be done at base image creation
time.
The changes also provide separation of announce and hearbeat calls:
- announce is for cloudron coming up and installer running
- heartbeat is for box server running
TODO:
appstore url is only part of image becase installer needs to announce.
This can be fixed by moving to user metadata
Fixes #110
2014-10-29 15:01:40 -07:00
Girish Ramakrishnan
c49de62f25
Move middleware to top level
...
This allows it to be shared with other servers like the install server
2014-10-28 00:20:44 -07:00
Girish Ramakrishnan
743b40df8e
adminOrigin is not sent as part of provision anymore
...
It was redundant
2014-10-27 23:54:10 -07:00
Girish Ramakrishnan
cacf1bdb54
Metadata gets saved as x-amz-meta-content-type
2014-10-27 14:27:14 -07:00
Girish Ramakrishnan
7888256349
Add 0.7.0 and cleanup version.json
2014-10-27 14:22:17 -07:00
Girish Ramakrishnan
9d695572ec
Sanity check versions.json before upload
2014-10-27 14:22:05 -07:00
Girish Ramakrishnan
84122b1acb
Add script to publish releases to s3
2014-10-27 14:14:26 -07:00
Girish Ramakrishnan
3c341f25dd
Add aws-sdk
2014-10-27 14:05:06 -07:00
Girish Ramakrishnan
f737e4f368
Bump revision for testing
2014-10-26 22:58:02 -07:00
Girish Ramakrishnan
c1e9707df6
backupurl now requires the box version
...
The box version is encoded in the url in s3 so that the appstore
can restore the backup with this as the 'preferred' version.
2014-10-26 19:25:54 -07:00
Girish Ramakrishnan
c625e7ca76
Rename bootstrap init script to cloudron-bootstrap
2014-10-26 14:38:43 -07:00
Girish Ramakrishnan
f43f17a7e7
Fix app.js to match new config.js API
2014-10-26 14:18:37 -07:00
Girish Ramakrishnan
b90cd29888
Add missing require
2014-10-26 14:03:30 -07:00
Girish Ramakrishnan
ad267ccd2e
Move announce and restore routes to installer
2014-10-26 12:32:20 -07:00
Girish Ramakrishnan
b5ba661bb9
Move announce code to installer.js
2014-10-26 12:08:10 -07:00
Girish Ramakrishnan
f97afb8a99
Updater is not a class anymore, just a singleton
2014-10-26 11:32:47 -07:00
Girish Ramakrishnan
c781d0201b
box versions url is a constant
2014-10-26 11:19:35 -07:00
Girish Ramakrishnan
93cef78c86
Move VERSIONS.json to s3
...
https://s3.amazonaws.com/cloudron-releases/versions.json
2014-10-25 10:36:24 -07:00
Girish Ramakrishnan
9d5ff39e0e
Append restore script log output
2014-10-25 00:50:49 -07:00
Girish Ramakrishnan
4ac6a3e8fa
Unset content-type header
...
When using curl -T, the content-type header is not set and upload
works fine. When using --data-binary, curl sets it to application/x-www-form-urlencoded
which s3 doesn't like.
2014-10-25 00:32:57 -07:00
Girish Ramakrishnan
93535313b3
Append backup logs to same file
2014-10-25 00:21:16 -07:00
Girish Ramakrishnan
61ee27d213
Use btrfs snapshots for backup
...
backup does not restart containers or the box anymore
The backup has exact same effect as powering off a machine at
that point
Fixes #108
2014-10-24 23:42:44 -07:00
Girish Ramakrishnan
884e88d736
Remove verbose logs for npm install
2014-10-24 23:17:24 -07:00
Girish Ramakrishnan
fe17cbce50
data dir is now a btrfs subvolume
...
This makes it snapshottable
2014-10-24 23:01:23 -07:00
Girish Ramakrishnan
b589a26991
Rename postinstall script to migrate_data
...
postinstall script is run automatically after npm install ends.
This create unnecessary confusion and we want to have more
control over when exactly the migration happens
2014-10-24 22:56:28 -07:00
Girish Ramakrishnan
fae156366c
Move to btrfs
...
The docker data as well as user (yellowtent) home is now btrfs.
This will greatly help us in backups. We simply take a btrfs
snapshot and back that up. This way we don't need to stop all
containers and simulates the same thing as a power outage.
Part of #108
2014-10-24 22:17:46 -07:00
Girish Ramakrishnan
80f82883cd
Query snapshot id before destroying droplet
...
Allows us to work in parallel as the droplet is being destroyed
2014-10-24 19:57:28 -07:00
Girish Ramakrishnan
09d24f687b
Cleanup config.js code
2014-10-24 18:42:55 -07:00
Girish Ramakrishnan
3e228eb995
Separate data part of config.js
2014-10-24 18:33:20 -07:00
Girish Ramakrishnan
7ec8b3f5ea
Make config.baseDir a function
2014-10-24 17:57:07 -07:00
Girish Ramakrishnan
15df364c91
Move all configs to configs/
...
This makes it easy to delete them in a single shot
2014-10-24 17:45:55 -07:00
Girish Ramakrishnan
049912c096
Sleep a couple of minutes before retrying again
2014-10-24 17:26:14 -07:00
Girish Ramakrishnan
624b4a03ca
Use package.json to determine the version
...
VERSIONS.json is really mean for the updater to get update changes.
Let's not mix the two.
2014-10-24 16:57:29 -07:00
Girish Ramakrishnan
0f8bab034f
Show 'upgrade' when image id is as part of update info
2014-10-23 16:30:38 -07:00
Girish Ramakrishnan
e62d622e12
Really Finish sorting all requires
2014-10-23 16:08:58 -07:00
Girish Ramakrishnan
7f5ec04a73
Finish sorting all requires
2014-10-23 14:51:00 -07:00
Girish Ramakrishnan
95ef3b9d2b
Open App Store in new window
2014-10-23 14:31:53 -07:00
Girish Ramakrishnan
10218c7ecd
Make tests pass
2014-10-23 14:30:31 -07:00
Girish Ramakrishnan
e01f9007c7
Make Appstore url clickable
2014-10-23 14:29:26 -07:00
Girish Ramakrishnan
c5c591d1d8
Make version 0.5.0
2014-10-23 14:18:00 -07:00
Girish Ramakrishnan
98541c1615
sort requires in source code
2014-10-23 14:15:53 -07:00
Girish Ramakrishnan
6d9bf71f8a
Basic box upgrade
2014-10-23 13:11:00 -07:00
Girish Ramakrishnan
5ec406bf4d
Remove version from cloudron.conf
...
The version and code move together, it's not really part of cloudron
configuration.
This can maybe even come from package.json later
2014-10-23 12:37:54 -07:00
Girish Ramakrishnan
2498311f24
Update scripts are now under updates/
...
This is because they are not run by the node.js code
2014-10-23 12:10:04 -07:00
Girish Ramakrishnan
5463b187e1
Remove bogus debug
2014-10-23 12:07:42 -07:00
Girish Ramakrishnan
50f4032988
Update oauth in restore code as well
2014-10-22 21:39:55 -07:00
Girish Ramakrishnan
40e639e710
Combine del and add as replace in clientdb
2014-10-22 21:35:41 -07:00
Girish Ramakrishnan
2046ede44e
Send mail dns records registration across restarts
...
The registration id is saved in the config
2014-10-22 21:22:18 -07:00
Girish Ramakrishnan
defe6ad15c
Remove config.databaseFileName
2014-10-22 20:05:53 -07:00
Girish Ramakrishnan
a77b2e6fc1
Rename variable
2014-10-22 19:35:02 -07:00
Girish Ramakrishnan
90dd30da3b
Use set -e in update.sh
2014-10-22 19:32:35 -07:00
Girish Ramakrishnan
133a93010e
Drop the square brackets for cmd evaluation
2014-10-22 19:13:32 -07:00
Girish Ramakrishnan
3540a3147b
Fix typo
2014-10-22 18:57:24 -07:00
Girish Ramakrishnan
3abc194631
restore script does not need token anymore
2014-10-22 18:43:46 -07:00
Girish Ramakrishnan
e53b2d6f0c
Add another FIXME
2014-10-22 18:01:02 -07:00
Johannes Zellner
13348b4b79
Fixup linter issues in cloudron.js
2014-10-22 17:57:52 -07:00
Girish Ramakrishnan
5d7a821bf1
Save provision data provided in restore call
...
Need because with the new restore design, cloudron.conf is not persisted
across restores.
2014-10-22 17:27:57 -07:00
Girish Ramakrishnan
c82c4bb712
Add paths.DATA_DIR
2014-10-22 17:14:25 -07:00
Girish Ramakrishnan
9b101b8c83
Backup with no data/ prefix
2014-10-22 13:42:00 -07:00
Girish Ramakrishnan
1d44877358
Run postinstall script in restore and update
2014-10-22 12:17:10 -07:00
Girish Ramakrishnan
39c0a71d97
Simplify update.sh removing fancy logs
2014-10-22 12:13:45 -07:00
Girish Ramakrishnan
21e897830e
Make restore script migrate data to latest format
2014-10-22 12:06:01 -07:00
Girish Ramakrishnan
c19ac0b361
Do not overwrite code dir on restore
2014-10-22 12:02:47 -07:00
Girish Ramakrishnan
1eee1a21cf
Backup only data
2014-10-22 12:00:24 -07:00
Girish Ramakrishnan
7a4d2c2235
Move schema.sql to migrations/
2014-10-22 11:02:30 -07:00
Johannes Zellner
d7ff586b64
Remove unused requires from config.js
2014-10-22 10:18:26 -07:00
Johannes Zellner
3d5a4acd53
Remove unused requires in database.js
2014-10-22 09:16:52 -07:00
Johannes Zellner
43b6dff466
Remove unused requires in apps-test.js
2014-10-22 09:16:42 -07:00
Girish Ramakrishnan
6864306562
Move naked domain config to settingsdb
2014-10-22 08:44:54 -07:00
Girish Ramakrishnan
5bbbf5cba4
Use -p in case .yellowtenttest never existed
2014-10-22 08:32:32 -07:00
Girish Ramakrishnan
ac8341cb2d
Bring back settingsdb.js
...
config.js is now meant for instance level data ie data for specific
cloudron instance. The sqlite database is meant for data that is
needed across restores.
2014-10-22 08:02:30 -07:00
Girish Ramakrishnan
18b2389315
Use NGINX_CERT_DIR
2014-10-22 00:39:32 -07:00
Girish Ramakrishnan
689c1cc4c3
Actually add paths.js
2014-10-22 00:35:01 -07:00
Girish Ramakrishnan
bc24596d22
Fix typo
2014-10-22 00:27:12 -07:00
Girish Ramakrishnan
cb055594c9
Fix scripts for new location of cloudron.conf
2014-10-22 00:04:55 -07:00
Girish Ramakrishnan
66e4a417d1
Fix scripts for new dir structure
2014-10-22 00:02:23 -07:00
Girish Ramakrishnan
93d3245b42
Clarify cloudron.conf vs cloudron.sqlite
2014-10-21 23:42:01 -07:00
Girish Ramakrishnan
9e81fbf05b
Move all path config to paths.js
...
I called it dirs.js first but that wouldn't allow filenames as
part of the API. stdpath.js seemed too 'standard'.
2014-10-21 23:34:23 -07:00
Girish Ramakrishnan
fe73fac628
Rework dir structure
...
data/ is backed up. Everything else is just configuration that does
not need to be backed up.
2014-10-21 22:26:12 -07:00
Girish Ramakrishnan
640b10bbb8
Move data and mount under volumes/
2014-10-21 22:15:00 -07:00
Girish Ramakrishnan
06465731eb
getUserHomeDir need not be a function
2014-10-21 22:04:36 -07:00
Girish Ramakrishnan
c3ef6068c3
Use iconsRoot
2014-10-21 21:58:42 -07:00
Girish Ramakrishnan
f11adb5e85
Run postinstall script on startup
2014-10-21 20:30:15 -07:00
Girish Ramakrishnan
df26fe4845
configRoot is never used
2014-10-21 19:48:34 -07:00
Girish Ramakrishnan
dd6e1f66ca
Start afresh for every test run
...
Note that we use ";" instead of && because on the Mac rm -rf
fails because of encfs bugs
Fixes #112
2014-10-21 19:45:35 -07:00
Girish Ramakrishnan
f06d305e36
Rename the database to cloudron.sqlite
2014-10-21 19:38:20 -07:00
Girish Ramakrishnan
775988ee7f
Run tests with base dir as ~/.yellowtenttest
...
Part of #112
2014-10-21 18:32:01 -07:00
Girish Ramakrishnan
65b65b8f2c
Remove everything except webadmin
2014-10-21 18:32:00 -07:00
Girish Ramakrishnan
d38d98e34f
Add database.clear
2014-10-21 18:32:00 -07:00
Girish Ramakrishnan
ec3bd4763b
Add migration script to add admin to clients by default
2014-10-21 18:32:00 -07:00
Girish Ramakrishnan
84965de92c
fix typo
2014-10-21 18:32:00 -07:00
Girish Ramakrishnan
c513933705
Add clear methods to all tables
2014-10-21 16:39:11 -07:00
Girish Ramakrishnan
d1a500e0ed
Add initial migration scripts
...
Part of #112
2014-10-21 13:38:27 -07:00
Girish Ramakrishnan
6885e37409
Add db-migrate
2014-10-21 12:24:56 -07:00
Girish Ramakrishnan
3555c72f8d
env vars are strings
2014-10-21 11:17:54 -07:00
Girish Ramakrishnan
772cefbfc6
Quote values in supervisor configs
2014-10-20 18:20:46 -07:00
Girish Ramakrishnan
9da9312086
Cleanup scripts
2014-10-20 16:52:33 -07:00
Girish Ramakrishnan
9f34ecdfa0
Store all data in data/ instead of .yellowtent/ in cloudrons
...
When run locally, it's still .yellowtent/
2014-10-20 16:44:14 -07:00
Girish Ramakrishnan
439107e6cb
Remove unused script
2014-10-20 16:32:22 -07:00
Girish Ramakrishnan
b1071790a6
Pretty print the config
2014-10-17 23:41:20 -07:00
Girish Ramakrishnan
1fe9e85293
Fix typo in dns check code
2014-10-17 22:01:05 -07:00
Girish Ramakrishnan
b84896a95f
Wait for DNS changes to complete
...
Fixes #111
2014-10-17 21:25:59 -07:00
Girish Ramakrishnan
0807f5caee
Add native-dns module
2014-10-17 20:30:25 -07:00
Girish Ramakrishnan
a5cab916e2
Bump version to 0.5.0
2014-10-16 14:56:56 -07:00
Girish Ramakrishnan
2abfac8a0d
Release version 0.4.0
2014-10-16 14:56:33 -07:00
Girish Ramakrishnan
32cc2d2e2a
Send isDev is /api/v1/config
2014-10-16 14:42:46 -07:00
Girish Ramakrishnan
c44779e639
Provision based on isDev value in provision call from app server
2014-10-16 14:29:41 -07:00
Girish Ramakrishnan
665b9c6e06
Do not backup the certs
...
These are our certs!
2014-10-16 14:08:03 -07:00
Girish Ramakrishnan
9a672ec3b3
Add a note not to backup any other dir
2014-10-16 13:58:39 -07:00
Girish Ramakrishnan
0de57a01ab
Just use docker exec instead of nsenter
...
New in docker 1.3
Fixes #109
2014-10-16 13:52:49 -07:00
Girish Ramakrishnan
6be3cc9bb7
Return values with callback
2014-10-16 13:31:59 -07:00
Girish Ramakrishnan
a8e86bbf90
Fix indentation of heredoc
2014-10-16 13:06:45 -07:00
Girish Ramakrishnan
8155a7d0b2
Retry git and npm command till it succeeds
...
It's fine to run them forever since after 30m the appstore
will recreate it anyway
2014-10-16 12:40:40 -07:00
Girish Ramakrishnan
e8a123b439
Improve log messages in initialization script
2014-10-16 12:26:01 -07:00
Girish Ramakrishnan
c88496873b
Install certificates provided during provisioning
2014-10-16 10:26:41 -07:00
Girish Ramakrishnan
4c8fa56175
Just use heroku for the moment since heroku keeps dying on me
...
Heroku has to be the most unstable service ever
2014-10-15 23:56:17 -07:00
Girish Ramakrishnan
e72d2e1e4f
Move to cloudron.io domain
2014-10-15 19:27:04 -07:00
Johannes Zellner
4e8438afdc
Add TODO to check the private apps user role
2014-10-15 18:01:42 -07:00
Johannes Zellner
e318160ec6
webadmin: display the access restriction in app details
2014-10-15 09:23:15 -07:00
Johannes Zellner
fbc511cc73
webadmin: create restrictAccessToLabel angular filter
2014-10-15 09:23:00 -07:00
Johannes Zellner
2d42f0e81a
webadmin: Add restrictAccessTo select fields in install and config forms
2014-10-15 09:22:29 -07:00
Johannes Zellner
ea4e51e252
Adjust Client to restrictAccessTo REST api changes
2014-10-15 09:21:47 -07:00
Johannes Zellner
7b9d1fe91c
Add restrictAccessTo field for app install and configure
2014-10-15 09:21:11 -07:00
Johannes Zellner
f65a6172b5
Rename isPrivate to restrictAccessTo in appsdb
2014-10-15 08:33:33 -07:00
Johannes Zellner
c93f6dbd4a
Add isPrivate field to appdb
2014-10-14 13:52:14 -07:00
Johannes Zellner
3bbacabd2e
Add app proxy route
...
This will add a proxy route for apps which are set to run
in private mode. At the moment there is no UI to make apps
private.
2014-10-14 13:52:14 -07:00
Johannes Zellner
05d311cedf
Make script includes absolute to webadmin for login session views
2014-10-14 13:52:14 -07:00
Johannes Zellner
fcf9936509
Only send welcome mails for non admins
...
This can only ever be an admin here if it is the very
first one.
2014-10-14 13:52:14 -07:00
Girish Ramakrishnan
4ea1bc65c9
Fix appstore url
2014-10-14 13:28:09 -07:00
Johannes Zellner
1b225da0de
Adjust oauth test suite to new user roles
2014-10-12 15:35:07 -07:00
Johannes Zellner
22128ad3b7
Ignore origin passed from oauth client but use the one in the db
...
Fixes #105
2014-10-12 14:09:38 -07:00
Girish Ramakrishnan
6dcb9a1eae
Pass token to restore script
2014-10-10 16:29:28 -07:00
Girish Ramakrishnan
05db80fdae
Add a TODO that restore should only be done in a fresh image
2014-10-10 15:57:09 -07:00
Girish Ramakrishnan
b8b72ffea4
I like dots
2014-10-10 13:16:19 -07:00
Girish Ramakrishnan
c2950f9a1b
On ubuntu, tar is /bin/tar
2014-10-10 12:10:55 -07:00
Girish Ramakrishnan
0315b27d61
Fix debug
2014-10-10 11:39:51 -07:00
Girish Ramakrishnan
9a94238a11
Pass backup url to updater to avoid circular reference
2014-10-10 11:37:57 -07:00
Girish Ramakrishnan
98a045ec0b
Fix missing require
2014-10-10 11:12:01 -07:00
Johannes Zellner
37f2dd6df6
webadmin: use ng-src instead of src in img tags
2014-10-10 11:04:12 -07:00
Johannes Zellner
c03f62339a
webadmin: use https:// for gravatar
2014-10-10 11:00:09 -07:00
Johannes Zellner
a421943e1c
Add angular-m5 for now to setup.html this is only temporarily
2014-10-10 10:52:15 -07:00
Girish Ramakrishnan
f388cc6058
Stop container before deleting it
...
This is attempting to fix
Thu, 09 Oct 2014 06:30:22 GMT box:apptask Apptask completed for 326e4abd-aa72-4069-abf3-238757b3167d { [Error: HTTP code is 500 which indicates error: server error - Cannot destroy container 4524791d0efe279ce556a6c10c484bd09e5163f4279a5de84fa30836be49ebf4: Unable to remove filesystem for 4524791d0efe279ce556a6c10c484bd09e5163f4279a5de84fa30836be49ebf4: remove /var/lib/docker/containers/4524791d0efe279ce556a6c10c484bd09e5163f4279a5de84fa30836be49ebf4: directory not empty
See https://github.com/docker/docker/issues/8203
2014-10-10 09:57:13 -07:00
Girish Ramakrishnan
5dd57f6327
Fix quoting in scripts
2014-10-10 09:54:12 -07:00
Girish Ramakrishnan
9028b4f6b5
Use execFile instead of exec
2014-10-10 09:54:12 -07:00
Johannes Zellner
15dc7ac13c
webadmin: use better fitting default gravatar
2014-10-10 09:47:45 -07:00
Johannes Zellner
7aeb66a603
webadmin: fun, use gravatar for user icon
2014-10-10 09:43:44 -07:00
Johannes Zellner
7e895a83bf
Revert "Stop container before deleting it"
...
This reverts commit 872316f64d .
2014-10-10 09:30:45 -07:00
Girish Ramakrishnan
79d1940506
Fix boolean logic from eb21b531
2014-10-10 08:53:32 -07:00
Girish Ramakrishnan
b0c2fd7129
Quote all the things!
2014-10-10 08:42:01 -07:00
Johannes Zellner
875bb35807
Write some oauth documentation of what the routes do
...
Since we deviate slightly from the oauth standard,
much like everyone seems to do, we need to document it better
as the topic is certainly not trivial
2014-10-10 08:30:57 -07:00
Johannes Zellner
0595d7895f
Merge branch 'rolescopes'
2014-10-10 08:04:16 -07:00
Girish Ramakrishnan
b447298388
print out the request body
2014-10-10 00:57:04 -07:00
Girish Ramakrishnan
957633ed64
Fix qouting
2014-10-10 00:56:56 -07:00
Girish Ramakrishnan
ad18353557
Do not set any header
2014-10-10 00:16:14 -07:00
Girish Ramakrishnan
c94b54ae31
Use execFile instead of exec
...
exec is dangerous because of arg escaping trap
2014-10-09 23:52:41 -07:00
Girish Ramakrishnan
10b1fbee69
Quote the assignment
2014-10-09 22:36:18 -07:00
Girish Ramakrishnan
fa338fb105
debug the backup url
2014-10-09 19:37:15 -07:00
Johannes Zellner
6140f2ad3f
Only ever use the scopes from the clientdb when handing out tokens
2014-10-09 17:54:51 -07:00
Johannes Zellner
a2847bd918
Remove * oauth scope and make it explicit
2014-10-09 17:54:26 -07:00
Johannes Zellner
5a16c41429
Remove scope and redirectURL from authcodedb
2014-10-09 17:53:59 -07:00
Girish Ramakrishnan
0efa500612
Use backup url api to backup and restore box data
...
Part of #60
2014-10-09 17:36:52 -07:00
Johannes Zellner
717fb5045c
Add oauth scope field to clientdb
2014-10-09 17:14:28 -07:00
Girish Ramakrishnan
7fe2bd12c1
Box must send heartbeat with fqdn
...
Hearbeat makes sense only after provisioning at which point
config.fqdn is setup correctly
2014-10-09 13:46:45 -07:00
Johannes Zellner
bf570f6f23
Add 2gb swapfile to the base image
2014-10-09 10:59:10 -07:00
Johannes Zellner
cf05cd4c19
Create images only with 512mb droplets
2014-10-09 10:35:12 -07:00
Johannes Zellner
6f1b208f47
If oauth client asks for admin capabilities only allow admins to login
...
This requires nicer error handling
2014-10-09 09:21:48 -07:00
Girish Ramakrishnan
872316f64d
Stop container before deleting it
...
This is attempting to fix
Thu, 09 Oct 2014 06:30:22 GMT box:apptask Apptask completed for 326e4abd-aa72-4069-abf3-238757b3167d { [Error: HTTP code is 500 which indicates error: server error - Cannot destroy container 4524791d0efe279ce556a6c10c484bd09e5163f4279a5de84fa30836be49ebf4: Unable to remove filesystem for 4524791d0efe279ce556a6c10c484bd09e5163f4279a5de84fa30836be49ebf4: remove /var/lib/docker/containers/4524791d0efe279ce556a6c10c484bd09e5163f4279a5de84fa30836be49ebf4: directory not empty
See https://github.com/docker/docker/issues/8203
2014-10-08 23:42:40 -07:00
Girish Ramakrishnan
d4e08c06b0
Not sure what the v arg means. Set it to false
2014-10-08 23:39:17 -07:00
Girish Ramakrishnan
76b3a7f3df
Use . as progress indicator
2014-10-08 22:48:55 -07:00
Girish Ramakrishnan
11997a4adc
Logging rules must be at the very end
2014-10-08 22:03:20 -07:00
Girish Ramakrishnan
112e77dc20
Log dropped incoming packages
2014-10-08 19:35:35 -07:00
Girish Ramakrishnan
99952e5bab
Firewall the box
...
This change firewalls everything except the internal bridge. An upcoming
change should disable icc as well but that requires us to link all the
apps with the mail container.
Part of #59
2014-10-08 19:23:15 -07:00
Girish Ramakrishnan
92ae8ec615
Add DNS port to reserved ports
2014-10-08 15:00:52 -07:00
Girish Ramakrishnan
a35fddcb59
Add more ports to reserved ports
2014-10-07 17:06:46 -07:00
Girish Ramakrishnan
2dab41683b
Remove Select *
2014-10-07 14:53:19 -07:00
Girish Ramakrishnan
3ba7632987
Remove SELECT * from queries
...
Stolen from SO article (https://stackoverflow.com/questions/321299/what-is-the-reason-not-to-use-select )
If you specify columns in a SQL statement, the SQL execution engine will error if that column is removed from the table and the query is executed.
You can more easily scan code where that column is being used.
You should always write queries to bring back the least amount of information.
As others mention if you use ordinal column access you should never use select *
If your SQL statement joins tables, select * gives you all columns from all tables in the join
2014-10-07 09:17:55 -07:00
Girish Ramakrishnan
020b509e2c
Do not assert if ip is null
...
IP is null when there is no network connectivity
2014-10-07 09:17:55 -07:00
Girish Ramakrishnan
aad31c46e0
Rickshaw does not like null data
2014-10-06 23:08:43 -07:00
Girish Ramakrishnan
b0c788e621
Cleanup rendering of appdetails graphs
2014-10-06 23:02:49 -07:00
Girish Ramakrishnan
37f2c5c9a1
Refactor graph rendering
2014-10-06 22:43:23 -07:00
Girish Ramakrishnan
3bc9cba036
Handle null data from graphite
2014-10-06 22:23:41 -07:00
Girish Ramakrishnan
c3a1ca7877
Check if a port is reserved when installing app
2014-10-06 19:07:19 -07:00
Girish Ramakrishnan
3ea6aff5e1
Server should only listen on the loopback
2014-10-06 19:02:39 -07:00
Girish Ramakrishnan
18059c4f8a
Cache the IP
2014-10-06 18:34:19 -07:00
Girish Ramakrishnan
0f68e3bebc
graphite runs on port 8000
2014-10-06 18:24:27 -07:00
Girish Ramakrishnan
e05243a72b
Start haraka and graphite containers on startup
...
The default restart policy for containers is "no". As a result,
the service container (graphite, haraka) are not started on
system reboot.
The apps themselves are resumed by apps.js. That code also handles
resumption of app tasks should the box have crashed/rebooted midway.
This code could have been placed in a supervisor script or an init
script. init script means tighter integration into the system OS
which we want to avoid. supervisor script could be done at some point
should we need a more sophisticated "pre-start" script.
Fixes #98
2014-10-06 14:25:23 -07:00
Girish Ramakrishnan
324011d04f
Remove debugging code
...
Not sure how this got committed
2014-10-06 11:02:36 -07:00
Girish Ramakrishnan
ebc5c56b11
Display location on sidebar now that we allow multiple instances
2014-10-04 02:36:11 -07:00
Girish Ramakrishnan
b31320bff4
Allow multiple instances of apps
...
Fixes #93
2014-10-04 01:24:13 -07:00
Johannes Zellner
9e2614a0d8
After password reset, redirect the user to the webadmin
2014-10-04 00:49:50 -07:00
Johannes Zellner
5a01c84936
Send new users to the webadmin
2014-10-04 00:47:26 -07:00
Johannes Zellner
c2fe5fc0a0
Also print the login url in welcome emails
2014-10-04 00:37:15 -07:00
Johannes Zellner
1d242d18f4
Generate random passwords for new user and send them via mail
2014-10-04 00:21:27 -07:00
Girish Ramakrishnan
669f0d2eca
Fix typo
2014-10-04 00:12:43 -07:00
Girish Ramakrishnan
b7156f7b49
break after finding an app
2014-10-04 00:07:08 -07:00
Girish Ramakrishnan
b311571dee
arp -d can fail
2014-10-03 20:42:23 -07:00
Girish Ramakrishnan
04fc6b6364
Enable backup logs
2014-10-03 20:41:27 -07:00
Johannes Zellner
18a931c04f
webadmin: make navbar responsive
2014-10-03 19:16:32 -07:00
Girish Ramakrishnan
81fd432764
Add a hack to forget the old MAIL_SERVER mac
2014-10-03 18:59:27 -07:00
Johannes Zellner
39916b351a
webadmin: Remove context menu for profile
2014-10-03 18:49:47 -07:00
Johannes Zellner
2af697bc90
Disable autocomplete for password reset form
2014-10-03 18:35:43 -07:00
Johannes Zellner
94e30052db
Finalize password reset
2014-10-03 18:16:57 -07:00
Johannes Zellner
0fdb5e3df0
Add missing password reset view
2014-10-03 17:41:59 -07:00
Girish Ramakrishnan
a2baf856ae
Add NET_ADMIN caps so that haraka can configure interface
2014-10-03 17:13:48 -07:00
Johannes Zellner
ada282e70d
Add initial form to enter new password after reset
2014-10-03 16:55:56 -07:00
Girish Ramakrishnan
1e02b9e8f4
Set the mail server static IP in haraka container instead
...
This makes it work across starts (like after a backup)
2014-10-03 16:05:18 -07:00
Girish Ramakrishnan
973a3b2849
Add MAIL_DOMAIN and make MAIL_USERNAME only have username
2014-10-03 15:34:29 -07:00
Johannes Zellner
8cceab7c38
Actually send reset tokens
2014-10-03 15:32:56 -07:00
Johannes Zellner
7ce2c252f0
Add more routes for password reset and attempt to send a mail
2014-10-03 15:08:19 -07:00
Girish Ramakrishnan
f6697d4e4c
Fix typo
2014-10-03 10:45:35 -07:00
Girish Ramakrishnan
4f615a1249
Give mail server a static IP
...
Docker containers get a new IP on every restart. This causes a problem
since we export the MAIL_SERVER as an env variable in apps.
2014-10-03 09:53:02 -07:00
Johannes Zellner
a1bc095fbd
Add initial password reset view
2014-10-03 03:40:24 -07:00
Girish Ramakrishnan
d3f9712eb8
Send mails asap
2014-10-03 03:06:47 -07:00
Girish Ramakrishnan
84c917e438
Fix typo
2014-10-03 02:54:52 -07:00
Girish Ramakrishnan
09c9bdc32c
Fix mailer issues
2014-10-03 02:42:26 -07:00
Girish Ramakrishnan
9559917272
Fix missing var
2014-10-03 02:35:40 -07:00
Girish Ramakrishnan
03175b3d06
Move mailer notifications outside routes code
2014-10-03 02:33:04 -07:00
Girish Ramakrishnan
d30f4c44c2
Better email notifications
2014-10-03 02:32:01 -07:00
Girish Ramakrishnan
ed74695d22
Remove bogus default email id
2014-10-03 02:32:01 -07:00
Johannes Zellner
9e61a3e7e5
Do not try to stop the box code on update
...
The backup should already stop it
2014-10-03 02:29:51 -07:00
Johannes Zellner
c65e5143b0
Do not start box code at end of backup if we are updating
2014-10-03 02:23:11 -07:00
Johannes Zellner
b6a0f429e7
Actually pass in the S3 credentials not just the variable name
2014-10-03 02:05:00 -07:00
Girish Ramakrishnan
73fffaa6d9
Fix email rendering
2014-10-03 01:01:08 -07:00
Johannes Zellner
e53666f0e8
Run a backup prior to an update
2014-10-03 00:54:36 -07:00
Johannes Zellner
e451acf271
Move backup code to cloudron.js
2014-10-03 00:44:08 -07:00
Johannes Zellner
eadfb9d837
Send 403 instead of 401 if admin tries to delete user providing wrong password
2014-10-03 00:33:21 -07:00
Johannes Zellner
cb4aa12c75
Remove log output for docker proxy if running in test mode
2014-10-03 00:22:23 -07:00
Johannes Zellner
24552b0eef
Remove stray console.dir()
2014-10-03 00:21:58 -07:00
Johannes Zellner
fb7519a7e2
Do not error if the app icon does not exist on uninstallation
2014-10-03 00:21:40 -07:00
Johannes Zellner
0d7910661d
Add supererror to apphealthtask
2014-10-02 23:36:43 -07:00
Johannes Zellner
dda50935b6
Add missing AND in sql statement
2014-10-02 23:35:46 -07:00
Johannes Zellner
fb316edf0a
cloudron.getIp() should also respect wifi devices
2014-10-02 23:04:50 -07:00
Girish Ramakrishnan
bad41d7a7e
Use async.mapSeries
2014-10-02 13:22:47 -07:00
Girish Ramakrishnan
de57fbb0aa
Fix typo
2014-10-02 13:16:12 -07:00
Girish Ramakrishnan
b0e0b441f4
Fix missing require
2014-10-02 13:11:57 -07:00
Girish Ramakrishnan
20d1a54674
mail: Notify admins and user when a user was added
2014-10-02 12:59:35 -07:00
Girish Ramakrishnan
c9dcfc3c23
Render email using ejs templates
2014-10-02 11:10:28 -07:00
Girish Ramakrishnan
acd868640d
Make it a debug statement
2014-10-02 09:59:46 -07:00
Girish Ramakrishnan
444fc6c0d2
Check DNS PTR record before sending email
...
This allows us to activate the cloudron asap but no mails are sent
out until the PTR records are setup.
2014-10-02 09:59:14 -07:00
Girish Ramakrishnan
8137079cb3
Add a mail queue
...
This is primarily so that we can tune the code later to send emails
at specific points (like after we ensure the dns has propagated)
2014-10-02 09:49:17 -07:00
Johannes Zellner
db2d9651aa
Remove unused requires in server.js
2014-10-02 08:38:04 -07:00
Johannes Zellner
47d2d957aa
webadmin: use a default error handler for all ajax requests in console.js
...
This allows us to logout if any request fails due to invalid
token. This can for example happen if you revoke the tokens for
the webadmin.
2014-10-01 16:53:50 -07:00
Johannes Zellner
22e3055bf2
webadmin: Remove call to nonexisting login()
2014-10-01 16:32:08 -07:00
Johannes Zellner
7303e703e8
Disable autocomplete for all forms besides login
2014-10-01 16:17:58 -07:00
Johannes Zellner
778c42ce36
Remove redundant form tag in login view
2014-10-01 16:14:21 -07:00
Girish Ramakrishnan
68989ad7a3
dkim does not have outbound signing policy anymore
...
http://www.faqs.org/rfcs/rfc4871.html does not have a section for 'o'
2014-10-01 08:54:09 -07:00
Girish Ramakrishnan
4ee3f7b350
Add more mail hooks
2014-10-01 06:17:54 -07:00
Girish Ramakrishnan
05473b4dc1
Fix debug scope
2014-10-01 06:11:28 -07:00
Girish Ramakrishnan
e2342fc653
Send welcome email
2014-10-01 06:05:17 -07:00
Girish Ramakrishnan
a58c1cf503
Display user's email
2014-09-30 21:57:40 -07:00
Girish Ramakrishnan
d6d50324d6
_dmarc and _domainkey are reserved subdomains
2014-09-30 21:34:41 -07:00
Girish Ramakrishnan
ed29754f63
Keep track of dns record ids
2014-09-30 17:11:12 -07:00
Girish Ramakrishnan
dba3527ba8
Mail DNS records must be double quoted
2014-09-29 23:28:43 -07:00
Girish Ramakrishnan
54b46240fb
Send SPF records as type TXT
2014-09-29 22:27:31 -07:00
Girish Ramakrishnan
43f21a7a39
Fix parsing of public key file
2014-09-29 17:29:47 -07:00
Girish Ramakrishnan
480d7b9bfd
Set loglevel to verbose
2014-09-29 17:21:20 -07:00
Girish Ramakrishnan
0b082d2a2a
Read public key as string
2014-09-29 17:07:27 -07:00
Girish Ramakrishnan
8888e4bbe7
Refactor getCertificate code
...
Kill timer on uninitialize as well
2014-09-29 14:47:33 -07:00
Girish Ramakrishnan
d5f1ccfd1d
Add mail DNS records
...
Part of #46
2014-09-29 14:47:28 -07:00
Girish Ramakrishnan
8393ee7c25
subdomain registration API now takes an array
2014-09-29 13:27:09 -07:00
Johannes Zellner
2ca9bedf45
webadmin: angular based form validation for create user
2014-09-29 09:55:43 -07:00
Johannes Zellner
b3d93742b3
webadmin: show validation errors for user creation
2014-09-29 08:36:25 -07:00
Johannes Zellner
cee89b44a6
webadmin: add basic form validation for first user creation
2014-09-28 20:21:01 -07:00
Johannes Zellner
94e1652422
webadmin: add some basic field validation for user creation
2014-09-28 20:09:56 -07:00
Johannes Zellner
17061a1f74
webadmin: creating any user requires an email address
2014-09-28 19:45:26 -07:00
Johannes Zellner
51b916ac0e
webadmin: creating the first user requires an email address
2014-09-28 19:36:45 -07:00
Girish Ramakrishnan
0b18fdca1b
Add type of subdomain API
2014-09-28 18:50:47 -07:00
Girish Ramakrishnan
802c2deb93
Set MAIL_USERNAME for app to use as from address for emails
2014-09-28 15:31:48 -07:00
Girish Ramakrishnan
dbbc6d1881
run node script as yellowtent user
2014-09-28 14:47:35 -07:00
Girish Ramakrishnan
4ba5967746
Export MAIL_SERVER env variable for apps
2014-09-28 13:17:59 -07:00
Girish Ramakrishnan
e15d516374
Save mailServer IP in cloudron config
2014-09-28 13:16:23 -07:00
Girish Ramakrishnan
d32b127da4
Always set defaults in config object
...
Set defaults and then overwrite them with any saved config object
2014-09-28 12:53:12 -07:00
Girish Ramakrishnan
8590bc7054
Generate the dkim keys in haraka container
...
If the appdata dir of haraka is prepopulated, then the setup
script is skipped.
2014-09-28 08:40:35 -07:00
Girish Ramakrishnan
08456655de
Fix typo
2014-09-28 00:15:23 -07:00
Girish Ramakrishnan
144fde9e43
Set DOMAIN_NAME env variable in the haraka container
2014-09-27 23:51:37 -07:00
Girish Ramakrishnan
920fe2df6f
Fix haraka setup script
2014-09-27 23:13:13 -07:00
Girish Ramakrishnan
03289fb55f
Add haraka mail relay server as part of base image
...
Part of #46
2014-09-27 13:09:01 -07:00
Girish Ramakrishnan
7bcca1ad2a
Fix speling
2014-09-26 18:28:26 -07:00
Girish Ramakrishnan
17d24d23b2
Fix refactoring error
2014-09-26 18:28:03 -07:00
Girish Ramakrishnan
d8310bdc1a
Fix typo
2014-09-26 16:07:12 -07:00
Girish Ramakrishnan
f2b910a22a
Move provisioning code to cloudron.js
2014-09-26 15:11:30 -07:00
Girish Ramakrishnan
46ce72a8d1
Remove business logic from cloudron routes code
2014-09-26 14:57:21 -07:00
Girish Ramakrishnan
0cd077da0a
Move updater code into cloudron.js
2014-09-26 14:33:08 -07:00
Girish Ramakrishnan
04e3325953
Move heartbeat code to cloudron.js
2014-09-26 14:21:25 -07:00
Girish Ramakrishnan
c59432323f
Move announce code to cloudron.js
2014-09-26 14:13:30 -07:00
Girish Ramakrishnan
e9f4cbcee0
Move box specific logic to cloudron.js
2014-09-26 13:00:02 -07:00
Girish Ramakrishnan
5e4b01cdda
Namespace cloudron routes
2014-09-26 12:45:50 -07:00
Girish Ramakrishnan
6b3cddc0d4
Add checkInstall.sh to npm test
2014-09-26 12:09:41 -07:00
Girish Ramakrishnan
52e7ec9d65
Add checkInstall.sh script to check sudo setup
...
Checks if all sudo scripts return OK with --check argument
2014-09-26 12:05:46 -07:00
Johannes Zellner
3c727c646a
Add Cross-site request forgery protection middleware csurf
...
Fixes #81
2014-09-26 09:56:19 -07:00
Johannes Zellner
f61c49ea73
Update sqlite3 module to version 3.0.0
2014-09-26 09:53:19 -07:00
Johannes Zellner
309e2f5389
webadmin: disable autofill for user deletion dialog
2014-09-25 14:32:44 -07:00
Girish Ramakrishnan
374ac8590c
Leave a note about USER_HZ
2014-09-24 15:08:06 -07:00
Girish Ramakrishnan
7e85ccb819
Display app graphs
...
https://www.kernel.org/doc/Documentation/cgroups/memory.txt
Part of #74
2014-09-24 11:11:29 -07:00
Girish Ramakrishnan
efbf4c1205
Collect max usage in bytes
2014-09-24 10:56:32 -07:00
Girish Ramakrishnan
624245f820
Display graphs in appdetails page
2014-09-24 10:08:10 -07:00
Johannes Zellner
397cfda62c
allocate oauth credentials during app install should fail when attempted twice
2014-09-24 07:56:11 -07:00
Girish Ramakrishnan
6aa7166f15
Collect appdata du information
2014-09-23 23:48:58 -07:00
Girish Ramakrishnan
c531825eb8
Change ownership of collectd dir
2014-09-23 23:18:44 -07:00
Girish Ramakrishnan
1233ebc1e4
Implement collection of app memory/cpu statistics
...
per-app collectd configuration is dynamically added/removed.
2014-09-23 22:31:19 -07:00
Girish Ramakrishnan
36213bc477
Move collectd configs inside backup dir
2014-09-23 21:51:04 -07:00
Johannes Zellner
7df45b535a
Merge branch 'revokation'
2014-09-23 21:04:12 -07:00
Johannes Zellner
abc1c903e3
webadmin: disable token deletion button if there are no tokens
2014-09-23 20:54:48 -07:00
Johannes Zellner
ced1618460
Fix clientdb.getAllWithDetails() query to use outer join correctly
2014-09-23 20:54:28 -07:00
Johannes Zellner
2bca7a95a2
webadmin: rework the security ui to adjust to server changes
2014-09-23 18:05:47 -07:00
Johannes Zellner
61db9bc698
Make oauth clients and tokens REST resources
...
This only covers functionality we use so far
2014-09-23 18:05:15 -07:00
Johannes Zellner
03f15dbe22
Update the database tests
2014-09-23 18:04:07 -07:00
Johannes Zellner
b4087645ac
Add clientdb.getAll*() methods
2014-09-23 18:03:49 -07:00
Johannes Zellner
de2f796651
Add tokendb.getByUserIdAndClientId()
2014-09-23 18:03:24 -07:00
Girish Ramakrishnan
04ef971b83
Add girish/base:0.7
...
Fixes #87
2014-09-23 17:12:38 -07:00
Girish Ramakrishnan
1fffd986f0
Add non-minified rickshaw files
...
rickshaw is from a240899625
d3 is from 3.4.11
2014-09-23 00:40:38 -07:00
Johannes Zellner
1abbde33d7
Only add webadmin as oauth client if not already there
2014-09-22 17:30:40 -07:00
Johannes Zellner
2c97b89524
Show oauth client credentials in webadmin
2014-09-22 17:08:27 -07:00
Johannes Zellner
24bd8070cd
webadmin: fixup the accordion collapsing
2014-09-22 16:56:08 -07:00
Johannes Zellner
f6a5bfcdcd
webadmin: The oauth client view is now an accordion
2014-09-22 16:33:03 -07:00
Johannes Zellner
615cf9150a
Adjust the special casing for webadmin for oauth scopes
2014-09-22 16:32:33 -07:00
Johannes Zellner
66afa93259
webadmin: make security a separate view
2014-09-22 16:04:23 -07:00
Johannes Zellner
0507a633ea
Introduce appId for clientdb
2014-09-22 15:51:43 -07:00
Girish Ramakrishnan
265ecbeffc
call transformNull on all metrics
2014-09-22 14:07:22 -07:00
Girish Ramakrishnan
4f2b818786
Fix graphs
2014-09-22 12:58:23 -07:00
Girish Ramakrishnan
c078871188
Implement month and year charts
...
Month charts don't work properly for some reason
2014-09-22 11:43:25 -07:00
Johannes Zellner
313a09bbb0
webadmin: Do list active clients instead of access tokens
2014-09-22 10:16:09 -07:00
Johannes Zellner
a7a7824fb4
Also fetch the scopes for tokens when getting active clients
2014-09-22 10:15:51 -07:00
Johannes Zellner
37dd2597b2
Add route to delete all tokens by active oauth client
2014-09-22 09:57:01 -07:00
Johannes Zellner
d259c4888b
Add clientdb.getByClientId() unit tests
2014-09-22 09:39:52 -07:00
Johannes Zellner
8a5b736af9
Add tokendb.delByUserIdAndClientId()
2014-09-22 09:26:06 -07:00
Johannes Zellner
8b59f11df4
Add route to list all active oauth clients for a user
2014-09-22 08:43:04 -07:00
Johannes Zellner
c3fc4a727d
Add query to list active oauth clients for a user
2014-09-22 08:42:33 -07:00
Girish Ramakrishnan
3fdfaa144c
nginx: redirect everything other than nginx_status
2014-09-22 08:07:21 -07:00
Girish Ramakrishnan
0698e5e8b7
Add legend to disk chart
2014-09-22 08:01:52 -07:00
Johannes Zellner
2075a47631
Actually use the oauth client scope for tokens we hand out
2014-09-22 07:59:03 -07:00
Johannes Zellner
0d1811561c
webadmin: add access token deletion action
2014-09-22 07:55:10 -07:00
Girish Ramakrishnan
c72fc8759e
Various fixes to graphing
2014-09-22 06:18:09 -07:00
Johannes Zellner
799b38061c
Make the create admin access token a WebAdmin token
2014-09-21 18:34:58 -07:00
Johannes Zellner
d9120146e1
webadmin: initial token list for settings panel
2014-09-21 18:17:31 -07:00
Johannes Zellner
975504b70a
Add token resource routes to list and delete tokens
2014-09-21 18:17:15 -07:00
Johannes Zellner
79649c4c76
Add tokendb.getByUserId()
2014-09-21 18:16:46 -07:00
Johannes Zellner
05ae667b7a
Fixup linter issues in tokendb
2014-09-21 18:16:46 -07:00
Girish Ramakrishnan
a492ba88cf
update graphs in Client.onReady
2014-09-21 18:06:48 -07:00
Girish Ramakrishnan
0567ba8867
Get started on graphs
2014-09-21 18:03:19 -07:00
Girish Ramakrishnan
1336c324cd
Add rickshaw from a240899625c2d83961b3e682cd77ab8e5199a866
2014-09-21 17:59:31 -07:00
Girish Ramakrishnan
32956cc8d7
Move proxy middleware definition
2014-09-21 17:59:31 -07:00
Johannes Zellner
3da1aedc60
webadmin: remove myapps views
2014-09-21 17:10:47 -07:00
Johannes Zellner
6867546dd5
Do not crash if creating a backup locally without aws config
2014-09-21 16:47:20 -07:00
Johannes Zellner
132571e359
webadmin: display installationState and installationProgress
2014-09-21 12:19:48 -07:00
Johannes Zellner
eb2d5f6207
webadmin: do not use angular helpers but do it the old way
...
This should fix the appdetails refresh
2014-09-21 11:41:45 -07:00
Girish Ramakrishnan
30c6a1b21e
Keep graphite urls open for testing
2014-09-20 11:17:44 -07:00
Girish Ramakrishnan
c50cdfd918
Make logs api protected
2014-09-19 23:42:53 -07:00
Girish Ramakrishnan
4d9091afab
Add graphite routes to nginx
2014-09-19 23:41:11 -07:00
Girish Ramakrishnan
da357efd9c
$timeout not used anymore
2014-09-19 23:00:30 -07:00
Girish Ramakrishnan
0e38a73395
Add /api/v1/graphs route
2014-09-19 19:59:32 -07:00
Johannes Zellner
1cd425bcb0
Ensure app install and get routes return similar objects
2014-09-19 17:52:31 -07:00
Girish Ramakrishnan
1cf1060d18
Make graphite/ calls authenticated
...
Fixes #82
2014-09-19 07:56:47 -07:00
Girish Ramakrishnan
bd96ad3c26
remove spurious log
2014-09-19 07:34:07 -07:00
Girish Ramakrishnan
b44a9cda05
Keep deps sorted
2014-09-19 07:32:19 -07:00
Girish Ramakrishnan
4e79aa44cc
Make docker proxy more robust
2014-09-19 07:29:15 -07:00
Girish Ramakrishnan
cfac836eb5
Enable the test
2014-09-19 00:53:35 -07:00
Girish Ramakrishnan
a92d961fc0
Add tests for logs and logStream
2014-09-19 00:47:03 -07:00
Girish Ramakrishnan
133f9fe56d
Implement log download
...
Fixes #83
2014-09-18 23:06:35 -07:00
Girish Ramakrishnan
5946c67dce
Bump test app version
2014-09-18 23:06:31 -07:00
Girish Ramakrishnan
52a572522e
Fix typo
2014-09-18 22:33:36 -07:00
Johannes Zellner
b1f8e581bf
Make bootstrap script an init script
2014-09-18 12:49:14 -07:00
Girish Ramakrishnan
7b4bca5d90
Append does not seem to work
2014-09-17 16:14:40 -07:00
Girish Ramakrishnan
ffa5fa335d
Add more debugs for testing
2014-09-17 16:12:29 -07:00
Girish Ramakrishnan
926dd8ae35
Escape $ since they are expanded in heredoc
2014-09-17 16:12:25 -07:00
Girish Ramakrishnan
bd74a364ce
Write logfiles with pid and also append
...
This will help confirm if the scripts are running twice for some
reason.
2014-09-17 15:05:46 -07:00
Girish Ramakrishnan
8b3ee3e0df
Make bootstrap run at the very end
2014-09-17 15:02:37 -07:00
Girish Ramakrishnan
89ccfe3895
move sync into initialization script
2014-09-17 15:01:59 -07:00
Girish Ramakrishnan
bd4c10f6d3
supervisor and nginx should never be running
2014-09-17 15:01:31 -07:00
Girish Ramakrishnan
37a8984d29
/var/log/cloudron should already exist at this point
2014-09-17 15:00:03 -07:00
Girish Ramakrishnan
10a7b6685d
Revert "Remove redirection, already redirected in bootstrap init.d script"
...
This reverts commit 45c771d6f8 .
2014-09-17 11:50:24 -07:00
Girish Ramakrishnan
db48b7ac0b
Looks like service makes the script terminate
2014-09-17 11:25:30 -07:00
Girish Ramakrishnan
45c771d6f8
Remove redirection, already redirected in bootstrap init.d script
...
(checking if this is the root cause of bootstrap.sh running twice)
2014-09-17 10:51:36 -07:00
Johannes Zellner
403c94e8df
Only unmount aufs filesystems if there are some
2014-09-17 10:21:05 -07:00
Girish Ramakrishnan
31cf9909d7
Enable and disable collectd appropriately
2014-09-17 10:05:13 -07:00
Girish Ramakrishnan
55ce1046df
Make script barf one error
2014-09-17 10:03:01 -07:00
Johannes Zellner
a6bcae1aa0
webadmin: add page offset and make tabs clickable for graphs
2014-09-17 09:39:05 -07:00
Girish Ramakrishnan
bbfe07ab91
Setup -> Install
2014-09-17 09:37:43 -07:00
Girish Ramakrishnan
8f7c4fa534
Attempt disk usage images
2014-09-17 00:16:54 -07:00
Girish Ramakrishnan
50668fd9c5
disable disk plugin which is measuring iops
2014-09-16 23:44:12 -07:00
Girish Ramakrishnan
567306f3b4
hardcode Hostname for predictable graphite targets
2014-09-16 23:21:51 -07:00
Girish Ramakrishnan
c07f493ca2
Display tab in graphs view
2014-09-16 20:39:00 -07:00
Girish Ramakrishnan
a7b4f816fb
Add graphs view filler
2014-09-16 19:06:44 -07:00
Girish Ramakrishnan
d5ac037ffc
bump the graphite docker version
2014-09-16 19:06:43 -07:00
Girish Ramakrishnan
92cf82af15
Monitor nginx logs using the tail plugin
...
I guess real analysis must be done using elasticsearch
2014-09-16 17:18:52 -07:00
Girish Ramakrishnan
0fd494f592
Remove dead configs in nginx config
2014-09-16 16:57:41 -07:00
Girish Ramakrishnan
85df77409b
Cleanup collectd.conf
2014-09-16 16:25:55 -07:00
Girish Ramakrishnan
77daac69c3
Update to latest graphite image
2014-09-16 16:23:38 -07:00
Girish Ramakrishnan
770acdf395
Make graphite data part of backup
2014-09-16 16:09:21 -07:00
Girish Ramakrishnan
86e7061819
collectd: configure df and disk
2014-09-16 12:04:44 -07:00
Girish Ramakrishnan
9bf5b1104e
collectd: Enable vmem plugin
2014-09-16 11:54:12 -07:00
Girish Ramakrishnan
20add2bee4
collectd: disable rrdtool
...
afaict, we don't need it since we use graphite as backend
2014-09-16 11:49:17 -07:00
Girish Ramakrishnan
e1ded03f1f
collectd: Enable collection of box process stats
2014-09-16 11:40:41 -07:00
Girish Ramakrishnan
f4c9c42859
collectd: enable swap space monitoring
2014-09-16 11:33:37 -07:00
Girish Ramakrishnan
52ff80f9bc
Enable collectd ping plugin
2014-09-16 11:29:05 -07:00
Girish Ramakrishnan
e4c891fff8
Enable nginx status in collectd
2014-09-16 11:25:52 -07:00
Girish Ramakrishnan
62cb58b5b1
Run docker in background
2014-09-16 08:05:25 -07:00
Girish Ramakrishnan
fc8a47774b
Remove girish/base:0.4
2014-09-15 22:16:04 -07:00
Girish Ramakrishnan
4e1ae532de
Move graphite to separate container
...
Only collectd needs to run in the host
2014-09-15 20:14:57 -07:00
Girish Ramakrishnan
7bb96f3523
Add collectd and graphite support to base image
2014-09-15 02:04:23 -07:00
Girish Ramakrishnan
c39d307bcc
Fix deps
2014-09-15 02:04:23 -07:00
Girish Ramakrishnan
b0e8625cab
Implement logs using ServerSent events
...
The hard lesson is that SSE sucks.
*) The cross-origin policy is not exactly well defined but this doesn't affect us
*) There is no way to set Authorization header and we have to rely on cookies
*) Have to use a polyfill to make work on IE
Also
*) timeout module does not close if headers are sent. So, it never closes SSE
*) nginx buffers responses until completion, so we have to disable that with X-Accel-Buffering header
The auth header basically means we have to move back to long polling or support
special auth just for SSE :-(
2014-09-13 01:51:22 -07:00
Girish Ramakrishnan
69c6d3a3fb
Bump test image version
2014-09-12 17:19:53 -07:00
Girish Ramakrishnan
779c6013d0
Add config.iconsRoot
2014-09-12 17:17:32 -07:00
Johannes Zellner
450530c95c
Add session logout for OAuth test suite
2014-09-12 12:06:14 -07:00
Johannes Zellner
9596671a64
Remove stray backslash
2014-09-12 12:02:23 -07:00
Johannes Zellner
a7ab2ddfe9
Remove unused OAuth token grant
2014-09-12 12:00:11 -07:00
Johannes Zellner
aa03287cc7
Add OAuth test suite to allow manual OAuth testing
2014-09-12 10:23:53 -07:00
Johannes Zellner
294059ff08
Only give out wildcard oauth scope to the webadmin
...
This will break our current other clients (quassel app and ngircd)
They now have to explicitly request the 'profile' scope and only that
2014-09-12 10:20:15 -07:00
Johannes Zellner
2a779fda6d
Do not crash if apps.uninitialize() is called twice
2014-09-12 08:59:14 -07:00
Johannes Zellner
01b87f80ef
Do not print the password in plaintext when DEBUG is set
2014-09-12 08:54:34 -07:00
Johannes Zellner
957c7a5efd
Introduce oauth scope to authcodes
2014-09-12 08:22:26 -07:00
Girish Ramakrishnan
3b08db3f4c
Display app logs
...
Note done completely. Needs autoscroll and some fixes in longpolling.
angular does not seem to provide chunked progress in ajax
2014-09-12 05:40:04 -07:00
Girish Ramakrishnan
4d2c5c14e7
Update node packages
...
From the output of npm outdated.
npm install underscore@* nodejs-disks@* js-yaml@* passport@* passport-oauth2-client-password@* --save
2014-09-12 04:32:56 -07:00
Girish Ramakrishnan
33c6516172
Update dockerode
2014-09-12 04:32:56 -07:00
Girish Ramakrishnan
3439dcf28c
Navigate to admin-localhost
2014-09-12 04:32:56 -07:00
Johannes Zellner
6a48b9ed10
The sudoers entry for scripts cannot contain spaces for ALL=(ALL)
2014-09-11 14:29:30 -07:00
Johannes Zellner
5f758b3d5e
Remove legacy support for auth_token and 'Token <tok>' in auth header
2014-09-11 08:43:32 -07:00
Johannes Zellner
a184e1fb01
Make bearer token verification implicit for scoped routes
2014-09-11 08:34:18 -07:00
Johannes Zellner
7292a23bab
Add oauth scopes for each scoped route
...
All tokens are still given out with the
wildcard scope. The syncer and file related
routes don't have scopes. As well as the
firsttime use and provisioning routes.
We now have the following scopes so far:
- root /api/v1/..
- profile /api/v1/profile
- users /api/v1/users/..
- apps /api/v1/apps/..
- settings /api/v1/settings/..
Each token can carry a comma separated list
of scopes, the token is good for.
2014-09-10 18:01:21 -07:00
Johannes Zellner
2c03aa275d
Allow to specify a redirect URL on session logout
2014-09-10 18:00:03 -07:00
Girish Ramakrishnan
a94b6956bb
Better error messages
2014-09-10 15:13:33 -07:00
Johannes Zellner
fc9a3b3511
Add OAuth scope testing middleware
2014-09-10 14:52:03 -07:00
Johannes Zellner
fbd658bf66
Use OAuth scope attached to the token to proceed
...
passport attaches the scope to req.authInfo, where we can pick it
up in other middlewares for verification
2014-09-10 13:14:50 -07:00
Johannes Zellner
d927a5b086
Remove unused tokendb.getByUserId
2014-09-10 12:57:41 -07:00
Johannes Zellner
a5d9871a75
Enforce and check deployment env argument for createDigitalOceanImage.sh
2014-09-10 11:51:56 -07:00
Johannes Zellner
05ed941973
Add some missing expect()s to database test
2014-09-10 11:48:16 -07:00
Johannes Zellner
9b1f51e932
Introduce OAuth scope field for tokens
...
All tokens are as before now good for each route.
The scope for that is "*"
2014-09-10 11:42:20 -07:00
Johannes Zellner
a532eecdc5
Remove unused require() in clientdb
2014-09-10 11:36:12 -07:00
Johannes Zellner
65f0992d55
Improve debug logging for OAuth routes
2014-09-10 09:15:37 -07:00
Johannes Zellner
3a183fbf64
Reorder routes in server.js to enhance visibility of what we have
2014-09-10 08:15:19 -07:00
Johannes Zellner
8938dc436b
Cleanup manifest resources on app uninstallation
2014-09-09 22:33:46 -07:00
Johannes Zellner
7ce61bcb1c
webadmin: cache also the title from the appstore on app installation
2014-09-09 22:12:39 -07:00
Johannes Zellner
095a3832fc
webadmin: don't rely on polling to get newly installed app
2014-09-09 22:02:25 -07:00
Johannes Zellner
98704f9fb9
Store installed app icons locally in data/icons
2014-09-09 21:36:11 -07:00
Johannes Zellner
a718e68892
Do not redefine 'error' and other minor things
2014-09-09 17:32:43 -07:00
Johannes Zellner
9af3e37fd0
Fixing more linter issues
2014-09-09 17:24:02 -07:00
Johannes Zellner
84f1305a96
webadmin: cleanup logout()
2014-09-09 16:45:11 -07:00
Johannes Zellner
215a22dd44
Remove noise from yellowtent.js
2014-09-09 16:39:59 -07:00
Johannes Zellner
ac5167461f
Remove /api/v1/token and adjust webadmin accordingly
2014-09-09 16:30:24 -07:00
Johannes Zellner
69cce25832
Add some /api/v1/config tests
2014-09-09 15:36:35 -07:00
Johannes Zellner
e260f55556
webadmin: angular needs special treatment for sending a json body with DELETE
2014-09-09 09:44:32 -07:00
Johannes Zellner
0355f26485
Reenable the logout route for the time being
2014-09-09 09:29:53 -07:00
Johannes Zellner
5a82cd7b17
Fixup webadmin's client.js to fit new /api/v1/users
2014-09-09 08:50:25 -07:00
Johannes Zellner
1cf9f86882
Fix apps tests for new /api/v1/users
2014-09-09 08:40:06 -07:00
Johannes Zellner
4726dba2df
Fix settings tests for new /api/v1/users
2014-09-09 08:33:49 -07:00
Johannes Zellner
5465df3e19
Fix volume tests for new /api/v1/users
2014-09-09 08:32:43 -07:00
Johannes Zellner
f186cc8917
Refactor the /api/v1/users routes
2014-09-09 08:29:17 -07:00
Johannes Zellner
4aaa55acdb
webadmin: append fqdn to app configuration form
2014-09-09 08:09:46 -07:00
Johannes Zellner
734abbd910
webadmin: append fqdn to app installation form
2014-09-09 08:03:33 -07:00
Johannes Zellner
7b038291ce
webadmin: fix refresh on app install view
2014-09-09 00:52:56 -07:00
Johannes Zellner
998a9ca962
Ensure we actually call the correct heartbeat URL
2014-09-08 08:30:24 -07:00
Johannes Zellner
31ff3c4ec0
Cleanup some linter issues
2014-09-08 08:20:42 -07:00
Johannes Zellner
882645afcf
Rely on heartbeat to notify appstore on restart
2014-09-08 08:13:22 -07:00
Johannes Zellner
d0c50e9580
Announce with config.fqdn instead of os.hostname()
...
This breaks one test but it's too late to fix the test
will do tomorrow
2014-09-07 22:52:42 -07:00
Johannes Zellner
75ea497711
Non 200 status codes on announce after reboot are ok
...
This happens when the cloudron itself rebooted and the
appstore had no clue of that. But in case the appstore
triggered the reboot, the cloudron will announce itself
and thus concludes a successful reboot
2014-09-07 22:14:08 -07:00
Johannes Zellner
938dd62a4a
The cloudron should announce itself once every restart
2014-09-07 21:48:04 -07:00
Johannes Zellner
7298e066ba
Add reboot route and webadmin UI
...
The reboot route will also be called from the reboot action
in the appstore to attmept a soft reboot, rather than a power
cycle.
2014-09-07 19:27:31 -07:00
Johannes Zellner
c1460f419e
webadmin: fix state bug in side panel during
2014-09-07 16:16:40 -07:00
Johannes Zellner
f8837ba284
webadmin: remove useless returns
2014-09-07 16:01:28 -07:00
Johannes Zellner
d02f498c2f
webadmin: ensure app details controller waits for Client to be ready
2014-09-07 15:46:11 -07:00
Johannes Zellner
b789395941
webadmin: ensure we display a fallback icon for apps in appstore
2014-09-07 14:20:29 -07:00
Johannes Zellner
1b90b5bb09
webadmin: remove some noisy console logs
2014-09-07 12:03:29 -07:00
Girish Ramakrishnan
9eece04682
Fix error when box does not app update information yet
2014-09-06 20:46:04 -07:00
Girish Ramakrishnan
f00ea968a9
Make apps resume on reboot
...
Add a new runState to mark apps that died by themselves (or by
the docker daemon).
Fixes #75
2014-09-06 20:19:42 -07:00
Girish Ramakrishnan
dcbba0f0e8
Use updateWithConstraints in setHealth
2014-09-06 20:12:25 -07:00
Girish Ramakrishnan
6811d1a380
Update app object only if update succeeded
2014-09-06 20:03:45 -07:00
Girish Ramakrishnan
c93863ef58
Create separate partition for docker images and appdata
...
This allows us to track their usage easily
Note that files created using dd/truncate are sparse files!
https://wiki.archlinux.org/index.php/sparse_file
Part of #72
2014-09-06 18:43:27 -07:00
Girish Ramakrishnan
0fa3f63673
Upgrade ubuntu as well
2014-09-06 18:43:27 -07:00
Girish Ramakrishnan
878b2ccfe9
Remove code that updates the box repo
...
This code was used previously when we used to run setup script
over and over again on same base image. This is not done anymore.
2014-09-06 18:43:27 -07:00
Girish Ramakrishnan
59623d783c
/etc/yellowtent is not used anymore
2014-09-06 18:43:27 -07:00
Johannes Zellner
665d7981d8
webadmin: add real form validation to password change
2014-09-06 11:32:44 -07:00
Johannes Zellner
77a8af452d
Set the proper angular app name in JS code
2014-09-06 10:57:57 -07:00
Girish Ramakrishnan
35015687f3
Set scrub_data=true when destroying droplet
...
This is set by default from what I understand but this is good to
set explicitly so we remeber this should we move away from DO.
https://github.com/fog/fog/issues/2525
https://www.digitalocean.com/company/blog/transparency-regarding-data-security/
2014-09-06 09:16:28 -07:00
Girish Ramakrishnan
16d9daa0bd
Rename YellowTent application to Application
2014-09-06 08:33:41 -07:00
Johannes Zellner
016a94b3a6
Add delay module as dev dependency
...
This is useful to simulate a slow network easily
and helps thus to debug our angular ui.
2014-09-05 17:52:35 -07:00
Johannes Zellner
a8b8603946
webadmin: hook up the admin flag toogle to the rest call
2014-09-05 17:38:40 -07:00
Johannes Zellner
0f4a114c8f
Add new route to set admin flag
...
We might want to consolidate the /user(s) routes at some point
2014-09-05 09:01:45 -07:00
Johannes Zellner
56c2de6c37
Add means to set the admin flag for users
2014-09-05 08:19:38 -07:00
Girish Ramakrishnan
b68603bbfd
Remove spurious log
2014-09-04 19:43:46 -07:00
Girish Ramakrishnan
5bc4e6e46f
exposeAs -> hostPort
2014-09-04 19:34:16 -07:00
Girish Ramakrishnan
95769661ac
Remove spurious debug
2014-09-04 19:30:18 -07:00
Girish Ramakrishnan
08c165d4a1
Release 0.3.0
2014-09-04 14:40:34 -07:00
Girish Ramakrishnan
d6cc39dd01
Fix VERSIONS.json
2014-09-04 14:37:53 -07:00
Girish Ramakrishnan
2705667546
make first argument the suffix
2014-09-04 14:33:56 -07:00
Girish Ramakrishnan
2d1a594453
tcp_ports -> tcpPorts
2014-09-04 12:09:36 -07:00
Girish Ramakrishnan
e2ab01339d
Pull in base:0.4 as well
2014-09-04 11:30:56 -07:00
Girish Ramakrishnan
785b021129
Backup every 4 hours
2014-09-04 07:19:45 -07:00
Girish Ramakrishnan
e8f7c74a0f
Compare against appStoreId
2014-09-03 23:28:53 -07:00
Girish Ramakrishnan
fd9d475c1e
Send appStoreId when querying updates
2014-09-03 22:54:13 -07:00
Girish Ramakrishnan
062313bfbc
Give up on json yet again
2014-09-03 20:23:19 -07:00
Girish Ramakrishnan
615b559652
Fix typo
2014-09-03 20:15:17 -07:00
Girish Ramakrishnan
a72de47c6e
In dev, use latest version
2014-09-03 20:10:05 -07:00
Girish Ramakrishnan
cefc7736db
Release 0.2.0
2014-09-03 19:51:39 -07:00
Girish Ramakrishnan
548e23cbbe
Update script may not exist for a version
...
In such a case, we just update the code
2014-09-03 19:46:06 -07:00
Girish Ramakrishnan
7905a572ab
config.js should always have the upcoming version
2014-09-03 19:46:00 -07:00
Girish Ramakrishnan
c2a3ceb22e
Use config.version instead of pkg.version
2014-09-03 19:39:44 -07:00
Girish Ramakrishnan
92c4ba2bbc
Pull specific version of base
2014-09-03 16:09:24 -07:00
Girish Ramakrishnan
b0ac3b5de0
Create version 0.1.0
...
Fix update script to call scripts using their version number
2014-09-03 15:55:43 -07:00
Girish Ramakrishnan
8352a6618c
Fix apptask states
...
Fixes #67
2014-09-03 15:07:42 -07:00
Girish Ramakrishnan
a76e891b5f
Add asserts
2014-09-03 14:52:01 -07:00
Girish Ramakrishnan
75c2d9df05
remove oauth credentials during installation
...
this is needed if an app that was pending install was aborted midway
and we attempt to install it again (for example, during restore/resume)
2014-09-03 14:04:49 -07:00
Girish Ramakrishnan
d3abc9c071
Only stopTask when committed in database
2014-09-03 11:00:21 -07:00
Girish Ramakrishnan
df5e6484e3
Add appdb.exists
2014-09-03 10:31:28 -07:00
Girish Ramakrishnan
b4cfb0214b
apptask: Do not kill existing task until the db operation succeeds
2014-09-03 10:05:35 -07:00
Girish Ramakrishnan
8408954f46
Restart nginx after update
2014-09-03 08:37:33 -07:00
Girish Ramakrishnan
c58f6f3253
Update the version in cloudron.conf in updater script
2014-09-03 08:32:50 -07:00
Girish Ramakrishnan
83bfb7d0f7
Stop the box before upgrade
...
This is required should the upgrade scripts do any db
manipulation, for example
2014-09-03 08:16:29 -07:00
Girish Ramakrishnan
bce609ed52
Make APPSTORE_URL configurable
...
Specify dev or alpha as first argument
2014-09-03 08:13:12 -07:00
Girish Ramakrishnan
4458dd4dfd
Add more apps tests
2014-09-03 07:56:42 -07:00
Girish Ramakrishnan
0d66bc5e3c
Add apps test
2014-09-02 16:03:34 -07:00
Girish Ramakrishnan
2355be222b
Query VERSIONS.json from git repo
2014-09-02 12:59:28 -07:00
Girish Ramakrishnan
182d5a9969
Rename boxUpdate to boxUpdateInfo
2014-09-02 11:17:46 -07:00
Girish Ramakrishnan
b0d220b409
rename updateInfo to appUpdateInfo
2014-09-02 11:15:40 -07:00
Girish Ramakrishnan
6378ad34e0
Use tag or sha1 in droplet and image name
...
Using branch name doesn't make much sense since branches can move
2014-09-02 10:53:33 -07:00
Girish Ramakrishnan
225e0959db
Add revision to snapshot name as well
2014-09-02 10:10:57 -07:00
Johannes Zellner
28b0b93363
Allow updates to origin/master on dev deployment
2014-09-01 12:52:25 -07:00
Johannes Zellner
09454012a7
Save new version after update in configuration
2014-09-01 12:38:34 -07:00
Johannes Zellner
e4789c27aa
Call the update.sh with the revsion argument
2014-09-01 12:38:16 -07:00
Johannes Zellner
5d3b828bb5
webadmin: Show update version and changelog in dialogs
2014-09-01 12:23:59 -07:00
Johannes Zellner
03c3d1d71f
Only send the show the next version for box updates
2014-09-01 12:11:27 -07:00
Johannes Zellner
60cf05e5c4
Make box and app update info available
2014-09-01 12:04:48 -07:00
Johannes Zellner
03d7ecf6ea
Add VERSIONS.json and make the update check on interval
2014-09-01 11:54:58 -07:00
Girish Ramakrishnan
3cfd2c5e26
droplets cannot have _ in box name
...
because _ is not valid subdomain
2014-08-29 13:54:06 -07:00
Girish Ramakrishnan
d6ecb4aa55
Allow creation of DO images for a specific revision
2014-08-29 13:25:56 -07:00
Girish Ramakrishnan
c192020a4b
Rename script
2014-08-29 11:05:58 -07:00
Girish Ramakrishnan
026f8694a4
Leave a note on why runState is reset
2014-08-28 14:42:32 -07:00
Girish Ramakrishnan
371ce2ca80
Fix openApp link in appstore view
2014-08-28 13:24:02 -07:00
Girish Ramakrishnan
553f401292
Allow multiple instances of apps
...
Fixes #68
2014-08-28 13:14:02 -07:00
Girish Ramakrishnan
a83572e561
Use path.join instead
2014-08-28 13:14:02 -07:00
Girish Ramakrishnan
e82997c412
app_id -> appId
...
we use camelCase everywhere
2014-08-28 11:32:23 -07:00
Girish Ramakrishnan
dfb23f2869
Do not use the object based binding
...
It's verbose
2014-08-28 11:25:51 -07:00
Girish Ramakrishnan
8e504773ab
Do not waste time with json -I -f
2014-08-28 08:58:30 -07:00
Girish Ramakrishnan
5bbcb9ff8c
Add the in-place replace flag
2014-08-28 08:44:01 -07:00
Johannes Zellner
642a92d485
Show nice error page if something goes wrong during OAuth
2014-08-28 08:19:00 -07:00
Girish Ramakrishnan
53b8ee26c9
Replacing token still does not work at times
2014-08-28 08:15:18 -07:00
Girish Ramakrishnan
7671af7b09
run the app when runState is null
...
The runState is null during restore. And also for the small time
immediately after the install of an app.
2014-08-28 03:36:40 -07:00
Girish Ramakrishnan
d5accd2858
Ignore 409 in subdomain registration
2014-08-28 03:32:59 -07:00
Girish Ramakrishnan
7d90646e11
Start containers after backup
2014-08-28 03:18:35 -07:00
Girish Ramakrishnan
9b760829ea
Move to different directory before replacing source dir
...
You get errors in the shell like below:
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
This is probably the reason why the json binary didn't work
2014-08-28 03:08:38 -07:00
Girish Ramakrishnan
ad1f14ba67
Log command line args for debugging
2014-08-28 02:35:12 -07:00
Girish Ramakrishnan
5ddbf27435
reset fields to null on restore
2014-08-28 02:14:28 -07:00
Girish Ramakrishnan
4d70600ef1
print the git revision
2014-08-28 01:55:05 -07:00
Girish Ramakrishnan
b23af68b59
Do not use json binary
...
Use a custom script instead
2014-08-28 01:30:48 -07:00
Girish Ramakrishnan
cb0a4a8ad8
Implement restore
...
The restore script set installation state as pending_restore for
all apps.
2014-08-27 23:30:56 -07:00
Girish Ramakrishnan
d3bc50bfe8
Disable hock.throwOnUnmatched
...
Without this, hock throws when the server makes queries for the appstore
(like the announce).
2014-08-27 23:12:47 -07:00
Girish Ramakrishnan
fd1b0fe8ce
Use startTask in resume
2014-08-27 23:05:14 -07:00
Girish Ramakrishnan
6eda87eb84
Separate out delete and create volume
2014-08-27 22:53:58 -07:00
Girish Ramakrishnan
6988bf1759
Remove extran line
2014-08-27 21:00:21 -07:00
Girish Ramakrishnan
3f9d7da260
Backup and restore the box code
2014-08-27 20:55:43 -07:00
Girish Ramakrishnan
b125ce1d2b
Install npm modules and chown ownership
2014-08-27 20:34:22 -07:00
Girish Ramakrishnan
967e6647de
ip is not part of config anymore
2014-08-27 19:57:02 -07:00
Girish Ramakrishnan
76d85b209a
Update bootstrap.sh to have the latest update.sh location
2014-08-27 19:16:53 -07:00
Girish Ramakrishnan
312dbd369c
Fix various bugs in appdb.setHealth
2014-08-27 19:08:08 -07:00
Girish Ramakrishnan
8600d3ec34
Show health icon based on app.healthy instead of runState
2014-08-27 18:24:27 -07:00
Girish Ramakrishnan
9c8b54f614
Move update scripts inside src/
...
The scripts/ dir is for helper scripts to be run by hand
The src/scripts dir is for scripts to be run by code
2014-08-27 18:03:48 -07:00
Girish Ramakrishnan
f21cb3716c
Fix typo
2014-08-27 17:57:19 -07:00
Girish Ramakrishnan
de8365c3ce
Detect IP locally so there is one less setting to fixup on restore
...
The appstore still send the IP across just in case
2014-08-27 17:48:55 -07:00
Girish Ramakrishnan
4516b8f408
Add TODO
2014-08-27 15:53:38 -07:00
Girish Ramakrishnan
c39689694e
Prefix private varibles with _
2014-08-27 14:13:36 -07:00
Girish Ramakrishnan
5b6f53824b
Clear backup timer when server stopped
2014-08-26 17:44:50 -07:00
Johannes Zellner
6724798de8
webadmin: prepare for adding and removing user as admins
2014-08-26 11:03:33 -07:00
Johannes Zellner
6b5b2f1686
Do not show app reconfiguration button if the app is not installed
2014-08-25 09:35:18 -07:00
Johannes Zellner
eb21b531b3
Do not fail during reconfiguration if there is no such container
2014-08-25 09:34:01 -07:00
Johannes Zellner
98a91c2b4f
Only install app if state is PENDING_INSTALL
2014-08-25 09:28:43 -07:00
Johannes Zellner
6a3350a54c
Do not make healthtask exit on error
2014-08-25 09:28:17 -07:00
Johannes Zellner
bf77f77b56
Also restart nginx after restore
2014-08-25 03:52:46 -07:00
Johannes Zellner
632b3c488c
Finally fix the token replacement
2014-08-25 03:38:01 -07:00
Johannes Zellner
23ca086e12
Fix token replacement
2014-08-25 03:22:17 -07:00
Girish Ramakrishnan
d8e556230c
Fix various bloopers in update code
2014-08-25 03:08:27 -07:00
Girish Ramakrishnan
883275ebc9
Fix typo
2014-08-25 03:08:27 -07:00
Girish Ramakrishnan
23a67e921e
Show update button only if a new version is available
2014-08-25 03:08:26 -07:00
Johannes Zellner
84cf457b4e
Fixup token replacement in restore.sh
2014-08-25 02:43:19 -07:00
Girish Ramakrishnan
e0625be396
webadmin: Add update button
2014-08-25 02:35:13 -07:00
Johannes Zellner
3549542c3d
Replace token with new value on restore
2014-08-25 02:09:36 -07:00
Girish Ramakrishnan
592742eaab
Add app update routes
2014-08-25 01:59:21 -07:00
Girish Ramakrishnan
b4b03bbe2a
config.update signals availability of box update
2014-08-25 01:51:49 -07:00
Girish Ramakrishnan
b3f26a78d5
Send appIds in boxupdate request
2014-08-25 01:47:34 -07:00
Girish Ramakrishnan
d76965c777
Use post for boxupdate queries
2014-08-25 01:12:56 -07:00
Girish Ramakrishnan
14f805fa47
Remove available
2014-08-25 01:09:58 -07:00
Johannes Zellner
1c56934a4d
When restoring finish request to appstore always for now
2014-08-25 00:51:17 -07:00
Girish Ramakrishnan
03e89699b9
appdb: add getAppVersions
2014-08-24 23:31:48 -07:00
Girish Ramakrishnan
d80ed67dd7
Implement app update
...
Part of #34
2014-08-24 23:17:41 -07:00
Girish Ramakrishnan
4f7fa7ea45
log to /var/log/cloudron/
2014-08-24 22:55:51 -07:00
Girish Ramakrishnan
ff575243dc
Save app version in apps table
2014-08-24 22:50:50 -07:00
Girish Ramakrishnan
ff2ae3a5f5
Update containerId in db after container deletion
2014-08-24 22:03:25 -07:00
Girish Ramakrishnan
7cc1888ff0
Use GLOB in sql query
...
GLOB is case-sensitive and uses shell matching
LIKE is case-insensitive and use % and _ instead of * and ?
2014-08-24 21:54:34 -07:00
Johannes Zellner
a3e98fa550
Make backup filename compatible with JS Date()
2014-08-24 20:51:16 -07:00
Girish Ramakrishnan
ceac771967
Remove unused file
2014-08-24 19:22:20 -07:00
Girish Ramakrishnan
930cbc071f
Implement restore script
2014-08-24 19:22:16 -07:00
Girish Ramakrishnan
ec4cd4a213
Update bootstrap scripts with path to new scripts dir
2014-08-24 17:44:12 -07:00
Girish Ramakrishnan
b718dd75f1
S3_BUCKET was mistakenly overriden
2014-08-24 17:40:25 -07:00
Girish Ramakrishnan
e672f13fd6
Move source scripts to src/scripts
2014-08-24 17:32:44 -07:00
Girish Ramakrishnan
501f2f54cd
Check for 304 in start/stop container
...
This is part of Docker rmeote API v1.13 to signal that the container
has not been modified (it's already in that state)
2014-08-24 17:18:48 -07:00
Girish Ramakrishnan
1c733b7fbb
Do not override PENDING states in db
...
The apphealthtask basically keep the database and the docker app
state in sync. But it should not overwrite any of the *_PENDING_*
commands which are commands from the REST API to the apptasj.
2014-08-24 16:37:46 -07:00
Girish Ramakrishnan
49e55b9dec
Return 409 for bad state
2014-08-24 16:20:00 -07:00
Girish Ramakrishnan
9c52d48046
Do not resume explicitly stopped apps
2014-08-24 16:18:31 -07:00
Johannes Zellner
7f21c675ff
Reduce noise when expecting an error in a test
2014-08-24 15:06:39 -07:00
Girish Ramakrishnan
c86ff884fa
Enable configure/start/stop buttons in the correct state
2014-08-24 14:58:09 -07:00
Johannes Zellner
2f8430526d
Add restore route
2014-08-24 14:56:25 -07:00
Johannes Zellner
deb7698a8a
Ensure provisioning route gets all needed aws credentials
2014-08-24 14:56:25 -07:00
Girish Ramakrishnan
790992d777
Mark app as running
2014-08-24 14:42:38 -07:00
Girish Ramakrishnan
cff35457fd
Start docker proxy before the app
2014-08-24 13:48:22 -07:00
Girish Ramakrishnan
c61f837a8d
Unset health in error or stopped state
2014-08-24 13:18:21 -07:00
Johannes Zellner
b609c6c4d7
webadmin: poll for box to come back alive after backup
2014-08-24 13:16:35 -07:00
Johannes Zellner
6a4c192d3e
Send empty object for backup route
2014-08-24 13:14:50 -07:00
Johannes Zellner
3280a8c975
Actually reset git in update
2014-08-24 13:11:54 -07:00
Johannes Zellner
bd0b5cde96
Fix the appdb JOINS
2014-08-24 13:01:43 -07:00
Johannes Zellner
d8b36dd342
webadmin: show modal dialog during backup
2014-08-24 12:08:03 -07:00
Johannes Zellner
c8a5ce118f
Remove unused unmountall.sh
2014-08-24 12:02:41 -07:00
Johannes Zellner
2548340659
Move update script execution to the Updater
2014-08-24 12:01:08 -07:00
Johannes Zellner
c480dd9862
webadmin: show backup button only when running on dev
2014-08-24 11:50:28 -07:00
Johannes Zellner
631bce8da0
Sync filesystems before we shutdown
2014-08-24 11:44:53 -07:00
Girish Ramakrishnan
58ad822841
Redirect backup output to logfile
2014-08-24 09:16:34 -07:00
Girish Ramakrishnan
e78dfedd9f
Schedule a backup every midnight
2014-08-24 04:42:16 -07:00
Johannes Zellner
609616b89b
Fix syntax error in bootstrap.sh
2014-08-24 04:39:11 -07:00
Girish Ramakrishnan
ad62bf95b0
Do not be cute with shell scripting
2014-08-24 04:33:25 -07:00
Girish Ramakrishnan
ae1e49824c
tar does not like absolute paths
2014-08-24 04:23:26 -07:00
Girish Ramakrishnan
b570a73f23
Give up on trying to teach sudo to preserve env
2014-08-24 04:12:39 -07:00
Johannes Zellner
accf4576f6
make create image script poll for droplet IP
2014-08-24 02:21:43 -07:00
Girish Ramakrishnan
32837e36ef
Implement backup
...
Fixes #32
2014-08-24 01:58:03 -07:00
Johannes Zellner
0ffe837c60
Allow bootstrap.sh to run as root without password
2014-08-24 01:39:55 -07:00
Johannes Zellner
d9d125468c
Log everything to /var/log/cloudron/
2014-08-24 01:38:57 -07:00
Girish Ramakrishnan
dd2a8e9224
Resume all docker apps on startup
...
Fixes #64
2014-08-23 21:24:37 -07:00
Girish Ramakrishnan
ad4285d55a
Send appId instead of id
2014-08-23 21:21:51 -07:00
Girish Ramakrishnan
68fdce4b67
Continue if oauth creds not found
2014-08-23 20:38:57 -07:00
Johannes Zellner
7b3f715fe4
webadmin: Fix typo in dev updater
2014-08-23 20:28:22 -07:00
Girish Ramakrishnan
894032e53c
Make configure and start btn-primary
2014-08-23 20:24:01 -07:00
Girish Ramakrishnan
d5c7ac1207
Ingore any unlink errors
...
Probably because the file does not exist in the first place
2014-08-23 20:19:14 -07:00
Girish Ramakrishnan
49af0ce6b6
do not barf if image/container was not found
2014-08-23 18:28:52 -07:00
Girish Ramakrishnan
e58ae3627a
console.error instead
2014-08-23 18:27:40 -07:00
Girish Ramakrishnan
4102350343
Adapt to new manifest format
2014-08-23 17:14:09 -07:00
Girish Ramakrishnan
20f8c74190
Implement a docker proxy to speed up the tests
2014-08-23 14:24:47 -07:00
Girish Ramakrishnan
323710f735
old nginx config can be removed
...
Should have been part of f51f0ff56c
Fixes #37
2014-08-23 12:48:06 -07:00
Girish Ramakrishnan
327b198f33
Register and unregister subdomain with appId
2014-08-23 12:42:10 -07:00
Johannes Zellner
056e70ff78
webadmin: remove appstore list flickering and mark installed apps
2014-08-23 12:07:04 -07:00
Girish Ramakrishnan
f51f0ff56c
Generate nginx configs based on appid instead of location
...
Part of #37
This lets us not remember the old location (for removal)
2014-08-23 12:04:54 -07:00
Girish Ramakrishnan
e9996d3eb2
Remove installationState arg from appdb.add
...
Always add with pending install state
2014-08-23 11:40:07 -07:00
Girish Ramakrishnan
565d8844ca
Fix bugs in appdb.update
2014-08-23 11:23:53 -07:00
Girish Ramakrishnan
ba3d8ba6d2
Fix tests
2014-08-23 11:04:29 -07:00
Girish Ramakrishnan
bed631123f
installationProgress can be null
2014-08-23 11:02:16 -07:00
Girish Ramakrishnan
42740638c8
Fix typo
2014-08-23 10:59:13 -07:00
Girish Ramakrishnan
602bae1af5
webadmin: Rename applist to appstore
2014-08-23 10:48:51 -07:00
Girish Ramakrishnan
3f1f2517d6
Make uninstall fail if any of the steps fail
2014-08-23 10:15:51 -07:00
Girish Ramakrishnan
7a5722f04d
Add installationProgress field to indicate progress
2014-08-23 10:07:29 -07:00
Girish Ramakrishnan
0d05f34aca
Display configure button on error or installed
2014-08-23 09:54:35 -07:00
Girish Ramakrishnan
4ff9c9547d
Make portBindings part of app object
2014-08-23 09:26:59 -07:00
Girish Ramakrishnan
9e5cc01141
Implement app reconfiguration
...
We need to store the old location somewhere to delete the old
nginx config correctly
2014-08-23 09:16:35 -07:00
Girish Ramakrishnan
117dba4196
Fix suggested_locations
2014-08-23 08:22:09 -07:00
Johannes Zellner
df0acac2a9
webadmin: Show update button when update is available
2014-08-23 04:33:10 -07:00
Girish Ramakrishnan
90c81a4cb4
Refactor apptask
2014-08-23 04:04:28 -07:00
Johannes Zellner
49d65c3b42
Add Updater to query the appstore for new box versions
2014-08-23 02:33:35 -07:00
Girish Ramakrishnan
112946c3ce
Make portBindings a simple map of container -> host port
2014-08-23 02:11:34 -07:00
Johannes Zellner
19c4122289
Do not stringify the Error object
2014-08-23 01:51:22 -07:00
Girish Ramakrishnan
1f2a07a67d
Rename exposeAs to hostPort
2014-08-23 00:50:56 -07:00
Girish Ramakrishnan
92d1aebe40
Make healthy a separate bit in the database
...
Do not alter the run state
2014-08-23 00:10:59 -07:00
Girish Ramakrishnan
72c06d5774
Return port bindings as part of app object
2014-08-22 23:55:50 -07:00
Girish Ramakrishnan
119917529f
webadmin: Rename appconfigure to appinstall
2014-08-22 11:44:11 -07:00
Johannes Zellner
615e6a1d6b
webadmin: hide UI when update is in progress
2014-08-22 08:34:50 -07:00
Johannes Zellner
4b51dbef54
deliver latest git revision and show in webadmin
2014-08-22 08:25:26 -07:00
Johannes Zellner
4e7b017bb5
Store provisioned IP in config.js
2014-08-22 07:40:23 -07:00
Johannes Zellner
8b4a4b052d
explicitly run with /bin/bash
2014-08-22 07:32:57 -07:00
Johannes Zellner
e2ca2c9b24
webadmin: hide actions if unprivileged user
2014-08-22 07:27:43 -07:00
Johannes Zellner
7eaac0e7ae
Add basic update.sh
2014-08-22 07:16:21 -07:00
Girish Ramakrishnan
8de4062cc4
Add UI to start/stop apps
2014-08-21 22:28:54 -07:00
Girish Ramakrishnan
e63172ad57
Do not require passwords for start, stop app routes
...
Disable it for the moment
2014-08-21 22:20:28 -07:00
Girish Ramakrishnan
2fd90a9a2a
Add route to start and stop apps
2014-08-21 20:43:23 -07:00
Girish Ramakrishnan
8ae5a662f9
apptask: Update to ISTATE_ERROR in install
2014-08-21 18:04:27 -07:00
Johannes Zellner
1c343de3d4
webadmin: do not travel to /dashboard when attempting to logout
2014-08-21 16:39:15 -07:00
Johannes Zellner
62d6d2fa27
webadmin: fade content views
2014-08-21 16:33:43 -07:00
Johannes Zellner
17b0497411
webadmin: refresh user list after user deletion
2014-08-21 16:23:07 -07:00
Johannes Zellner
d059354631
webadmin: show userlist after usercreation
2014-08-21 16:21:13 -07:00
Johannes Zellner
1a3e269749
webadmin: remove acute combo box plugin
2014-08-21 15:45:46 -07:00
Johannes Zellner
ac51ab46fd
webadmin: remove unused splash view
2014-08-21 15:40:02 -07:00
Johannes Zellner
209e8b01fc
webadmin: remove spin.js
2014-08-21 15:38:37 -07:00
Johannes Zellner
41f9885f69
webadmin: move script includes to the top
2014-08-21 15:34:26 -07:00
Johannes Zellner
687abe4f3b
webadmin: remove unused angularjs ui.bootstrap
2014-08-21 15:32:15 -07:00
Johannes Zellner
dcde3a07b6
webadmin: add basic user creation
2014-08-21 14:28:22 -07:00
Johannes Zellner
b06b8df746
webadmin: add user deletion dialog
2014-08-21 14:09:26 -07:00
Johannes Zellner
e81f42f508
webadmin: Enable userlist view
2014-08-21 11:49:03 -07:00
Girish Ramakrishnan
422f6d4981
Display app title in configure screen
2014-08-21 08:41:27 -07:00
Girish Ramakrishnan
b08b0a5494
Change cert generation dir
2014-08-20 01:54:39 -07:00
Girish Ramakrishnan
df63793c61
Change naming convention of files under cert/*.
...
Follow the naming convention as used in provisioning by appstore:
host.cert = public cert
host.info = textual output
host.key = private key
host.pem = key file and cert file combined into one
2014-08-20 01:35:56 -07:00
Girish Ramakrishnan
525aa523ff
Copy over nginx setup code from scripts/bootstrap.sh
...
Copying nginx/* from source repo copies over a lots of other files
2014-08-20 00:49:42 -07:00
Girish Ramakrishnan
79a06beb4f
generate admin.conf from template
...
6fe11f869a broke it probably
2014-08-20 00:45:42 -07:00
Girish Ramakrishnan
f302062306
Move nginx cert dir to be under backup dir
2014-08-20 00:34:02 -07:00
Girish Ramakrishnan
f46f1e3154
Remove any existing volume from a previous bad uninstall
2014-08-19 23:31:38 -07:00
Girish Ramakrishnan
30fad2d889
Access app.manifest carefully
...
manifest may not be valid if download of manifest had failed
2014-08-19 23:18:27 -07:00
Girish Ramakrishnan
aa2f07ae63
Increase counter to make it pass consistently
2014-08-19 23:17:29 -07:00
Girish Ramakrishnan
664d0e652c
Update README
...
Setting hostname or FQDN is not needed anymore after 6fe11f8
2014-08-19 23:07:02 -07:00
Johannes Zellner
32dc09649f
Fix this/that typo
2014-08-19 22:31:21 -07:00
Johannes Zellner
5d5b824883
Do not use FQDN setting as a token...
...
...when announcing the cloudron with the appstore server
2014-08-19 22:20:26 -07:00
Johannes Zellner
6fe11f869a
Do not depend on os.hostname() for fqdn
...
The non provisioned boxes will always be configured
to work on localhost. This includes the webadmin OAuth
records. After the cloudron gets provisioned, the FQDN
will be set to the correct value, which requires regeneration
of the OAuth client records.
2014-08-19 22:05:50 -07:00
Girish Ramakrishnan
4994325a79
Don't set NODE_TLS_REJECT_UNAUTHORIZED
...
The issue had to do with intermediate cert installation
See 9009d98c4f392 in appstore
2014-08-19 18:46:55 -07:00
Girish Ramakrishnan
c816861530
Pick specific properties to be set in config
2014-08-19 18:45:36 -07:00
Girish Ramakrishnan
349436aa66
Add underscore
2014-08-19 18:43:49 -07:00
Girish Ramakrishnan
74403385b9
Increase announce timer retry interval
...
5 seconds is way too often
2014-08-19 18:39:23 -07:00
Johannes Zellner
f0a349710b
Verify clientId with clientSecret instead of appId with clientSecret
2014-08-19 16:29:43 -07:00
Girish Ramakrishnan
1e7f806a11
Setup oauth variables when creating container
...
APP_ORIGIN
The origin of the app. Like https://foo-box.domain.com
The box cannot use os.hostname(). This is because docker sets up
the container's hostname() to be just the host name (and not FQDN)
and node uses gethostbyname(). This is simply a convenience instead
of executing hostname -f.
ADMIN_ORIGIN
The origin of the box admin. Like https://admin-box.domain.com
OAUTH_CLIENT_ID
OAUTH_CLIENT_SECRET
Self explanatory oauth variables
Part of #47
2014-08-19 12:47:14 -07:00
Johannes Zellner
dd1ceeed2f
Fix makeDocs.sh
2014-08-19 11:28:44 -07:00
Johannes Zellner
affa254b41
Some more linter cleanups
2014-08-19 09:36:39 -07:00
Johannes Zellner
8fe325e3bb
Some linter cleanups
2014-08-19 09:33:57 -07:00
Johannes Zellner
4386c9033c
Allocate OAuth credentials for apps during installation
2014-08-19 09:31:09 -07:00
Johannes Zellner
4fa693de8b
webadmin: Move script tags back to the page header
2014-08-18 08:03:00 -07:00
Johannes Zellner
b4117f320b
Add 'ip' to config.js
2014-08-17 18:09:55 -07:00
Johannes Zellner
5fe37b1dff
Use HttpError for update route
2014-08-17 18:09:53 -07:00
Johannes Zellner
96e609dbc5
Reload webadmin after update
2014-08-17 18:09:36 -07:00
Johannes Zellner
2c9e3b9b5d
Fix typo for progress dialog
2014-08-17 17:46:54 -07:00
Johannes Zellner
dbf5c7f6fe
Add in-progress modal dialog during update
2014-08-17 17:42:10 -07:00
Johannes Zellner
2040409968
Show IP address in settings panel
2014-08-17 17:29:55 -07:00
Johannes Zellner
911ef5f4bf
Add some basic git based update route
2014-08-17 17:29:49 -07:00
Johannes Zellner
7e27c96b67
Fixup the icon url for apps
2014-08-17 16:51:30 -07:00
Girish Ramakrishnan
6da1e829f3
Adjust routes to match new appstore routes
...
Part of #29
2014-08-13 17:02:18 -07:00
Girish Ramakrishnan
ae9819848b
Reverse the arguments in DatabaseError
2014-08-13 15:46:47 -07:00
Girish Ramakrishnan
a737e6d1a4
Move business logic + validation from routes code to apps.js
...
Part of #57
2014-08-13 15:17:01 -07:00
Girish Ramakrishnan
cf748fe501
Do not use db directly in routes
...
Part of #57
2014-08-13 14:32:46 -07:00
Girish Ramakrishnan
ed28afdb78
Change name of droplet on each run
2014-08-12 18:05:48 -07:00
Girish Ramakrishnan
59f2f48c14
Fix path to script
2014-08-12 18:03:38 -07:00
Girish Ramakrishnan
becda1274f
Fix path to ssh keys
2014-08-12 17:45:16 -07:00
Girish Ramakrishnan
62cde20fc2
Better shell scripting
2014-08-12 17:30:48 -07:00
Girish Ramakrishnan
7fc0fd0b9b
From appstore repo
2014-08-12 16:56:06 -07:00
Girish Ramakrishnan
2684264e3f
Finish base image creation script
2014-08-12 16:21:05 -07:00
Girish Ramakrishnan
f6ad431936
chmod +x nsenter
2014-08-11 18:39:55 -07:00
Girish Ramakrishnan
8c04c94465
Automate createBaseUbuntuImage
2014-08-11 18:09:12 -07:00
Johannes Zellner
393fa560c9
Add unit test for stats route
2014-08-11 17:58:46 -07:00
Johannes Zellner
435f6748ec
webadmin: make sure the forms have input focus
2014-08-11 17:48:49 -07:00
Johannes Zellner
1eac153ab2
webadmin: add loading indicator for appstore view
2014-08-11 17:26:19 -07:00
Johannes Zellner
2a852d4ad3
webadmin: add more installation states
2014-08-11 17:13:58 -07:00
Johannes Zellner
0abc418ea0
webadmin: show appicon in app details view
2014-08-11 16:51:29 -07:00
Johannes Zellner
ebf33288cf
Add server stat route
2014-08-11 16:48:27 -07:00
Johannes Zellner
dcaabc6303
webadmin: Add angular filter for app installation states
2014-08-11 16:31:03 -07:00
Johannes Zellner
6df1f27b57
webadmin: rename the main page to Cloudron Webadmin
2014-08-11 16:05:12 -07:00
Girish Ramakrishnan
0d3bfb7cd1
Install nsenter
...
Fixes appstore's issue 10
2014-08-11 13:57:49 -07:00
Girish Ramakrishnan
819fd06beb
Set the content-type explicitly to javascript
...
Otherwise it is set to html and you get an error like so:
Resource interpreted as Script but transferred with MIME type text/html: "https://admin-hash.cloudron.us/api/v1/oauth/yellowtent.js ".
2014-08-11 13:45:19 -07:00
Johannes Zellner
f9c8026091
webadmin: add modal confirm dialog for app deletion
2014-08-11 11:03:41 -07:00
Johannes Zellner
1af9dadad2
Revert "Locally the appstore is running on non ssl"
...
This reverts commit c609848281 .
2014-08-11 10:37:00 -07:00
Johannes Zellner
b905ad2c2f
webadmin: add more details for installed apps
2014-08-10 23:49:13 -07:00
Johannes Zellner
72bafc8397
webadmin: Add a placeholder dashboard
2014-08-10 23:28:26 -07:00
Johannes Zellner
3dbd44109e
webadmin: no need to explicitly creating a new row
2014-08-10 23:08:56 -07:00
Girish Ramakrishnan
81d237038b
X-Originating-IP is some email header
...
X-Forwarded-For gives the address of the client which connected to the proxy
X-Forwarded-Port gives the port the client connected to on the proxy (e.g. 80 or 443)
X-Forwarded-Proto gives the protocol the client used to connect to the proxy (http or https)
X-Forwarded-Host gives the content of the Host header the client sent to the proxy.
I am not sure if rewriting Host header to $host is a good idea.
2014-08-10 22:57:07 -07:00
Girish Ramakrishnan
af400a038e
Set various proxy headers in nginx config
...
These headers are required for apps like wordpress to figure the
site url. It is not clear why they do not just use relative urls.
http://cmanios.wordpress.com/2014/04/12/nginx-https-reverse-proxy-to-wordpress-with-apache-http-and-different-port/
2014-08-10 22:31:42 -07:00
Johannes Zellner
4ec9e6d3ca
webadmin: show installed apps count and add placeholder if 0
2014-08-10 19:01:13 -07:00
Johannes Zellner
6488675193
webadmin: redirect to apps details during installation
2014-08-10 18:56:37 -07:00
Johannes Zellner
5851f43672
webadmin: add an appdetails view and show apps in the menu
2014-08-10 18:44:25 -07:00
Girish Ramakrishnan
6b84b8fdf4
webadmin: Port bindings are not passwords
2014-08-10 17:17:28 -07:00
Girish Ramakrishnan
892a42f190
webadmin: fix downloading of manifest
2014-08-10 16:53:55 -07:00
Johannes Zellner
3e052175a3
webadmin: style app configuration form
2014-08-10 16:54:49 -07:00
Johannes Zellner
833e58d00f
webadmin: Only show 'No Apps available' when we finished retrieving the apps
2014-08-10 12:49:08 -07:00
Johannes Zellner
f06746ae6d
webadmin: restyle appstore gridview
...
Bootstrap seems to work just fine with wrapping the elements
depending on the window size, even though we will exceed the 12
column limit
2014-08-10 12:22:24 -07:00
Johannes Zellner
c609848281
Locally the appstore is running on non ssl
2014-08-10 12:20:39 -07:00
Johannes Zellner
a3511c7a47
webadmin: Remove unused function and properties from the Client
2014-08-09 22:56:11 -07:00
Johannes Zellner
cec3902cbb
webadmin: some cleanup for setup.html
2014-08-09 22:45:52 -07:00
Johannes Zellner
8172fe923f
Set viewport meta tag for OAuth views
2014-08-09 22:39:41 -07:00
Johannes Zellner
f9981683b7
webadmin: enable settings link in profile menu
2014-08-09 22:20:28 -07:00
Johannes Zellner
afdb739b59
webadmin: add main content animation stub
2014-08-09 22:18:15 -07:00
Johannes Zellner
d61d046977
webadmin: show username in navbar
2014-08-09 21:53:12 -07:00
Johannes Zellner
794ecc8347
Only show webadmin UI when MainController has finished initialization
2014-08-09 21:51:39 -07:00
Johannes Zellner
dd232e17ea
Make admin creation on first time a independent setup step
2014-08-09 21:33:55 -07:00
Johannes Zellner
471291261b
Style password change form
2014-08-09 21:10:23 -07:00
Johannes Zellner
ab8ef07f84
Fix settings page refresh and style it according to bootstrap theme
2014-08-09 21:06:08 -07:00
Johannes Zellner
6b5c6679bd
Make use more use of the bootstrap theme's styles for form and buttons
2014-08-09 20:10:55 -07:00
Johannes Zellner
cd8eb63acf
Remove unused assets for webadmin and OAuth views
2014-08-09 20:10:36 -07:00
Johannes Zellner
dab348ee6b
Use sb-admin also in OAuth views
2014-08-09 19:30:05 -07:00
Johannes Zellner
c4b3e680a9
Add missing /api/v1/ route prefix
2014-08-09 13:29:52 -07:00
Johannes Zellner
3b0326a69f
Run npm install as user with HOME set for that user
2014-08-09 13:12:11 -07:00
Johannes Zellner
98e2bab53d
Support https appstore urls when fetching certificate
2014-08-09 13:00:17 -07:00
Johannes Zellner
9d77aa3cbd
Fix some linter issues of unused requires
2014-08-09 12:54:49 -07:00
Johannes Zellner
17bec272ab
Add fetching certificate from appstore and restart nginx
2014-08-09 12:54:02 -07:00
Girish Ramakrishnan
19922de374
Bump test app version
2014-08-09 10:31:30 -07:00
Girish Ramakrishnan
e002fa99aa
Remove docker image on app removal
...
Fixes #55
2014-08-08 21:24:39 -07:00
Girish Ramakrishnan
e1935309e0
Fix typo
2014-08-08 19:01:38 -07:00
Girish Ramakrishnan
16a650f65e
Pull all base docker images
2014-08-08 13:19:54 -07:00
Girish Ramakrishnan
e6fa61f76a
Template the admin and app config files with srcdir
2014-08-07 18:02:02 -07:00
Girish Ramakrishnan
6b6be410fd
Change nginx prefix directory
2014-08-07 17:00:18 -07:00
Girish Ramakrishnan
b0139a3be0
pidfile and logfile are required for ubuntu scripts
2014-08-07 15:43:25 -07:00
Girish Ramakrishnan
c83545a2b7
Install rcconf
2014-08-07 15:40:06 -07:00
Johannes Zellner
d19094202b
Fix typo to create the supervisor log folder
2014-08-07 15:35:31 -07:00
Girish Ramakrishnan
5f7d67655b
Store log to persistent storage
2014-08-07 15:00:54 -07:00
Girish Ramakrishnan
d01398e460
Fix some bloopers
...
set -e has already done
Just skip checkout altogether
2014-08-07 12:10:07 -07:00
Girish Ramakrishnan
bfb1e584bf
Copy mime.types to nginx configuration
2014-08-07 11:55:53 -07:00
Girish Ramakrishnan
fa10e77def
Do not start supervisor automatically
...
The bootstrap.sh script enables it after it's done configuring
supervisor
2014-08-07 11:53:02 -07:00
Girish Ramakrishnan
3424e51ba4
Give name to checkout branch
2014-08-07 11:46:00 -07:00
Girish Ramakrishnan
de2cc8a905
Run npm install as yellowtent user
2014-08-07 11:31:17 -07:00
Girish Ramakrishnan
fab5e40aae
Make scripts error out automatically
2014-08-07 11:27:48 -07:00
Girish Ramakrishnan
f3f4731a04
Update the code as yellowtent user
2014-08-07 11:23:54 -07:00
Girish Ramakrishnan
a280ff77f1
sudoers file is already setup in bootstrap.sh
2014-08-07 11:18:50 -07:00
Girish Ramakrishnan
04f33d365e
Rename BASEDIR to SRCDIR
2014-08-07 10:59:25 -07:00
Girish Ramakrishnan
f7b49d1449
Fix typo
2014-08-07 10:59:24 -07:00
Girish Ramakrishnan
38c5b94449
Update README with notes for creating box images
2014-08-07 10:51:07 -07:00
Girish Ramakrishnan
1c8cdc1f31
Move nginx files away from repo
...
Fixes #52
2014-08-07 06:22:12 -07:00
Girish Ramakrishnan
f406f873d0
Alias ~/.yellowtent as BACKUP_DIR
2014-08-07 06:17:52 -07:00
Girish Ramakrishnan
09a7e6244b
Rename BASEDIR to SRCDIR
2014-08-07 06:13:44 -07:00
Girish Ramakrishnan
0e7648be50
coding style: use camel case
2014-08-07 06:04:18 -07:00
Johannes Zellner
e30445b4c4
Make better use of Error objects
2014-08-06 22:46:41 -07:00
Johannes Zellner
3257d2ed98
Fixup apps test for changed subdomains REST API
2014-08-06 22:46:28 -07:00
Johannes Zellner
d50aaa0429
No need to stringify Error objects
...
The stringify actually looses information.
2014-08-06 22:16:19 -07:00
Johannes Zellner
427b270ca1
Use console.error() instead of debug() if we have an error
2014-08-06 22:04:52 -07:00
Johannes Zellner
68372e9b3e
Only log box* with debug() when deployed
2014-08-06 21:52:13 -07:00
Johannes Zellner
4ddf83f3f9
Fixup linter issues
2014-08-06 21:34:54 -07:00
Johannes Zellner
3ae937b516
/api/v1/subdomains/ route now contains an s
2014-08-06 21:31:59 -07:00
Johannes Zellner
8d9a0189bb
Use new supererror
2014-08-06 20:34:42 -07:00
Girish Ramakrishnan
b6be2997f3
Fix logs
...
fixes #54
2014-08-06 19:35:34 -07:00
Girish Ramakrishnan
785d19f0af
Simplify announce test
2014-08-06 18:41:23 -07:00
Girish Ramakrishnan
d166b0fbd4
Add tests for config.js
2014-08-06 16:10:39 -07:00
Girish Ramakrishnan
93a6d5f886
TODO: add config tests
2014-08-06 15:51:45 -07:00
Girish Ramakrishnan
7a3285369a
Announce repeatedy until successful
...
Fixes #51
2014-08-06 12:51:38 -07:00
Girish Ramakrishnan
49579da5b3
Tweak various timeouts to make the tests pass consistently
...
An option is to disable docker.pull during tests
2014-08-06 11:29:44 -07:00
Johannes Zellner
2cc774f956
Update shrinkwrap file
2014-08-06 09:26:12 -07:00
Girish Ramakrishnan
6e7869ef3b
Check config.token to verify if already provisioned
2014-08-06 07:25:11 -07:00
Girish Ramakrishnan
dcbc632ba9
Remove settingsdb
...
We now use config as our key/value store
A nice side-effect is that this makes get-test-set atomic.
2014-08-05 15:58:31 -07:00
Girish Ramakrishnan
91b999cadd
Move all config data back to a json file
...
We used to have a yellowtent.conf previously. This change moves back to
the old pattern except the file is called cloudron.conf.
- naked_domain hack is not needed in config.js
- We can load the config.js synchronously and without db being initialized
- works better multiprocess. Initially, I thought I can just pass the config as
command line or child_process.send() and use the config in apptask. But, apptask
uses database code which uses config.js. This means then that we either pass
config around everywhere or we have a config.load() which is asynchronous.
Eventually: we remove settingsdb as well
Probably fixes #50
2014-08-05 15:11:49 -07:00
Girish Ramakrishnan
3f6fa46226
Add db error handlers
2014-08-05 15:11:49 -07:00
Girish Ramakrishnan
27a6eb69f3
Merge box stdout and stderr logs
2014-08-05 15:11:49 -07:00
Johannes Zellner
2f8ca758b5
Adjust to use new boxes announce REST api
2014-08-05 15:00:48 -07:00
Girish Ramakrishnan
ffdff37476
Add test for port bindings
2014-08-05 08:24:20 -07:00
Johannes Zellner
1a83225983
Add empty naked_domain config variable in config.js
2014-08-05 07:42:02 -07:00
Johannes Zellner
4fc3bb9f38
Let us know which config key triggered the assert
2014-08-05 07:36:39 -07:00
Johannes Zellner
c7aa8a7fc4
Make APP_SERVER_URL explicitly only used for production mode
2014-08-05 07:16:57 -07:00
Girish Ramakrishnan
5804d6d78a
Close the hock server in cleanup
2014-08-05 07:08:54 -07:00
Johannes Zellner
593f4a7fad
Fixup some linter issues
2014-08-05 06:59:10 -07:00
Girish Ramakrishnan
0d1a5a4b6d
Test subdomain registation and unregistration
...
Fixes #30
2014-08-05 04:43:58 -07:00
Girish Ramakrishnan
fbad5317e5
More apptask tests
...
Part of #30
2014-08-05 04:15:46 -07:00
Girish Ramakrishnan
eb3d2deacf
Remove unnecessary testcase
2014-08-05 03:35:27 -07:00
Johannes Zellner
8074d3bb94
Fix wrong usage of settingsdb result
2014-08-04 23:53:53 -07:00
Johannes Zellner
0850e6ca2d
Replace last occasions of appstoreOrigin with appServerUrl
2014-08-04 23:31:14 -07:00
Johannes Zellner
dd619a258d
Swap supervisor config file names
2014-08-04 23:28:35 -07:00
Johannes Zellner
19afa8f5f1
Remove any system provided supervisor configs
2014-08-04 22:23:24 -07:00
Johannes Zellner
15bd1c7eb3
Create nginx and box supervisor manifests during bootstrap
...
Previously we were linking the supervisor config
directory into /etc/supervisor and using template manifests,
which got changed during bootstrapping. In order to avoid
changing files in the git repository and more harder to
follow 'sed's the bootstrap.sh now simply creates those files
directly with appropriate values.
This also eliminates the yellowtent.json, as those values
are now passed via the process.env, set in the supervisor
manifest for the box
2014-08-04 21:50:38 -07:00
Girish Ramakrishnan
81110fd673
test: check that app is running
...
part of #30
2014-08-04 20:17:00 -07:00
Girish Ramakrishnan
a1b7bf628c
Test app installation
...
Part of #30
The test requires docker to be running
2014-08-04 19:20:20 -07:00
Girish Ramakrishnan
9d3d130d31
Make reloadnginx.sh always return 0 for the tests
2014-08-04 17:44:26 -07:00
Girish Ramakrishnan
7844b5bc52
Initial version of app installation test
...
Part of #30
The actual app installation itself cannot be verified because
nock does not work across processes (apptask is run as a separate
process).
2014-08-04 14:07:22 -07:00
Girish Ramakrishnan
9ab960d7ed
Add tests for setting/unsetting naked domain
2014-08-04 14:02:12 -07:00
Girish Ramakrishnan
2ce9167792
Add sinon as dependancy
2014-08-04 12:02:46 -07:00
Girish Ramakrishnan
d4e3418c1d
Add tests for settings route
2014-08-04 11:48:55 -07:00
Girish Ramakrishnan
9c8bb1c771
Add comment on the purpose of BASE_DIR env var
2014-08-04 10:59:21 -07:00
Girish Ramakrishnan
9bb3b5540b
doc: add comment on webadmin oauth client insertion
2014-08-04 10:53:20 -07:00
Girish Ramakrishnan
89932532a2
Ensure each item added to config has been set in config.js
2014-08-04 10:40:40 -07:00
Girish Ramakrishnan
22bb5778aa
Remove awkwardly named initialize2
2014-08-04 10:35:13 -07:00
Girish Ramakrishnan
c5f4077795
Let routes code require config.js directly
2014-08-04 10:31:42 -07:00
Girish Ramakrishnan
49bb6bcbdb
Close database on exit
2014-08-04 10:16:50 -07:00
Girish Ramakrishnan
0b38cf5d45
database.create also initializes database
2014-08-04 10:14:00 -07:00
Girish Ramakrishnan
d59d2b9516
Let tables use database module directly
...
- solves circular dependancy
- do not have to init each and every table code
- allows database to do pooling smartly
2014-08-04 08:25:15 -07:00
Girish Ramakrishnan
af73d975bd
doc: routes/apps
2014-08-03 13:52:18 -07:00
Girish Ramakrishnan
c335f08d52
Fix grammar
2014-08-03 11:12:39 -07:00
Girish Ramakrishnan
797fceebd4
Use async.series
2014-08-03 11:04:16 -07:00
Girish Ramakrishnan
156d34c3c7
Rename config.silent to config.logApiRequests
2014-08-03 10:01:11 -07:00
Girish Ramakrishnan
82bc3ce416
NODE_ENV is always set to production when undefined already
2014-08-03 10:00:05 -07:00
Girish Ramakrishnan
0320409f93
Use config.js directly instead of passing it around
...
Treat config.js as a global object
BASE_DIR env is set in the config.js so that child processes
(like apphealthtask, apptask) pick up the correct baseDir
2014-08-03 09:59:59 -07:00
Girish Ramakrishnan
8828e7baaf
Use safe instead of exceptions
2014-08-02 18:23:31 -07:00
Girish Ramakrishnan
61a97bc3b1
Source config.js directly
2014-08-02 18:12:29 -07:00
Girish Ramakrishnan
92a14997a7
More appconfig tests
...
Part of #30
2014-08-01 15:44:24 -07:00
Johannes Zellner
881f1aa420
Only show navigation if we are logged in
2014-08-01 14:38:41 -07:00
Johannes Zellner
96fd490d4f
Initial cutover to sb-admin theme
...
Theme is from http://startbootstrap.com/template-overviews/sb-admin-2/
2014-08-01 14:29:42 -07:00
Girish Ramakrishnan
abfa4d0b12
Set config value before callback
2014-08-01 14:09:30 -07:00
Girish Ramakrishnan
dfb39358d0
More updates to README
2014-08-01 13:34:04 -07:00
Girish Ramakrishnan
7daad02e0b
Fix README.md to provide correct paths to sudo scripts
2014-08-01 13:32:03 -07:00
Johannes Zellner
a01d9e4c58
Sync config object with settingsdb on startup and provisioning
2014-08-01 11:19:20 -07:00
Girish Ramakrishnan
c38ce36b7d
Initial apptask tests
...
Part of #30
2014-08-01 10:51:39 -07:00
Johannes Zellner
80eb87069c
Capture bootstrap script output in log file
2014-08-01 08:35:56 -07:00
Johannes Zellner
2b4d927b42
Make bootstrap script exectuable
2014-08-01 08:19:03 -07:00
Johannes Zellner
e466a49e62
Cleanup node_modules on cloudron
2014-07-31 18:02:16 -07:00
Johannes Zellner
a9b2020270
Ensure npm install succeeds
2014-07-31 17:48:30 -07:00
Johannes Zellner
d50d464b48
Use supererror
2014-07-31 12:39:33 -07:00
Johannes Zellner
caccc3eaf5
explicitly use bash to execute the certificate script
2014-07-31 12:35:24 -07:00
Johannes Zellner
33a9721cdf
Fixup the certificate generation
2014-07-31 12:33:14 -07:00
Girish Ramakrishnan
61caf680f2
Provide app's fqdn instead of url
...
This is because url requires home_url which in turn requires the
manifest downloaded.
Fixes #45
2014-07-31 12:09:48 -07:00
Girish Ramakrishnan
98c6408e0d
More changes to README
2014-07-31 11:47:54 -07:00
Girish Ramakrishnan
8991a12135
Add settingsdb.set callback
2014-07-31 11:40:09 -07:00
Girish Ramakrishnan
f1c78dfcb8
Fix supervisorctl path in reloadnginx.sh on Mac
2014-07-31 11:23:30 -07:00
Girish Ramakrishnan
e74061aea7
Update README
2014-07-31 11:23:30 -07:00
Johannes Zellner
be384a6f03
Generate self signed certs based on hostname during bootstrap
2014-07-31 11:15:01 -07:00
Johannes Zellner
e06227c52d
Temporarily disable certificate retrieval from appstore
2014-07-31 10:09:15 -07:00
Johannes Zellner
696f95e0d7
move most settings from yellowtent.conf to the settingsdb
2014-07-31 09:31:28 -07:00
Johannes Zellner
3919bce140
Ignore known hosts warnings for creating base images
2014-07-31 09:31:03 -07:00
Johannes Zellner
f92ca8bb03
Move bootstrap script to box
...
Instead of executing the bootstrap script via ssh,
we now run it once the box boots the first time.
It will update the repo and run the box code, which
needs to contact the appstore in order to get provisioned.
2014-07-31 08:16:35 -07:00
Johannes Zellner
4ef5296cb8
Add initial provisioning route
...
This will replace the ssh provisioning
and simply sets token, appstore details, and fqdn
It will succeed only once.
2014-07-31 08:13:15 -07:00
Girish Ramakrishnan
297cc122b3
Show naked domain app list as a combo box
...
Refs #40
2014-07-31 03:04:30 -07:00
Girish Ramakrishnan
5bf88117ae
Remove naked domain config on app uninstall
...
Refs #40
2014-07-31 03:04:08 -07:00
Girish Ramakrishnan
dcac24fae5
Parse/Stringify manifest in db code
...
We store the manifest itself as a string in the database. Everywhere
else in code, it is just a js object.
2014-07-30 23:06:59 -07:00
Girish Ramakrishnan
033dade88b
Refresh app status periodically
2014-07-30 22:09:58 -07:00
Girish Ramakrishnan
3f2b45279b
Redirect to myapps on app install
2014-07-30 21:57:51 -07:00
Girish Ramakrishnan
1170b0f95f
Domain argument is not required
2014-07-30 21:04:03 -07:00
Johannes Zellner
dce7a49eb7
Only add user to docker group after installing docker
2014-07-30 17:26:52 -07:00
Girish Ramakrishnan
e38a544ef7
Use hyphen based subdomains for apps
...
Instead of
appname.username.cloudron.us
we now use
appname-username.cloudron.us
This allows us to get a wildcard certificate for cloudron.us and the
ssl stuff will work.
The motivation for appname-username instead of username-appname is primarily
UI at this point. We can show a suffix easily on the right side of a line edit.
Fixes #49
2014-07-30 13:52:47 -07:00
Girish Ramakrishnan
5c47eb2d7c
Validate app subdomain
2014-07-30 10:10:24 -07:00
Johannes Zellner
afda56bea5
Send heartbeat for now only every hour
2014-07-10 22:52:12 -07:00
Johannes Zellner
3dcd938951
Disable nginx init scripts
...
nginx is handled via supervisor
2014-07-10 22:51:36 -07:00
Johannes Zellner
b84f81feb4
Also escape the eval backticks
2014-07-09 13:26:16 -07:00
Johannes Zellner
9aefeaa9fc
Escape the shell variables for the init script
2014-07-09 13:13:16 -07:00
Johannes Zellner
45dec6e9df
Add convenience script to produce a base image
2014-07-09 11:12:20 -07:00
Johannes Zellner
3437474837
Make the announce init script retry until it succeeds
2014-07-09 10:59:05 -07:00
Johannes Zellner
933d3381b6
Actually send the hostname of the newly created droplet
2014-07-07 10:26:26 -07:00
Johannes Zellner
acb6bf12ca
Fix typo in base image creation script
2014-07-07 08:10:56 -07:00
Johannes Zellner
171c8c2453
Echo all commands during base image creation
2014-07-07 08:09:22 -07:00
Johannes Zellner
9090a91c14
Enable the init script for bootstrapping
2014-07-03 17:45:49 -07:00
Johannes Zellner
ae1f708213
Set default FQDN to os.hostname()
2014-07-03 16:15:49 -07:00
Johannes Zellner
5a6c09b899
Create a base image creation script
...
As this script is part of the box repo, it is actually
not intended to be run from here, but we need to store it
somewhere for now. The idea is to copy it to a pristine
ubuntu droplet, run it and then create a new base image for
cloudrons off of that droplet.
2014-07-03 16:10:41 -07:00
Girish Ramakrishnan
19b5342af9
Update gitignore
2014-07-02 11:38:48 -07:00
Girish Ramakrishnan
daf9d17274
Better debug messages
2014-07-02 11:37:19 -07:00
Girish Ramakrishnan
0ff31a6b2c
Refactor uninstall into async.series
...
async really needs a 'on error continue anyway'.
https://github.com/caolan/async/issues/549
2014-07-02 09:47:11 -07:00
Girish Ramakrishnan
1a8322753b
Skip subdomain unregister for dev
2014-07-01 22:14:32 -07:00
Girish Ramakrishnan
3b484dbe51
Reload nginx for config changes instead of restarting
...
Restarting nginx means that existing connections get dropped. Supervisor
does not support sending arbitrary signals to processes, so we have to
do this the hard way.
Since nginx runs as root, we need a helper sudoers script.
http://stackoverflow.com/questions/13632399/sending-general-signal-to-child-process-of-supervisord
https://www.ruby-forum.com/topic/917257
https://github.com/Supervisor/supervisor/issues/53
https://github.com/Supervisor/supervisor/issues/179
2014-07-01 21:45:36 -07:00
Girish Ramakrishnan
8370356f5d
Do not start app if installation failed
2014-07-01 21:45:36 -07:00
Girish Ramakrishnan
3aebd93376
Set NODE_TLS_REJECT_UNAUTHORIZED only for apptask process
...
apptask module is currently used for setting up naked domain as well
by the main server code.
2014-07-01 20:31:50 -07:00
Girish Ramakrishnan
4e9195c457
better error message
2014-07-01 20:30:26 -07:00
Girish Ramakrishnan
3458f0f068
Use fqdn instead of hostname to generate nginx configs
...
This change makes it clear that we are really after the fqdn and not the hostname.
The code has been working only because Digital Ocean sets the hostname
to be the FQDN.
What I learnt about hostnames
-----------------------------
The kernel has get/sethostname() and get/setdomainname() system calls.
There is restriction on what can be set as the hostname. init scripts
usually set the contents of /etc/hostname. How hostname is setup depends
on the distribution - it could be the simple name OR the fqdn. CentOS
for example puts the FQDN and ubuntu puts the simple name.
DigitalOcean puts the name of the box in /etc/hostname. So far this has
worked in our favor because os.hostname() which uses gethostname() gave
us the FQDN.
Docker sets only the simple name in /etc/hostname but sets up the
OS host/domain name correctly. This mean os.hostname() does not provide
the FQDN in docker. Altering it is not possible because it requires the
the SYS_ADMIN caps which container don't have (unless --priveliged).
Also, hostname -f first does gethostname(), then does a DNS lookup
using getaddrinfo() or the deprecated getaddressbyname(). Using that IP,
it does a reverse lookup.
The DNS system itself using nsswitch.conf to determine look up order.
The first entry in /etc/hosts file is taken as the domain entry for
reverse lookups.
2014-07-01 20:07:46 -07:00
Johannes Zellner
ca262a77de
Login user automatically when he creates an admin
2014-06-29 23:20:01 -07:00
Girish Ramakrishnan
21a47ac825
Skip subdomain registration during dev
2014-06-29 18:04:40 -07:00
Johannes Zellner
5ba4f098bb
Fixup url in appstatus.html to point to admin
2014-06-29 15:57:08 -07:00
Johannes Zellner
879376d112
Only allow Bearer login for domain and apps routes
2014-06-29 15:21:26 -07:00
Johannes Zellner
6b65bbe969
Do not include bootstrap angular components in appstatus.html
2014-06-29 15:06:47 -07:00
Johannes Zellner
e6e6c631b4
Make sure we server appstatus.html correctly when apps are installing
2014-06-29 13:25:02 -07:00
Johannes Zellner
9497417d72
Show myapps as a default route
2014-06-29 12:18:23 -07:00
Johannes Zellner
1729ed5b9c
Only allow bearer tokens for /api/v1/user/token
...
This avoids that the browser is showing a Basic login
dialog if Bearer token is invalid
2014-06-29 12:17:04 -07:00
Johannes Zellner
19980747df
Add bootstrap to appstatus.html
2014-06-29 11:26:01 -07:00
Johannes Zellner
eea0dcc3f0
Cleanup settings view
2014-06-29 11:21:00 -07:00
Johannes Zellner
84c659a58a
Hide User and Volume management
2014-06-29 11:16:11 -07:00
Johannes Zellner
0bc170a27c
Remove unused login view and controller
2014-06-29 11:14:07 -07:00
Johannes Zellner
78b1afb45a
Use login_callback for oauth login
2014-06-29 11:12:24 -07:00
Girish Ramakrishnan
333fe0e1b8
webadmin: Add Client.getApps and Client.removeApp
2014-06-28 23:30:34 -07:00
Girish Ramakrishnan
1b949ef83f
Mark naked domain as not-required
2014-06-28 22:08:09 -07:00
Girish Ramakrishnan
fbdbe644f5
naked domains can be setup only for apps
2014-06-28 22:08:09 -07:00
Girish Ramakrishnan
3a2c108232
res might be null
2014-06-28 22:08:09 -07:00
Girish Ramakrishnan
b74725aabc
Add missing semicolon
2014-06-28 22:08:08 -07:00
Girish Ramakrishnan
b50c70e9bb
Add settings API
...
We will use this to store key/value pairs
2014-06-28 22:08:08 -07:00
Johannes Zellner
ff1d8b7d0f
Do not set URL when login succeeded
2014-06-28 20:17:41 -07:00
Johannes Zellner
18146c1a73
Actually make the logout
2014-06-28 19:33:20 -07:00
Johannes Zellner
8599578f6d
Do not show uninitialized messages
2014-06-28 19:10:24 -07:00
Johannes Zellner
bf126b8e9a
Move from popup to redirecturi for webadmin oauth
2014-06-28 19:04:29 -07:00
Girish Ramakrishnan
c14b050b33
Add settingsdb
...
We will use this to store key/value pairs
2014-06-28 18:48:31 -07:00
Johannes Zellner
fc10a20aa9
More rename of origin to adminOrigin
2014-06-28 18:08:54 -07:00
Girish Ramakrishnan
e6a772e35b
create naked_domain.conf in run.sh
2014-06-28 18:03:41 -07:00
Girish Ramakrishnan
9a90151f2a
Rename origin to adminOrigin
2014-06-28 17:58:40 -07:00
Girish Ramakrishnan
b1c9f8cfd4
Move admin to admin.subdomain.com
...
By default, we have the naked domain point to admin. This is a redirect
because the auth code always redirects to admin.*. For apps, we won't
do a redirect.
2014-06-28 17:20:59 -07:00
Girish Ramakrishnan
89724bceb6
Include certificates.conf to get the correct deployed cert
2014-06-28 15:27:56 -07:00
Girish Ramakrishnan
ad20de5582
Move nginx template into nginx dir
2014-06-28 15:26:50 -07:00
Girish Ramakrishnan
603cf7db21
Use ejs template for nginx application config
2014-06-28 13:28:00 -07:00
Girish Ramakrishnan
e74bfd9e41
Create task for every app that has not been installed
2014-06-28 13:09:02 -07:00
Girish Ramakrishnan
e74bfbad8e
cleanup nginx config
2014-06-28 13:09:02 -07:00
Johannes Zellner
7e4840db4b
Update to new husky version
2014-06-28 11:36:02 -07:00
Johannes Zellner
6355eb79a4
Pass token for heartbeat in query
2014-06-28 10:38:04 -07:00
Girish Ramakrishnan
f227b3c271
Fix appstatus.html
2014-06-28 10:05:17 -07:00
Girish Ramakrishnan
c1742ad6d2
Simplify apptask state management
...
The state machine was written to handle restarts. This behavior
while awesome is unnecesary and complicates code. Simplify by
just using an async.series()
2014-06-28 10:04:28 -07:00
Girish Ramakrishnan
8f27c01cf4
Implement runtime state
...
This separation makes it possible for apphealthtask to go in parallel
and not worry about it the app being uninstalled.
Fixes #27
2014-06-28 02:32:41 -07:00
Girish Ramakrishnan
434693976f
process -> install
2014-06-28 01:40:25 -07:00
Girish Ramakrishnan
0dd57d0565
Rename STATUS_* to ISTATE_*
2014-06-28 01:17:30 -07:00
Girish Ramakrishnan
b5625534ef
Rename statusCode to installationState
2014-06-28 01:11:30 -07:00
Girish Ramakrishnan
fd47077987
Remove statusMessage from schema
...
There's no need to save the status message in the database. Only
need to print it out in the logs.
2014-06-28 01:02:37 -07:00
Girish Ramakrishnan
dcd6dfa711
Set error states
2014-06-28 00:31:11 -07:00
Girish Ramakrishnan
5a2bb95f74
rmdirapp -> rmappdir
2014-06-27 23:40:26 -07:00
Girish Ramakrishnan
d5baa13828
FATAL_CALLBACK does not exist anymore
2014-06-27 23:32:26 -07:00
Johannes Zellner
605c9015cc
Make subdomain unregistration non fatal
2014-06-27 21:06:58 -07:00
Girish Ramakrishnan
4a3f08ede3
Move to uninstalled state only if uninstall succeeds
2014-06-27 12:06:19 -07:00
Girish Ramakrishnan
767047e2a2
Fix apptask state management
...
Fixes #22
2014-06-26 22:11:52 -07:00
Girish Ramakrishnan
8ef012e6fe
Monitor exited apps and restart them correctly
...
If an app had exited, we only attempt to start the container. Since
the volume should already exist from a previous run.
Not sure if the healthtask should trigger a restart of the app or
similar automatically. Currently, this is only done for server restart.
2014-06-26 18:33:31 -07:00
Girish Ramakrishnan
0ce3727e36
Add missing callback
2014-06-26 18:15:29 -07:00
Girish Ramakrishnan
914c9c8074
Register subdomain immediately after nginx configuration
...
I don't think it matters if we do subdomain registration first or
nginx first. Nginx first has the mild advantage that we are sure
that nginx is ready to show status page before the dns is done
propagating.
2014-06-26 17:53:16 -07:00
Girish Ramakrishnan
bdb12b57a9
Add app status page
...
Visiting the subdomain when the app is not responding or being installed now
displays the appstatus.html page.
nginx configuration gleaned from various sources:
http://www.cyberciti.biz/faq/custom-nginx-maintenance-page-with-http503/
http://forum.nginx.org/read.php?2,231364,231424
http://mailman.nginx.org/pipermail/nginx/2012-March/032463.html
2014-06-26 17:49:41 -07:00
Johannes Zellner
f9a55793a6
Add husky to add git push hooks for running the tests
2014-06-26 16:33:51 -07:00
Girish Ramakrishnan
ca20a7777a
Set superagent timeout
...
Note that the timeout is a global timeout for the entire request.
2014-06-26 14:22:04 -07:00
Girish Ramakrishnan
458d0be8be
Remove task for tasks when it exits
2014-06-25 20:30:40 -07:00
Girish Ramakrishnan
f9f133e97d
Unregister subdomain on app delete
...
Fixes #23
2014-06-25 20:23:17 -07:00
Girish Ramakrishnan
a828dde674
Fix typo
2014-06-25 15:57:21 -07:00
Girish Ramakrishnan
cb0857091b
Fix apptask design
...
Initially I tried moving the code to a proper task system like que.
However, I could not figure out how to make task cancellation work.
For example, if an app is installing and user cancels it, we want
to kill the installation task. Que does not provide any way to manage
processes. Secondly, there is no way to attach ids to tasks. The id
is autogenerated (incremented number) which means I cannot get at the
task by appid.
Current design: spin out apptask processes for every app's install/uninstall.
An install/uninstall kills any existing apptask process associated with
that task.
apphealth check is a separate process. It is always running and it just
pings all running/dead apps.
2014-06-25 15:56:31 -07:00
Girish Ramakrishnan
1257ad2877
Remove dead code
2014-06-25 08:16:42 -07:00
Girish Ramakrishnan
366a8596aa
apps module does not need config anymore
2014-06-24 15:04:41 -07:00
Johannes Zellner
daa7262734
Skip user decision dialog until we have OAuth scopes
...
Since for now we do not have special scoping for
access tokens, presenting a decision dialog to the
user and let him approve makes not much sens.
This commit will skip this step, without interrupting
the normal OAuth flow.
2014-06-24 07:54:07 -07:00
Johannes Zellner
9ed5aac955
Serve up a config object containing appstoreOrigin
...
This also changes the webadmin to pickup the appstoreOrigin
from the config object to avoid hardcoding
2014-06-23 23:17:43 -07:00
Johannes Zellner
a84734302c
Remove unused logs view in webadmin
2014-06-23 18:53:30 -07:00
Johannes Zellner
6efffde9e5
Specify ssl certs in separate file
2014-06-23 18:31:04 -07:00
Girish Ramakrishnan
9c658515d0
Keep dependancies alphabetical
2014-06-23 08:36:41 -07:00
Johannes Zellner
a64337d0c9
Put childprocess logs into /var/log
...
The default is /tmp. logrotation will happen
automatically done by supervisor
2014-06-23 08:19:41 -07:00
Johannes Zellner
376fca6d8a
Show full box configuration on startup
2014-06-22 12:38:56 -07:00
Girish Ramakrishnan
f2990c7fe1
Remove isRefreshPending
2014-06-21 01:47:55 -07:00
Girish Ramakrishnan
40696d9697
apptask: Rename variables
2014-06-21 01:47:55 -07:00
Girish Ramakrishnan
3c8b795e57
Do not update the appdb outside apptask
...
Updating outside apptask might lead to the statusCode being
overwritten.
2014-06-21 01:47:55 -07:00
Girish Ramakrishnan
bfb86e950b
Process each app to completion
2014-06-21 01:47:55 -07:00
Girish Ramakrishnan
4e8cdecd1b
apptask: Move state handling code to separate function
2014-06-21 01:47:55 -07:00
Johannes Zellner
362d8bea5f
Enable full debugging output for now on the cloudrons
2014-06-21 01:20:09 -07:00
Girish Ramakrishnan
47c097cd53
Add database.create
...
This basically splits out initialize and create database part.
server.js will call create database but not apptask.
2014-06-20 23:24:06 -07:00
Girish Ramakrishnan
c55001a86a
configRoot is already created by the server code
2014-06-20 22:16:27 -07:00
Girish Ramakrishnan
7e1ebce96c
Add note about clearing sudo cache
2014-06-19 22:07:07 -07:00
Girish Ramakrishnan
2a9ef0d927
Make apptask a separate process
...
Need to fix the db code so that we don't initialize twice. And there
is also some oauth related code in database that should not be there.
2014-06-19 21:50:08 -07:00
Girish Ramakrishnan
48c6c098e3
Move config variables to config.js
...
This way they can be required by various modules as needed. Instead
of passing them around everywhere like we do now.
2014-06-19 21:03:39 -07:00
Girish Ramakrishnan
b3cedab483
Rename config.js to volumeconfig.js
2014-06-19 20:02:00 -07:00
Girish Ramakrishnan
aae36c173f
Remove optimist dependancy
2014-06-19 19:50:13 -07:00
Girish Ramakrishnan
b4651066dc
Update README
2014-06-19 16:49:01 -07:00
Girish Ramakrishnan
297354c069
HOME is not preserved by sudo when calling rmappdir
...
Ubuntu has configured sudo to preserve HOME. This is not the case with
debian or arch. This appears to be a compile time option even.
Explicitly specify that the HOME needs to preserved.
http://unix.stackexchange.com/questions/91384/how-is-sudo-set-to-not-change-home-in-ubuntu-and-how-to-disable-this-behavior
http://unix.stackexchange.com/questions/13240/etc-sudoers-specify-env-keep-for-one-command-only
2014-06-19 14:49:32 -07:00
Girish Ramakrishnan
23404e69c9
Print appdata path instead of home
2014-06-19 14:22:42 -07:00
Girish Ramakrishnan
c69934d896
Add --check argument to rmappdir.sh
2014-06-19 14:21:07 -07:00
Girish Ramakrishnan
6f8c7a693b
Typo in app health calculation
2014-06-19 13:11:53 -07:00
Girish Ramakrishnan
b9d330b62e
Output debug message for healthy app
...
With DEBUG=box:*, we don't get superagent output anymore.
2014-06-19 13:09:13 -07:00
Girish Ramakrishnan
339446dccc
Explicitly pass supervisor config path
...
Otherwise it picks up the system default config
2014-06-19 13:06:25 -07:00
Girish Ramakrishnan
ec4c4cdbeb
Access box using https://HOSTNAME
2014-06-19 13:02:12 -07:00
Girish Ramakrishnan
4372216a82
Set NODE_ENV to production by default
2014-06-19 12:54:27 -07:00
Girish Ramakrishnan
31b4d40b00
Update README.md to reflect reality
2014-06-19 12:06:11 -07:00
Girish Ramakrishnan
35bd376a2b
Use the 'box' namespace for all debug output
2014-06-19 10:18:11 -07:00
Johannes Zellner
8c2bc69cfd
Setup box process environment to run as different user
...
Supervisor does not spawn a shell to run the application,
thus the process environment of supervisord will be inherited.
This can be overridden with 'environmen=...' in the config file
2014-06-18 23:37:07 -07:00
Johannes Zellner
440e42fe98
Run box as user 'yellowtent'
2014-06-18 22:49:41 -07:00
Johannes Zellner
bc9e085330
Disable /etc/sudoers.d/yellowtent assert until we have a better solution
2014-06-18 22:25:11 -07:00
Johannes Zellner
f3dd285c6c
Run box from withing the project root dir
...
The box root dir (NGINX_ROOT) is provided either via run.sh
or /etc/default/supervisor
2014-06-18 22:11:15 -07:00
Girish Ramakrishnan
1aac4dd48a
Add rmappdir.sh script
...
Host-mounted volumes contain files that are owned by user ids of the container.
However, these values leak through to the host. As a result, one needs to
be the root user to remove the appdata directory.
Initially, a setuid shell script was planned. However, most unixes don't
allos setuid on shell scripts.
We use sudo instead. A special suderos file needs to exist. For example,
In /etc/sudoers.d/rmappdir.sh, add
USERNAME host = (root) NOPASSWD: BOXDIR/src/rmappdir.sh
2014-06-18 00:22:59 -07:00
Girish Ramakrishnan
c62a9d9d74
appstore is now https based
2014-06-17 15:59:26 -07:00
Girish Ramakrishnan
fad0d5d74e
Make the title clickable
...
For some reason making ng-href an expression doesn't work.
ng-href="https://{{ app.location + '.' + window.location.host }}"
window.location.host is always empty :(
2014-06-14 21:30:09 -07:00
Girish Ramakrishnan
3a4a43f16d
Use hostname instead of localhost as default origin
2014-06-14 21:03:25 -07:00
Girish Ramakrishnan
59f507da04
Enable TLS for apps
...
The main nginx conf automatically redirects all http to https. This
means that apps need to be doing TLS on their vhost configs as well.
Currently, they all share the same cert and key. This works only because
the cert and key are wildcard certficates.
2014-06-14 21:03:05 -07:00
Girish Ramakrishnan
6180c24e43
Add wildcard self-signed certficate
...
openssl genrsa 2048 > host.key
openssl req -new -x509 -nodes -sha1 -days 3650 -key host.key > host.cert
openssl x509 -noout -fingerprint -text < host.cert > host.info
cat host.cert host.key > host.pem
2014-06-11 10:54:11 -07:00
Girish Ramakrishnan
8da4b2e5a2
Implement subdomain registration for apps
2014-06-11 10:47:49 -07:00
Girish Ramakrishnan
8c71c038b1
Revert 676a1adff1
...
Leave it to the app to copy it's data into /app/data as needed.
There are many advantages to this approach:
1. The app won't rely needlessly on some initial data in /app/data.
This means we can clear the data dir should the user ask to and the
app will work as expected.
2. box code will now just work on the Mac :)
2014-06-10 23:47:31 -07:00
Girish Ramakrishnan
f625e6e537
docker port has changed in 1.0
2014-06-09 14:11:17 -07:00
Girish Ramakrishnan
0f2628e338
data.config -> data.Config
2014-06-08 10:33:35 -07:00
Girish Ramakrishnan
b34dbc18c9
Add a note that appdata delete doesn't work
...
docker has no concept of user namespace yet. This means that
whatever files are created by the container is seen on the host
appdata as a file by that user. If root is running in the container,
then the volume has files owned by root. This means that our app
code cannot delete the directoy anymore.
Note that some versions of docker even change the permissions of
the app's volume on host to root.root. This behavior apparently changes
depending on whether the volume is empty (!)
I tried playing around with setfacl/getfacl but that doesn't help
because the container can remove any ACL we set.
I see two options:
- a setuid script
- a sudo NOPASSWD script
Links to various issues:
https://github.com/dotcloud/docker/issues/2969
https://github.com/dotcloud/docker/issues/2360
https://github.com/dotcloud/docker/issues/2372
https://github.com/dotcloud/docker/issues/3124
https://github.com/dotcloud/docker/issues/2975
https://github.com/dotcloud/docker/issues/5189
https://github.com/dotcloud/docker/issues/1737
2014-06-06 22:58:09 -07:00
Girish Ramakrishnan
ec71381ef1
Remove nginx configuration on uninstall
2014-06-06 16:38:46 -07:00
Girish Ramakrishnan
e18d642789
Better logs
2014-06-06 16:24:05 -07:00
Girish Ramakrishnan
676a1adff1
Setup app data volume with /app/data of container
...
It turns out that mounting a host path in /app/data will shadow
the contents of the container /app/data. I expected docker to
copy all files from /app/data of container into the volume.
Since docker doesn't do this for us, we have to copy over the
contents ourselves before we start the container.
https://github.com/dotcloud/docker/issues/1992
Without this change, every app that has any 'initial' config
will have to basically write a setup script which has to run
on startup.
This changes is a little untested because volume mounting cannot
be tested on the Mac through boot2docker.
Notes:
1. The VOLUME cmd in Dockerfile merely exposes the directory to
be available for other container to mount as volumes (i.e they
will be available for --volumes-from)
2014-06-06 13:46:05 -07:00
Girish Ramakrishnan
5cf8cea60b
Store app data under appDataRoot
...
Initially there was a plan to integrate this with the volume code but
that is a little complicated. The apptask runs in spirit as a separate
process. This means that we need to figure a way to send it the username
and password to create volumes. A work around might be to create the volumes
in the routes code instead. However, the uninstall still needs to happen
in apptask code which makes it asymmetric.
Lastly, we need to ensure that app id does not clash with user volumes.
2014-06-06 01:23:23 -07:00
Girish Ramakrishnan
d9ab4ce4ef
volume: rename config to options
2014-06-06 00:39:34 -07:00
Girish Ramakrishnan
d0cf60ed28
Register all existing apps with the health tracker
2014-06-06 00:28:15 -07:00
Girish Ramakrishnan
0e8be87eb3
Implement multiple port bindings
...
moves port bindings to separate table
2014-06-06 00:12:50 -07:00
Girish Ramakrishnan
2d11fb9513
Implement a basic database connection pool
...
sqlite3 module that we use does not explicitly support transactions.
The only model that works for transactions is to create a separate
database connection using sqlite3_open().
https://github.com/mapbox/node-sqlite3/issues/304
http://www.sqlite.org/isolation.html
2014-06-06 00:12:50 -07:00
Johannes Zellner
1e6956fa17
Do not hardcode origin in webadmin
2014-06-05 21:45:07 -07:00
Johannes Zellner
61e4759e82
Ensure we add the origin as the callback url for webadmin oauth
2014-06-05 20:20:36 -07:00
Johannes Zellner
eda0e34505
Send basic heartbeat to appstore server
...
Heartbeat is scheduled every 10sec for now.
It only is scheduled if appServerUrl and token is set.
2014-06-05 18:21:42 -07:00
Girish Ramakrishnan
2008b5a8a4
For Mac, forward tcp ports from host to vbox as well
2014-06-05 15:19:26 -07:00
Girish Ramakrishnan
f32638c36c
Display container id in debug
2014-06-05 14:24:44 -07:00
Girish Ramakrishnan
0f11373118
app: env variables are part of container config
...
I don't completely grok the difference between container config
and host config.
2014-06-05 13:02:07 -07:00
Girish Ramakrishnan
27cb1bd139
manifest.tcp_ports is optional
2014-06-05 12:28:43 -07:00
Girish Ramakrishnan
de3bea03e7
Implement port bindings
...
Currently, only one the first port is mapped (mostly because of db
setup issues).
2014-06-05 12:28:39 -07:00
Girish Ramakrishnan
2e8a1a3643
webadmin: $http is unused
2014-06-04 15:48:57 -07:00
Girish Ramakrishnan
64a607c9b9
weadmin: Remove spurious log statements
2014-06-04 15:18:36 -07:00
Girish Ramakrishnan
5208047c75
webadmin: Cache applist
2014-06-04 15:09:01 -07:00
Girish Ramakrishnan
b500b6b23f
webadmin: Create AppStore service
2014-06-04 14:59:09 -07:00
Girish Ramakrishnan
bb37705bf8
Capitalize service names
...
Following johannes' existing naming convention:
module names are camel case
factories and service names are capitalized
2014-06-04 14:44:50 -07:00
Girish Ramakrishnan
5d459b5b44
Define factories and services in YellowTent module
2014-06-04 14:33:29 -07:00
Girish Ramakrishnan
82e9bf79b6
Clean up js directory
...
Create a directory called views that conatins the controller and
the partials together. These two are tightly tied together anyway.
Can't see any point of grouping things based on programming
patterns (it might make sense to group things based on function
as our code becomes bigger)
2014-06-04 14:21:49 -07:00
Girish Ramakrishnan
6b2aafa699
Pass nginx path using env variable
...
%(ENV_xxx)s is the magic incantation for supervisor config files.
Sadly this works only on specific fields.
2014-06-04 14:01:07 -07:00
Johannes Zellner
f67e235b06
Use supervisor for the box application
2014-06-04 10:27:02 -07:00
Girish Ramakrishnan
e222fba2ee
Check for Cmd as well along with Entrypoint
...
ENTRYPOINT is sh -c by default. CMD is the command to be run and
is passed as args to the ENTRYPOINT.
2014-06-03 23:47:39 -07:00
Girish Ramakrishnan
41bc074793
Run nginx through supervisor
...
One of the motivations for this is to allow the node code to restart
nginx once the nginx config files have been written out. Without
supervisor, the app code needs to be root. With supervisor, we can
just ask supervisor to restart it for us (which helpfully listens
for commands in a tcp port 9001).
The supervisor configs are crude and need to somehow use environment
variables for log file paths and such. %(ENV)s format is supposed to
work but doesn't.
supervisor is not a daemon because it's easy to start/stop it through
run.sh (and Ctrl+C) works nicely during development. We can possibly
run it as a daemon once supervisor configs are more stable.
nginx is not a daemon anymore because it is run through supervisor.
supervisorctl seems to magically connect to supervisor even without
passing it -c <conf> file. Not sure how that works.
2014-06-03 22:23:30 -07:00
Girish Ramakrishnan
9b78afb67c
Split config into proper database fields
...
This is requird to be able to query the list of (used) locations
and ports.
2014-06-03 19:07:49 -07:00
Girish Ramakrishnan
c335e05ddd
On Mac, add a vbox rule to forward from host to the vbox
2014-06-03 19:07:45 -07:00
Girish Ramakrishnan
d13828ce23
Make NOOP_CALLBACK print any error using console.error
2014-06-03 16:07:51 -07:00
Girish Ramakrishnan
e9ba2aebef
Use json instead of yaml for manifest format
2014-06-02 18:23:27 -07:00
Johannes Zellner
0add24f59e
Use provisioned yellowtent.json if it exists
2014-06-02 17:37:40 -07:00
Girish Ramakrishnan
6c501af9d1
Get free port by creating transient server
2014-05-31 16:13:43 -07:00
Girish Ramakrishnan
522e4f862f
Generate nginx configs with hostname
2014-05-31 15:06:32 -07:00
Girish Ramakrishnan
a566cb28b3
Implement nginx configuration
...
nginx is configured as the very first step so that we can serve
out a page showing the current app installation status if required.
2014-05-31 14:30:39 -07:00
Girish Ramakrishnan
3cbfe49777
s/config/CONFIG
2014-05-31 13:10:36 -07:00
Girish Ramakrishnan
d91751c548
apps: move to running state when health check succeeds
2014-05-29 18:11:36 -07:00
Girish Ramakrishnan
6cfb99d251
apps: Implement health check and uninstall
...
doesn't completely work yet
2014-05-29 17:31:18 -07:00
Girish Ramakrishnan
e87bb4debd
Initialize config.appServerUrl to invalid url
...
This prevents the asserts in apptask code and makes tests
pass.
2014-05-29 10:27:55 -07:00
Girish Ramakrishnan
0f40dadf4d
Fix database tests
...
The apps db schema changed
2014-05-29 08:52:07 -07:00
Girish Ramakrishnan
c034606d2c
Start implementing app lifecycle
...
apptask is separate because it is could potentially be run in a separate
process.
2014-05-28 20:12:44 -07:00
Johannes Zellner
3c3dd2e1a8
Add a deployed specific version of server.routes
2014-05-28 17:19:14 -07:00
Johannes Zellner
f432bcd29c
supervisord.conf is now yellowtent.conf
2014-05-28 16:29:14 -07:00
Girish Ramakrishnan
c86822589c
Use this.changes and this.lastID to determine insert/update/del errors
...
The sqlite3 modules sets these variables in the callback function
2014-05-28 09:42:46 -07:00
Johannes Zellner
4c261c8dd9
Enable supervisorctl and run nginx as daemon
2014-05-27 08:11:48 -07:00
Johannes Zellner
5493804b73
For ease of deployment rename nginx.conf
2014-05-26 22:17:38 -07:00
Johannes Zellner
dc7084ad7d
Update supervisord.conf to reflect box folder structure
2014-05-26 22:15:51 -07:00
Girish Ramakrishnan
43d1e2f2b8
Update safetydance to 0.0.11
2014-05-23 13:49:04 -07:00
Girish Ramakrishnan
aa396656d7
Fix jshint errors
2014-05-23 13:08:40 -07:00
Johannes Zellner
5836685ccd
Add and disable more tests for appdb
...
Have to exit train, no time to fix the UPDATE
tests.
2014-05-22 18:00:34 -07:00
Johannes Zellner
a80c30aca7
Add unit tests for appdb and fix issues
2014-05-22 17:53:17 -07:00
Johannes Zellner
6764a0255b
Add tokendb unit tests
2014-05-22 17:40:46 -07:00
Johannes Zellner
3ae0250dfe
Improve authcode unit tests
2014-05-22 17:27:13 -07:00
Johannes Zellner
e1102b430c
Add initial authcodedb unit tests
2014-05-22 08:44:24 -07:00
Johannes Zellner
3bd12d0f92
Fixup some linter issues in database.js
2014-05-22 08:22:40 -07:00
Girish Ramakrishnan
d6e314ebf7
Display message when no apps are present
2014-05-21 22:06:33 -07:00
Girish Ramakrishnan
06aecf6217
Remove ng-controller from partials
...
Controllers were getting loaded twice - once from ng-controller tag
and again from ng-route configuration.
2014-05-21 21:58:38 -07:00
Girish Ramakrishnan
28ed75d3e0
Show loading status for apps
2014-05-21 18:47:32 -07:00
Girish Ramakrishnan
f4610e0e6f
Move oauth2views into src
2014-05-21 18:10:28 -07:00
Johannes Zellner
16e1106198
Fix small typo in SQL statement
2014-05-21 17:57:41 -07:00
Girish Ramakrishnan
9f02ab0f79
Store keys as hex-encoded strings
...
One option is store salt, public and private keys are binary BLOBs.
However, these can be cumbersome to see in database viewers and is
a pain should we ever consider switching databases. String is the
most portable.
So, save all buffers are hex-encoded strings in database.
2014-05-21 16:27:29 -07:00
Girish Ramakrishnan
fc48e23553
Explicitly specify the modules size and exponent
2014-05-21 16:27:29 -07:00
Girish Ramakrishnan
20a416b961
sqlite3: move userdb to sqlite3
...
THis completes sqlite3 migration
2014-05-20 20:48:15 -07:00
Johannes Zellner
c2903cd7b4
Merge branch 'johannes'
2014-05-20 16:37:09 -07:00
Johannes Zellner
262e4e4258
Update shrinkwrap file
2014-05-20 15:10:00 -07:00
Girish Ramakrishnan
e3410ff4a2
Use database.removePrivates
...
DatabaseTable will go away
2014-05-20 11:52:25 -07:00
Girish Ramakrishnan
87a0e85975
Remove identity code
...
This is just dead code and has been moved to the appstore code
2014-05-20 09:04:40 -07:00
Girish Ramakrishnan
49f25b35c9
Add removePrivates to database.js
2014-05-20 09:04:36 -07:00
Girish Ramakrishnan
ea1d36512e
Allow multiple admins
2014-05-19 16:31:22 -07:00
Girish Ramakrishnan
8c09157d3d
s/USERNAME/ADMIN
2014-05-19 15:58:56 -07:00
Girish Ramakrishnan
298c194feb
Remove unused config option from User.create
2014-05-19 14:28:21 -07:00
Girish Ramakrishnan
2767faf43b
db: mark private fields with _ prefix
...
This follows the javascript coding convention
2014-05-19 10:13:04 -07:00
Girish Ramakrishnan
8f323c7cd0
sqlite3: move appdb to sqlite
2014-05-19 08:18:33 -07:00
Johannes Zellner
893e727e5d
Use supervisor instead of systemd or upstart
2014-05-19 08:08:50 -07:00
Girish Ramakrishnan
f4dab61a8f
sqlite3: migrate authcodedb and clientdb
2014-05-18 19:12:18 -07:00
Girish Ramakrishnan
821240632d
sqlite3: start moving database stuff to sqlite3
...
tokendb is migrated for the moment
DatabaseError class needs to be fixed to have a nicer API. It's
very error prone to have the reason as the second argument!
2014-05-18 18:24:23 -07:00
Johannes Zellner
3d6ade2088
Make upstart script work with forever
2014-05-18 17:34:30 -07:00
Johannes Zellner
5520b21907
Add initial upstart script
2014-05-18 16:27:18 -07:00
Girish Ramakrishnan
624d0ddb6b
Use camel case for database fields
...
AFAIK, the convention seems to be to follow the language
convention. So, camel case won out in favor of underscores
since we use camel case in our code.
2014-05-18 16:17:28 -07:00
Girish Ramakrishnan
14e95375dd
Move db initialization code to database.js
2014-05-17 18:44:12 -07:00
Girish Ramakrishnan
145c24e699
refactor: inline Server._listen
2014-05-17 17:52:37 -07:00
Johannes Zellner
52075d7ec1
Remove 'both' middleware on some routes
...
The routes which use params handler for volume or
syncerVolume already use the 'both' middleware.
2014-05-17 11:50:47 -07:00
Girish Ramakrishnan
65e7b46581
Code cleanup
2014-05-17 10:16:01 -07:00
Girish Ramakrishnan
f33c4da89f
Make httpServer property of the server
...
I don't trust the express team to not use 'cool' js features :) For
all we know, they might just Object.freeze the express() object!
2014-05-17 10:09:42 -07:00
Girish Ramakrishnan
6a53ac36d8
Code cleanup
2014-05-17 09:57:29 -07:00
Girish Ramakrishnan
ff8201970d
Avoid using express' setting
2014-05-17 09:07:43 -07:00
Girish Ramakrishnan
451b5d28bc
express4: fix shrinkwrap file
...
This completes move to express4
2014-05-16 21:49:56 -07:00
Girish Ramakrishnan
116e86d18b
express4: use multiparty middleware for multipart
...
the middleware parses out multipart data into req.files and req.fields
2014-05-16 21:45:28 -07:00
Girish Ramakrishnan
a231f8514b
express4: req.params.length is not defined anymore
...
req.params.length !== 0 ? req.params[0] : '';
Since it was not set anymore, it yielded undefined instead of ''
2014-05-16 21:20:09 -07:00
Girish Ramakrishnan
5bc15a2463
express4: param does not take multiple callbacks anymore
...
Reading docs of express 3 it appears that it didn't take multiple
callbacks. So we were using a hidden feature.
2014-05-16 21:19:04 -07:00
Girish Ramakrishnan
026c43844a
express4: del -> delete
2014-05-16 20:32:50 -07:00
Girish Ramakrishnan
3ea2f55b22
Remove middleware loading code
2014-05-16 20:29:08 -07:00
Girish Ramakrishnan
a48505b63d
Comment out express.limit for now
2014-05-16 20:22:12 -07:00
Girish Ramakrishnan
1684dad50a
express4: json and urlencoded middleware is part of body-parser
2014-05-16 20:21:43 -07:00
Girish Ramakrishnan
adb016aeb3
express4: cookieParser is now in cookie-parser
2014-05-16 19:49:59 -07:00
Girish Ramakrishnan
d272b047e7
express4: favion is in serve-favicon
2014-05-16 19:47:26 -07:00
Girish Ramakrishnan
03900de8f2
express4: session is now in express-session
2014-05-16 19:45:23 -07:00
Girish Ramakrishnan
2cbd92de6a
express4: timeout now resides in connect-timeout
2014-05-16 19:43:59 -07:00
Girish Ramakrishnan
843867a640
express4: logger is gone. use morgan instead
2014-05-16 19:32:20 -07:00
Girish Ramakrishnan
55412be52f
express4: app.router has removed
...
From the docs:
"app.router has been removed and middleware and routes are executed in the
order they are added. Your code should move any calls to app.use that came
after app.use(app.router) after any routes (HTTP verbs)."
2014-05-16 19:27:29 -07:00
Girish Ramakrishnan
511210511f
express4: app.configure is no longer available
2014-05-16 19:23:10 -07:00
Girish Ramakrishnan
0e50370378
Update to express 4.2
2014-05-16 19:18:07 -07:00
Johannes Zellner
b224e3f8b6
Set nginx user in config
...
The server currently runs as root, this needs to change.
2014-05-11 11:37:43 -07:00
Johannes Zellner
38c02b8e93
Update shrinkwrap file and restrict module updates
2014-05-08 18:38:39 -07:00
Girish Ramakrishnan
905323a25d
Add app configuration page
2014-05-08 18:04:10 -07:00
Girish Ramakrishnan
ecad05f048
Remove 'x' bits from files
2014-05-08 16:53:03 -07:00
Girish Ramakrishnan
8e670107b7
apps -> applist
2014-05-08 16:52:29 -07:00
Girish Ramakrishnan
28790999fa
Remove 'x' bit from more files
2014-05-08 16:48:57 -07:00
Girish Ramakrishnan
59611d488d
Remove 'x' bit from non-executables
2014-05-08 16:47:34 -07:00
Girish Ramakrishnan
1bee1d8ef9
Allow setting the hostname of the app
2014-05-08 14:45:02 -07:00
Girish Ramakrishnan
03174203ec
Parse manifest and install docker app
2014-05-08 00:00:28 -07:00
Girish Ramakrishnan
14c47e963d
Fix various error because of eaf2ec5a
2014-05-06 15:40:36 -07:00
Girish Ramakrishnan
225035f721
server -> box
2014-05-06 15:15:04 -07:00
Girish Ramakrishnan
eaf2ec5a55
Refactor apps code into apps.js
2014-05-06 08:22:43 -07:00
Girish Ramakrishnan
4f69a8b664
app.js -> apps.js
2014-05-05 17:35:12 -07:00
Girish Ramakrishnan
b679e9c922
Implement appdb
2014-04-30 23:22:41 -07:00
Girish Ramakrishnan
b1da9f68dc
pyramid of doom -> async
2014-04-30 22:42:31 -07:00
Girish Ramakrishnan
00655871aa
Add app server url to config
2014-04-30 22:03:20 -07:00
Girish Ramakrishnan
098ca9c7fe
We require express 3
2014-04-30 20:19:31 -07:00
Girish Ramakrishnan
4fa6aab537
Add route to install an app
2014-04-29 16:58:22 -07:00
Girish Ramakrishnan
1605ae3262
Display app icons
2014-04-29 16:38:59 -07:00
Girish Ramakrishnan
49ac758787
Add config service that provides the appstore url
2014-04-29 16:26:51 -07:00
Girish Ramakrishnan
04a3f88073
Add place holder for App Store tab
2014-04-26 08:36:06 -07:00
Girish Ramakrishnan
7c5725d751
Redirect all http traffic to https
2014-04-25 14:11:03 -07:00
Girish Ramakrishnan
ff151e0b00
Specify the port where it the server is started
2014-04-25 14:08:42 -07:00
Johannes Zellner
c7a00ea283
Use OAuth login in the webadmin
...
Currently the webadmin has a fixed built-in
client id, which is added on server startup.
2014-04-16 21:17:16 -07:00
Johannes Zellner
5edae28235
Use postMessage instead of direct object access for OAuth result
2014-04-15 10:20:47 -07:00
Johannes Zellner
a7db6023f0
Serve up the OAuth support library from the express app
2014-04-15 08:31:02 -07:00
Johannes Zellner
adae88e5b5
Use run.sh only for starting the router
...
I guess for a real system startup we should rather
manager our processes via systemd only.
2014-04-15 08:17:11 -07:00
Johannes Zellner
616fbca2bd
Add signin with Yellowtent button feature
2014-04-14 09:36:34 -07:00
Johannes Zellner
21ed9d6102
Style the OAuth flow sites according to the webadmin style
2014-04-13 21:33:14 -07:00
Johannes Zellner
f74f05b9af
Make OAuth2 example work
...
The test page is inside the webadmin for now.
https://localhost/oauth2/
An account needs to be created first.
2014-04-13 20:46:58 -07:00
Johannes Zellner
fd4f6fc034
Specify auth strategy for each user related route explicitly
2014-04-11 17:40:09 -07:00
Johannes Zellner
0431a74f6b
Add auth middleware explicitly to all routes
...
Currently most routes still support both bearer and basic.
The public routes (version, firsttime, ..) are now handled
by the app.router
2014-04-11 08:43:16 -07:00
Johannes Zellner
beee12925b
Replace old handcrafted auth route with passport strategies
2014-04-10 19:00:46 -07:00
Johannes Zellner
3d630dfdfa
Use Date.now() instead of (new Date()).getTime()
2014-04-09 18:13:44 -07:00
Johannes Zellner
ee9b127762
Remove server test mode
...
This was used by the file route test and was disabling
the authentication middleware. This is unneccesary, as
the test already passed auth info.
2014-04-09 17:59:05 -07:00
Johannes Zellner
361c42a7a9
Start using passport and some auth route strategies
...
The auth strategies are still unused so far.
2014-04-09 17:48:32 -07:00
Girish Ramakrishnan
243a022b5d
Move server-test into src
2014-04-09 09:15:02 -07:00
Johannes Zellner
35d5c1e53d
Fixup linter issues after those merges
2014-04-09 07:48:13 -07:00
Johannes Zellner
8d8cbc16b5
run nginx in the background when using run.sh
2014-04-08 21:57:18 -07:00
Johannes Zellner
a0f81a1991
Move auth/ back into src/
...
This also replaces database.js with distinct
versions of it: userdb.js, tokendb.js and for further
OAuth functions authcodedb.js and clientdb.js
2014-04-08 21:54:28 -07:00
Girish Ramakrishnan
aad73ce941
Move middleware to src/
2014-04-08 19:18:26 -07:00
Girish Ramakrishnan
58625710a8
Make the run script run the app as well
2014-04-08 19:16:52 -07:00
Girish Ramakrishnan
588402548f
Move common back to src/
2014-04-08 19:10:03 -07:00
Girish Ramakrishnan
c7e524c153
sync -> src
2014-04-08 19:01:53 -07:00
Girish Ramakrishnan
24aa15812b
Remove volumeserver and nginx config
2014-04-08 18:59:45 -07:00
Girish Ramakrishnan
a37005d445
Revert the split of volume and syncer code
...
syncer code is now considered core functionality. There were some
problems with making the syncer code an app.
syncer needs exclusive access to volumes. The volumes have a specific
directory format (repo/) and the syncer cannot know if random
apps write to the volume outside it's REST API. This means that
if syncer were just an app, syncer's volumes cannot be shared
with other apps. This would make simple cases like gallery app
modifying pictures impossible. Additionally, docker was supposed
to be used for mounting all the user's volumes into the app.
However, docker does not have a way to add additional mounts on
running containers (minor issue). It would also require to run
an app instance per user.
The new strategy is to make syncer a filesystem API. All read/write
in the system goes through syncer's REST API. This means that we
need only one app instance for multiple users. Volumes don't need
to be mounted, since the app just uses REST calls.
2014-04-08 18:49:57 -07:00
Girish Ramakrishnan
a9af314a62
Volume code does not depend on repo anymore
2014-04-08 15:26:53 -07:00
Johannes Zellner
7cf08d95fb
Take public/private key generation and password hashing from old user.js into use
2014-04-08 09:12:50 -07:00
Johannes Zellner
4d5dcc2ae5
Add /users resource methods and tests
2014-04-08 08:40:25 -07:00
Girish Ramakrishnan
c0b60b1ef1
sync server does not depend on volume code anymore
...
The sync server does not call into the volume server at all. It is
assumed that all the volumes that the sync app has access to will
be mounted in the container in the mountRoot.
2014-04-07 22:36:43 -07:00
Girish Ramakrishnan
9ef40b2dcf
Rename volume server separately at port 3500
...
The top level volumeserver file now run the volume server at 3500.
All api calls /api/v1/volume/* are routed to this server by nginx.
2014-04-07 20:16:56 -07:00
Johannes Zellner
abef09e6f1
Add some more identity tests and run them on npm test
2014-04-07 08:50:48 -07:00
Johannes Zellner
06b291856f
Separate temporary devmode for identity server
2014-04-07 08:45:59 -07:00
Johannes Zellner
380b22c2f4
Add initial identity server test
2014-04-07 08:35:21 -07:00
Girish Ramakrishnan
ef16152025
Rename 'api' to 'sync'
2014-04-06 21:35:45 -07:00
Girish Ramakrishnan
d755c86084
Move user related code to auth/
2014-04-06 21:35:37 -07:00
Girish Ramakrishnan
08cdded284
Move volume specific code to volume/
2014-04-06 21:34:55 -07:00
Johannes Zellner
735e362ec9
Rename auth/ to identity/
2014-04-06 21:38:20 -07:00
Johannes Zellner
a44189d792
Add bearer token grant for normal websites
2014-04-06 21:01:47 -07:00
Johannes Zellner
8d3eabc402
Don't callback twice
2014-04-06 20:29:48 -07:00
Johannes Zellner
1cdf867bb4
Use the json file database for user, token, authCode and client dbs
2014-04-06 20:24:41 -07:00
Johannes Zellner
3d4da8b11b
Cater to the route change for the auth server
2014-04-06 20:24:07 -07:00
Johannes Zellner
45c55ed190
Add auth server route to the default router config
2014-04-06 20:23:41 -07:00
Johannes Zellner
a7ca7900a3
Consolidate some routes into their corresponding js files
2014-04-06 19:31:23 -07:00
Johannes Zellner
289acc8850
Remove ssl for auth server, handled by nginx
2014-04-06 19:32:21 -07:00
Johannes Zellner
64d45e2285
Merge branch 'oauth'
...
Conflicts:
npm-shrinkwrap.json
package.json
2014-04-06 19:28:41 -07:00
Girish Ramakrishnan
3e5f6a30c9
Generously increase timeout for tests on Mac
...
After 10.9.2 update, encfs has become a whole lot slower.
2014-04-05 23:27:00 -07:00
Girish Ramakrishnan
e815dfe84a
Remove upnp-ssdp module since it is unused
2014-04-05 19:50:27 -07:00
Girish Ramakrishnan
6e61fed0c2
webadmin is now served through statically through nginx
2014-04-05 18:48:29 -07:00
Girish Ramakrishnan
72cc084399
Remove http config
2014-04-05 18:45:57 -07:00
Girish Ramakrishnan
417ebb303d
Move certs to nginx
2014-04-05 18:43:54 -07:00
Girish Ramakrishnan
b7cefd9ff3
Revert "Add https support"
...
This reverts commit 5d6cd91bee .
Conflicts:
api/server.js
server.js
2014-04-05 18:43:21 -07:00
Johannes Zellner
fbe7f510f2
Add basic oauth with some test ui in webadmin
2014-04-04 08:40:32 -07:00
Johannes Zellner
6b83066014
Add some authentication means like bearer and basic
2014-04-03 18:01:02 -07:00
Johannes Zellner
51ec3db5ed
Make ejs views work
2014-04-03 08:32:51 -07:00
Johannes Zellner
3968f29ce1
Add database wrappers for tokens, codes, users and clients
2014-04-02 21:46:26 -07:00
Johannes Zellner
b320a0d614
Initial version for the authserver
2014-04-02 20:46:10 -07:00
Johannes Zellner
f2e5cabe81
Remove volume is last user got removed
2014-03-26 23:12:43 -07:00
Johannes Zellner
61cc8d4e54
Add acute.select combobox for user selection
2014-03-26 08:32:37 -07:00
Johannes Zellner
dceddc36fa
Add cleanup script for developer convenience
2014-03-25 07:51:25 -07:00
Johannes Zellner
8c03302558
Actually remove the user you want to remove
...
There is still a bug somewhere...have to exit the train now
2014-03-24 18:53:42 -07:00
Johannes Zellner
86424e4d30
Add UI to remove a user from a volume
2014-03-24 18:38:42 -07:00
Johannes Zellner
8587f534a2
Add user add form and user list for each volume
2014-03-23 22:20:56 -07:00
Johannes Zellner
6c73dbe404
List users for volumes when listing volumes
...
Also includes a unit test for adding users to volumes
2014-03-23 22:07:37 -07:00
Johannes Zellner
0f356585a1
Make tests not interfere wit a currently running yellowtent server
...
This only changes the ports the test servers will be spawned
2014-03-23 12:01:52 -07:00
Johannes Zellner
2266bbe7c9
If broken out of the layout 0% would get overlayed by the main content
2014-03-23 11:54:01 -07:00
Johannes Zellner
fb259a5e7e
Make webadmin main menu responsive
...
fixes #27
2014-03-22 11:36:10 -07:00
Girish Ramakrishnan
aea9b81e95
Update required node version to be >= 0.10.0
...
Otherwise you get issues like
https://github.com/gruntjs/grunt-contrib-imagemin/issues/142
2014-03-22 04:03:31 -07:00
Johannes Zellner
b1891833cc
Streamline dialogs to not expand too much
2014-03-21 10:41:26 -07:00
Johannes Zellner
e09d2e56ae
Integrate user and volume creation in the navbar
2014-03-21 09:52:27 -07:00
Johannes Zellner
72be63c971
Make sure side menu is always visible
...
This however does not work yet in mobile portrait.
2014-03-20 23:15:21 -07:00
Johannes Zellner
830b935d8e
Cardify the settings
2014-03-20 18:00:03 -07:00
Johannes Zellner
1f123654a0
Remove theme.css and copy relevant parts into one css file
2014-03-20 17:52:01 -07:00
Johannes Zellner
033f5d3aa0
Get rid of all flexbox related stuff
2014-03-20 17:32:47 -07:00
Johannes Zellner
aa71e6d20d
Protect against some property access of undefined objects
2014-03-20 17:16:17 -07:00
Johannes Zellner
fd1f7e26fe
Make background fixed
2014-03-20 17:09:28 -07:00
Johannes Zellner
c3b2070f3f
Add initial animations on side pane
2014-03-20 16:19:03 -07:00
Johannes Zellner
05b557d0b1
Make links black
2014-03-20 10:34:44 -07:00
Johannes Zellner
eb2ce3636f
Make volume list show 'cards' per volume
2014-03-20 10:30:18 -07:00
Johannes Zellner
7bc17efd53
Some better bootstrap usage
2014-03-20 08:46:54 -07:00
Johannes Zellner
b60edb268a
First step away from boring desktop application style
2014-03-20 00:04:40 -07:00
Johannes Zellner
1f4039fa0c
Remove the tabview in webadmin
2014-03-19 23:25:22 -07:00
Johannes Zellner
6a4e32591c
Fix typo to load Client in password change dialog
2014-03-19 18:55:44 -07:00
Johannes Zellner
f917e380d1
Remove unused node module simple-crypt
2014-03-18 08:40:24 -07:00
Johannes Zellner
900eb2105e
Implement volume multiuser routes
2014-03-18 08:33:48 -07:00
Girish Ramakrishnan
a61c5fa11d
Provide size information in response when uploading new file
2014-03-18 15:05:17 +05:30
Girish Ramakrishnan
8b376b921f
Set invalid mtime for dirs instead of skipping the property
2014-03-18 14:41:32 +05:30
Johannes Zellner
97e09efd84
Add user get() api
2014-03-17 22:50:39 -07:00
Johannes Zellner
e890dedbab
Fixup volume rest api test
2014-03-17 22:02:38 -07:00
Johannes Zellner
9718f3a2fe
Add users() function to volumes to list the users
2014-03-17 21:58:31 -07:00
Johannes Zellner
c146b032fe
Add unit test for volume delete API
2014-03-17 19:10:15 -07:00
Johannes Zellner
cf8f91c5c5
Adjust webadmin to work with volume IDs
2014-03-17 09:18:41 -07:00
Johannes Zellner
ae0441c7e1
Use a proper config file wrapper for volume configs
2014-03-17 09:18:34 -07:00
Johannes Zellner
415f1492ba
Add unique volume identifier instead of using name
...
This adds a new config file to the volume and thus requires
to recreate all existing volumes and possibly clean the servers
configuration
2014-03-17 09:18:26 -07:00
Johannes Zellner
8831a14ec7
Revert "Add unique volume identifier instead of using name"
...
Pushed too hastly to the wrong branch.
This reverts commit 9514423ab8 .
2014-03-17 08:20:34 -07:00
Johannes Zellner
d8f05534e8
Revert "Adjust webadmin to work with volume IDs"
...
Pushed too hastly to the wrong branch.
This reverts commit c2c4818eda .
2014-03-17 08:20:11 -07:00
Johannes Zellner
c2c4818eda
Adjust webadmin to work with volume IDs
2014-03-17 08:14:11 -07:00
Johannes Zellner
9514423ab8
Add unique volume identifier instead of using name
...
This adds a new config file to the volume and thus requires
to recreate all existing volumes and possibly clean the servers
configuration
2014-03-14 10:36:48 -07:00
Girish Ramakrishnan
6b83bec13e
Make HTTPS the default
2014-03-12 18:48:18 +05:30
Girish Ramakrishnan
60c1a19383
repo: make createDirectory return the dir entry
2014-02-28 12:47:13 -08:00
Girish Ramakrishnan
9a7ede96a0
Add empty dir support
...
I tried a couple of hacks before the magic file approach.
1. First determine the empty tree
git hash-object -t tree /dev/null gives 4b825dc642
Then,
git update-index --index-info
040000 tree 4b825dc642 path/to/empty-folder
Sadly, git converts the above to a submodule when committing :-(
2. The next idea was to repurpose symlinks to denote empty dir.
While this idea could work, it requires the additional work of removing
the symlink before creating the directory.
The current approach is to use a magic file inside empty dir (like .gitignore).
The magic file is filtered when we read from index and when we read tree from
the object store.
2014-02-27 00:12:00 -08:00
Girish Ramakrishnan
46de76ee4d
Increase timeout for some of the volume tests
...
My Mac needs more than 2seconds :-(
2014-02-23 15:40:32 -08:00
Girish Ramakrishnan
3aee2231b7
Run test server at a different port than default
...
tests fail because I have my development server running on the
same port
2014-02-23 15:26:10 -08:00
Johannes Zellner
4c7a8f8987
Improve first time flow
2014-02-23 11:06:03 -08:00
Johannes Zellner
ee8ee4d01f
Remove advancedconnection partials
...
This is no longer needed, as the website is
delievered via the same server.
2014-02-22 11:59:56 -08:00
Johannes Zellner
624d5653cd
Fix issues around user management in webadmin
2014-02-22 11:42:53 -08:00
Johannes Zellner
6c64b045d5
Fix wrong error reporting in volume verification
2014-02-21 23:06:53 -08:00
Johannes Zellner
fbac122abc
Fix volume creation in webadmin
2014-02-21 22:39:31 -08:00
Johannes Zellner
a583f31734
Basic login/logout works again in the webadmin
2014-02-21 21:50:16 -08:00
Johannes Zellner
3f93453101
Add forgotten unit tests for new auth method
2014-02-21 21:49:55 -08:00
Johannes Zellner
29590f22f3
Add new token based authentication
...
We now support next to Basic auth also Token
auth in the authorization header:
Authorization: Token <token>
2014-02-21 21:41:22 -08:00
Johannes Zellner
dea5b1d365
Add autofill polyfill due to missing feature in angular
...
See: https://github.com/angular/angular.js/issues/1460
2014-02-21 20:25:20 -08:00
Johannes Zellner
c14e56151f
Add new webadmin
...
This is merely a copy from the nw-client and
does not yet work in its state atm
2014-02-21 20:04:52 -08:00
Johannes Zellner
1a90b029c2
Remove old webadmin
2014-02-21 20:04:52 -08:00
Girish Ramakrishnan
62c5678ca1
Convert 503 timeout errors to 408
...
Being optimistic about the quality of our server here :) If a request
timed out, we assume the client is taking too long to complete it's request.
In the future, we can make this more sophisticated, by checking if it's
the server or the client which is taking time.
2014-02-21 13:53:20 -08:00
Girish Ramakrishnan
d4a6753c4d
Move timeout constants to server.js
2014-02-21 13:53:20 -08:00
Girish Ramakrishnan
d32c79afd5
Place all size constants in one place
2014-02-21 13:53:12 -08:00
Girish Ramakrishnan
ba96118e53
Make the upload size explicit in server.js
...
Currently, it's hidden deep inside the route handler and hard to spot
2014-02-21 12:38:47 -08:00
Girish Ramakrishnan
138934f1a5
Ignore nginx pid file
2014-02-21 12:35:05 -08:00
Girish Ramakrishnan
c2500cdb82
Set default upload size to unlimited
...
Default seems to be 1MB or so
2014-02-21 12:32:11 -08:00
Johannes Zellner
74ddb991a6
Add initial nginx configuration
...
This adds basic configuration for 80 and 443
nginx can be run with:
./run.sh
and requires root access to bind to the ports.
Basic routes are specified in nginx/server.routes
Additional application routes can be put into the
nginx/applications/ subfolder.
2014-02-21 08:38:15 -08:00
Johannes Zellner
42f8f97f2e
Take npm shrinkwrap into use
...
Until npm 1.4.4 please remove your node_modules
subfolder and run npm --production and then npm shrinkwrap.
Or if just adding a new non dev dependency:
npm i foo --save
npm shrinkwrap
2014-02-21 07:47:26 -08:00
Johannes Zellner
b6065c73fa
check if config.certificateDir is a string, we fail otherwise later
2014-02-17 00:27:56 -08:00
Johannes Zellner
91b0304fee
Switch to asymmetric encryption using RSA for volume headers
2014-02-17 00:22:22 -08:00
Girish Ramakrishnan
5d6cd91bee
Add https support
...
To test with our self-signed key:
./server -k test/cert
2014-02-16 18:39:35 -08:00
Girish Ramakrishnan
177eaaa2b5
Ensure filePath is not null
2014-02-16 01:50:29 -08:00
Johannes Zellner
e7065c506d
Return 401 instead of 400 for wrong login credentials
2014-02-15 11:21:33 -08:00
Johannes Zellner
ba1e931947
Add more error response for password change route
2014-02-14 23:47:42 -08:00
Johannes Zellner
5c5e52b12f
Return access error for volume mount
2014-02-14 21:36:29 -08:00
Johannes Zellner
3c42052f86
Remove destroyVolume() with volume.destroy()
2014-02-14 21:23:16 -08:00
Johannes Zellner
e5d2058065
Abuse the express error handlers for succes handler
...
For finish a rest route with successs, use:
next(new HttpSuccess(statusCode, object));
2014-02-13 17:56:27 -08:00
Girish Ramakrishnan
d7fafc40d8
listVolumes (/api/v1/volumes/list) now returns an object
...
Returning arrays is considered bad practice. This is because Array
constructor can be overriden and this makes REST api prone to
cross-scripting attacks. For example, someone can put a REST call in
a <script src="someothersite/api/v1/list.js"> tag and the browser
will prompty send cookies. Even though the result is JSON, it's
result can be captured if you overload the array constructor!
2014-02-13 17:30:10 -08:00
Johannes Zellner
24a69b772a
Validate new volume password
2014-02-12 22:50:41 -08:00
Johannes Zellner
85af5c7d18
Ensure user create and removal only allowed by admin
2014-02-12 08:38:14 -08:00
Johannes Zellner
6626b1017d
Fix the password handling to be able to reset the users password
2014-02-11 09:34:20 -08:00
Johannes Zellner
bf43147856
Improve volume management
...
This adds a load of unit tests around volume user management
and introduces the password changing capabilities. The API is
still a bit ugly but should work now at least.
2014-02-10 19:23:25 -08:00
Johannes Zellner
d2874185b2
More argument checking for all functions in volume.js
2014-02-10 08:21:08 -08:00
Johannes Zellner
7e3ad7d490
Send userinfo during token login and add 'admin' flag
2014-02-08 11:11:06 -08:00
Girish Ramakrishnan
f3449a8157
Set content-length when getting files
...
Not setting Content-Length results in chunked encoding and makes
it impossible to show progress indicators on the client.
2014-02-07 23:09:39 -08:00
Girish Ramakrishnan
0f848b96a9
Add documentation for repo._getFileSizes
2014-02-07 22:59:44 -08:00
Johannes Zellner
a2a8812371
Make volume.getVolume() async
2014-02-07 09:21:54 -08:00
Johannes Zellner
bb515f0f0c
Add list user API
2014-02-05 08:08:31 -08:00
Johannes Zellner
5bda071d5b
Add option to remove private fields from getAll()
2014-02-05 07:56:31 -08:00
Johannes Zellner
e88ce0cadc
Add getAll() to database.js
2014-02-03 18:56:57 -08:00
Johannes Zellner
a5a26da2f9
Asyncjs added by mistake, we use async
2014-01-28 08:18:55 -08:00
Johannes Zellner
eb4bbc2d55
Add isMounted to the list volumes API
2014-01-27 18:17:31 -08:00
Girish Ramakrishnan
6a0f35dbe9
Make _absoluteFilePath more robust
2014-01-26 23:11:27 -08:00
Girish Ramakrishnan
b742f1bae8
repo: add lots of docs
2014-01-26 18:35:28 -08:00
Girish Ramakrishnan
2864ac4a92
repo: indexEntries now returns file name
2014-01-26 17:17:37 -08:00
Girish Ramakrishnan
94878bfe82
repo: add doc for what indexEntries returns
2014-01-26 17:11:11 -08:00
Girish Ramakrishnan
aff9edc7b9
Add some api docs for repo
2014-01-25 00:36:54 -08:00
Johannes Zellner
f3e54e10ab
Add more tests to not leak unwanted properties
2014-01-21 00:04:55 -08:00
Girish Ramakrishnan
cfb5443816
repo.js: set to_path to . when empty
...
git mv <from> <to> fails gloriously otherwise
2014-01-19 21:18:56 -08:00
Girish Ramakrishnan
55793d9dcf
In javascript, "" evaluates to false
...
A lesson I have learnt umpteem times but can never remember.
2014-01-19 21:11:25 -08:00
Girish Ramakrishnan
717301ca92
Fix error in error handling code
2014-01-19 18:49:50 -08:00
Girish Ramakrishnan
99306e6209
doc: rev can be set to "*" for move and copy
2014-01-19 18:41:49 -08:00
Girish Ramakrishnan
bec3a840e6
fileops: check for path parameter in request
2014-01-19 17:55:58 -08:00
Girish Ramakrishnan
edde17299a
Fix test to query dir/subdir and not dir
2014-01-18 10:57:49 -08:00
Girish Ramakrishnan
e5d9168804
repo: Add listFiles API
...
listFiles returns the mtime information in the checkout dir.
2014-01-16 12:30:26 -08:00
Girish Ramakrishnan
29208276fb
Make tree entries contain the filename
...
Tree entries now contain the path and name. Commit messages contain
the file name and not the path.
2014-01-16 12:06:36 -08:00
Girish Ramakrishnan
bb05224f7e
repo.js: Use -rt when listing subtrees
2014-01-15 19:56:41 -08:00
Girish Ramakrishnan
cfb31439fd
Make volume.listFiles use volume.getTree().
2014-01-15 19:09:35 -08:00
Johannes Zellner
e8b70fdfe3
Add initial systemd service file and some readme
2014-01-14 18:01:39 -08:00
Girish Ramakrishnan
6b1b030f22
Replace polo with upnp-ssdp
2014-01-13 00:56:40 -08:00
Johannes Zellner
579c1b6167
Add explicitly {} to response.send()'s body
...
This is needed, as we set content type JSON to all responses,
thus we do not want express to add a 'OK' in a res.send(200);
case
2014-01-12 18:40:04 -08:00
Girish Ramakrishnan
a434bc44a0
Hot fix for getting webadmin to work again
2014-01-10 12:07:48 -08:00
Johannes Zellner
48f449383f
The credentials header always needs to be there for CORS
2014-01-09 18:19:20 -08:00
Girish Ramakrishnan
7083644eb7
Add test for CORS
2014-01-08 23:58:30 -08:00
Girish Ramakrishnan
7df5ee85ce
Fix typo when returning new stream
2014-01-08 22:29:38 -08:00
Johannes Zellner
90e1e9e106
return empty readStream
2014-01-08 18:32:06 -08:00
Girish Ramakrishnan
781495e662
Get rid of _ dependancy and use the cors middleware
2014-01-08 18:09:00 -08:00
Girish Ramakrishnan
fc8b03a9dc
Add CORS middleware
2014-01-08 17:51:50 -08:00
Johannes Zellner
322db20642
Move firsttime route to server.js and complete user documentation
2013-12-01 17:52:51 -08:00
Johannes Zellner
8c82ce82a6
Merge branch 'documentation'
2013-12-01 16:44:30 -08:00
Johannes Zellner
cbb80c6b01
Generate random salt for volume headers and check volumes for such header
2013-11-28 21:16:10 -08:00
Johannes Zellner
ab2d82e93f
Add some more documentation and change the error format a bit
2013-11-18 20:24:41 -08:00
Johannes Zellner
da17d14a2c
Add infrastructure for REST api documentation
2013-11-18 18:54:34 -08:00
Girish Ramakrishnan
d6f2a3ec48
Remove unused requires
2013-11-04 21:54:27 -08:00
Girish Ramakrishnan
8c27178b40
Revert testMode
...
Using mock objects is a better idea to do syncer testing.
2013-11-01 15:03:14 -07:00
Girish Ramakrishnan
65102425e8
Use null instead of undefined.
...
The coding style is:
- Use and test for null for object properties
- Use 'delete' only for hashes
- Use 'undefined' only when testing for a key in a hash
2013-11-01 11:25:04 -07:00
Johannes Zellner
158d625cc7
Separate the server code into a main and a server API
...
the server.js in the api subfolder might not be in the best
place, as its not an API as the others are.
2013-10-31 12:11:05 -07:00
Girish Ramakrishnan
b73eb8dabd
Instead of X-YT-Authorization header just check for absence of auth.
2013-10-30 12:51:43 -07:00
Girish Ramakrishnan
c9164e0865
Add test mode
...
node server --test.
This will authenticate any request that contains the X-YT-AUTHORIZATION
header.
2013-10-30 05:35:42 -07:00
Girish Ramakrishnan
c695af5cd1
Move auth function to top level for readability
2013-10-30 05:13:17 -07:00
Girish Ramakrishnan
5af6ad236f
Fix coding style
2013-10-30 04:59:51 -07:00
Johannes Zellner
227645b489
Add more tests around the token and user management
2013-10-29 08:41:54 -07:00
Girish Ramakrishnan
73d61368d1
Remove dead code
2013-10-26 11:21:06 -07:00
Girish Ramakrishnan
1618e42e5d
Fix linting errors
2013-10-23 20:56:03 -07:00
Girish Ramakrishnan
20c0ef7d93
Add a TODO in putFile implementation
2013-10-23 09:46:07 -07:00
Girish Ramakrishnan
b161a2e68a
Removing non-existent file is not an error
...
We return a 204 now which is possibly incorrect because we set an
entity header content-type as per
http://www.w3.org/Protocols/rfc2616/rfc2616-sec7.html
2013-10-23 04:01:18 -07:00
Girish Ramakrishnan
f37ff4c5e6
Have a local copy of aes-helper
2013-10-22 18:30:31 -07:00
Girish Ramakrishnan
0f323b05be
Remove superfluous send call
2013-10-22 12:27:36 -07:00
Girish Ramakrishnan
66d798dc61
Return 422 for invalid cursor
2013-10-22 12:20:25 -07:00
Girish Ramakrishnan
3deab4c307
Add content-type middleware
...
Set all our API responses to be appplication/json.
2013-10-18 23:38:43 -07:00
Girish Ramakrishnan
e779d822bb
Create scripts dir
2013-10-18 23:26:29 -07:00
Girish Ramakrishnan
3bbe8aa353
Handle Renames and Copies correctly in diff-tree
2013-10-18 15:00:42 -07:00
Girish Ramakrishnan
35db6ab0ed
Give descriptive names for positions
2013-10-18 14:31:27 -07:00
Girish Ramakrishnan
a4c1cbb86c
Fix parsing of index for filenames with newlines
2013-10-18 13:30:03 -07:00
Girish Ramakrishnan
2bf7d64786
Parse commit message correctly for files with trailing spaces
2013-10-18 12:54:11 -07:00
Girish Ramakrishnan
c680b2f560
Use verbatim mode for commit messages
2013-10-18 12:48:51 -07:00
Girish Ramakrishnan
5835767d18
Write the message to stdin
...
-m add \n\n to the commit message in verbatim mode (this is not set
yet, but will be in a future commit).
2013-10-18 12:47:06 -07:00
Girish Ramakrishnan
a9352d94a4
Test tabs in filename
2013-10-18 11:22:21 -07:00
Girish Ramakrishnan
c166d4b27d
database.js: indent the JSON for readabililty
2013-10-18 10:08:28 -07:00
Girish Ramakrishnan
5ed871fdea
Fix putFile to handle nullSha1 parent for new files
2013-10-17 22:21:02 -07:00
Girish Ramakrishnan
5d9ccf51b8
Fix db directory creation by database.js
2013-10-17 17:18:09 -07:00
Girish Ramakrishnan
c6de2a5668
Make mkdirSync calls via safetydance
2013-10-17 17:02:57 -07:00
Girish Ramakrishnan
c884c183c8
Make existsSync calls via safetydance
2013-10-17 12:46:41 -07:00
Girish Ramakrishnan
9400918c3c
Use safetydance all over
2013-10-17 12:30:54 -07:00
Girish Ramakrishnan
fc5e78384b
Use safetydance for exception safety
2013-10-17 12:25:35 -07:00
Girish Ramakrishnan
183b38f645
Test non-ASCII file names
2013-10-17 01:23:57 -07:00
Girish Ramakrishnan
494e52c729
Add tests to check for file with special characters
2013-10-17 01:15:17 -07:00
Girish Ramakrishnan
8e197ce714
Add FIXME in repo.js to convert to Buffer
2013-10-16 23:50:29 -07:00
Girish Ramakrishnan
8aff9f7b9c
Remove all usages of trimRight to be consistent with other parts of code
2013-10-16 23:30:25 -07:00
Girish Ramakrishnan
11f5932732
null terminate log output
2013-10-16 23:28:19 -07:00
Girish Ramakrishnan
bbe0f2d253
diff-tree and log now uses -z termination
2013-10-16 23:24:25 -07:00
Girish Ramakrishnan
5270735122
refactor parseIndexLines
2013-10-16 22:12:37 -07:00
Girish Ramakrishnan
5da2e7c1c0
Find renames in commits
2013-10-16 22:05:40 -07:00
Girish Ramakrishnan
ffdf6cb4f3
ls-files output now uses -z based output
2013-10-16 20:55:11 -07:00
Girish Ramakrishnan
6e364139ee
Parse filename as 'rest of line'
2013-10-16 18:59:31 -07:00
Girish Ramakrishnan
c5c96aa9eb
ls-tree now uses -z
...
This allows us to work properly with spaces and special characters
in filenames.
2013-10-16 17:31:16 -07:00
Girish Ramakrishnan
1410e50a1e
Make sure parser functions are not passed empty strings
2013-10-16 17:14:51 -07:00
Girish Ramakrishnan
6ebe9f1e52
Set the file upload limit to 521mb
...
My intention was to set it to 512mb but the file I have is 514mb.
So, I chose a prime number above 514.
For some reason, instead of a 413 HTTP Error, the connection gets
reset when uploading large files. Needs investigation.
2013-10-14 23:11:49 -07:00
Girish Ramakrishnan
209270305e
Increase upload timeout of file uploads to 3 mins
2013-10-14 22:49:04 -07:00
Girish Ramakrishnan
c902373354
Make _absoluteFilePath return null when path is outside repo
2013-10-13 20:53:49 -07:00
Girish Ramakrishnan
9a5e5b8aa3
Standardize on the debug naming convention
...
Always prefix with server. Provide path to file. Drop file extension.
So,
server:routes/user
This allows to debug as DEBUG="server:*".
2013-10-12 17:01:21 -07:00
Johannes Zellner
507a5eac1b
Graphics assets move to the client
2013-10-12 09:56:21 -07:00
Johannes Zellner
f972136fa0
Add some user routes documentation and improve statuscodes
2013-10-08 08:38:58 -07:00
Johannes Zellner
afe6a12e80
Use GET not POST
2013-10-07 17:23:23 -07:00
Johannes Zellner
be17cbd2d9
Add volume isMounted route
2013-10-07 17:21:24 -07:00
Johannes Zellner
429172e6aa
Move requireMountedVolume to volume routes and add two more tests
2013-10-07 00:24:03 -07:00
Johannes Zellner
5dfb2c9b6c
Separate file route api tests into its own test file
2013-10-07 00:03:30 -07:00
Johannes Zellner
0d6bf03a40
Separate volume route api tests into its own test file
2013-10-06 23:49:49 -07:00
Johannes Zellner
755edc874a
Separate user route api tests into its own test file
2013-10-06 23:36:50 -07:00
Johannes Zellner
58f4bc2a68
Add route step to check if volume is mounted
2013-10-06 11:24:48 -07:00
Johannes Zellner
72a8606cca
Add volume.isMounted() to hide away encfs
2013-10-04 08:35:45 -07:00
Johannes Zellner
c911153b2f
Always handle error event for spawn
...
In case we cannot execute the process or the cwd
is not existent, the exception would bubble up till
the server crashes.
2013-10-04 08:23:44 -07:00
Girish Ramakrishnan
595b8a5f89
Verify filePath type
2013-10-03 08:27:21 -07:00
Girish Ramakrishnan
79dc24ac5e
Compute hash through git instead of multiparty
...
git hash contains "blob<sp>size\0" prepended to blob data.
2013-10-03 01:12:36 -07:00
Girish Ramakrishnan
a74c05807f
repo.js: allow putting a file with same contents as the existing one
2013-10-02 23:40:06 -07:00
Girish Ramakrishnan
6aa82c7019
remove unused reference to syncer
2013-10-02 22:47:03 -07:00
Girish Ramakrishnan
1cda149d9d
Remove file.update route
...
putFile and fileops does it's job.
2013-10-02 22:41:28 -07:00
Girish Ramakrishnan
90b6e0d155
Check authorization header before cookie/auth_token.
...
6503885b21 reversed the order for some unknown reason.
2013-10-01 22:11:57 -07:00
Johannes Zellner
1af3198ef2
Add password verification route for some volume related routes
2013-09-30 21:42:30 -07:00
Johannes Zellner
9002e01b62
Finally fix the repo subfolder in volume
...
Fixes #2
2013-09-28 21:40:27 -07:00
Girish Ramakrishnan
d0fa0131ea
Fix linting issues in syncer.js
2013-09-28 21:33:56 -07:00
Girish Ramakrishnan
f0758551dd
Fix fileops.js linting issues
2013-09-28 21:27:07 -07:00
Girish Ramakrishnan
c82fdcced5
Fix linter issues in repo.js
2013-09-28 21:25:03 -07:00
Johannes Zellner
7c14e195eb
Do not mix token and auth header extraction
2013-09-28 17:13:17 -07:00
Johannes Zellner
6a8743fd0e
Add unmountall.sh to unmount all remaining encfs volumes
2013-09-28 14:01:22 -07:00
Johannes Zellner
242519f52a
Do not stringify the object, wrong content type would be set
2013-09-28 01:28:41 -07:00
Johannes Zellner
13e8e7dae0
Init repo in a 'repo' subfolder of the volume
...
Fixes #2
2013-09-28 00:35:02 -07:00
Johannes Zellner
99eaf65884
Use new polo release and catch any errors from that
2013-09-26 10:18:53 -07:00
Johannes Zellner
6a4885414d
Replace the first time handling with an API call
...
There is now a /v1/firsttime GET call to check in which mode
the device currently is. The convenience redirection to firsttime.html
for the webadmin, which was done for every request is now gone.
2013-09-21 17:18:49 -07:00
Girish Ramakrishnan
5692851d4c
Add some API docs
2013-09-19 23:40:28 -07:00
Johannes Zellner
3f88f9bbbf
Add some token related test cases
2013-09-19 09:48:41 -07:00
Johannes Zellner
245aa63fc0
Add some user server API tests
2013-09-19 08:42:38 -07:00
Johannes Zellner
538a80e686
Enable the volume already exists test
2013-09-19 08:34:27 -07:00
Johannes Zellner
9f55ca3cea
Add some tests for the server
2013-09-19 08:30:17 -07:00
Johannes Zellner
6d2e1141c6
Add a silent option to the server to suppress logging
2013-09-19 08:13:43 -07:00
Johannes Zellner
b31fe1371a
Let server's start() API take a config object
...
This object can be used to specify the data folders.
Mainly useful for temporary folders for tests.
2013-09-19 08:00:27 -07:00
Johannes Zellner
53b6a0b871
Also run the toplevel tests
2013-09-18 11:07:54 -07:00
Johannes Zellner
47b59306ab
Change server.js to export an API with start/stop
...
Also add a basic test to verify the server can start and stop.
We still have an issue with api/server/server-test.js to use the
regular ~/.yellowtent/ folders thus test might break if this directory
is used.
2013-09-18 10:58:10 -07:00
Johannes Zellner
763cf46e2e
Forgot to callback the server init back
2013-09-18 08:01:11 -07:00
Girish Ramakrishnan
31b1265592
repo.js: Remove usage of exec
...
This makes sure we can handle files with spaces and funny characters
like brackets without shell-escaping.
Using exec has security implication since a filename could be 'foo && rm -rf /'
2013-09-18 00:44:26 -07:00
Girish Ramakrishnan
9e8177a139
repo.js: remove exec feature of chaining commands
...
chaining is a shell feature. This is part one of removing
shell usage.
2013-09-18 00:44:26 -07:00
Johannes Zellner
a18fe47783
Add server announcement via polo
2013-09-17 10:39:29 -07:00
Johannes Zellner
9821a3e515
Add some additional logging
2013-09-16 08:00:07 -07:00
Girish Ramakrishnan
476c7f8ab7
repo.js: add separate function to add content
2013-09-15 23:22:38 -07:00
Girish Ramakrishnan
56bc1fe9fb
s/_op/_operation
...
Note that the _ signifies that the option is internal and not set
by the user.
2013-09-15 19:56:55 -07:00
Girish Ramakrishnan
d3c6ba0345
repo.js: add putFile
2013-09-15 19:52:38 -07:00
Girish Ramakrishnan
d4db16c845
refactor: Move code into repo
2013-09-15 19:24:23 -07:00
Girish Ramakrishnan
87f04cd978
Make rev param mandatory for fileops
...
Specify '*' as rev for don't care.
2013-09-15 19:04:01 -07:00
Johannes Zellner
20aaf3eb01
Increase request size limit for now
2013-09-15 15:18:30 -07:00
Johannes Zellner
2df8dd36af
Use volume password header database
...
This database stores the username and the volume password,
encrypted with the users password.
2013-09-13 23:45:28 -07:00
Girish Ramakrishnan
e16b3c91cf
repo.js: fileEntry return ENOENT when file not found
2013-09-13 23:07:46 -07:00
Girish Ramakrishnan
c3a58b44a4
fix typo
2013-09-13 22:59:59 -07:00
Girish Ramakrishnan
dcca98019b
Better error handling
2013-09-13 22:35:13 -07:00
Girish Ramakrishnan
fa15e13cb1
move metadata to repo
2013-09-13 22:14:56 -07:00
Girish Ramakrishnan
20942f6305
Add more asserts to validate arguments
2013-09-12 22:39:39 -07:00
Girish Ramakrishnan
99664c0323
coding style: Remove options from repo.create
...
The style is thus:
- Required arguments are listed as proper arguments
- Optional arguments are in options
- Options object is optional and ca be skipped
2013-09-12 22:29:55 -07:00
Girish Ramakrishnan
0e39b7bfbf
Sprinkle asserts to validate args
2013-09-12 22:23:53 -07:00
Girish Ramakrishnan
1ab311c6fb
s/user/obj
2013-09-12 22:17:23 -07:00
Girish Ramakrishnan
84e1dc32d3
api: implement putFile
2013-09-12 21:03:39 -07:00
Johannes Zellner
2b726e3097
Add better volume error reporting and volume mounting
2013-09-11 10:52:47 -07:00
Johannes Zellner
f9c06fedbc
Use private property to prevent accidental pushes to npm
2013-09-11 10:52:47 -07:00
Anders Bakken
c6b1052173
Add new p2p stuff
2013-09-09 18:28:45 -07:00
Johannes Zellner
07a8dbf1c3
Add initial support for user/password headers for volumes
2013-09-09 09:45:40 -07:00
Johannes Zellner
ee8bd13685
Add some more volume related tests
2013-09-08 21:02:36 -07:00
Johannes Zellner
6503885b21
Ask the user for his password to create a volume
2013-09-08 20:24:19 -07:00
Johannes Zellner
51009cae42
make tests cleanup their tmp folders
2013-09-08 14:07:01 -07:00
Johannes Zellner
6326bdd1c3
Minor updates to streamline tests
2013-09-08 13:44:33 -07:00
Johannes Zellner
fa6772ea5c
Add database.js unit tests
2013-09-08 13:43:47 -07:00
Girish Ramakrishnan
0f7b85f52d
repo: implement move and copy
2013-09-08 00:58:14 -07:00
Girish Ramakrishnan
e051ded540
make sure paths are outside .git/
2013-09-08 00:28:39 -07:00
Girish Ramakrishnan
c627a1fc07
path.resolve already takes care of path.join
2013-09-07 23:37:17 -07:00
Girish Ramakrishnan
05fe38512d
use path.join
2013-09-07 23:37:17 -07:00
Girish Ramakrishnan
defaf84532
repo: separate addFileAndCommit from writeFileAndCommit
...
addFileAndCommit can be used to add files that were modified or created
in place in the checkout (for example, copy operation)
2013-09-07 23:15:29 -07:00
Girish Ramakrishnan
78a4daf08d
repo: refactor exec call
2013-09-07 23:12:07 -07:00
Girish Ramakrishnan
925f22d979
api: add delete fileops
2013-09-07 22:23:55 -07:00
Girish Ramakrishnan
7e04452f24
repo: removeFile can now remove directories
2013-09-07 21:43:53 -07:00
Johannes Zellner
eee4955f4c
Add user remove route
2013-09-06 09:54:07 -07:00
Johannes Zellner
9e84c5d063
Set different default reporter for mocha
2013-09-06 09:52:32 -07:00
Johannes Zellner
c05fc3f79c
First user created is the admin
...
The special */createadmin route is to allow non authorized calls.
As soon as there is one entry in the db, no further calls are allowed.
2013-09-06 08:10:19 -07:00
Johannes Zellner
48ba30a0d1
Use user API in user routes
2013-09-05 21:34:49 -07:00
Johannes Zellner
b7dfcc8576
Add initial user.js to split up the user route and API
2013-09-05 10:02:32 -07:00
Girish Ramakrishnan
10847404da
repo.addFile can now automatically rename a file if it already exists
2013-09-03 01:06:07 -07:00
Girish Ramakrishnan
a29778f6cf
Get server version from package.json
2013-09-02 15:19:59 -07:00
Johannes Zellner
bed03ef56e
Do not include .git folder for volume file listing
2013-09-01 11:54:56 -07:00
Girish Ramakrishnan
c5becb8480
rename options.dirs to options.listSubtrees
2013-09-01 08:37:26 -07:00
Girish Ramakrishnan
5aabc1f4bf
Metadata now returns the tree hash
...
The hash can be provided in a future call to metadata. If there are
no changes, metadata returns 304.
2013-09-01 01:46:27 -07:00
Girish Ramakrishnan
c8795fae1c
Use cat-file instead of show
...
Only to use plumbing as much as possible.
2013-09-01 00:09:36 -07:00
Girish Ramakrishnan
7f31ead9e3
centralize volume error handling
2013-08-31 22:56:52 -07:00
Girish Ramakrishnan
23b41089b4
repo: getTree can now list dirs
2013-08-31 22:46:54 -07:00
Girish Ramakrishnan
2291146416
api: /api/v1/metadata now returns metadata about file or directory
2013-08-31 22:46:54 -07:00
Johannes Zellner
54a8dad1b7
Empty name in package.json to prevent accidental publish
2013-08-31 21:24:34 -07:00
Girish Ramakrishnan
6816e069a1
src -> api
2013-08-31 21:01:21 -07:00
Girish Ramakrishnan
009f819dae
Add coverage/ to git ignore
2013-08-31 21:00:58 -07:00
Girish Ramakrishnan
d6342d8f26
api: get delta changes using /api/v1/sync/<volume>/delta?clientRevision=rev
2013-08-30 16:58:56 -07:00
Girish Ramakrishnan
83120d1aab
repo: implement diffTree
2013-08-30 15:58:01 -07:00
Johannes Zellner
0cfd3b43ee
Move webadmin/ and server.js to toplevel folder
2013-08-30 15:00:42 -07:00
Girish Ramakrishnan
0d247de7ee
Use standard Basic authentication
...
This makes the API easier to use with standard rest clients.
2013-08-30 14:55:48 -07:00
Girish Ramakrishnan
55e04644b0
api: revisions api - /api/v1/revisions/<path>
2013-08-30 13:51:17 -07:00
Girish Ramakrishnan
db56ddb99d
repo: add getRevisions to get file history
2013-08-30 13:27:54 -07:00
Girish Ramakrishnan
b7805853b9
repo: refactor out log line parsing
2013-08-30 12:47:21 -07:00
Girish Ramakrishnan
187a78c10e
repo: Spawn now returns the spawned process
2013-08-30 12:45:21 -07:00
Johannes Zellner
3812a0ab5f
Remove noise from the volume test
2013-08-30 10:17:54 -07:00
Johannes Zellner
9ca7a5aa75
check if volume is still mounted on destroy
2013-08-30 10:17:00 -07:00
Johannes Zellner
a528bd4cec
Add test case to destroy a volume and actually cleanup the mounted volumes
2013-08-30 10:11:46 -07:00
Johannes Zellner
9eac6e79fd
Add istanbul code coverage tool
...
Can be used via:
$ npm test --coverage
The result are then in the coverage subfolder:
$ chromium coverage/lcov-report/index.html
2013-08-29 14:07:54 -07:00
Johannes Zellner
d2f56e2b0b
Use volume.js to back the volume routes
2013-08-29 09:55:11 -07:00
Girish Ramakrishnan
be2716c039
repo: read specified file revision
2013-08-27 23:51:22 -07:00
Girish Ramakrishnan
0ef5650424
repo: don't ever pipe to pager
2013-08-27 23:07:30 -07:00
Girish Ramakrishnan
38190a9831
Provide the sha1 in changes
2013-08-27 22:46:24 -07:00
Girish Ramakrishnan
dd5e34249d
Return 404 if file not found
2013-08-27 21:36:17 -07:00
Girish Ramakrishnan
dfccd5e1f4
Create RepoError to give more information on the actual error
2013-08-27 21:34:16 -07:00
Girish Ramakrishnan
d873b5e9f4
repo: check for valid file path
2013-08-27 21:27:47 -07:00
Girish Ramakrishnan
2bebe59437
Fix failing server-test
2013-08-27 15:35:22 -07:00
Girish Ramakrishnan
3ad917042c
Fix path to tests
2013-08-27 15:26:58 -07:00
Girish Ramakrishnan
cade29e72d
Move package.json and README.md to toplevel
2013-08-27 15:22:23 -07:00
Girish Ramakrishnan
40bd520cf5
rename server/ to src/
2013-08-27 15:18:18 -07:00
Girish Ramakrishnan
1d2c4eaf0d
Remove lib/ and lock.js
...
lock.js got replaced with lockfile module.
2013-08-27 15:13:21 -07:00
Girish Ramakrishnan
d25f424db8
Move client code to new repo
...
nw-client.git is the new location
2013-08-27 15:10:30 -07:00
Johannes Zellner
4240ae6189
Make client.js executeable
2013-08-27 09:15:54 -07:00
Johannes Zellner
d60a4d6681
Add inital volume.js file with tests
2013-08-27 09:14:43 -07:00
Johannes Zellner
2f9e171de4
Clear file listing when a volume gets deleted
2013-08-27 09:14:43 -07:00
Girish Ramakrishnan
4fe5da1048
Say hello to new client, same as old client
2013-08-27 00:39:11 -07:00
Girish Ramakrishnan
37beba7929
clientIndex is the entries
2013-08-27 00:39:11 -07:00
Girish Ramakrishnan
920408cdea
Add package.json for lib
2013-08-26 23:40:46 -07:00
Girish Ramakrishnan
5b4f03622d
Move package.json to server/
2013-08-26 23:16:08 -07:00
Anders Bakken
b65d15cc5e
cleanup
2013-08-26 23:05:29 -07:00
Anders Bakken
87accc011a
Write a small test that traverses a directory structure and calculates hashes
2013-08-26 23:01:49 -07:00
Girish Ramakrishnan
417a2d9ece
Increase volume create test timeout
...
On the Mac, creating volumes takes a lot of time on low battery
2013-08-26 22:12:55 -07:00
Girish Ramakrishnan
bab57fc464
Use expect.js the right way
2013-08-26 21:31:24 -07:00
Girish Ramakrishnan
3704fd61d9
Store mtime and size into the entry directly
2013-08-26 21:07:39 -07:00
Girish Ramakrishnan
ed47471096
Use server index to perform 3-way diff
...
The diff code requires mtime to resolve conflicts properly. So, just
use the index to get hold of the HEAD tree with the mtime information.
2013-08-26 08:45:44 -07:00
Girish Ramakrishnan
4b5da33d55
Disable logger in testing mode
2013-08-26 00:25:54 -07:00
Johannes Zellner
2914684867
Ignore non directories in the data folder as volumes
2013-08-25 19:00:31 -07:00
Johannes Zellner
3acbed6eb8
Add repo test for email and author
2013-08-25 18:53:28 -07:00
Johannes Zellner
3671d1cf88
disable lib/test and fix test case linting
2013-08-25 18:42:43 -07:00
Johannes Zellner
4dcce36cc2
Add email to the token database
2013-08-25 18:33:15 -07:00
Johannes Zellner
f03d8f2a08
replace wrench with rimraf
2013-08-25 18:18:44 -07:00
Johannes Zellner
365f20be60
The encfs module is now in npm, remove from repo
2013-08-25 08:47:32 -07:00
Girish Ramakrishnan
2e73db41fb
repo: parse index to get mtime information
2013-08-25 00:50:42 -07:00
Girish Ramakrishnan
8a2efe24bc
Test routes.sync.diff
2013-08-25 00:37:40 -07:00
Girish Ramakrishnan
70db966c75
repo: pass tmpDir as config option
2013-08-24 20:55:34 -07:00
Girish Ramakrishnan
2356a673fe
file: fix file update and add tests
2013-08-24 20:47:30 -07:00
Girish Ramakrishnan
5a109b462b
Create multipart parser on the fly
...
The parser saves files directly into the volume's tmp.
2013-08-24 19:13:54 -07:00
Girish Ramakrishnan
13d266f373
Create tmp per volume
...
This allows us to rename files. rename() does not work across file
systems.
2013-08-24 19:13:11 -07:00
Girish Ramakrishnan
bc6419ce8a
repo: return file's sha1 when creating new commits
2013-08-24 18:02:03 -07:00
Girish Ramakrishnan
0cd4ea32bc
repo.js: Allow git() to take multiple commands
2013-08-24 17:38:12 -07:00
Girish Ramakrishnan
bff912830b
repo: requesting an invalid entry must not error
...
It should just return a null entry
2013-08-24 17:01:36 -07:00
Girish Ramakrishnan
5b0fddb27e
typo: root->rootDir
2013-08-24 17:01:02 -07:00
Girish Ramakrishnan
8ab9bd7d22
file: fix file.read and add tests
...
This commit also changes the initial file in volume from README to README.md.
Side note: By default, superagent only buffers response for text/* and form data.
So when sending across README, the file is just an octet-stream and the response
in not received in res.text. This can be fixed by calling buffer(false) in superagent
request. Renaming the file to README.md side steps this problem because .md files
have the mime type text/x-markdown.
2013-08-24 15:34:48 -07:00
Girish Ramakrishnan
8586420137
add test for attachVolume with bad repo param
2013-08-24 08:41:07 -07:00
Girish Ramakrishnan
9fd90d417d
volume: create repos in initialize
...
needs test :)
2013-08-23 23:38:16 -07:00
Girish Ramakrishnan
fed4c584e6
repo: remove initialize
...
It was present primarily for caching HEAD. It's not really required.
2013-08-23 23:36:35 -07:00
Girish Ramakrishnan
eb6da4d79a
Initialize repo when volume is created.
...
Get started with the volume tests while we are at it.
2013-08-23 23:22:46 -07:00
Girish Ramakrishnan
8fc9504dd7
tests: create admin user and get userInfo
2013-08-23 22:23:16 -07:00
Girish Ramakrishnan
8448310b10
Make server.js a module and add tests
2013-08-23 22:03:53 -07:00
Girish Ramakrishnan
7e8980d5bc
file: implement update
2013-08-22 00:21:27 -07:00
Girish Ramakrishnan
5f33ac29c9
repo: make fileEntry work with deleted files
2013-08-22 00:21:22 -07:00
Girish Ramakrishnan
1c06045a01
file: implement file.read
2013-08-21 23:17:49 -07:00
Girish Ramakrishnan
ca706de69d
Change default base dir to ~/.yellowtent
...
It pollutes the source directory with stuff and git clean -dxf nuked
all my old setup :( Don't want that to happen again.
Also create the paths synchronously, otherwise this ends up with a
race with the db.initialize() code.
2013-08-21 22:47:24 -07:00
Girish Ramakrishnan
6f1bcf1250
Use app.param to attach repo to volume
2013-08-21 22:34:45 -07:00
Girish Ramakrishnan
a2cca15a34
Use named params instead of wild cards
2013-08-19 23:17:11 -07:00
Girish Ramakrishnan
58d1a245ee
Implement sync.diff
2013-08-19 22:46:24 -07:00
Girish Ramakrishnan
c06f67965e
repo.js: make getCommit public and set commit.sha1
2013-08-19 22:46:24 -07:00
Girish Ramakrishnan
b642b65524
syncer: Add syncer code and test.
2013-08-19 20:40:22 -07:00
Johannes Zellner
a7f857ad8c
Style tinkering for volume.js
2013-08-19 10:10:27 -07:00
Johannes Zellner
0c987ed58c
Add npm test script for server/ and lib/
2013-08-19 10:01:25 -07:00
Girish Ramakrishnan
9573889ee9
repo.js: refactor
2013-08-19 02:27:46 -07:00
Girish Ramakrishnan
826f9be0e2
repo.js: remove fileChangeTime and add extra arg to fileEntry
2013-08-19 02:19:10 -07:00
Girish Ramakrishnan
d2119d367c
repo.js: Implement fileEntry
2013-08-19 02:07:54 -07:00
Girish Ramakrishnan
6fa3ca2697
repo.js: make head a commit object
2013-08-19 01:31:40 -07:00
Girish Ramakrishnan
69536118cc
repo.js: Make Repo a class and add tests
2013-08-19 01:21:19 -07:00
Girish Ramakrishnan
4916be2a02
Implement lock.js
...
This will be used for locking shared variables like the index.
If we decided to make things multi-process, this implementation can
become file based.
2013-08-18 23:05:21 -07:00
Johannes Zellner
b15b385a9e
Move server routes from volume.js to server.js
2013-08-18 21:17:33 -07:00
Johannes Zellner
924bd03912
Also redirect to firsttime if req is /
2013-08-18 21:16:45 -07:00
Johannes Zellner
d25e48bfe2
Add mocha based autotest for encfs module
2013-08-18 21:03:04 -07:00
Johannes Zellner
5c59a2f651
Change server comandline args and change firsttime
...
- server now takes has a configRoot, dataRoot, mountRoot with
defaults so no startup argument is needed
* configRoot: for server config like user db
* dataRoot: actual encrypted container storage
* mountRoot: mount point folder for mounted encfs volumes
- First time use is now alwasy detected and the browser gets
redirected by the server
2013-08-18 11:23:21 -07:00
Johannes Zellner
5f356da1c6
Add bootstrap theme css files
2013-08-18 11:23:04 -07:00
Johannes Zellner
da3a9b2c24
Update to current bootstrap version and adjust new volume creation
2013-08-18 10:04:47 -07:00
Girish Ramakrishnan
2282940259
repo: implement commit(), addFile(), updateFile(), removeFile(), createReadStream()
2013-08-17 11:52:07 -07:00
Johannes Zellner
ee96bab60b
Add 'new volume' button and make volume controls smaller
2013-08-17 09:49:30 -07:00
Girish Ramakrishnan
e52b23931d
repo: add mtime() and isTracked()
2013-08-17 01:33:33 -07:00
Girish Ramakrishnan
216df68578
repo: prune empty lines
2013-08-17 01:00:28 -07:00
Girish Ramakrishnan
7f2c11250b
repo: empty commit is a special case for null tree
2013-08-17 01:00:28 -07:00
Girish Ramakrishnan
b830bace54
repo: add commit()
2013-08-16 22:05:33 -07:00
Girish Ramakrishnan
c52094290d
Remove console.log
2013-08-16 21:53:20 -07:00
Girish Ramakrishnan
9f379b1106
repo: add hasFileChanged
2013-08-16 21:22:20 -07:00
Johannes Zellner
5af5910840
Temporarily disable repo per default until volume.js initializes the git repo
2013-08-16 20:47:00 -07:00
Girish Ramakrishnan
d36f36e346
Add repo.js
...
This is our git wrapper. I tried using gift but it's painful.
2013-08-16 20:33:29 -07:00
Johannes Zellner
56c9e5b7a9
Use glyphicons for volume list delegates
2013-08-16 16:27:26 -07:00
Johannes Zellner
676067b92d
Add bootstrap-glyphicons
2013-08-16 16:27:15 -07:00
Johannes Zellner
4edfc67563
Add volume deletion
2013-08-16 09:34:27 -07:00
Johannes Zellner
c9ee8db8e4
Add volume delete button
2013-08-15 10:07:35 -07:00
Johannes Zellner
4e6a3deb62
Add volume creating interface
2013-08-15 08:39:11 -07:00
Johannes Zellner
3973d320b1
Add initial version of node-enc
...
Currently in toplevel as I dont know where to put
2013-08-14 10:50:55 -07:00
Johannes Zellner
029adee031
Add basic volume selection api
2013-08-13 21:32:17 -07:00
Johannes Zellner
d09988e324
Add bare file listing to display the dirIndex content
2013-08-13 09:22:47 -07:00
Johannes Zellner
2b2f4a1f0a
Add favicon.ico, 404s in terminal are annoying
2013-08-12 08:29:56 -07:00
Johannes Zellner
920bdacfef
Go to index.html after firsttime setup
2013-08-12 08:28:55 -07:00
Johannes Zellner
172b2dabe2
Add some stub for dashboard pages and invalidate token on logout
2013-08-11 20:19:30 -07:00
Johannes Zellner
8bd68f994f
Replace basic auth with simple post login based auth to get token
2013-08-11 14:02:37 -07:00
Johannes Zellner
8c114a5296
Merge branch 'webadmin'
2013-08-11 10:08:30 -07:00
Johannes Zellner
dbb62374e8
Update icon
2013-08-10 18:56:01 -07:00
Johannes Zellner
583654e98f
Add basic icon assets
2013-08-10 15:42:29 -07:00
Girish Ramakrishnan
3fad7c2eb9
webadmin: add dashboard
2013-08-03 16:51:29 -07:00
Girish Ramakrishnan
2d6e533973
webadmin: implement authentication
2013-08-03 00:23:04 -07:00
Girish Ramakrishnan
b00139fff6
webadmin: Show okButton by default
2013-08-02 23:43:06 -07:00
Girish Ramakrishnan
7c36ac6336
reorg: move around code
2013-08-02 22:08:53 -07:00
Girish Ramakrishnan
5e1f81cfb6
Remove unused 'i' cmd line option
2013-08-02 18:41:57 -07:00
Girish Ramakrishnan
0a7efad0da
refactor: move routes to separate directory
2013-08-02 18:00:33 -07:00
Girish Ramakrishnan
38d6d86148
webadmin: redirect to firsttime in index.html
2013-08-02 17:27:14 -07:00
Girish Ramakrishnan
cb689c11d2
webadmin: rename login.html to index.html
2013-08-02 17:11:28 -07:00
Girish Ramakrishnan
7029012927
webadmin: add API to query if this is the first time
2013-08-02 17:08:59 -07:00
Girish Ramakrishnan
5b51a34ba9
webadmin: make the ui post to /api/v1/createadmin
2013-08-02 16:41:52 -07:00
Girish Ramakrishnan
d611fe4e31
webadmin: implement /api/v1/createadmin
2013-08-02 14:39:03 -07:00
Girish Ramakrishnan
89c1d784da
webadmin: redirect initial access to firsttime.html
2013-08-02 11:48:01 -07:00
Girish Ramakrishnan
ee3209c0f5
webadmin: serve pages from /webadmin
2013-08-02 10:47:26 -07:00
Girish Ramakrishnan
d49709d50a
webadmin: add first time user form
2013-08-01 23:10:06 -07:00
Girish Ramakrishnan
71edfee67b
webadmin: Add login page
2013-08-01 22:40:41 -07:00
Johannes Zellner
9054904d10
Fix bug, which made the transaction processing stuck
2013-07-23 22:34:42 -07:00
Johannes Zellner
4fc742d144
Create folders recoursively when adding files to the backup
2013-07-23 22:27:46 -07:00
Johannes Zellner
79ce036d22
Add --initial step for initial sync with remote to cmd client
2013-07-23 22:19:25 -07:00
Johannes Zellner
1b8bdbd8cd
Add initial node-webkit, bungee based client
2013-07-23 10:20:01 -07:00
Johannes Zellner
bf5be43c51
Add initial .gitignore file to ignore node_modules
2013-07-23 10:18:54 -07:00
Johannes Zellner
53ec8767ab
Implement basic file download for sync purpose
2013-07-22 09:11:49 -07:00
Johannes Zellner
106ba22d69
Some improvements to transactions and the client
2013-07-13 10:22:05 -07:00
Johannes Zellner
34ef5921f3
Compare timestamps instead of strings
2013-07-13 10:21:35 -07:00
Johannes Zellner
f646b08a8e
Add basic transactions to the client
2013-07-01 09:47:59 -07:00
Girish Ramakrishnan
5af9b305ad
server: implement missing DirIndex functions
2013-06-30 01:23:23 -07:00
Girish Ramakrishnan
07da5c310b
server: check entry existence correctly
2013-06-30 00:41:38 -07:00
Johannes Zellner
9d66010b1b
add mtime to request object
2013-06-30 00:36:03 -07:00
Johannes Zellner
39c66bc26f
do not expect a file in the remove case
2013-06-30 00:27:16 -07:00
Girish Ramakrishnan
836662ab30
dirIndex: store ctime and mtime as integers and not Date objects
2013-06-30 00:26:11 -07:00
Johannes Zellner
783118d4f0
Use superagent
2013-06-30 00:19:51 -07:00
Girish Ramakrishnan
02c695fb2c
dirIndex: actually update the sha1
2013-06-30 00:18:47 -07:00
Girish Ramakrishnan
68bcb3611b
server: add README.md
2013-06-30 00:16:24 -07:00
Girish Ramakrishnan
5ab1562d02
dirIndex: add root argument to update
2013-06-30 00:15:00 -07:00
Girish Ramakrishnan
8b9ce15907
server: update index on startup
2013-06-30 00:10:14 -07:00
Girish Ramakrishnan
b3996d11fc
server: make add work
2013-06-30 00:07:55 -07:00
Girish Ramakrishnan
3244be448a
server: implement processing of post request
2013-06-30 00:01:43 -07:00
Johannes Zellner
df036de726
Get rid of some indentation
2013-06-29 21:42:58 -07:00
Girish Ramakrishnan
52912d7186
server: Add /dirIndex endpoint to receive the dirIndex
2013-06-29 21:43:20 -07:00
Girish Ramakrishnan
fc50a5e9ba
Add empty server stub
2013-06-29 19:56:04 -07:00
Johannes Zellner
7f7200841f
Rebuild index on filesystem changes
2013-06-29 19:35:15 -07:00
Girish Ramakrishnan
956ffe73ba
Remove check for callback
...
It's a programming error if a callback is not provided. So,
let it throw an error at compile time.
2013-06-29 19:31:18 -07:00
Girish Ramakrishnan
2e05db9bbc
Make Index.update smart
...
Index.update now uses the previous stat and size information to
determine whether it's worth rehashing contents.
2013-06-29 19:24:09 -07:00
Girish Ramakrishnan
2de0f331e2
Save the ctime and mtime information in entry.
2013-06-29 18:03:53 -07:00
Johannes Zellner
2a9679fe59
Add initial client.js
2013-06-29 18:01:00 -07:00
Girish Ramakrishnan
a72a789381
Refactor sha1 computation to private function
2013-06-29 18:01:00 -07:00
Girish Ramakrishnan
8e0e51b80c
Make DirIndex take path as constructor argument
2013-06-29 18:01:00 -07:00
Girish Ramakrishnan
6679556d76
Fix package.json
2013-06-29 18:00:59 -07:00
Johannes Zellner
a89c96bf29
Create directory structure
2013-06-29 18:00:50 -07:00
Girish Ramakrishnan
58775fae9a
Initial version
2013-06-29 16:56:04 -07:00