SlideShare a Scribd company logo
Drupal and Docker
Super powered drupal development
MACIEJ.LUKIANSKI@DROPTICA.COM
How to use docker to make drupal development
easier, quicker and more productible
In June
drupalcamp.pl
WWW.DROPTICA.COMDocker and Drupal
Problems of a dev team
● Multiple stacks
○ php 5.2 - 7.x
○ Many libraries & versions
○ Apache Solr 4.x to 6.x
○ Redis, Memcached
○ MongoDB, Nodejs, Elasticsearch
○ other
● How to:
○ Onboard developers quickly
○ Deploy and maintain integrity of environments:
■ dev,
■ test,
■ test_feature_7773
■ stage,
■ stage2,
■ ….
■ prod
○ Test the environments?
○ Propagate changes of environments between
team?
● Complex projects
○ Systems with APIs
○ Microservices
○ Legacy systems on outdated stacks
WWW.DROPTICA.COMDocker and Drupal
Possible solutions
● Use everyone’s local setups and hope it works
● Manually configure, upgrade, downgrade on each machine
● Virtualbox (with Puppet/Chef/Ansible)
● Vagrant
● Remote workspaces
WWW.DROPTICA.COMDocker and Drupal
● DOCKER - yay!
Our docker benefits
● Very few deployment surprises
○ No more “It worked on my machine”
WWW.DROPTICA.COMDocker and Drupal
● ~ 500 hours a year saved:
○ Setting up a project takes 10 minutes (3-5 commands)
○ Test/Stage environments in few minutes
○ No more differences between environments
○ Simplicity of services that took time to set up (solr, elasticsearch, mongo, node, postgres, other)
● We are looking beyond
○ cross functional expert teams
○ microservices
○ other technologies
● Stacks generally work (developers program rather than fight the architecture)
○ All config in code
How we do it?
WWW.DROPTICA.COMDocker and Drupal
● boilerplate images
● docker-console (custom script)
● docker-compose
Docker compose
● simple config file
● starting images often
enough
WWW.DROPTICA.COMDocker and Drupal
Once you get
the hang of it..
SSL for free with
jrcs/letsencrypt-nginx-proxy-companion
Separate images for crons
Backup as a service from a
separate image (create once,
use always)
Apache Solr quickly
available and configured
also locally
WWW.DROPTICA.COMDocker and Drupal
Boilerplate images
● droptica/apache-php https://hub.docker.com/r/droptica/apache-php
● droptica/php-fpm https://hub.docker.com/r/droptica/php-fpm
● droptica/php-developer https://hub.docker.com/r/droptica/php-developer
● droptica/codecept https://hub.docker.com/r/droptica/codecept
● droptica/mailcatcher https://hub.docker.com/r/droptica/mailcatcher
● droptica/postfix https://hub.docker.com/r/droptica/postfix
● droptica/jmeter https://hub.docker.com/r/droptica/jmeter
● and more...
WWW.DROPTICA.COMDocker and Drupal
How do I develop?
Where is drush?
Where is mysqldump?
Where is a sass compiler?
And all other development tools?
Apache &
PHP
mysql
Apache
Solr
mailer backup
mongodb
WWW.DROPTICA.COMDocker and Drupal
docker-compose.yml
php-developer & docker-console
Apache &
PHP
mysql
php-developer
(developer container)
sample commands:
dcon drush uli
dcon drush cc all
dcon shell -s
Apache
Solr
mailer backup
other
1. drush
2. Sass (ruby gems etc)
3. npm, bower, fabric,
4. Other tools
gives you a server-like feeling
WWW.DROPTICA.COMDocker and Drupal
● understands docker-compose.yml
● Multiple pre-built commands
● Building workflows like lego
● Custom commands (in python)
Docker console ~$ pip install docker-console
An additional application which helps to
automate workflow using the
php-developer image
WWW.DROPTICA.COMDocker and Drupal
DEMO
WWW.DROPTICA.COMDocker and Drupal
Heavy equipment dealer website
WWW.DROPTICA.COMDocker and Drupal
● Drupal
● Redis for cache
● Search with solr
● Mongodb with some data from
other system
Demo dealer dev environment
Apache & PHP
(to serve drupal)
+ php libraries
for mongodb
mysql
Apache
Solr
mongodb
WWW.DROPTICA.COMDocker and Drupal
Admin panel
for mongo
(mogo-express)
redis
docker-compose.ym
l
WWW.DROPTICA.COMDocker and Drupal
web:
build: ./docker/custom_images/custom-web
volumes:
- ./docker/custom_config/apache2.conf:/etc/apache2/apache2.conf:ro
- ./docker/custom_config/default-vhost.conf:/etc/apache2/sites-enabled/000-default.conf
- ./app/web:/var/www/web
links:
- mysql:mysql
- mongo:mongo
- solr:solr
environment:
VIRTUAL_HOST: ddemo.dev,www.ddemo.dev
mysql:
image: mysql:5.6
volumes:
- ./app_data/database:/var/lib/mysql
- ./docker/custom_config/my.cnf:/etc/mysql/conf.d/custom.cnf:ro
solr:
image: solr:6
volumes:
- ./app_conf/solr_conf/ddemo_search/conf:/opt/solr/server/solr/ddemo_search/conf
- ./app_conf/solr_conf/ddemo_search/core.properties:/opt/solr/server/solr/ddemo_search/core.properties
- ./app_data/solr_data/ddemo_search:/opt/solr/server/solr/ddemo_search/data
ports:
- 8983:8983
mongo:
image: mongo
volumes:
- ./app_data/mongodb:/data/db
mongo-express:
image: mongo-express
links:
- mongo:mongo
ports:
- 8081:8081
redis:
image: redis
This is all it takes
New developer comes along
WWW.DROPTICA.COMDocker and Drupal
1. git pull git@git-url-to-the-repository
2. cd repository
3. docker-console up
Apache & PHP
+ php libraries for
mongodb
mysql
Apache Solr
mongodb
Admin
panel for
mongo
and presto
Redis
To import db, composer install, run updates etc:
1. fab get-dbases
2. Docker-console build Project set up and working
But where is the demo ??
WWW.DROPTICA.COMDocker and Drupal
This is too simple..
WWW.DROPTICA.COMDocker and Drupal
Show me more complex
Nginx to serve
Drupal
cron daily
cron alerts
cron html
printouts
Mailer
XML generator
Rabbitmq
tests
PHP
cron search api
cron emails
daily
DRUPAL
codebase
blackfire
cron emails
weekly
Nginx to serve
xml extracts
WWW.DROPTICA.COMDocker and Drupal
....
14 cron
containers
…..
Mailcatcher
Files
Mysql
Redis
Solr
Nginx for
drupal
cron daily
cron alerts
cron html
printouts
cron backup
Mailer
XML
generator
Rabbitmq
tests
cache warmerPHP
cron search
api
cron emails
daily
DRUPAL
codebase
blackfire
cron emails
weekly
AWS S3
Nginx for
xml
WWW.DROPTICA.COMDocker and Drupal
....
14 cron
containers
…..
Files
AWS
RDS
Redis
Solr
Mailchimp
php:
build: ./docker/Dockerfiles/custom-php
links:
- mysql:mysql
- solr:solr
- redis:redis
- mailcatcher:mailcatcher
- rabbit:rabbit
- blackfire:blackfire
php:
restart: always
build: ./docker/Dockerfiles/custom-php-prod
links:
- blackfire:blackfire
extra_hosts:
- "solr:${SOLR_HOST}"
- "mailcatcher:${MAILER_HOTS}"
- "rabbit:${RABBIT_HOST}"
dev
prod
cron daily
cron backup
XML
generator
PHP
MailerRabbitmq
cron emails
weekly
WWW.DROPTICA.COMDocker and Drupal
....
14 cron
containers
…..
AWS
RDS
Redi
s
Solr
Nginx PHP
Nginx
loadbalancer
cache warmer
Files
tests
Web
browsers
Additional Benefits
● Easy to see what environment consist of (all is in code)
● A move towards SOA (we do not care how solr or rabbitmq is set up)
● Great step towards microservices
WWW.DROPTICA.COMDocker and Drupal
● Upgrades of stack are a breeze (php5 -> php7 is a one line)
● Easier to explore technologies - “there is an image for that”
● don’t hold data in containers (map volumes or use docker volumes)
● don’t hold multiple services in one container
● do use code for config (Dockerfile, docker-compose)
Dos and don’ts
WWW.DROPTICA.COMDocker and Drupal
● github.com/droptica/docker-tutorial
How to start
WWW.DROPTICA.COMDocker and Drupal
● Use docker for services
solr:
image: solr.6
ports:
- 8983:8983
redis:
image: redis
● www.droptica.com/blog
Thank you
Imię i Nazwisko autora
Maciej Lukianski
maciej.lukianski@droptica.com
@MaciejLukianski
Contact details:
WWW.DROPTICA.COM

