Skip to content

Running a live OFN Instance

Matt-Yorkley edited this page Jul 20, 2018 · 4 revisions

Preparation

When running a live instance you should consider the following:

Backup sysadmins

Add ssh keys for your core sysadmins, and some give access to some backup sysadmins in case your core team is unavailable during an emergency. This should be done by making a PR to ofn-install to add any new keys in /files/keys and naming the sysadmins in your group_vars file, e.g: /inventory/group_vars/uk.yml

Server Monitoring

Set up Server Monitoring for receiving alerts if the server goes down. If you add an integration with Slack, you can have alerts sent to a private channel for your instance's alerts, and invite your core and backup sysadmins to that channel.

Tips and tricks

There are various issues you might encounter whilst running a live instance.

  • To see check on a running process like delayed_job, use: ps faux | grep process_name

  • If there are issues with missing templates after a deployment, you can try recompiling the assets by switching to the openfoodnetwork user with: sudo su openfoodnetwork and using this: bash -lc "bundle exec rake assets:precompile RAILS_ENV=production"

  • When dealing with issues on a server, sometimes you will need to restart either unicorn or nginx, or both. You can do that with: sudo systemctl restart nginx.service and sudo systemctl restart unicorn_openfoodnetwork.service

Clone this wiki locally