regluit-provisioning
regluit-provisioning copied to clipboard
setting up crontab
@jekohk , @rdhyee I'm now building new Unglue.it machines using John's playbooks, and I've begun the process of cleaning out Raymond's equivalents. (see Gluejar/regluit:more-cleanup) One thing that seems to be missing from John's scripts is a crontab setup, which in Raymond's system are used only to run emit_notices.sh once a minute and to restart the server on reboot. Have I missed anything in John's work (now moved here)?
Also, why was emit_notices being done by cron instead of celerybeat?
IIRC, I resorted to cron because I couldn't get celery beat to work in this case. I can't recall the details. I can dig further if you want @eshellman
thanks raymond. what about the startup?
emit notices no longer needed. remaining question is whether something is needed so reboot restarts the server
@eshellman One thing that needed to be addressed on reboot is setting up /var/run/celery (/var/run is deleted on reboot.) That's why I had in regluit/crontab_prod.txt (and the other crontabs):
@reboot sudo mkdir /var/run/celery; sudo chown celery:celery /var/log/celery /var/run/celery; cd /opt/regluit; . /opt/regluit/ENV/bin/activate; /opt/regluit/ENV/bin/django-admin.py celeryd_multi restart w1 --settings=regluit.settings.prod; /etc/init.d/celerybeat restart;
Note the first part
@reboot sudo mkdir /var/run/celery; sudo chown celery:celery /var/log/celery /var/run/celery
I don't know whether re-creating /var/run/celery, etc is still relevant in the new setup -- but that's something to check.