-
-
Notifications
You must be signed in to change notification settings - Fork 116
Configuration
This describes how to update ofn-install for a new OFN configuration.
Ansible is configured using YAML. If you're not familiar with YAML, read the Ansible docs about how it uses YAML. You can validate the syntax of your vars file with the Online YAML Parser.
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. Below is extra info on how to configure the variables.
- checkout_zone: See the Spree User Guide for more.
- country_code: See the list of 2-letter country codes
- currency: See the list of currency codes
- locale: See the list of locales supported by Spree.
- language: Use the locale and add
.UTF8. Locale should be formatted asen_GB. - language_packages:
- l10n_repo: Create a
l10n_xxlocalization project (see Seed data below) - timezone: Run
bundle exec rake time:zones:allto find an appropriate timezone value. - developer_email: Used for the Let's Encrypt email settings (SSL certificate)
- users_sysadmin: List of usernames of system administrators that will have access to the server through SSH
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.
To get access to the server, system administrators must add their SSH public keys as separated files in files/keys/username.pub. Add the usernames used for the name of the files to the users_sysadmin list in your instance's group_vars.
S3 is recommended. See File storage for more information and how to setup S3. These settings should then be defined in the host secrets.yml file:
s3_backups_bucket: {{ app }}-{{ rails_env }}-backups
Note: Bucket names should be lowercase and dashes only.
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.
Next: Provisioning the server
Provisioning
Deployment
Sysadmin
External services
- Sending emails from OFN
- Email Deliverability
- SSL certificates
- Maps
- File storage
- Backups
- Server monitoring
- Issue reporting (Bugsnag)
Contributing