More Related Content

What's hot

From Docker Run To Docker Compose
From Docker Run To Docker ComposeFrom Docker Run To Docker Compose
From Docker Run To Docker Compose
Fitra Aditya
 
Academy PRO: Docker. Part 2
Academy PRO: Docker. Part 2Academy PRO: Docker. Part 2
Academy PRO: Docker. Part 2
Binary Studio
 
Academy PRO: Docker. Part 4
Academy PRO: Docker. Part 4Academy PRO: Docker. Part 4
Academy PRO: Docker. Part 4
Binary Studio
 
How to debug the pod which is hard to debug (디버그 하기 어려운 POD 디버그 하기)
How to debug the pod which is hard to debug (디버그 하기 어려운 POD 디버그 하기)How to debug the pod which is hard to debug (디버그 하기 어려운 POD 디버그 하기)
How to debug the pod which is hard to debug (디버그 하기 어려운 POD 디버그 하기)
어형 이
 
Docker 0.11 at MaxCDN meetup in Los Angeles
Docker 0.11 at MaxCDN meetup in Los AngelesDocker 0.11 at MaxCDN meetup in Los Angeles
Docker 0.11 at MaxCDN meetup in Los Angeles
Jérôme Petazzoni
 
Continuous Delivery di una WebApp - by example
Continuous Delivery di una WebApp - by exampleContinuous Delivery di una WebApp - by example
Continuous Delivery di una WebApp - by example
Fabio Mora
 
