SlideShare a Scribd company logo
1 of 36
Download to read offline
Docker Containers: 
Testing automation and development in Drupal. 
Amsterdam - DevOps meetup, September 2014 
A new strategy for automating Drupal testing 
@ricardoamaro
About me 
Free/Opensource software lover 
Senior Cloud Engineer @Acquia 
Drupal.org infrastructure/devops 
Drupalist & Linux enthusiast 
Father, artist, community facilitator 
@ricardoamaro 
https://drupal.org/user/666176
today’s meetup 
Story of an investigation to improve cloud 
1. The sad VirtualMachine story 
2. Containers and non-containers 
3. DEMO - Drupal Docker 
4. Drupal Testbots story in a Glance 
5. Docker as a testing automation factor 
6. DEMO - Docker Tesbot 
7. Integration path
What is virtualization? 
Hardware virtualization or platform 
virtualization refers to the creation of a 
virtual machine that acts like a real 
computer with an operating system. 
Software executed on these virtual 
machines is separated from the underlying 
hardware resources.
Why should i care? 
Increase 
+ efficiency 
+ availability 
+ security 
Reduce 
- costs 
- hardware 
- energy 
Cloud infrastructure providers like Amazon Web Service sell virtual 
machines. EC2 revenue is expected to surpass $1B in revenue this year. 
That's a lot of VMs…
Virtual Machine platforms
The sad Virtual Machine story... 
➢ We are also paying for lot of 
avoidable overhead. 
➢ The Virtual Machine is a full-blown 
operating system image. 
➢ This is a heavyweight solution to 
run applications in the cloud.
What is the solution?
A new concept, a new hope 
CCoonnttaaiinneerrss uusseedd ttoo bbee tteerrrriibbllee,, bbuutt nnoott aannyymmoorree
Because Docker has arrived!
On any recent Linux Kernel near you!
Virtual Machines vs Containers 
Virtualization and 
paravirtualization 
require a full 
operating system 
image for each 
instance. 
Source : http://www.linuxjournal.com/content/containers%E2%80%94not-virtual-machines%E2%80%94are-future-cloud
Virtual Machines vs Containers 
Containers can 
share a single 
Linux Kernel and, 
optionally, other 
binary and library 
resources. 
Source : http://www.linuxjournal.com/content/containers%E2%80%94not-virtual-machines%E2%80%94are-future-cloud
Virtual Machines vs Containers 
Virtualization and paravirtualization 
require a full operating system image 
for each instance. 
Containers can share a single operating 
system and, optionally, other binary 
and library resources. 
Source : http://www.linuxjournal.com/content/containers%E2%80%94not-virtual-machines%E2%80%94are-future-cloud
The time to provision 
Source : http://www.linuxjournal.com/content/containers%E2%80%94not-virtual-machines%E2%80%94are-future-cloud
From the simple concept of “chroot” 
mount /dev/sda /target 
chroot /target 
source: http://openvz.org 
but that had no resource and security isolation goals 
for multi-tenant designs...
Cpu 
Devices 
Processes 
Memory 
Disk space 
Network 
What if you could control...
Docker 
Need 
control 
over 
specific 
host 
resources 
cgroups 
Control Groups provide a mechanism for aggregating/partitioning sets 
of tasks, and all their future children, into hierarchical groups with 
specialized behaviour. 
~$ ls /sys/fs/cgroup 
blkio 
cpu 
cpuacct 
cpuset 
devices 
freezer 
hugetlb 
memory 
perf_event 
Containers & Cgroups 
https://www.kernel.org/doc/Documentation/cgroups/cgroups.txt
use Docker
Docker Who??
this Docker 
and ship them as containers
Ship containers? Build Once, Run Anywhere
Build and ship Drupal the Docker way: 
https://github.com/ricardoamaro/docker-drupal 
https://github.com/ricardoamaro/docker-drupal-nginx
The docker is awesome! 
the Commands: 
attach Attach to a running container 
commit Create a new image from a container's changes 
diff Inspect changes on a container's filesystem 
export Stream the contents of a container as a tar archive 
history Show the history of an image 
images List images 
import Create a new filesystem image from the contents of a tarball 
info Display system-wide information 
inspect Return low-level information on a container 
kill Kill a running container 
login Register or Login to the docker registry server 
logs Fetch the logs of a container 
port Lookup the public-facing port which is NAT-ed to PRIVATE_PORT 
ps List containers 
pull Pull an image or a repository to the docker registry server 
push Push an image or a repository to the docker registry server 
restart Restart a running container 
rm Remove a container 
rmi Remove an image 
run Run a command in a new container 
start Start a stopped container 
stop Stop a running container 
tag Tag an image into a repository 
version Show the docker version information 
wait Block until a container stops, then print its exit code 
the Api 
http://docs.docker.io/en/latest/api/registry_index_spec/ 
the Builder 
http://docs.docker.com/reference/builder/ 
the Registry 
http://docs.docker.io/en/latest/api/index_api/
Docker on Docker > v0.6
Continuous Deployments, Development & Testing... 
Keep only the good apples 
Changes to the container can be committed 
to the central index or rolled back
TESTBOTS 
How does this picture help 
the Drupal testing and the 
jobrunner?
Testbot is `Sad` 
Actual running testbots were created in 
2007 and revamped in 2009, need 
modernizing in order to overcome 
several pending issues that make them 
difficult to debug, go faster and be less 
prone to error. 
Since they are full virtual servers, they consume 
much cpu, memory and IO. A part from that 
developers have ever increasing demands. 
Multiple environments and databases need to 
be tested and contained.
Current Drupal testing workflow (simplified): 
Testbots 
(jobrunner) 
Runs the actual 
test 
drupal.org 
Issue queue 
starts process 
and displays 
results 
qa.drupal.org 
keeps track of 
jobs and detailed 
info
Integration 
round table:
New proposed Drupal testing workflow: 
Testbot 
1 
drupal.org 
Issue queue 
starts process 
and displays 
results 
results 
drupal.org 
keeps track of 
jobs and detailed 
info 
Jenkins 
Dispatcher 
Testbot 
2 
Testbot 
3 
Testbot 
4 
Docker Container types: 
- PHP5.3 / PHP5.4 / PHP5.5 / PHP5.6 
- MariaDB 
- MySQL 
- Sqlite 
- Postgres 
and others... 
Testbot 
n 
API
Docker Containers: 
Testing automation 
and development in Drupal. 
Amsterdam - DevOps meetup, September 2014 
@ricardoamaro
Thank you! 
@ricardoamaro

