Server Setup#

The generated codebase contains a /devops folder with the tools needed to provision and setup a basic installation of your Plone project using Ansible and Docker.

Install Dependencies#

Change to the devops folder in your project directory.

And then install all dependencies.

source .env_local
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/users.yml file and replace the line public_keys: [] with

      - '<your ssh public key>'

Run playbook#

Setup 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_local, then:

source .env_prod

Also, add a prod.yml file to inventory folder (with information about the production server), and a plone-conference-prod.yml to host_vars folder.