-
Notifications
You must be signed in to change notification settings - Fork 0
OFN DevEnv Quick Start
This document will guide you through creating an lxc container which you start/stop to develop ofn, provision it with everything you need to develop ofn and provide you with easy commands to get up and running with ofn as quickly and as painlessly as possible.
Anyone, wishing to contribute to the Open Food Foundation project and is using linux and can run lxc on their host machine.
Checkout the following two repos in the same folder:
git clone [email protected]:coopdevs/ofn-install.git
git clone [email protected]:openfoodfoundation/openfoodnetwork.git
Copy ofn-install/inventory/host_vars/local.ofn.org/secrets.example.yml
to ``ofn-admin/inventory/host_vars/local.ofn.org/secrets.yml`
# Keep this password as is (same as that in database.yml in openfoodnetwork app)!!
db_password: f00d
admin_password: f00d
# Secret Token
# This is required to verify session. It must be at least 30 characters and
# random.
# Generate one with a bash command like: openssl rand -hex 128
secret_token: 'xxxxxx'
Add your ssh key, so that you can run ansible:
cp ~/.ssh/id_rsa.pub ofn-install/files/keys/mykey.pub
and add yourself to the list of users here ofn-install/playbooks/development.yml
:
- users_sysadmin:
- mykey
cd ofn-install
./scripts/create-container.sh
If this has worked correctly, you shouldn't have any trouble doing both of the following:
ssh [email protected]
ssh [email protected]
It should not require passwords, because your ssh key should already be copied to the container.
Ensure you have the lastest (>=2.3) ansible package installed:
sudo apt-add-repository ppa:ansible/ansible
sudo apt update
sudo apt install ansible
Then you can provision the lxc container:
./scripts/provisioning-dev.sh
Note: The first SUDO password it asks for is your host users password.
Staging and production provisioning
OFN-DevEnv-Quick-Start - english
Crear entorno
Aprovisionamiento del entorno