Description
Use Ansible to provision a full-stack Plone server
Plone's Ansible Playbook can completely provision a remote server to run the full stack of Plone, including:
- Plone in a cluster configuration;
- Automatic starting and process control of the Plone cluster with supervisor;
- Load balancing of the cluster with HAProxy;
- Caching with Varnish;
- Nginx as a world-facing remote proxy and URL rewrite engine;
- An outgoing-mail-only mail server using Postfix;
- Monitoring and log analysis with munin-node and logwatch and fail2ban.
- Use of a local VirtualBox provisioned via vagrant to test and model your remote server.
An ansible playbook and roles describe the desired condition of the server. The playbook is used both for initial provisioning and for updating.
We generally support relatively current CentOS and Debian/Ubuntu environments. Versions currently supported are Ubuntu 16.0.4 (Xenial) LTS, Ubuntu 15, Ubuntu 14, Debian wheezy, Debian jessie, Debian stretch, and CentOS 7.
See the docs
subdirectory or readthedocs for complete documentation.
Detailed, tutorial-style documentation with lots of real-life examples is available at the Plone Training site.
- Install a current version of Ansible (use virtualenv and pip -- not your OS package manager);
- If you wish to test locally, install Vagrant and VirtualBox;
- Check out or download a copy of the STABLE branch of this package;
- Run
ansible-galaxy -p roles -r requirements.yml install
to install required roles; - Copy one of the
sample*.yml
files tolocal-configure.yml
and edit as needed. - To test in a local virtual machine, run
vagrant up
orvagrant provision
; - To deploy, create an Ansible inventory file for the remote host and run ``ansible-playbook --ask-sudo-pass -i myhost.cfg playbook.yml``[*]_;
- Set a real password for your Plone instance on the target server;
- Set up appropriate firewalls.
Warning
Python required: Ansible requires that the target server have a recent Python 2.x on the server. Newer platforms (like Ubuntu Xenial and later) may not have this activated on pristine new machines.
If you get connection errors from Ansible, check the remote machine to make sure Python 2.7 is available.
which python2.7
will let you know.
If it's missing, use your package manager to install it.
On Ubuntu Xenial (16.0.4 LTS), sudo apt-get install -y python
will do the trick.
sshpass: You may need to install sshpass
on the host machine to manage sending passwords to the remote machine over ssh. sudo apt-get install sshpass
will do the trick in the Debian universe.
BSD-3-Clause