-
-
Notifications
You must be signed in to change notification settings - Fork 112
Provisioning
Provisioning is the process of configuring a server with the software required to run Open Food Network.
The provision.yml
playbook installs packages such as curl and git, then installs:
You will need to set up an instance of Ubuntu "Precise Pangolin" x64 server (a.k.a. an Ubuntu Precise 64 box), though this may work on other Debian based systems too. See current Server Specifications to get an idea of what you need.
The DigitalOcean Ubuntu precise 64 image is solidly tested, and Amazon Ubuntu precise 64 images have also worked.
If you are going through this process the first time, you probably want to test it on your local machine first. Jump to Using Vagrant to create a local virtual machine and run the provisioning on that. You will have a real installation of the Open Food Network app on that virtual machine and will be able to test everything first.
Edit the inventory/hosts
file to add new production and staging servers, e.g.:
[au-prod]
www.openfoodnetwork.org.au
[au-staging]
staging1.openfoodnetwork.com.au
[au:children]
au-prod
au-staging
This is not needed for Vagrant.
Copy and rename inventory/group_vars/_example.yml
and add the configuration for your country.
For your staging and production servers copy the _example
directory and rename it to match the domain. Edit the config.yml
file inside it, e.g.:
---
domain: www.openfoodnetwork.org.au
rails_env: production
Create a secrets.yml
file in the same location. This is excluded from git.
The default is to use AWS S3. To do this, add this to your host_vars/<host>/secrets.yml
file:
s3_backups_bucket: {{ app }}-{{ rails_env }}-backups
The ofn-install
project stores all configuration for OFN instances. We recommend committing the config that can be public and creating a pull request to push it to the openfoodfoundation/ofn-install
project.
Add -vvvv
for greater debug output.
Ansible needs at least one user created on the system so that it can run and install software as that user. An ofn-admin
user account is now created at the start of the provisioning playbook.
Run the provisioning and deploy plays with the site.yml
playbook:
ansible-playbook -i inventory/hosts --limit=au-staging site.yml
Or on Vagrant:
ansible-playbook -i inventory/dev --e user=vagrant site.yml
This step can take a long time. And you might need to tweak your SSH configuration to prevent timeouts.
Provisioning
Deployment
Sysadmin
External services
- Sending emails from OFN
- Email Deliverability
- SSL certificates
- Google Maps
- File storage
- Backups
- Server monitoring
- Issue reporting (Bugsnag)
Contributing