More Related Content

What's hot

What's hot (20)

Docker for Devs - John Zaccone, IBM
Docker for Devs - John Zaccone, IBMDocker for Devs - John Zaccone, IBM
Docker for Devs - John Zaccone, IBM
 
When Docker Engine 1.12 features unleashes software architecture
When Docker Engine 1.12 features unleashes software architectureWhen Docker Engine 1.12 features unleashes software architecture
When Docker Engine 1.12 features unleashes software architecture
 
Docker meetup - PaaS interoperability
Docker meetup - PaaS interoperabilityDocker meetup - PaaS interoperability
Docker meetup - PaaS interoperability
 
Docker
DockerDocker
Docker
 
Introduction to docker and docker compose
Introduction to docker and docker composeIntroduction to docker and docker compose
Introduction to docker and docker compose
 
Docker on Windows
Docker on WindowsDocker on Windows
Docker on Windows
 
Real-World Docker: 10 Things We've Learned
Real-World Docker: 10 Things We've Learned  Real-World Docker: 10 Things We've Learned
Real-World Docker: 10 Things We've Learned
 
Why should i care about stateful containers?
Why should i care about stateful containers?Why should i care about stateful containers?
Why should i care about stateful containers?
 
Docker linuxday 2015
Docker linuxday 2015Docker linuxday 2015
Docker linuxday 2015
 
