SlideShare a Scribd company logo
DRUPAL VM
A VM for Drupal development, built with Vagrant + Ansible
★
#MidCamp 2017 – Jeff Geerling
@geerlingguy
• Drupalist
...of genus Acquian
• Writer
• Automator of things
Drupal VM for Drupal 8 Dev - MidCamp 2017
DRUPAL VM
• Info: www.drupalvm.com
• Docs: docs.drupalvm.com
• Code: GitHub
DRUPAL VM
• Quick Start:
1. Install VirtualBox and Vagrant
2. Download Drupal VM
3. vagrant up
HOW DO I BUILD AND
MAINTAIN DRUPAL 8
PROJECTS?
Drush was never designed as a
dependency management tool.
❤
DRUPAL-PROJECT
$ composer create-project drupal-composer/drupal-project:8.x-dev 
bacon 
--stability dev 
--no-interaction
DRUPAL VM
composer require --dev geerlingguy/drupal-vm
PREP THE VM
---
vagrant_hostname: local.bacon.com
drupal_build_composer_project: false
drupal_build_composer: false
drupal_composer_dependencies: []
installed_extras:
- drush
- drupalconsole
- mailhog
- nodejs
- xdebug
- varnish
vm/config.yml
{
PREP DRUPAL PROJECT
ENV['DRUPALVM_PROJECT_ROOT'] = "#{__dir__}"
ENV['DRUPALVM_CONFIG_DIR'] = "vm"
ENV['DRUPALVM_DIR'] = "vendor/geerlingguy/drupal-vm"
# Load Drupal VM's Vagrantfile
load "#{__dir__}/#{ENV['DRUPALVM_DIR']}/Vagrantfile"
Vagrantfile
{
vagrant up
WHAT ABOUT PROD?
WHAT ABOUT PROD?
---
# Deploy from the project's Git repository.
drupal_deploy: true
drupal_deploy_repo: "git@github.com:my/bacon.git"
drupal_deploy_dir: /var/www/drupal
# Set the domain for this site appropriately.
drupal_domain: "prod.bacon.com"
vagrant_hostname: "{{ drupal_domain }}"
vm/prod.config.yml
{
WHAT ABOUT PROD?
$ DRUPALVM_ENV=prod 

ansible-playbook -i vm/inventory 

vendor/geerlingguy/drupal-vm/provisioning/playbook.yml 

-e "config_dir=$(pwd)/vm" 

--become --ask-become-pass 

--ask-vault-pass
WHAT ABOUT PROD?
• Dogfooding: project is on GitHub
• Everybody loves secrets (.yml)
• Full writeup on my blog:

https://www.jeffgeerling.com/drupal-vm-local-prod
Drupal VM for Drupal 8 Dev - MidCamp 2017
GOING DEEPER
EXAMPLE: SOLR SEARCH
EXAMPLE: SOLR SEARCH
• Step 1: Add Solr to Drupal VM
• Add solr to installed_extras
• Copy Drupal VM's example configure-solr.sh
to scripts/configure-solr.sh
• Add script to vm/config.yml:
post_provision_scripts:

- "../../../../scripts/configure-solr.sh"
EXAMPLE: SOLR SEARCH
• Step 2: Add Drupal modules
composer require drupal/search_api:^1.0
drupal/search_api_solr:^1.0
drush @local.example.com en -y search_api
search_api_solr search_api_solr_defaults
EXAMPLE: SOLR SEARCH
• Step 3: Export the config and deploy!
• Disable Search API Solr Defaults module
• Export: drush @local.bacon.com cex -y
• Commit and push
• Deploy: Run the playbook on prod!
Drupal VM for Drupal 8 Dev - MidCamp 2017
It's alive!!!
EXAMPLE: BEHAT TESTS
EXAMPLE: BEHAT TESTS
EXAMPLE: BEHAT TESTS
• Step 1: Add Selenium to Drupal VM
• Add selenium to installed_extras
EXAMPLE: BEHAT TESTS
• Step 2: Add Drupal Extension
composer require --dev drupal/drupal-extension
EXAMPLE: BEHAT TESTS
• Step 3: Configure Behat (behat.yml)
• Add tests directory
• Copy the config from Drupal VM's docs
• Paste into new tests/behat.yml
EXAMPLE: BEHAT TESTS
• Step 4: Initialize Behat
• Log into VM
• cd into tests
• Run ../vendor/bin/behat init
EXAMPLE: BEHAT TESTS
• Step 5: Test ALL THE THINGS!
• Create feature files in tests/features/web
• Example: HomeContent.feature
EXAMPLE: BEHAT TESTS
Feature: Test DrupalContext
In order to prove Behat is working correctly in Drupal VM

As a developer

I need to run a simple interface test
Scenario: Viewing content in a region

Given I am on the homepage

Then I should see "This is a demonstration" in the "content"
EXAMPLE: BEHAT TESTS
WINDOWS
WINDOWS
😭
WINDOWS
🤗
WINDOWS
• Use SMB, rsync, or reverse-mount shared folders
• Use WSL/Ubuntu Bash and/or Cmder
• Use Unix line endings
• Read the docs
• DRUPALVM_ANSIBLE_TAGS=xdebug vagrant provision
• Tideways is the new XHProf
• Configure ALL THE THINGS in Vagrantfile.local
• Add custom pre/post-provision playbooks
• Test your modules with PAReview.sh
BONUS ROUND!
THE FUTURE
• Docker & Libvirt/KVM
• Easier config template customization
• Certbot + LetsEncrypt (TLS FTW)
• MOAR Composer
• MOAR Windows
THANKS!
• Review this session:

https://joind.in/talk/8f8fa
• Support my work on Patreon:

https://www.patreon.com/geerlingguy

More Related Content

What's hot (20)

PDF
SEP DevOps Ignite Talk - Packer
Ryan Sweeney
 
PDF
Ansible Case Studies
Greg DeKoenigsberg
 
PDF
What's New in v2 - AnsibleFest London 2015
jimi-c
 
PDF
High Performance Drupal
Jeff Geerling
 
PPTX
Ansible: How to Get More Sleep and Require Less Coffee
Sarah Z
 
PDF
macos installation automation
Jon Fuller
 
PDF
Ansible v2 and Beyond (Ansible Hawai'i Meetup)
Timothy Appnel
 
PDF
Docker slides
Jyotsna Raghuraman
 
PDF
EC2 AMI Factory with Chef, Berkshelf, and Packer
George Miranda
 
PDF
Deploying PHP Applications with Ansible
Orestes Carracedo
 
PDF
DevOps in a Regulated World - aka 'Ansible, AWS, and Jenkins'
rmcleay
 
PDF
Ansible and AWS
Peter Sankauskas
 
PDF
How Ansible Makes Automation Easy
Peter Sankauskas
 
PDF
Ansible + WordPress
Alan Lok
 
PDF
Ansible - A 'crowd' introduction
Manuel de la Peña Peña
 
PDF
Ansible 101 - Presentation at Ansible STL Meetup
Jeff Geerling
 
PPTX
Cyansible
Alan Norton
 
PDF
Ansible Introduction
Robert Reiz
 
PPTX
Vagrant to-aws-flow
Kimberly Macias
 
PDF
Ansible introduction - XX Betabeers Galicia
Juan Diego Pereiro Arean
 
SEP DevOps Ignite Talk - Packer
Ryan Sweeney
 
Ansible Case Studies
Greg DeKoenigsberg
 
What's New in v2 - AnsibleFest London 2015
jimi-c
 
High Performance Drupal
Jeff Geerling
 
Ansible: How to Get More Sleep and Require Less Coffee
Sarah Z
 
macos installation automation
Jon Fuller
 
Ansible v2 and Beyond (Ansible Hawai'i Meetup)
Timothy Appnel
 
Docker slides
Jyotsna Raghuraman
 
EC2 AMI Factory with Chef, Berkshelf, and Packer
George Miranda
 
Deploying PHP Applications with Ansible
Orestes Carracedo
 
DevOps in a Regulated World - aka 'Ansible, AWS, and Jenkins'
rmcleay
 
Ansible and AWS
Peter Sankauskas
 
How Ansible Makes Automation Easy
Peter Sankauskas
 
Ansible + WordPress
Alan Lok
 
Ansible - A 'crowd' introduction
Manuel de la Peña Peña
 
Ansible 101 - Presentation at Ansible STL Meetup
Jeff Geerling
 
Cyansible
Alan Norton
 
Ansible Introduction
Robert Reiz
 
Vagrant to-aws-flow
Kimberly Macias
 
Ansible introduction - XX Betabeers Galicia
Juan Diego Pereiro Arean
 

Viewers also liked (20)

PPTX
Xpert MTB/RIF Ultra newer technology past to future DIAGNOSIS OF TUBERCULOSIS
Society for Microbiology and Infection care
 
PPTX
Alejandro Fernandez vs Luis Miguel
Susana Gallardo
 
PDF
マイクロソフトが創る未来 医療編 20170401
Aya Tokura
 
PPTX
Elixir-Conf-Japan-2017-session-ohr486
Tsunenori Oohara
 
PPTX
トレンドを探る AI と HPC の関係性
NVIDIA Japan
 
PDF
La teoría PDCA para la mejora contínua
Sergio Salimbeni
 
PPTX
Thank you 4.1.2017
Kevin Schafer
 
PDF
Amazon EC2 HPCインスタンス - AWSマイスターシリーズ
Amazon Web Services Japan
 
PPTX
Immunisation against bacteria
Rohit Satyam
 
PPTX
Mr. Nitin bassi IEWP @ 2nd India-EU Water Forum @ World Sustainable Developme...
India-EU Water Partnership
 
DOCX
PROCESO DE EXPORTACION DE AGUACATE HASS
AGROPROGRESOSAS
 
PDF
[JDLL 2017] Le Guide du Connard du Logiciel Libre
Clément OUDOT
 
PDF
2017 HE sytem in Lebanon
Ahmad JAMMAL
 
PPTX
20170330 lckva pfi gwp presentatie grondstoffencongres 2017
Partners for Innovation BV
 
PPTX
o discípulo e a oração
Pastor Cerqueira
 
PPTX
Daniela Bandera Distinte e Integrate 31032017
Daniela Bandera
 
PDF
Transform your living space into beauty.
Trent Altman
 
PPTX
Мастер класс "Команда о которой вы мечтаете"
Tatyana Гончаренко
 
PDF
Zły UX. Dlaczego dostajemy 
słabe produkty i usługi?
Tomasz Skórski
 
PPTX
Jc aprile 2017
SIEOG
 
Xpert MTB/RIF Ultra newer technology past to future DIAGNOSIS OF TUBERCULOSIS
Society for Microbiology and Infection care
 
Alejandro Fernandez vs Luis Miguel
Susana Gallardo
 
マイクロソフトが創る未来 医療編 20170401
Aya Tokura
 
Elixir-Conf-Japan-2017-session-ohr486
Tsunenori Oohara
 
トレンドを探る AI と HPC の関係性
NVIDIA Japan
 
La teoría PDCA para la mejora contínua
Sergio Salimbeni
 
Thank you 4.1.2017
Kevin Schafer
 
Amazon EC2 HPCインスタンス - AWSマイスターシリーズ
Amazon Web Services Japan
 
Immunisation against bacteria
Rohit Satyam
 
Mr. Nitin bassi IEWP @ 2nd India-EU Water Forum @ World Sustainable Developme...
India-EU Water Partnership
 
PROCESO DE EXPORTACION DE AGUACATE HASS
AGROPROGRESOSAS
 
[JDLL 2017] Le Guide du Connard du Logiciel Libre
Clément OUDOT
 
2017 HE sytem in Lebanon
Ahmad JAMMAL
 
20170330 lckva pfi gwp presentatie grondstoffencongres 2017
Partners for Innovation BV
 
o discípulo e a oração
Pastor Cerqueira
 
Daniela Bandera Distinte e Integrate 31032017
Daniela Bandera
 
Transform your living space into beauty.
Trent Altman
 
Мастер класс "Команда о которой вы мечтаете"
Tatyana Гончаренко
 
Zły UX. Dlaczego dostajemy 
słabe produkty i usługi?
Tomasz Skórski
 
Jc aprile 2017
SIEOG
 
Ad

Similar to Drupal VM for Drupal 8 Dev - MidCamp 2017 (20)

PPTX
Vagrant crash course
Marcus Deglos
 
PPTX
Drupal 8 - Improving your development workflow
valuebound
 
PDF
Improving your Drupal 8 development workflow DrupalCampLA
Jesus Manuel Olivas
 
PDF
Docman - The swiss army knife for Drupal multisite docroot management and dep...
Aleksey Tkachenko
 
PPTX
Docker at Monoco.jp (LinkedIn)
Akhmad Fathonih
 
PDF
Using Minikube for Node.js development
Troy Connor
 
ZIP
Building a Drupal Distribution using Features, Drush Make, Installation Profi...
Ben Shell
 
PDF
Drupal 8 improvements for developer productivity php symfony and more
Acquia
 
PDF
Efficient development workflows with composer
nuppla
 
PPTX
Detailed Introduction To Docker
nklmish
 
ODP
Vagrant and puppet: Deployment made easy
Geronimo Orozco
 
PDF
Modernize Your Drupal Development
Chris Tankersley
 
PPTX
How to deploy and run mule in docker
Ravi Prakash Singh
 
PDF
Efficient development workflows with composer
nuppla
 
PDF
Enabling Hybrid Workflows with Docker/Mesos @Orbitz
Steve Hoffman
 
PDF
Dockerize All The Things
Chris Tankersley
 
PDF
Help! I inherited a Drupal Site! - DrupalCamp Atlanta 2016
Paul McKibben
 
PPTX
vodQA(Pune) 2018 - Docker in Testing
vodQA
 
PDF
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
Michael Lihs
 
PDF
CI/CD with Azure DevOps and Azure Databricks
GoDataDriven
 
Vagrant crash course
Marcus Deglos
 
Drupal 8 - Improving your development workflow
valuebound
 
Improving your Drupal 8 development workflow DrupalCampLA
Jesus Manuel Olivas
 
Docman - The swiss army knife for Drupal multisite docroot management and dep...
Aleksey Tkachenko
 
Docker at Monoco.jp (LinkedIn)
Akhmad Fathonih
 
Using Minikube for Node.js development
Troy Connor
 
Building a Drupal Distribution using Features, Drush Make, Installation Profi...
Ben Shell
 
Drupal 8 improvements for developer productivity php symfony and more
Acquia
 
Efficient development workflows with composer
nuppla
 
Detailed Introduction To Docker
nklmish
 
Vagrant and puppet: Deployment made easy
Geronimo Orozco
 
Modernize Your Drupal Development
Chris Tankersley
 
How to deploy and run mule in docker
Ravi Prakash Singh
 
Efficient development workflows with composer
nuppla
 
Enabling Hybrid Workflows with Docker/Mesos @Orbitz
Steve Hoffman
 
Dockerize All The Things
Chris Tankersley
 
Help! I inherited a Drupal Site! - DrupalCamp Atlanta 2016
Paul McKibben
 
vodQA(Pune) 2018 - Docker in Testing
vodQA
 
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
Michael Lihs
 
CI/CD with Azure DevOps and Azure Databricks
GoDataDriven
 
Ad

More from Jeff Geerling (14)

PDF
Continuous Testing with Molecule, Ansible, and GitHub Actions
Jeff Geerling
 
PDF
2020 Drupal Local Development Tools Survey - CMS Philly
Jeff Geerling
 
PDF
There's a role for that! (AnsibleFest 2019)
Jeff Geerling
 
PDF
Everything I know about Kubernetes I learned from a Raspberry Pi cluster
Jeff Geerling
 
PDF
Real World DevOps - Jeff Geerling's NEDCamp 2018 Keynote
Jeff Geerling
 
PDF
Make your Ansible playbooks maintainable, flexible, and scalable
Jeff Geerling
 
PDF
Ansible and Kubernetes
Jeff Geerling
 
PDF
HTTPS and Ansible
Jeff Geerling
 
PDF
ProTips for Staying Sane while Working from Home
Jeff Geerling
 
PDF
Highly available Drupal on a Raspberry Pi cluster
Jeff Geerling
 
PDF
Drupal 8 - A Brief Introduction
Jeff Geerling
 
PDF
Server Check.in case study - Drupal and Node.js
Jeff Geerling
 
PPT
Florissant TIF - Cross Keys Redevelopment
Jeff Geerling
 
PDF
How to Build a Drupal Module
Jeff Geerling
 
Continuous Testing with Molecule, Ansible, and GitHub Actions
Jeff Geerling
 
2020 Drupal Local Development Tools Survey - CMS Philly
Jeff Geerling
 
There's a role for that! (AnsibleFest 2019)
Jeff Geerling
 
Everything I know about Kubernetes I learned from a Raspberry Pi cluster
Jeff Geerling
 
Real World DevOps - Jeff Geerling's NEDCamp 2018 Keynote
Jeff Geerling
 
Make your Ansible playbooks maintainable, flexible, and scalable
Jeff Geerling
 
Ansible and Kubernetes
Jeff Geerling
 
HTTPS and Ansible
Jeff Geerling
 
ProTips for Staying Sane while Working from Home
Jeff Geerling
 
Highly available Drupal on a Raspberry Pi cluster
Jeff Geerling
 
Drupal 8 - A Brief Introduction
Jeff Geerling
 
Server Check.in case study - Drupal and Node.js
Jeff Geerling
 
Florissant TIF - Cross Keys Redevelopment
Jeff Geerling
 
How to Build a Drupal Module
Jeff Geerling
 

Recently uploaded (20)

PPTX
Change Common Properties in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
PDF
Thread In Android-Mastering Concurrency for Responsive Apps.pdf
Nabin Dhakal
 
PDF
vMix Pro 28.0.0.42 Download vMix Registration key Bundle
kulindacore
 
PDF
Build It, Buy It, or Already Got It? Make Smarter Martech Decisions
bbedford2
 
PPTX
Tally_Basic_Operations_Presentation.pptx
AditiBansal54083
 
PDF
유니티에서 Burst Compiler+ThreadedJobs+SIMD 적용사례
Seongdae Kim
 
PPTX
Transforming Mining & Engineering Operations with Odoo ERP | Streamline Proje...
SatishKumar2651
 
PDF
SAP Firmaya İade ABAB Kodları - ABAB ile yazılmıl hazır kod örneği
Salih Küçük
 
PDF
Generic or Specific? Making sensible software design decisions
Bert Jan Schrijver
 
PDF
AI + DevOps = Smart Automation with devseccops.ai.pdf
Devseccops.ai
 
PPTX
Homogeneity of Variance Test Options IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
PDF
Download Canva Pro 2025 PC Crack Full Latest Version
bashirkhan333g
 
PPTX
Home Care Tools: Benefits, features and more
Third Rock Techkno
 
PDF
Alexander Marshalov - How to use AI Assistants with your Monitoring system Q2...
VictoriaMetrics
 
PDF
Digger Solo: Semantic search and maps for your local files
seanpedersen96
 
PDF
MiniTool Partition Wizard 12.8 Crack License Key LATEST
hashhshs786
 
PPTX
Why Businesses Are Switching to Open Source Alternatives to Crystal Reports.pptx
Varsha Nayak
 
PDF
The 5 Reasons for IT Maintenance - Arna Softech
Arna Softech
 
PDF
Wondershare PDFelement Pro Crack for MacOS New Version Latest 2025
bashirkhan333g
 
PDF
Online Queue Management System for Public Service Offices in Nepal [Focused i...
Rishab Acharya
 
Change Common Properties in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
Thread In Android-Mastering Concurrency for Responsive Apps.pdf
Nabin Dhakal
 
vMix Pro 28.0.0.42 Download vMix Registration key Bundle
kulindacore
 
Build It, Buy It, or Already Got It? Make Smarter Martech Decisions
bbedford2
 
Tally_Basic_Operations_Presentation.pptx
AditiBansal54083
 
유니티에서 Burst Compiler+ThreadedJobs+SIMD 적용사례
Seongdae Kim
 
Transforming Mining & Engineering Operations with Odoo ERP | Streamline Proje...
SatishKumar2651
 
SAP Firmaya İade ABAB Kodları - ABAB ile yazılmıl hazır kod örneği
Salih Küçük
 
Generic or Specific? Making sensible software design decisions
Bert Jan Schrijver
 
AI + DevOps = Smart Automation with devseccops.ai.pdf
Devseccops.ai
 
Homogeneity of Variance Test Options IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
Download Canva Pro 2025 PC Crack Full Latest Version
bashirkhan333g
 
Home Care Tools: Benefits, features and more
Third Rock Techkno
 
Alexander Marshalov - How to use AI Assistants with your Monitoring system Q2...
VictoriaMetrics
 
Digger Solo: Semantic search and maps for your local files
seanpedersen96
 
MiniTool Partition Wizard 12.8 Crack License Key LATEST
hashhshs786
 
Why Businesses Are Switching to Open Source Alternatives to Crystal Reports.pptx
Varsha Nayak
 
The 5 Reasons for IT Maintenance - Arna Softech
Arna Softech
 
Wondershare PDFelement Pro Crack for MacOS New Version Latest 2025
bashirkhan333g
 
Online Queue Management System for Public Service Offices in Nepal [Focused i...
Rishab Acharya
 

Drupal VM for Drupal 8 Dev - MidCamp 2017

  • 1. DRUPAL VM A VM for Drupal development, built with Vagrant + Ansible ★ #MidCamp 2017 – Jeff Geerling
  • 2. @geerlingguy • Drupalist ...of genus Acquian • Writer • Automator of things
  • 4. DRUPAL VM • Info: www.drupalvm.com • Docs: docs.drupalvm.com • Code: GitHub
  • 5. DRUPAL VM • Quick Start: 1. Install VirtualBox and Vagrant 2. Download Drupal VM 3. vagrant up
  • 6. HOW DO I BUILD AND MAINTAIN DRUPAL 8 PROJECTS?
  • 7. Drush was never designed as a dependency management tool.
  • 8.
  • 9. DRUPAL-PROJECT $ composer create-project drupal-composer/drupal-project:8.x-dev bacon --stability dev --no-interaction
  • 10. DRUPAL VM composer require --dev geerlingguy/drupal-vm
  • 11. PREP THE VM --- vagrant_hostname: local.bacon.com drupal_build_composer_project: false drupal_build_composer: false drupal_composer_dependencies: [] installed_extras: - drush - drupalconsole - mailhog - nodejs - xdebug - varnish vm/config.yml {
  • 12. PREP DRUPAL PROJECT ENV['DRUPALVM_PROJECT_ROOT'] = "#{__dir__}" ENV['DRUPALVM_CONFIG_DIR'] = "vm" ENV['DRUPALVM_DIR'] = "vendor/geerlingguy/drupal-vm" # Load Drupal VM's Vagrantfile load "#{__dir__}/#{ENV['DRUPALVM_DIR']}/Vagrantfile" Vagrantfile {
  • 15. WHAT ABOUT PROD? --- # Deploy from the project's Git repository. drupal_deploy: true drupal_deploy_repo: "[email protected]:my/bacon.git" drupal_deploy_dir: /var/www/drupal # Set the domain for this site appropriately. drupal_domain: "prod.bacon.com" vagrant_hostname: "{{ drupal_domain }}" vm/prod.config.yml {
  • 16. WHAT ABOUT PROD? $ DRUPALVM_ENV=prod 
 ansible-playbook -i vm/inventory 
 vendor/geerlingguy/drupal-vm/provisioning/playbook.yml 
 -e "config_dir=$(pwd)/vm" 
 --become --ask-become-pass 
 --ask-vault-pass
  • 17. WHAT ABOUT PROD? • Dogfooding: project is on GitHub • Everybody loves secrets (.yml) • Full writeup on my blog:
 https://www.jeffgeerling.com/drupal-vm-local-prod
  • 21. EXAMPLE: SOLR SEARCH • Step 1: Add Solr to Drupal VM • Add solr to installed_extras • Copy Drupal VM's example configure-solr.sh to scripts/configure-solr.sh • Add script to vm/config.yml: post_provision_scripts:
 - "../../../../scripts/configure-solr.sh"
  • 22. EXAMPLE: SOLR SEARCH • Step 2: Add Drupal modules composer require drupal/search_api:^1.0 drupal/search_api_solr:^1.0 drush @local.example.com en -y search_api search_api_solr search_api_solr_defaults
  • 23. EXAMPLE: SOLR SEARCH • Step 3: Export the config and deploy! • Disable Search API Solr Defaults module • Export: drush @local.bacon.com cex -y • Commit and push • Deploy: Run the playbook on prod!
  • 28. EXAMPLE: BEHAT TESTS • Step 1: Add Selenium to Drupal VM • Add selenium to installed_extras
  • 29. EXAMPLE: BEHAT TESTS • Step 2: Add Drupal Extension composer require --dev drupal/drupal-extension
  • 30. EXAMPLE: BEHAT TESTS • Step 3: Configure Behat (behat.yml) • Add tests directory • Copy the config from Drupal VM's docs • Paste into new tests/behat.yml
  • 31. EXAMPLE: BEHAT TESTS • Step 4: Initialize Behat • Log into VM • cd into tests • Run ../vendor/bin/behat init
  • 32. EXAMPLE: BEHAT TESTS • Step 5: Test ALL THE THINGS! • Create feature files in tests/features/web • Example: HomeContent.feature
  • 33. EXAMPLE: BEHAT TESTS Feature: Test DrupalContext In order to prove Behat is working correctly in Drupal VM
 As a developer
 I need to run a simple interface test Scenario: Viewing content in a region
 Given I am on the homepage
 Then I should see "This is a demonstration" in the "content"
  • 38. WINDOWS • Use SMB, rsync, or reverse-mount shared folders • Use WSL/Ubuntu Bash and/or Cmder • Use Unix line endings • Read the docs
  • 39. • DRUPALVM_ANSIBLE_TAGS=xdebug vagrant provision • Tideways is the new XHProf • Configure ALL THE THINGS in Vagrantfile.local • Add custom pre/post-provision playbooks • Test your modules with PAReview.sh BONUS ROUND!
  • 40. THE FUTURE • Docker & Libvirt/KVM • Easier config template customization • Certbot + LetsEncrypt (TLS FTW) • MOAR Composer • MOAR Windows
  • 41. THANKS! • Review this session:
 https://joind.in/talk/8f8fa • Support my work on Patreon:
 https://www.patreon.com/geerlingguy