SlideShare une entreprise Scribd logo
1  sur  26
Télécharger pour lire hors ligne
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

Contenu connexe

Tendances

From Docker Run To Docker Compose
From Docker Run To Docker ComposeFrom Docker Run To Docker Compose
From Docker Run To Docker ComposeFitra Aditya
 
Academy PRO: Docker. Part 2
Academy PRO: Docker. Part 2Academy PRO: Docker. Part 2
Academy PRO: Docker. Part 2Binary Studio
 
Academy PRO: Docker. Part 4
Academy PRO: Docker. Part 4Academy PRO: Docker. Part 4
Academy PRO: Docker. Part 4Binary 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 AngelesJé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 exampleFabio 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 1Binary Studio
 
Docker, Docker Swarm mangement tool - Gorae
Docker, Docker Swarm mangement tool - GoraeDocker, Docker Swarm mangement tool - Gorae
Docker, Docker Swarm mangement tool - GoraeRhio 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 cloudLadislav Prskavec
 
Docker workshop DevOpsDays Amsterdam 2014
Docker workshop DevOpsDays Amsterdam 2014Docker workshop DevOpsDays Amsterdam 2014
Docker workshop DevOpsDays Amsterdam 2014Pini 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 ItaliaGiovanni 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 architecturePiotr 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 minutesLuciano 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 DrupalPantheon
 
Ruby microservices with Docker - Sergii Koba
Ruby microservices with Docker -  Sergii KobaRuby microservices with Docker -  Sergii Koba
Ruby microservices with Docker - Sergii KobaRuby 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 2014André Rømcke
 

Tendances (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
 

Similaire à Super powered Drupal development with docker

Docker4Drupal 2.1 for Development
Docker4Drupal 2.1 for DevelopmentDocker4Drupal 2.1 for Development
Docker4Drupal 2.1 for DevelopmentWebsolutions Agency
 
Powercoders · Docker · Fall 2021.pptx
Powercoders · Docker · Fall 2021.pptxPowercoders · Docker · Fall 2021.pptx
Powercoders · Docker · Fall 2021.pptxIgnacioTamayo2
 
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 Peekmsyukor
 
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 InfluxDataInfluxData
 
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 YorkJérôme Petazzoni
 
Getting Started with Docker
Getting Started with DockerGetting Started with Docker
Getting Started with DockerGeeta Vinnakota
 
Tribal Nova Docker feedback
Tribal Nova Docker feedbackTribal Nova Docker feedback
Tribal Nova Docker feedbackNicolas 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 DockerAndrey Hristov
 
Accelerate your software development with Docker
Accelerate your software development with DockerAccelerate your software development with Docker
Accelerate your software development with DockerAndrey Hristov
 
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 2017Chris Tankersley
 
Docker primer and tips
Docker primer and tipsDocker primer and tips
Docker primer and tipsSamuel Chow
 
Introduction of Docker and Docker Compose
Introduction of Docker and Docker ComposeIntroduction of Docker and Docker Compose
Introduction of Docker and Docker ComposeDr. 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 moreAcquia
 

Similaire à 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
 

Dernier

AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplatePresentation.STUDIO
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnAmarnathKambale
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionOnePlan Solutions
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrainmasabamasaba
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park masabamasaba
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension AidPhilip Schwarz
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...Shane Coughlan
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisamasabamasaba
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfproinshot.com
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesVictorSzoltysek
 

Dernier (20)

AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 

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