Commit Graph

196 Commits

Author SHA1 Message Date
Girish Ramakrishnan 1aa7eb4478 Collect and aggregate du information twice a day 2019-08-21 13:45:52 -07:00
Girish Ramakrishnan fd6dd1ea18 Add timestamp to the logs 2019-08-21 10:16:57 -07:00
Girish Ramakrishnan 9d3b4ba816 store docker df output as well 2019-08-19 16:15:31 -07:00
Girish Ramakrishnan 2b484c0382 collect maildata size separately 2019-08-19 13:23:31 -07:00
Girish Ramakrishnan 0d7a3f43c4 Collect du information 2019-08-18 21:52:41 -07:00
Girish Ramakrishnan a737d2675e Fix logrotation rules
* explicitly specify the dirs that are getting rotated
* app log rules are now moved to logrotate.ejs
* we keep task logs for a week

Some testing notes:
* touch -d "10 days ago" foo
* logrotate /etc/logrotate.conf -v to test rotation. there is a state
file created in /var/lib/logrotate/status. If we have a 'daily' rule,
it will get processed only after a log line in status exists and it's atleast
1 day old timestamp.

https://github.com/logrotate/logrotate/blob/master/logrotate.c is quite
readable
2019-07-30 15:37:15 -07:00
Girish Ramakrishnan 996041cabc add mechanism to whitelist and blacklist apps 2019-06-06 11:42:42 -07:00
Girish Ramakrishnan ed03ed7bad make changeDashboardDomain customizable 2019-05-14 19:20:45 -07:00
Johannes Zellner 4c56ffc767 Add default footer content to custom.yml 2019-05-13 22:50:28 +02:00
Girish Ramakrishnan 97d2494fe3 Make ticket body customizable 2019-05-10 17:35:47 -07:00
Girish Ramakrishnan a54be69c96 rework custom configuration 2019-05-10 16:18:43 -07:00
Girish Ramakrishnan 23280f1635 make custom.yml empty by default 2019-05-10 07:40:56 -07:00
Girish Ramakrishnan 9e74b666fb More caas removal 2019-05-08 20:01:14 -07:00
Girish Ramakrishnan a78cab36ab Make support and alert email customizable 2019-05-07 11:30:12 -07:00
Girish Ramakrishnan 33d5cb3061 initial features implementation 2019-05-07 10:29:47 -07:00
Girish Ramakrishnan a0d1016c01 containerize sftp 2019-04-04 22:43:02 -07:00
Girish Ramakrishnan 823bad2ace add proftpd to base image 2019-03-25 16:15:03 -07:00
Girish Ramakrishnan 57c4d96467 ensure mysql is storing UTC times 2019-03-22 15:19:17 -07:00
Johannes Zellner 62ee3fa0f1 Verify proftp ldap connection via ip instead of fake admin account 2019-03-19 15:24:09 -07:00
Johannes Zellner ef0403af0e Make proftpd conf static 2019-03-19 15:24:09 -07:00
Johannes Zellner 044b27967e Make initial sftp connection work 2019-03-19 15:24:09 -07:00
Johannes Zellner cde852f0f9 Add proftpd as service 2019-03-19 15:24:09 -07:00
Girish Ramakrishnan a435e88b25 rotate task logs 2019-03-18 22:53:47 -07:00
Girish Ramakrishnan 3ab131786b motd: Remove PasswordAuthentication check 2019-03-15 15:01:55 -07:00
Girish Ramakrishnan 7983ff5db2 Stash logs in crash log directory 2019-03-01 15:07:06 -08:00
Girish Ramakrishnan 19348ef205 Fix links in motd 2019-02-07 14:07:30 -08:00
Girish Ramakrishnan abc8e1c377 improve motd a bit more 2019-02-05 16:58:24 -08:00
Girish Ramakrishnan de67b6bc0c better motd 2019-02-05 14:58:44 -08:00
Girish Ramakrishnan ce1b621488 motd: add message to finish setup 2019-02-05 09:57:42 -08:00
Girish Ramakrishnan 38a4c1aede Fixup volume management
Fixes related to removing directory and directory perms
2019-01-18 15:18:42 -08:00
Girish Ramakrishnan a7fe35513a Ubuntu 16 needs MemoryLimit
systemd[1]: [/etc/systemd/system/box.service:25] Unknown lvalue 'MemoryMax' in section 'Service'
2019-01-17 09:28:35 -08:00
Girish Ramakrishnan 13c628b58b backups (tgz): work with a layout
this will allow us to place the localstorage directory in an arbitrary
location
2019-01-16 12:52:04 -08:00
Girish Ramakrishnan e62d417324 Set OOMScoreAdjust to stop box code from being killed
OOMScoreAdjust can be set between -1000 and +1000. This value is inherited
and systemd has no easy way to control this for children (box code also
runs as non-root, so it cannot easily set it for the children using
/proc/<pid>/oom_score_adj.

When set to -1000 and the process reaches the MemoryMax, it seems the kernel
does not kill any process in the cgroup and it spins up in high memory. In fact,
'systemctl status <service>' stops displaying child process (but ps does), not sure
what is happenning.

Keeping it -999 means that if a child process consumed a lot of memory, the kernel
will kill something in the group. If the main box itself is killed, systemd will
kill it at all because of KillMode=control-group.

Keeping it -999 also saves box service group being killed relative to other docker
processes (apps and addons).

Fixes #605
2019-01-06 19:16:53 -08:00
Girish Ramakrishnan 6bdd7f7a57 Give more memory to the control group
this allows backups to take more memory as part of the systemd group.
the node box code itself runs under little more constraints using
--max_old_space_size=150
2018-12-20 10:44:42 -08:00
Girish Ramakrishnan 4a34703cd3 rework code to enable/disable remote support
we had a generic ssh key management api. this was causing issues because
the ssh format is more complicated than what we had implemented. currently,
the only use case we have is to add our ssh key.

Fixes #600
2018-12-19 13:35:20 -08:00
Girish Ramakrishnan 434525943c move appconfig.ejs 2018-12-13 21:53:31 -08:00
Girish Ramakrishnan 7c1ef143f9 Add unbound service 2018-12-02 19:38:34 -08:00
Girish Ramakrishnan df927eae74 move backupupload.js to scripts
it is just a sudo helper
2018-11-29 23:30:56 -08:00
Girish Ramakrishnan a2da9bea58 backup: use ipc for communicating with upload process 2018-11-26 15:21:48 -08:00
Girish Ramakrishnan 6cd8e769be remove all uses of sudoSync 2018-11-25 14:43:29 -08:00
Johannes Zellner 161a8fe2bf Make docker restartable 2018-11-24 22:12:28 +01:00
Girish Ramakrishnan 1b1945e1f5 Move out graphite from port 8000
Port 8000 is used by esxi management service (!)
2018-11-17 19:14:21 -08:00
Johannes Zellner 9d40cffabe Add logrotate config for box logs 2018-11-16 13:14:59 +01:00
Johannes Zellner ac25477cd7 Ensure we prefix all output with a timestamp
note that debug() already does this now on its own in the same format
it does not use console.log but process.stderr
2018-11-16 13:02:37 +01:00
Johannes Zellner 59b86aa090 Stop logging box to journald 2018-11-16 12:15:38 +01:00
Girish Ramakrishnan 6abd48d480 rename backuptask to backupupload 2018-11-15 12:00:51 -08:00
Girish Ramakrishnan 2c60614d4b remove special rm script for redis 2018-10-15 16:14:16 -07:00
Girish Ramakrishnan 816fa94555 Upgrade the db addons using dumps when major version changes 2018-10-15 16:14:13 -07:00
Girish Ramakrishnan 23b9854c57 Use REST API instead of volumes for redis 2018-09-18 13:09:24 -07:00
Girish Ramakrishnan a46e208c63 Use docker volumes instead of bind mount for app data 2018-09-13 15:35:41 -07:00