Skip to content
David Cook edited this page Sep 12, 2024 · 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:

Important

For all ofn-install tasks make sure you update your local repos ofn-install and ofn-secrets (see fetch secrets below).

First time: run the site.yml playbook

If the server you are provisioning has not been set up or provisioned before, you can run the site.yml playbook. This will run through the three main playbooks for: setup, provision, and deploy. The setup playbook includes adding the correct user accounts to the server.

ansible-playbook site.yml --limit=au_staging

This step can take a long time. And you might need to tweak your SSH configuration to prevent timeouts.

Running Ansible playbooks

Add -vvvv for greater debug output.

Provisioning

To provision you just need to run the following command (ensuring secrets are up to date):

ansible-playbook playbooks/provision.yml --limit=<host> -e "@../ofn-secrets/<host>-prod/secrets.yml" --ask-vault-pass

A more convenient way to include up-to-date secrets for one or many servers is the fetch_secrets.yml playbook.

Server groups

To provision all globally managed servers, you can use the all-prod group:

export FETCH_OFN_SECRETS="TRUE"
ansible-playbook playbooks/provision.yml --limit=all-prod

Next: Administration of your application server