Docker workshop 0507 Taichung
Docker workshop 0507 Taichung Docker workshop 0507 Taichung
Docker workshop 0507 Taichung
Paul Chao
 
Academy PRO: Docker. Part 1
Academy PRO: Docker. Part 1Academy PRO: Docker. Part 1
Academy PRO: Docker. Part 1
Binary Studio
 
Docker, Docker Swarm mangement tool - Gorae
Docker, Docker Swarm mangement tool - GoraeDocker, Docker Swarm mangement tool - Gorae
Docker, Docker Swarm mangement tool - Gorae
Rhio kim
 
How to easy deploy app into any cloud
How to easy deploy app into any cloudHow to easy deploy app into any cloud
How to easy deploy app into any cloud
Ladislav Prskavec
 
Surveillance on slam technology
Surveillance on slam technologySurveillance on slam technology
Surveillance on slam technology
GMO-Z.com Vietnam Lab Center
 
Docker workshop DevOpsDays Amsterdam 2014
Docker workshop DevOpsDays Amsterdam 2014Docker workshop DevOpsDays Amsterdam 2014
Docker workshop DevOpsDays Amsterdam 2014
Pini Reznik
 
When Docker ends, Chef begins ~ #idi2015 Incontro DevOps Italia
When Docker ends, Chef begins ~ #idi2015 Incontro DevOps ItaliaWhen Docker ends, Chef begins ~ #idi2015 Incontro DevOps Italia
When Docker ends, Chef begins ~ #idi2015 Incontro DevOps Italia
Giovanni Toraldo
 
Pragmatic Monolith-First, easy to decompose, clean architecture
Pragmatic Monolith-First, easy to decompose, clean architecturePragmatic Monolith-First, easy to decompose, clean architecture
Pragmatic Monolith-First, easy to decompose, clean architecture
Piotr Pelczar
 
Docker 101 - from 0 to Docker in 30 minutes
Docker 101 - from 0 to Docker in 30 minutesDocker 101 - from 0 to Docker in 30 minutes
Docker 101 - from 0 to Docker in 30 minutes
Luciano Fiandesio
 
Dockerizing Symfony Applications - Symfony Live Berlin 2014
Dockerizing Symfony Applications - Symfony Live Berlin 2014Dockerizing Symfony Applications - Symfony Live Berlin 2014
Dockerizing Symfony Applications - Symfony Live Berlin 2014D
 
Composer Tools & Frameworks for Drupal
Composer Tools & Frameworks for DrupalComposer Tools & Frameworks for Drupal
Composer Tools & Frameworks for Drupal
Pantheon
 