Docker at Spotify
Docker at SpotifyDocker at Spotify
Docker at Spotify
 
From development environments to production deployments with Docker, Compose,...
From development environments to production deployments with Docker, Compose,...From development environments to production deployments with Docker, Compose,...
From development environments to production deployments with Docker, Compose,...
 
Immutable kubernetes architecture by linuxkit
Immutable kubernetes architecture by linuxkitImmutable kubernetes architecture by linuxkit
Immutable kubernetes architecture by linuxkit
 
containerd the universal container runtime
containerd the universal container runtimecontainerd the universal container runtime
containerd the universal container runtime
 
Introduction to docker
Introduction to dockerIntroduction to docker
Introduction to docker
 
Docker and the Linux Kernel
Docker and the Linux KernelDocker and the Linux Kernel
Docker and the Linux Kernel
 
Docker All The Things - ASP.NET 4.x and Windows Server Containers
Docker All The Things - ASP.NET 4.x and Windows Server ContainersDocker All The Things - ASP.NET 4.x and Windows Server Containers
Docker All The Things - ASP.NET 4.x and Windows Server Containers
 
Containers: The What, Why, and How
Containers: The What, Why, and HowContainers: The What, Why, and How
Containers: The What, Why, and How
 
Docker and Kubernetes 101 workshop
Docker and Kubernetes 101 workshopDocker and Kubernetes 101 workshop
Docker and Kubernetes 101 workshop
 
Orchestration tool roundup kubernetes vs. docker vs. heat vs. terra form vs...
Orchestration tool roundup   kubernetes vs. docker vs. heat vs. terra form vs...Orchestration tool roundup   kubernetes vs. docker vs. heat vs. terra form vs...
Orchestration tool roundup kubernetes vs. docker vs. heat vs. terra form vs...
 
Docker by Example - Basics
Docker by Example - Basics Docker by Example - Basics
Docker by Example - Basics
 

Viewers also liked

Drupal workshop ist 2014
Drupal workshop ist 2014Drupal workshop ist 2014
Drupal workshop ist 2014
Ricardo Amaro
 
Drupalcamp es 2013 drupal with lxc docker and vagrant
Drupalcamp es 2013  drupal with lxc docker and vagrant Drupalcamp es 2013  drupal with lxc docker and vagrant
Drupalcamp es 2013 drupal with lxc docker and vagrant
Ricardo Amaro
 
Drupal workshop fcul_2014
Drupal workshop fcul_2014Drupal workshop fcul_2014
Drupal workshop fcul_2014
Ricardo Amaro
 

Viewers also liked (20)

How To Train Your APIs
How To Train Your APIsHow To Train Your APIs
How To Train Your APIs
 
Building a REST API Microservice for the DevNet API Scavenger Hunt
Building a REST API Microservice for the DevNet API Scavenger HuntBuilding a REST API Microservice for the DevNet API Scavenger Hunt
Building a REST API Microservice for the DevNet API Scavenger Hunt
 
Drupal workshop ist 2014
Drupal workshop ist 2014Drupal workshop ist 2014
Drupal workshop ist 2014
 
Open Source Tools for Container Security and Compliance @Docker LA Meetup 2/13
Open Source Tools for Container Security and Compliance @Docker LA Meetup 2/13Open Source Tools for Container Security and Compliance @Docker LA Meetup 2/13
Open Source Tools for Container Security and Compliance @Docker LA Meetup 2/13
 
Microservice architecture
Microservice architectureMicroservice architecture
Microservice architecture
 
Drupalcamp es 2013 drupal with lxc docker and vagrant
Drupalcamp es 2013  drupal with lxc docker and vagrant Drupalcamp es 2013  drupal with lxc docker and vagrant
Drupalcamp es 2013 drupal with lxc docker and vagrant
 
Introduction to Infrastructure as Code & Automation / Introduction to Chef
Introduction to Infrastructure as Code & Automation / Introduction to ChefIntroduction to Infrastructure as Code & Automation / Introduction to Chef
Introduction to Infrastructure as Code & Automation / Introduction to Chef
 
