Server Setup#
The generated codebase contains a /devops folder with the tools needed to provision and set up a basic installation of your Plone project using Ansible and Docker.
Install Dependencies#
Change to the devops folder in your project directory.
cd devops
And then install all dependencies.
source .env_dev
make clean
make setup
This will create a new Python 3 virtual environment with Ansible.
Provisioning the Server#
We are using Vagrant in this training, and to create a new Vagrant box, as defined in the Vagrantfile, run:
make provision
Ansible playbook#
Configure SSH key#
Edit the group_vars/all/users.yml file and replace the line public_keys: [] with the following.
public_keys:
- '<your ssh public key>'
Run playbook#
Run the playbook to set up the server by installing base packages, creating UFW configuration, and adding users.
make run-playbook
For Production#
Create .env_prod, if it does not exist, setting all values defined in .env_dev, then run:
source .env_prod
Next add a file prod.yml in the folder inventory with information about the production server.
Finally, add a file plone-conference-prod.yml in the folder host_vars.