CI-CD WITH GITLAB WORKFLOW
CI-CD WITH GITLAB WORKFLOWCI-CD WITH GITLAB WORKFLOW
CI-CD WITH GITLAB WORKFLOW
AddWeb Solution Pvt. Ltd.
 
Ruby microservices with Docker - Sergii Koba
Ruby microservices with Docker -  Sergii KobaRuby microservices with Docker -  Sergii Koba
Ruby microservices with Docker - Sergii Koba
Ruby Meditation
 
Dockerize your Symfony application - Symfony Live NYC 2014
Dockerize your Symfony application - Symfony Live NYC 2014Dockerize your Symfony application - Symfony Live NYC 2014
Dockerize your Symfony application - Symfony Live NYC 2014
André Rømcke
 

What's hot (20)

From Docker Run To Docker Compose
From Docker Run To Docker ComposeFrom Docker Run To Docker Compose
From Docker Run To Docker Compose
 
Academy PRO: Docker. Part 2
Academy PRO: Docker. Part 2Academy PRO: Docker. Part 2
Academy PRO: Docker. Part 2
 
Academy PRO: Docker. Part 4
Academy PRO: Docker. Part 4Academy PRO: Docker. Part 4
Academy PRO: Docker. Part 4
 
How to debug the pod which is hard to debug (디버그 하기 어려운 POD 디버그 하기)
How to debug the pod which is hard to debug (디버그 하기 어려운 POD 디버그 하기)How to debug the pod which is hard to debug (디버그 하기 어려운 POD 디버그 하기)
How to debug the pod which is hard to debug (디버그 하기 어려운 POD 디버그 하기)
 
Docker 0.11 at MaxCDN meetup in Los Angeles
Docker 0.11 at MaxCDN meetup in Los AngelesDocker 0.11 at MaxCDN meetup in Los Angeles
Docker 0.11 at MaxCDN meetup in Los Angeles
 
Continuous Delivery di una WebApp - by example
Continuous Delivery di una WebApp - by exampleContinuous Delivery di una WebApp - by example
Continuous Delivery di una WebApp - by example
 
Docker workshop 0507 Taichung
Docker workshop 0507 Taichung Docker workshop 0507 Taichung
Docker workshop 0507 Taichung
 
Academy PRO: Docker. Part 1
Academy PRO: Docker. Part 1Academy PRO: Docker. Part 1
Academy PRO: Docker. Part 1
 
Docker, Docker Swarm mangement tool - Gorae
Docker, Docker Swarm mangement tool - GoraeDocker, Docker Swarm mangement tool - Gorae
Docker, Docker Swarm mangement tool - Gorae
 
How to easy deploy app into any cloud
How to easy deploy app into any cloudHow to easy deploy app into any cloud
How to easy deploy app into any cloud
 
Surveillance on slam technology
Surveillance on slam technologySurveillance on slam technology
Surveillance on slam technology
 
Docker workshop DevOpsDays Amsterdam 2014
Docker workshop DevOpsDays Amsterdam 2014Docker workshop DevOpsDays Amsterdam 2014
Docker workshop DevOpsDays Amsterdam 2014
 
When Docker ends, Chef begins ~ #idi2015 Incontro DevOps Italia
When Docker ends, Chef begins ~ #idi2015 Incontro DevOps ItaliaWhen Docker ends, Chef begins ~ #idi2015 Incontro DevOps Italia
When Docker ends, Chef begins ~ #idi2015 Incontro DevOps Italia
 
Pragmatic Monolith-First, easy to decompose, clean architecture
Pragmatic Monolith-First, easy to decompose, clean architecturePragmatic Monolith-First, easy to decompose, clean architecture
Pragmatic Monolith-First, easy to decompose, clean architecture
 
Docker 101 - from 0 to Docker in 30 minutes
Docker 101 - from 0 to Docker in 30 minutesDocker 101 - from 0 to Docker in 30 minutes
Docker 101 - from 0 to Docker in 30 minutes
 
Dockerizing Symfony Applications - Symfony Live Berlin 2014
Dockerizing Symfony Applications - Symfony Live Berlin 2014Dockerizing Symfony Applications - Symfony Live Berlin 2014
Dockerizing Symfony Applications - Symfony Live Berlin 2014
 