Priming Your Teams For Microservice Deployment to the Cloud
Priming Your Teams For Microservice Deployment to the CloudPriming Your Teams For Microservice Deployment to the Cloud
Priming Your Teams For Microservice Deployment to the Cloud
 
Docker security: Rolling out Trust in your container
Docker security: Rolling out Trust in your containerDocker security: Rolling out Trust in your container
Docker security: Rolling out Trust in your container
 
DOXLON November 2016 - Data Democratization Using Splunk
DOXLON November 2016 - Data Democratization Using SplunkDOXLON November 2016 - Data Democratization Using Splunk
DOXLON November 2016 - Data Democratization Using Splunk
 
DATA CENTER
DATA CENTER DATA CENTER
DATA CENTER
 
Docker Security
Docker SecurityDocker Security
Docker Security
 
S.R.E - create ultra-scalable and highly reliable systems
S.R.E - create ultra-scalable and highly reliable systemsS.R.E - create ultra-scalable and highly reliable systems
S.R.E - create ultra-scalable and highly reliable systems
 
Drupal workshop fcul_2014
Drupal workshop fcul_2014Drupal workshop fcul_2014
Drupal workshop fcul_2014
 
Docker and Cloud - Enables for DevOps - by ACA-IT
Docker and Cloud - Enables for DevOps - by ACA-ITDocker and Cloud - Enables for DevOps - by ACA-IT
Docker and Cloud - Enables for DevOps - by ACA-IT
 
The free software history and communities’ journey ahead
The free software history and communities’ journey aheadThe free software history and communities’ journey ahead
The free software history and communities’ journey ahead
 
DevOps meetup 16oct docker and jenkins
DevOps meetup 16oct docker and jenkinsDevOps meetup 16oct docker and jenkins
DevOps meetup 16oct docker and jenkins
 
Docker (compose) in devops - prague docker meetup
Docker (compose) in devops - prague docker meetupDocker (compose) in devops - prague docker meetup
Docker (compose) in devops - prague docker meetup
 
Amplifying Docker - Alex Heneveld

Amplifying Docker - Alex Heneveld
Amplifying Docker - Alex Heneveld

Amplifying Docker - Alex Heneveld

 
Dockercon Europe 2014 - Continuous Delivery leveraging on Docker CaaS
Dockercon Europe 2014 - Continuous Delivery leveraging on Docker CaaSDockercon Europe 2014 - Continuous Delivery leveraging on Docker CaaS
Dockercon Europe 2014 - Continuous Delivery leveraging on Docker CaaS
 

Similar to Docker containers & the Future of Drupal testing

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
 

Similar to Docker containers & the Future of Drupal testing (20)

Why everyone is excited about Docker (and you should too...) - Carlo Bonamic...
Why everyone is excited about Docker (and you should too...) -  Carlo Bonamic...Why everyone is excited about Docker (and you should too...) -  Carlo Bonamic...
Why everyone is excited about Docker (and you should too...) - Carlo Bonamic...
 
codemotion-docker-2014
codemotion-docker-2014codemotion-docker-2014
codemotion-docker-2014
 
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
 
Containerization using docker and its applications
Containerization using docker and its applicationsContainerization using docker and its applications
Containerization using docker and its applications
 
Containerization using docker and its applications
Containerization using docker and its applicationsContainerization using docker and its applications
Containerization using docker and its applications
 
Practical guide to Oracle Virtual environments
Practical guide to Oracle Virtual environmentsPractical guide to Oracle Virtual environments
Practical guide to Oracle Virtual environments
 
Docker and the Container Revolution
Docker and the Container RevolutionDocker and the Container Revolution
Docker and the Container Revolution
 
ABCs of docker
ABCs of dockerABCs of docker
ABCs of docker
 
Getting Started with Docker
Getting Started with DockerGetting Started with Docker
Getting Started with Docker
 
Novices guide to docker
Novices guide to dockerNovices guide to docker
Novices guide to docker
 
