Deploying PHP applications with Ansible, Ansible Vault and Ansistrano
Great! You’ve built your website, and now you just need to deploy it. There are various ways that this could be done - from (S)FTP, to SCP and rsync, to running commands like
git pull and
composer install directly on the server which is not ideal.
As well provisioning and maintaining your server configuration and running commands, you can also use Ansible to deploy your PHP application - leveraging relevant Ansible modules such as Git and Composer, custom Ansible roles, Ansible Vault for managing secrets, and features such as idempotency out of the box to build a simple deployment playbook. We can then extend that and make it more robust by adding Ansistrano - a port of Capistrano - which adds extra features such as storing multiple builds for each project and the ability to roll-back if needed, customising your build steps using built-in hooks, multi-stage environments and more.
I've been using Ansible and Ansistrano to deploy a variety of PHP projects - including Drupal 7 & 8, Symfony, Laravel and Sculpin, as well as basic HTML websites, and found it to be very flexible and easy to install and use, and by the end of this talk we will have a fully working deployment playbook, deploying real code onto a real server.
- DrupalNYC in New York, USA (Online) - 15th June 2021
- Ansible London in London, UK (Online) - 25th May 2021
- PHP Oxford in Oxford, UK (Online) - 28th April 2021
- Midwest PHP (Online) - 23rd April 2021
- PHP Sussex in Brighton, UK (Online) - 1st July 2020
- PHP North East in Newcastle Upon Tyne, UK (Online) - 16th June 2020
- PHP London in London, UK (Online) - 4th June 2020
- Drupal Yorkshire in Leeds, UK (Online) - 21st May 2020
- CMS Philly in Philadelphia, USA (Online) - 1st May 2020
- Drupal Edinburgh in Edinburgh, UK (Online) - 12th March 2020
- Bristol Devops in Bristol, UK - 30th January 2020
- DrupalCon Europe 2019 in Amsterdam, NL - 30th October 2019
- PHP South Wales in Cardiff, UK - 23rd July 2019
- Drupal Bristol in Bristol, UK - 23rd January 2019