Composer Tools & Frameworks for Drupal
Composer Tools & Frameworks for DrupalComposer Tools & Frameworks for Drupal
Composer Tools & Frameworks for Drupal
 
CI-CD WITH GITLAB WORKFLOW
CI-CD WITH GITLAB WORKFLOWCI-CD WITH GITLAB WORKFLOW
CI-CD WITH GITLAB WORKFLOW
 
Ruby microservices with Docker - Sergii Koba
Ruby microservices with Docker -  Sergii KobaRuby microservices with Docker -  Sergii Koba
Ruby microservices with Docker - Sergii Koba
 
Dockerize your Symfony application - Symfony Live NYC 2014
Dockerize your Symfony application - Symfony Live NYC 2014Dockerize your Symfony application - Symfony Live NYC 2014
Dockerize your Symfony application - Symfony Live NYC 2014
 

Similar to Super powered Drupal development with docker

Docker4Drupal 2.1 for Development
Docker4Drupal 2.1 for DevelopmentDocker4Drupal 2.1 for Development
Docker4Drupal 2.1 for Development
Websolutions Agency
 
Docker+java
Docker+javaDocker+java
Docker+java
DPC Consulting Ltd
 
Powercoders · Docker · Fall 2021.pptx
Powercoders · Docker · Fall 2021.pptxPowercoders · Docker · Fall 2021.pptx
Powercoders · Docker · Fall 2021.pptx
IgnacioTamayo2
 
Docker for Web Developers: A Sneak Peek
Docker for Web Developers: A Sneak PeekDocker for Web Developers: A Sneak Peek
Docker for Web Developers: A Sneak Peek
msyukor
 
Introduction to Docker and Monitoring with InfluxData
Introduction to Docker and Monitoring with InfluxDataIntroduction to Docker and Monitoring with InfluxData
Introduction to Docker and Monitoring with InfluxData
InfluxData
 
Introduction to Docker at the Azure Meet-up in New York
Introduction to Docker at the Azure Meet-up in New YorkIntroduction to Docker at the Azure Meet-up in New York
Introduction to Docker at the Azure Meet-up in New York
Jérôme Petazzoni
 
Getting Started with Docker
Getting Started with DockerGetting Started with Docker
Getting Started with Docker
Geeta Vinnakota
 
Tribal Nova Docker feedback
Tribal Nova Docker feedbackTribal Nova Docker feedback
Tribal Nova Docker feedback
Nicolas Degardin
 
Automate drupal deployments with linux containers, docker and vagrant
Automate drupal deployments with linux containers, docker and vagrant Automate drupal deployments with linux containers, docker and vagrant
Automate drupal deployments with linux containers, docker and vagrant Ricardo Amaro
 
Accelerate your development with Docker
Accelerate your development with DockerAccelerate your development with Docker
Accelerate your development with Docker
Andrey Hristov
 
Accelerate your software development with Docker
Accelerate your software development with DockerAccelerate your software development with Docker
Accelerate your software development with Docker
Andrey Hristov
 
Docker introduction
Docker introductionDocker introduction
Docker introduction
Marcelo Ochoa
 
Docker workshop
Docker workshopDocker workshop
Docker workshop
Rafael Dutra
 
A Gentle Introduction to Docker and Containers
A Gentle Introduction to Docker and ContainersA Gentle Introduction to Docker and Containers
A Gentle Introduction to Docker and ContainersDocker, Inc.
 
Developing and Deploying PHP with Docker
Developing and Deploying PHP with DockerDeveloping and Deploying PHP with Docker
Developing and Deploying PHP with DockerPatrick Mizer
 
Why Docker? Dayton PHP, April 2017
Why Docker? Dayton PHP, April 2017Why Docker? Dayton PHP, April 2017
Why Docker? Dayton PHP, April 2017
Chris Tankersley
 
Docker primer and tips
Docker primer and tipsDocker primer and tips
Docker primer and tips
Samuel Chow
 
Introduction of Docker and Docker Compose
Introduction of Docker and Docker ComposeIntroduction of Docker and Docker Compose
Introduction of Docker and Docker Compose
Dr. Ketan Parmar
 
Drupal 8 improvements for developer productivity php symfony and more
Drupal 8 improvements for developer productivity  php symfony and moreDrupal 8 improvements for developer productivity  php symfony and more
Drupal 8 improvements for developer productivity php symfony and more
Acquia
 
Docker presentation
Docker presentationDocker presentation
Docker presentation
Jaskaran Singh
 

