Skip to content
Paul Mackay edited this page Aug 31, 2015 · 20 revisions

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:

Setup an Ubuntu Precise 64 box

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.

The DigitalOcean Ubuntu precise 64 image is solidly tested, and Amazon Ubuntu precise 64 images have also worked.

Define the inventory

This is for a staging server:

  • Create a file called staging. Add the text below:
# file: staging

[ofn_servers]
staging.openfoodnetwork.org ansible_ssh_host=<your IP here>

Change the URL as appropriate for a production or test server. This is not needed for Vagrant.

Note: ansible-playbook commands need to include -i staging to use this inventory file.

Set up a default user

Ansible needs at least one user created on the system so that it can run and install software as that user. You specify the user name and password user in your vars.yml file. (On Ubuntu systems, it is standard practice to create a user named ubuntu for this purpose.)

On DigitalOcean servers and any system where there is no default user set up, you will need to run the user.yml playbook.

ansible-playbook -i staging user.yml

On Vagrant this is done automatically.

On standard Amazon (AWS) Ubuntu images that block root login, the user.yml playbook won't run, and doesn't need to.

Run the install playbook

Run:

ansible-playbook -i staging install.yml

(with -vvvv for full debug output)

Build and install notes

For production and staging servers you will need to enter the site URL and SMTP details through the OFN admin interface before the site is fully functional.