Dev opsec dockerimage_patch_n_lifecyclemanagement_
Dev opsec dockerimage_patch_n_lifecyclemanagement_Dev opsec dockerimage_patch_n_lifecyclemanagement_
Dev opsec dockerimage_patch_n_lifecyclemanagement_
 
Docker In Brief
Docker In BriefDocker In Brief
Docker In Brief
 
Docker module 1
Docker module 1Docker module 1
Docker module 1
 
Docker for Developers
Docker for DevelopersDocker for Developers
Docker for Developers
 
PuppetConf 2017: What’s in the Box?!- Leveraging Puppet Enterprise & Docker- ...
PuppetConf 2017: What’s in the Box?!- Leveraging Puppet Enterprise & Docker- ...PuppetConf 2017: What’s in the Box?!- Leveraging Puppet Enterprise & Docker- ...
PuppetConf 2017: What’s in the Box?!- Leveraging Puppet Enterprise & Docker- ...
 
Containerize! Between Docker and Jube.
Containerize! Between Docker and Jube.Containerize! Between Docker and Jube.
Containerize! Between Docker and Jube.
 
Docker-Hanoi @DKT , Presentation about Docker Ecosystem
Docker-Hanoi @DKT , Presentation about Docker EcosystemDocker-Hanoi @DKT , Presentation about Docker Ecosystem
Docker-Hanoi @DKT , Presentation about Docker Ecosystem
 
Docker Ecosystem on Azure
Docker Ecosystem on AzureDocker Ecosystem on Azure
Docker Ecosystem on Azure
 
Overview of Docker
Overview of DockerOverview of Docker
Overview of Docker
 
The Docker "Gauntlet" - Introduction, Ecosystem, Deployment, Orchestration
The Docker "Gauntlet" - Introduction, Ecosystem, Deployment, OrchestrationThe Docker "Gauntlet" - Introduction, Ecosystem, Deployment, Orchestration
The Docker "Gauntlet" - Introduction, Ecosystem, Deployment, Orchestration
 

Recently uploaded

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Recently uploaded (20)

Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 