Similar to Super powered Drupal development with docker (20)

Docker4Drupal 2.1 for Development
Docker4Drupal 2.1 for DevelopmentDocker4Drupal 2.1 for Development
Docker4Drupal 2.1 for Development
 
Docker+java
Docker+javaDocker+java
Docker+java
 
Powercoders · Docker · Fall 2021.pptx
Powercoders · Docker · Fall 2021.pptxPowercoders · Docker · Fall 2021.pptx
Powercoders · Docker · Fall 2021.pptx
 
Docker for Web Developers: A Sneak Peek
Docker for Web Developers: A Sneak PeekDocker for Web Developers: A Sneak Peek
Docker for Web Developers: A Sneak Peek
 
Introduction to Docker and Monitoring with InfluxData
Introduction to Docker and Monitoring with InfluxDataIntroduction to Docker and Monitoring with InfluxData
Introduction to Docker and Monitoring with InfluxData
 
Introduction to Docker at the Azure Meet-up in New York
Introduction to Docker at the Azure Meet-up in New YorkIntroduction to Docker at the Azure Meet-up in New York
Introduction to Docker at the Azure Meet-up in New York
 
Getting Started with Docker
Getting Started with DockerGetting Started with Docker
Getting Started with Docker
 
Tribal Nova Docker feedback
Tribal Nova Docker feedbackTribal Nova Docker feedback
Tribal Nova Docker feedback
 
Automate drupal deployments with linux containers, docker and vagrant
Automate drupal deployments with linux containers, docker and vagrant Automate drupal deployments with linux containers, docker and vagrant
Automate drupal deployments with linux containers, docker and vagrant
 
Accelerate your development with Docker
Accelerate your development with DockerAccelerate your development with Docker
Accelerate your development with Docker
 
Accelerate your software development with Docker
Accelerate your software development with DockerAccelerate your software development with Docker
Accelerate your software development with Docker
 
Docker introduction
Docker introductionDocker introduction
Docker introduction
 
Docker workshop
Docker workshopDocker workshop
Docker workshop
 
A Gentle Introduction to Docker and Containers
A Gentle Introduction to Docker and ContainersA Gentle Introduction to Docker and Containers
A Gentle Introduction to Docker and Containers
 
Developing and Deploying PHP with Docker
Developing and Deploying PHP with DockerDeveloping and Deploying PHP with Docker
Developing and Deploying PHP with Docker
 
Why Docker? Dayton PHP, April 2017
Why Docker? Dayton PHP, April 2017Why Docker? Dayton PHP, April 2017
Why Docker? Dayton PHP, April 2017
 
Docker primer and tips
Docker primer and tipsDocker primer and tips
Docker primer and tips
 
Introduction of Docker and Docker Compose
Introduction of Docker and Docker ComposeIntroduction of Docker and Docker Compose
Introduction of Docker and Docker Compose
 
Drupal 8 improvements for developer productivity php symfony and more
Drupal 8 improvements for developer productivity  php symfony and moreDrupal 8 improvements for developer productivity  php symfony and more
Drupal 8 improvements for developer productivity php symfony and more
 
Docker presentation
Docker presentationDocker presentation
Docker presentation
 

Recently uploaded

Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
Donna Lenk
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
Google
 
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Anthony Dahanne
 
A Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdfA Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdf
kalichargn70th171
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
Ortus Solutions, Corp
 
Graphic Design Crash Course for beginners
Graphic Design Crash Course for beginnersGraphic Design Crash Course for beginners
Graphic Design Crash Course for beginners
e20449
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Mind IT Systems
 
top nidhi software solution freedownload
top nidhi software solution freedownloadtop nidhi software solution freedownload
top nidhi software solution freedownload
vrstrong314
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Globus
 
Using IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandUsing IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New Zealand
IES VE
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
Matt Welsh
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
Globus
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Globus
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
Ortus Solutions, Corp
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
Philip Schwarz
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
NYGGS Automation Suite
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
Globus
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Globus
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
Max Andersen
 

Recently uploaded (20)

Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
 
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
 
A Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdfA Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdf
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
 
Graphic Design Crash Course for beginners
Graphic Design Crash Course for beginnersGraphic Design Crash Course for beginners
Graphic Design Crash Course for beginners
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
 
top nidhi software solution freedownload
top nidhi software solution freedownloadtop nidhi software solution freedownload
top nidhi software solution freedownload
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
 
