Drupal VM is a VM for Drupal development, built with Vagrant and Ansible, or Docker. This presentation was given at Drupal Camp St. Louis 2017 by Jeff Geerling, Senior Technical Architect at Acquia.
6. DRUPAL VM
geerlingguy, what if I already have an existing
site but want a really simple local development
environment?
7. DRUPAL VM
• docker-compose.yml integration:
1. Get your codebase into a web subdirectory
2. Grab Drupal VM's docker-compose.yml
3. docker-compose up -d
9. DRUPAL VM
I need Apache Solr. And can I run 3.6, not 6.x.
I need Elasticsearch.
I need Varnish.
I need XDebug.
I need [Blackfire|Tideways|XHProf]
I need PHP 7.2. And 7.1. And 7.0. And 5.6.
I need Nginx and PostgreSQL.
(etc.)
10. DRUPAL VM
• Vagrant Quick Start:
1. Install VirtualBox and Vagrant
2. Download Drupal VM, customize config.yml
3. vagrant up
20. EXAMPLE: BEHAT TESTS
• Step 1: There is no step 1!
• BLT comes preconfigured with Behat tests 😌
21. EXAMPLE: BEHAT TESTS
• Step 5: Test ALL THE THINGS!
• Create feature files in tests/behat/features
• Example: Examples.feature
22. 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: Load a page without Javascript
Given I am on "/"
Then the response status code should be 200
26. WINDOWS
• Use SMB, rsync, or reverse-mount shared folders
• Use WSL/Ubuntu Bash and/or Cmder
• Use Unix line endings
• Read the docs
27. • (docker)
• Configure ALL THE THINGS in Vagrantfile.local
• Add custom pre/post-provision playbooks
• Test your modules with PAReview.sh
BONUS ROUND!