Docker containers & the Future of Drupal testing

  • 1. Docker Containers: Testing automation and development in Drupal. Amsterdam - DevOps meetup, September 2014 A new strategy for automating Drupal testing @ricardoamaro
  • 2. About me Free/Opensource software lover Senior Cloud Engineer @Acquia Drupal.org infrastructure/devops Drupalist & Linux enthusiast Father, artist, community facilitator @ricardoamaro https://drupal.org/user/666176
  • 3. today’s meetup Story of an investigation to improve cloud 1. The sad VirtualMachine story 2. Containers and non-containers 3. DEMO - Drupal Docker 4. Drupal Testbots story in a Glance 5. Docker as a testing automation factor 6. DEMO - Docker Tesbot 7. Integration path
  • 4. What is virtualization? Hardware virtualization or platform virtualization refers to the creation of a virtual machine that acts like a real computer with an operating system. Software executed on these virtual machines is separated from the underlying hardware resources.
  • 5. Why should i care? Increase + efficiency + availability + security Reduce - costs - hardware - energy Cloud infrastructure providers like Amazon Web Service sell virtual machines. EC2 revenue is expected to surpass $1B in revenue this year. That's a lot of VMs…
  • 7. The sad Virtual Machine story... ➢ We are also paying for lot of avoidable overhead. ➢ The Virtual Machine is a full-blown operating system image. ➢ This is a heavyweight solution to run applications in the cloud.
  • 8. What is the solution?
  • 9. A new concept, a new hope CCoonnttaaiinneerrss uusseedd ttoo bbee tteerrrriibbllee,, bbuutt nnoott aannyymmoorree
  • 10. Because Docker has arrived!
  • 11. On any recent Linux Kernel near you!
  • 12. Virtual Machines vs Containers Virtualization and paravirtualization require a full operating system image for each instance. Source : http://www.linuxjournal.com/content/containers%E2%80%94not-virtual-machines%E2%80%94are-future-cloud
  • 13. Virtual Machines vs Containers Containers can share a single Linux Kernel and, optionally, other binary and library resources. Source : http://www.linuxjournal.com/content/containers%E2%80%94not-virtual-machines%E2%80%94are-future-cloud
  • 14. Virtual Machines vs Containers Virtualization and paravirtualization require a full operating system image for each instance. Containers can share a single operating system and, optionally, other binary and library resources. Source : http://www.linuxjournal.com/content/containers%E2%80%94not-virtual-machines%E2%80%94are-future-cloud
  • 15. The time to provision Source : http://www.linuxjournal.com/content/containers%E2%80%94not-virtual-machines%E2%80%94are-future-cloud
  • 16. From the simple concept of “chroot” mount /dev/sda /target chroot /target source: http://openvz.org but that had no resource and security isolation goals for multi-tenant designs...
  • 17. Cpu Devices Processes Memory Disk space Network What if you could control...
  • 18. Docker Need control over specific host resources cgroups Control Groups provide a mechanism for aggregating/partitioning sets of tasks, and all their future children, into hierarchical groups with specialized behaviour. ~$ ls /sys/fs/cgroup blkio cpu cpuacct cpuset devices freezer hugetlb memory perf_event Containers & Cgroups https://www.kernel.org/doc/Documentation/cgroups/cgroups.txt
  • 21. this Docker and ship them as containers
  • 22. Ship containers? Build Once, Run Anywhere
  • 23. Build and ship Drupal the Docker way: https://github.com/ricardoamaro/docker-drupal https://github.com/ricardoamaro/docker-drupal-nginx
  • 24.
  • 25. The docker is awesome! the Commands: attach Attach to a running container commit Create a new image from a container's changes diff Inspect changes on a container's filesystem export Stream the contents of a container as a tar archive history Show the history of an image images List images import Create a new filesystem image from the contents of a tarball info Display system-wide information inspect Return low-level information on a container kill Kill a running container login Register or Login to the docker registry server logs Fetch the logs of a container port Lookup the public-facing port which is NAT-ed to PRIVATE_PORT ps List containers pull Pull an image or a repository to the docker registry server push Push an image or a repository to the docker registry server restart Restart a running container rm Remove a container rmi Remove an image run Run a command in a new container start Start a stopped container stop Stop a running container tag Tag an image into a repository version Show the docker version information wait Block until a container stops, then print its exit code the Api http://docs.docker.io/en/latest/api/registry_index_spec/ the Builder http://docs.docker.com/reference/builder/ the Registry http://docs.docker.io/en/latest/api/index_api/
  • 27. Continuous Deployments, Development & Testing... Keep only the good apples Changes to the container can be committed to the central index or rolled back
  • 28. TESTBOTS How does this picture help the Drupal testing and the jobrunner?
  • 29. Testbot is `Sad` Actual running testbots were created in 2007 and revamped in 2009, need modernizing in order to overcome several pending issues that make them difficult to debug, go faster and be less prone to error. Since they are full virtual servers, they consume much cpu, memory and IO. A part from that developers have ever increasing demands. Multiple environments and databases need to be tested and contained.
  • 30. Current Drupal testing workflow (simplified): Testbots (jobrunner) Runs the actual test drupal.org Issue queue starts process and displays results qa.drupal.org keeps track of jobs and detailed info
  • 31.
  • 32.
  • 34. New proposed Drupal testing workflow: Testbot 1 drupal.org Issue queue starts process and displays results results drupal.org keeps track of jobs and detailed info Jenkins Dispatcher Testbot 2 Testbot 3 Testbot 4 Docker Container types: - PHP5.3 / PHP5.4 / PHP5.5 / PHP5.6 - MariaDB - MySQL - Sqlite - Postgres and others... Testbot n API
  • 35. Docker Containers: Testing automation and development in Drupal. Amsterdam - DevOps meetup, September 2014 @ricardoamaro