Using IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandUsing IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New Zealand
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
 

Super powered Drupal development with docker

  • 1. Drupal and Docker Super powered drupal development MACIEJ.LUKIANSKI@DROPTICA.COM How to use docker to make drupal development easier, quicker and more productible
  • 3. Problems of a dev team ● Multiple stacks ○ php 5.2 - 7.x ○ Many libraries & versions ○ Apache Solr 4.x to 6.x ○ Redis, Memcached ○ MongoDB, Nodejs, Elasticsearch ○ other ● How to: ○ Onboard developers quickly ○ Deploy and maintain integrity of environments: ■ dev, ■ test, ■ test_feature_7773 ■ stage, ■ stage2, ■ …. ■ prod ○ Test the environments? ○ Propagate changes of environments between team? ● Complex projects ○ Systems with APIs ○ Microservices ○ Legacy systems on outdated stacks WWW.DROPTICA.COMDocker and Drupal
  • 4. Possible solutions ● Use everyone’s local setups and hope it works ● Manually configure, upgrade, downgrade on each machine ● Virtualbox (with Puppet/Chef/Ansible) ● Vagrant ● Remote workspaces WWW.DROPTICA.COMDocker and Drupal ● DOCKER - yay!
  • 5. Our docker benefits ● Very few deployment surprises ○ No more “It worked on my machine” WWW.DROPTICA.COMDocker and Drupal ● ~ 500 hours a year saved: ○ Setting up a project takes 10 minutes (3-5 commands) ○ Test/Stage environments in few minutes ○ No more differences between environments ○ Simplicity of services that took time to set up (solr, elasticsearch, mongo, node, postgres, other) ● We are looking beyond ○ cross functional expert teams ○ microservices ○ other technologies ● Stacks generally work (developers program rather than fight the architecture) ○ All config in code
  • 6. How we do it? WWW.DROPTICA.COMDocker and Drupal ● boilerplate images ● docker-console (custom script) ● docker-compose
  • 7. Docker compose ● simple config file ● starting images often enough WWW.DROPTICA.COMDocker and Drupal
  • 8. Once you get the hang of it.. SSL for free with jrcs/letsencrypt-nginx-proxy-companion Separate images for crons Backup as a service from a separate image (create once, use always) Apache Solr quickly available and configured also locally WWW.DROPTICA.COMDocker and Drupal
  • 9. Boilerplate images ● droptica/apache-php https://hub.docker.com/r/droptica/apache-php ● droptica/php-fpm https://hub.docker.com/r/droptica/php-fpm ● droptica/php-developer https://hub.docker.com/r/droptica/php-developer ● droptica/codecept https://hub.docker.com/r/droptica/codecept ● droptica/mailcatcher https://hub.docker.com/r/droptica/mailcatcher ● droptica/postfix https://hub.docker.com/r/droptica/postfix ● droptica/jmeter https://hub.docker.com/r/droptica/jmeter ● and more... WWW.DROPTICA.COMDocker and Drupal
  • 10. How do I develop? Where is drush? Where is mysqldump? Where is a sass compiler? And all other development tools? Apache & PHP mysql Apache Solr mailer backup mongodb WWW.DROPTICA.COMDocker and Drupal docker-compose.yml
  • 11. php-developer & docker-console Apache & PHP mysql php-developer (developer container) sample commands: dcon drush uli dcon drush cc all dcon shell -s Apache Solr mailer backup other 1. drush 2. Sass (ruby gems etc) 3. npm, bower, fabric, 4. Other tools gives you a server-like feeling WWW.DROPTICA.COMDocker and Drupal
  • 12. ● understands docker-compose.yml ● Multiple pre-built commands ● Building workflows like lego ● Custom commands (in python) Docker console ~$ pip install docker-console An additional application which helps to automate workflow using the php-developer image WWW.DROPTICA.COMDocker and Drupal
  • 14. Heavy equipment dealer website WWW.DROPTICA.COMDocker and Drupal ● Drupal ● Redis for cache ● Search with solr ● Mongodb with some data from other system
  • 15. Demo dealer dev environment Apache & PHP (to serve drupal) + php libraries for mongodb mysql Apache Solr mongodb WWW.DROPTICA.COMDocker and Drupal Admin panel for mongo (mogo-express) redis
  • 16. docker-compose.ym l WWW.DROPTICA.COMDocker and Drupal web: build: ./docker/custom_images/custom-web volumes: - ./docker/custom_config/apache2.conf:/etc/apache2/apache2.conf:ro - ./docker/custom_config/default-vhost.conf:/etc/apache2/sites-enabled/000-default.conf - ./app/web:/var/www/web links: - mysql:mysql - mongo:mongo - solr:solr environment: VIRTUAL_HOST: ddemo.dev,www.ddemo.dev mysql: image: mysql:5.6 volumes: - ./app_data/database:/var/lib/mysql - ./docker/custom_config/my.cnf:/etc/mysql/conf.d/custom.cnf:ro solr: image: solr:6 volumes: - ./app_conf/solr_conf/ddemo_search/conf:/opt/solr/server/solr/ddemo_search/conf - ./app_conf/solr_conf/ddemo_search/core.properties:/opt/solr/server/solr/ddemo_search/core.properties - ./app_data/solr_data/ddemo_search:/opt/solr/server/solr/ddemo_search/data ports: - 8983:8983 mongo: image: mongo volumes: - ./app_data/mongodb:/data/db mongo-express: image: mongo-express links: - mongo:mongo ports: - 8081:8081 redis: image: redis This is all it takes
  • 17. New developer comes along WWW.DROPTICA.COMDocker and Drupal 1. git pull git@git-url-to-the-repository 2. cd repository 3. docker-console up Apache & PHP + php libraries for mongodb mysql Apache Solr mongodb Admin panel for mongo and presto Redis To import db, composer install, run updates etc: 1. fab get-dbases 2. Docker-console build Project set up and working
  • 18. But where is the demo ?? WWW.DROPTICA.COMDocker and Drupal
  • 19. This is too simple.. WWW.DROPTICA.COMDocker and Drupal Show me more complex
  • 20. Nginx to serve Drupal cron daily cron alerts cron html printouts Mailer XML generator Rabbitmq tests PHP cron search api cron emails daily DRUPAL codebase blackfire cron emails weekly Nginx to serve xml extracts WWW.DROPTICA.COMDocker and Drupal .... 14 cron containers ….. Mailcatcher Files Mysql Redis Solr
  • 21. Nginx for drupal cron daily cron alerts cron html printouts cron backup Mailer XML generator Rabbitmq tests cache warmerPHP cron search api cron emails daily DRUPAL codebase blackfire cron emails weekly AWS S3 Nginx for xml WWW.DROPTICA.COMDocker and Drupal .... 14 cron containers ….. Files AWS RDS Redis Solr Mailchimp php: build: ./docker/Dockerfiles/custom-php links: - mysql:mysql - solr:solr - redis:redis - mailcatcher:mailcatcher - rabbit:rabbit - blackfire:blackfire php: restart: always build: ./docker/Dockerfiles/custom-php-prod links: - blackfire:blackfire extra_hosts: - "solr:${SOLR_HOST}" - "mailcatcher:${MAILER_HOTS}" - "rabbit:${RABBIT_HOST}" dev prod
  • 22. cron daily cron backup XML generator PHP MailerRabbitmq cron emails weekly WWW.DROPTICA.COMDocker and Drupal .... 14 cron containers ….. AWS RDS Redi s Solr Nginx PHP Nginx loadbalancer cache warmer Files tests Web browsers
  • 23. Additional Benefits ● Easy to see what environment consist of (all is in code) ● A move towards SOA (we do not care how solr or rabbitmq is set up) ● Great step towards microservices WWW.DROPTICA.COMDocker and Drupal ● Upgrades of stack are a breeze (php5 -> php7 is a one line) ● Easier to explore technologies - “there is an image for that”
  • 24. ● don’t hold data in containers (map volumes or use docker volumes) ● don’t hold multiple services in one container ● do use code for config (Dockerfile, docker-compose) Dos and don’ts WWW.DROPTICA.COMDocker and Drupal
  • 25. ● github.com/droptica/docker-tutorial How to start WWW.DROPTICA.COMDocker and Drupal ● Use docker for services solr: image: solr.6 ports: - 8983:8983 redis: image: redis ● www.droptica.com/blog
  • 26. Thank you Imię i Nazwisko autora Maciej Lukianski maciej.lukianski@droptica.com @MaciejLukianski Contact details: WWW.DROPTICA.COM