SlideShare uma empresa Scribd logo
1 de 31
Baixar para ler offline
Dockerize your Symfony application
Docker: What, Why and How with Symfony?
Symfony Live New York, Oct 9-10 2014!
By @andrerom, VP Engineering at eZ Systems AS
Who am I?
André Rømcke:
• Heads Engineering (Dev, QA & Support) at eZ Systems AS
• PHP for 9 years, started with frontend in 96 <blink>#dhtml</blink>
• Currently living in Lyon, France but from ~Oslo, Norway
!
eZ Systems AS:
• Maker of eZ Publish since 2001
• Norwegian based but with offices in 7 countries and hiring
• Professional partners & Community users in all corners of the world
!
eZ Publish
• A Open source Enterprise Content Management System
• Started using Symfony in 2012 (5.0), will complete the migration to
Symfony in 2015 (6.0) with new product name: eZ Platform
What is Docker?
What is Docker?
Environment as Micro services
!
LEGO for developers?
What is Docker?
Currently on docker.com: “Docker - An open platform for
distributed applications for developers and sysadmins.”

!
!
Docker Engine is built on LXC ( cgroups, namespaces,
Apparmor/SELinux, …) and Union file system to provide a
layered container image format that can run on any recent
Linux distro.

!
Docker Hub is a cloud service for sharing container images
and automating workflows, free for public, paid for private.
Concept: Layers
“Docker Engine”
However lets use a more relevant example…
Concept: Layers
PHP-CPHP-FPM ContainerNginx ContainerMySQL Container
PHP Image
Base Image
Nginx ImageMySQL Image
PHP-PHP-FPM Image
PH
Base Image Base Image Bas
m
e
Container layer Container layer
Container layer Conta
yer
Example: $ sudo docker run -d php-fpm:5.6

!
!
!
!
!
!
!
• Starts a php-fpm container based on a php-fpm image tagged “5.6”

• The php-fpm image extends a plain php image, which again extends
a base image like debian/ubuntu/centos

• You can write to file system inside container, but changes in
container is not persisted when replaced with new version of
image unless using volumes
Concept: DockerFile
• Defines a Docker image
• A bit like VagrantFile meets Puppet/Chef/Anisibel, but using shell
!
• $ sudo docker build -t apache .

FROM debian:wheezy
MAINTAINER Some Maintainer "docker-maint@docker"
!
RUN apt-get -y install apache2
!
ENV APACHE_RUN_USER www-data
ENV APACHE_RUN_GROUP www-data
ENV APACHE_LOG_DIR /var/log/apache2
!
EXPOSE 80
!
CMD ["/usr/sbin/apache2ctl", "-D", "FOREGROUND"]
• Just like you are used to with Vagrant or VM’s you can map ports to
keep images generic
!
• $ sudo docker run -d -p 81:80 —name=web-1 php:5.6-apache
Host!
Listen: 80
Concept: Port Mapping
*:80 80
81
82
www-1

:80
www-2

:80
Varnish

:80
Note:
no advantage
having more then
one www instance
other then for cluster
testing on one
node
• Just like you are used to with Vagrant or VM’s you can map ports to
keep images generic
!
• $ sudo docker run -d -p 81:80 —name=web-1 php:5.6-apache
VM!
Listen: 80
8080
localhost:8080
Concept: Port Mapping
80
81
82
www-1

:80
www-2

:80
Varnish

:80
Note:
no advantage
having more then
one www instance
other then for cluster
testing on one
node
• Shares exposed ports and environment variables from one container
to another
!
• $ sudo docker run -d -p 81:80 --link db-1:db (…)
VM!
Listen: 80
Concept: Container Linking
8080
localhost:8080 80
81
82
www-1

:80
www-2

:80
db-1

:3306
Varnish

:80
• Mounts a folder in Host/VM to a container
• Can be read only or read-write
!
• $ sudo docker run -v /vagrant/www:/www:rw —name=sf-vol (…)
VM!
Listen: 80
Concept: Data Volume
8080
localhost:8080
vagrant/files/www
80
81
82
www-1

:80
www-2

:80
db-1

:3306
sf-volrw
Varnish

:80
• Mounts all volumes in one container to others
• Can be read only or read-write
!
• $ sudo docker run -d -p 81:80 --volumes-from sf-vol (…)
VM!
Listen: 80
Concept: Sharing Data Volume
80
81
82
8080
localhost:8080
vagrant/files/www
rw
www-1

:80
www-2

:80
sf-vol
db-1

:3306
Varnish

:80
How does it compare to VM’s?
Virtual Machines vs Docker
App A App B
Bin/Libs Bin/Libs
Guest OS Guest OS
HyperVisor
Host OS
Server
App A App B
Bin/Libs Bin/Libs
Guest OS Guest OS
“Docker Engine”
Host OS
Server
How does it compare to VM’s?
Virtual Machines vs Docker
App A App B
Bin/Libs Bin/Libs
Guest OS Guest OS
HyperVisor
Host OS
Server
App A App B
Bin/Libs Bin/Libs
Guest OS Guest OS
“Docker Engine”
Host OS
ServerClose
to zero run time
overhead!
How does it compare to VM’s?
App A App B
Bin/Libs Bin/Libs
Guest OS Guest OS
“Docker Engine”
Host OS
Server
Virtual Machines vs Docker
App A App B
Bin/Libs Bin/Libs
Guest OS Guest OS
HyperVisor
Host OS
Server
“Machine”
boots in less then
a second
Close
to zero run time
overhead!
App A App B
Bin/Libs Bin/Libs
Guest OS Guest OS
“Docker Engine”
Host OS
Server
How does it compare to VM’s?
Virtual Machines vs Docker
App A App B
Bin/Libs Bin/Libs
Guest OS Guest OS
HyperVisor
Host OS
Server Close
to zero run time
overhead!
Shared
“layers” share
memory
“Machine”
boots in less then
a second
App A App B
Bin/Libs Bin/Libs
Guest OS Guest OS
“Docker Engine”
Host OS
Server
How does it compare to VM’s?
Virtual Machines vs Docker
App A App B
Bin/Libs Bin/Libs
Guest OS Guest OS
HyperVisor
Host OS
Server Close
to zero run time
overhead!
Image
size advantage; i.e. OS
image only downloaded
once
Shared
“layers” share
memory
“Machine”
boots in less then
a second
Why use Docker?
Why?
Docker holds the promise of:

• Stable official containers for everything* you need on Docker Hub
• No need to care about OS/Linux-distro differences anymore
• Develop once, use and deploy everywhere
• Less need for using abstracted install recipes using Puppet/Chef/
Ansible**
• Can replace capistrano, capifony, ….
!
!
!
!
* Not yet, but getting there. Example: v1 of PHP container out recently
** However they are still very valid for configuration of your app
Example: Not unrealistic that we will have a standard docker config ala fig
which can be used on: Azure, Google Computer, Server, localhost, …
!
How fig.yml currently looks like:
web-1:
image: php:5.6-apache
ports:
- "80:80"
links:
- db-1
volumes:
- /vagrant/volumes/ezpublish:/var/www:rw
db-1:
image: mysql:5.6
environment:
MYSQL_ROOT_PASSWORD: mysecretpassword
Why?
Check
out Google Kubernetes!

Already supported by Google
and Azure.
Why?
Highly scalable:

• “By forcing you to split out application in micro services it allows you
to scale up part of the application very easily!”



GOTO:
• Google Kubernetes (for use on own, Azure or GoogleCloudPlatform)

• Apache Mesos + Marathon

• …Docker slides from DockerCon for more alternatives…
High level Benefits
Lets Developers iterate on environment like on code:

• Develop & Use locally
• Use for test system keeping test server clean
• Deploy/Deliver to Ops/Sysadmins
• $um: Run everywhere
!
Allows Ops/Sysadmins to standardize around containers:

• Can focus on maintain hosts, scaling, monitoring
• Streamlined Deployments
!
Benefits for your business:

• Standardize environments & deployments across developers, whole
organization and customers
• Opportunity: new marketplace for your application
• Operation Cost
Examples of use and CI/CD
Example: Single app, one node
Server / VM
Varnish www-1
sf-vol
db-vol
php-
fpm-1
db-1
Example of this:
Note for running Symfony-standard on this:
• Rename app.php or app_dev.php to index.php, or change the rewrite rules
• VagrantFile: Comment out d.run command for ezpublish:prepare
• Correct settings in files/vagrant.yml
Example: Single app, Cluster testing on one node
Server / VM
Varnish
www-1
www-2 php-
fpm-2
sf-vol
db-vol
php-
fpm-1
db-1
Example: Single app, several nodes
Web Server / VM 1
www-1
sf-vol
php-
fpm-1
redis-1
load-
balancer
Data-
base
Binary
storage
Web Server / VM 2
www-2
sf-vol
php-
fpm-2
redis-2
Web Server / VM 3 sf-vol
Adding
nodes
on
dem
and
Example: Multiple apps, several nodes “PAAS”
Web Server / VM 1
load-
balancer
Data-
base
Binary
storage
Adding
nodes
on
dem
and
App N
www
sf-vol
php-
fpm
redis
App 3
www
sf-vol
php-
fpm
redis
App 4
www
sf-vol
php-
fpm
redis
App 1
www
sf-vol
php-
fpm
redis
App 2
www
sf-vol
php-
fpm
redis
Web Server / VM 2
App N
www
sf-vol
php-
fpm
redis
App 3
www
sf-vol
php-
fpm
redis
App 4
www
sf-vol
php-
fpm
redis
App 1
www
sf-vol
php-
fpm
redis
App 2
www
sf-vol
php-
fpm
redis
Web Server / VM 3 App 3
www
sf-vol
php- redis
Continues Integration and Deployment?
Docker Hub (Public/Private)All tests
merge publish image
symfony-standard
pull latests stable parent image
Symfony-standard on Docker Hub?
Continues Integration and Deployment?
Own containers (optional) Docker Hub (Public/Private)
merge publish image
Code
Test on stable image
merge deploy updated image
Server / !
Azure /!
Google Cloud /!
…
pull latests stable code
Custom project
Test on stable code
pull latests stable image
Note: Also checkout Pablo Godel’s talk “Rock Solid Deployment of Symfony Apps”
The End
Resources:

• registry.hub.docker.com (Official and community made containers)
• github.com/ezsystems/ezpublish-docker (referred to in slides)
• ez.no/Blog/What-is-Docker-and-why-should-I-care
!
• Running Docker on cluster:
• https://github.com/GoogleCloudPlatform/kubernetes
• mesosphere.com/learn/
• aws.amazon.com/blogs/aws/container-computing/
!
Twitter: @andrerom
Joined.in: https://joind.in/12188
!
PS: eZ launches 100% Symfony CMS in 2015 called eZ Platform
based on todays “New/Symfony stack” in eZ Publish 5.x

Mais conteúdo relacionado

Mais procurados

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 ContainersAnthony Chu
 
當專案漸趕,當遷移也不再那麼難 (Ship Your Projects with Docker EcoSystem)
當專案漸趕,當遷移也不再那麼難 (Ship Your Projects with Docker EcoSystem)當專案漸趕,當遷移也不再那麼難 (Ship Your Projects with Docker EcoSystem)
當專案漸趕,當遷移也不再那麼難 (Ship Your Projects with Docker EcoSystem)Ruoshi Ling
 
Developing and Deploying PHP with Docker
Developing and Deploying PHP with DockerDeveloping and Deploying PHP with Docker
Developing and Deploying PHP with DockerPatrick Mizer
 
Build service with_docker_in_90mins
Build service with_docker_in_90minsBuild service with_docker_in_90mins
Build service with_docker_in_90minsLarry Cai
 
Docker orchestration using core os and ansible - Ansible IL 2015
Docker orchestration using core os and ansible - Ansible IL 2015Docker orchestration using core os and ansible - Ansible IL 2015
Docker orchestration using core os and ansible - Ansible IL 2015Leonid Mirsky
 
Docker 初探,實驗室中的運貨鯨
Docker 初探,實驗室中的運貨鯨Docker 初探,實驗室中的運貨鯨
Docker 初探,實驗室中的運貨鯨Ruoshi Ling
 
Docker and containers - Presentation Slides by Priyadarshini Anand
Docker and containers - Presentation Slides by Priyadarshini AnandDocker and containers - Presentation Slides by Priyadarshini Anand
Docker and containers - Presentation Slides by Priyadarshini AnandPRIYADARSHINI ANAND
 
Real World Experience of Running Docker in Development and Production
Real World Experience of Running Docker in Development and ProductionReal World Experience of Running Docker in Development and Production
Real World Experience of Running Docker in Development and ProductionBen Hall
 
Native Containers on Windows 10 & Windows Server 2016 using Docker
Native Containers on Windows 10 & Windows Server 2016 using DockerNative Containers on Windows 10 & Windows Server 2016 using Docker
Native Containers on Windows 10 & Windows Server 2016 using DockerJorge Arteiro
 
Docker summit 2015: 以 Docker Swarm 打造多主機叢集環境
Docker summit 2015: 以 Docker Swarm 打造多主機叢集環境Docker summit 2015: 以 Docker Swarm 打造多主機叢集環境
Docker summit 2015: 以 Docker Swarm 打造多主機叢集環境謝 宗穎
 
Plug-ins: Building, Shipping, Storing, and Running - Nandhini Santhanam and T...
Plug-ins: Building, Shipping, Storing, and Running - Nandhini Santhanam and T...Plug-ins: Building, Shipping, Storing, and Running - Nandhini Santhanam and T...
Plug-ins: Building, Shipping, Storing, and Running - Nandhini Santhanam and T...Docker, Inc.
 
Docker Distributed application bundle & Stack - Overview
Docker Distributed application bundle & Stack - Overview Docker Distributed application bundle & Stack - Overview
Docker Distributed application bundle & Stack - Overview Thomas Chacko
 
The How and Why of Windows containers
The How and Why of Windows containersThe How and Why of Windows containers
The How and Why of Windows containersBen Hall
 
Docker 1.11 Presentation
Docker 1.11 PresentationDocker 1.11 Presentation
Docker 1.11 PresentationSreenivas Makam
 
Running Docker in Development & Production (DevSum 2015)
Running Docker in Development & Production (DevSum 2015)Running Docker in Development & Production (DevSum 2015)
Running Docker in Development & Production (DevSum 2015)Ben Hall
 
Infrastructure Deployment with Docker & Ansible
Infrastructure Deployment with Docker & AnsibleInfrastructure Deployment with Docker & Ansible
Infrastructure Deployment with Docker & AnsibleRobert Reiz
 
Docker 原理與實作
Docker 原理與實作Docker 原理與實作
Docker 原理與實作kao kuo-tung
 
파이썬 개발환경 구성하기의 끝판왕 - Docker Compose
파이썬 개발환경 구성하기의 끝판왕 - Docker Compose파이썬 개발환경 구성하기의 끝판왕 - Docker Compose
파이썬 개발환경 구성하기의 끝판왕 - Docker Composeraccoony
 

Mais procurados (20)

Docker orchestration
Docker orchestrationDocker orchestration
Docker orchestration
 
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
 
當專案漸趕,當遷移也不再那麼難 (Ship Your Projects with Docker EcoSystem)
當專案漸趕,當遷移也不再那麼難 (Ship Your Projects with Docker EcoSystem)當專案漸趕,當遷移也不再那麼難 (Ship Your Projects with Docker EcoSystem)
當專案漸趕,當遷移也不再那麼難 (Ship Your Projects with Docker EcoSystem)
 
Developing and Deploying PHP with Docker
Developing and Deploying PHP with DockerDeveloping and Deploying PHP with Docker
Developing and Deploying PHP with Docker
 
Build service with_docker_in_90mins
Build service with_docker_in_90minsBuild service with_docker_in_90mins
Build service with_docker_in_90mins
 
Docker orchestration using core os and ansible - Ansible IL 2015
Docker orchestration using core os and ansible - Ansible IL 2015Docker orchestration using core os and ansible - Ansible IL 2015
Docker orchestration using core os and ansible - Ansible IL 2015
 
Exploring Docker Security
Exploring Docker SecurityExploring Docker Security
Exploring Docker Security
 
Docker 初探,實驗室中的運貨鯨
Docker 初探,實驗室中的運貨鯨Docker 初探,實驗室中的運貨鯨
Docker 初探,實驗室中的運貨鯨
 
Docker and containers - Presentation Slides by Priyadarshini Anand
Docker and containers - Presentation Slides by Priyadarshini AnandDocker and containers - Presentation Slides by Priyadarshini Anand
Docker and containers - Presentation Slides by Priyadarshini Anand
 
Real World Experience of Running Docker in Development and Production
Real World Experience of Running Docker in Development and ProductionReal World Experience of Running Docker in Development and Production
Real World Experience of Running Docker in Development and Production
 
Native Containers on Windows 10 & Windows Server 2016 using Docker
Native Containers on Windows 10 & Windows Server 2016 using DockerNative Containers on Windows 10 & Windows Server 2016 using Docker
Native Containers on Windows 10 & Windows Server 2016 using Docker
 
Docker summit 2015: 以 Docker Swarm 打造多主機叢集環境
Docker summit 2015: 以 Docker Swarm 打造多主機叢集環境Docker summit 2015: 以 Docker Swarm 打造多主機叢集環境
Docker summit 2015: 以 Docker Swarm 打造多主機叢集環境
 
Plug-ins: Building, Shipping, Storing, and Running - Nandhini Santhanam and T...
Plug-ins: Building, Shipping, Storing, and Running - Nandhini Santhanam and T...Plug-ins: Building, Shipping, Storing, and Running - Nandhini Santhanam and T...
Plug-ins: Building, Shipping, Storing, and Running - Nandhini Santhanam and T...
 
Docker Distributed application bundle & Stack - Overview
Docker Distributed application bundle & Stack - Overview Docker Distributed application bundle & Stack - Overview
Docker Distributed application bundle & Stack - Overview
 
The How and Why of Windows containers
The How and Why of Windows containersThe How and Why of Windows containers
The How and Why of Windows containers
 
Docker 1.11 Presentation
Docker 1.11 PresentationDocker 1.11 Presentation
Docker 1.11 Presentation
 
Running Docker in Development & Production (DevSum 2015)
Running Docker in Development & Production (DevSum 2015)Running Docker in Development & Production (DevSum 2015)
Running Docker in Development & Production (DevSum 2015)
 
Infrastructure Deployment with Docker & Ansible
Infrastructure Deployment with Docker & AnsibleInfrastructure Deployment with Docker & Ansible
Infrastructure Deployment with Docker & Ansible
 
Docker 原理與實作
Docker 原理與實作Docker 原理與實作
Docker 原理與實作
 
파이썬 개발환경 구성하기의 끝판왕 - Docker Compose
파이썬 개발환경 구성하기의 끝판왕 - Docker Compose파이썬 개발환경 구성하기의 끝판왕 - Docker Compose
파이썬 개발환경 구성하기의 끝판왕 - Docker Compose
 

Semelhante a Dockerize your Symfony application - Symfony Live NYC 2014

Docker module 1
Docker module 1Docker module 1
Docker module 1Liang Bo
 
Docker for Dummies
Docker for DummiesDocker for Dummies
Docker for DummiesRoel Hartman
 
2016 - Easing Your Way Into Docker: Lessons From a Journey to Production
2016 - Easing Your Way Into Docker: Lessons From a Journey to Production2016 - Easing Your Way Into Docker: Lessons From a Journey to Production
2016 - Easing Your Way Into Docker: Lessons From a Journey to Productiondevopsdaysaustin
 
Killer Docker Workflows for Development
Killer Docker Workflows for DevelopmentKiller Docker Workflows for Development
Killer Docker Workflows for DevelopmentChris Tankersley
 
Introduction to Docker - Vellore Institute of Technology
Introduction to Docker - Vellore Institute of TechnologyIntroduction to Docker - Vellore Institute of Technology
Introduction to Docker - Vellore Institute of TechnologyAjeet Singh Raina
 
Introduction to Docker - VIT Campus
Introduction to Docker - VIT CampusIntroduction to Docker - VIT Campus
Introduction to Docker - VIT CampusAjeet Singh Raina
 
Up and running with docker
Up and running with dockerUp and running with docker
Up and running with dockerMichelle Liu
 
Introduction to Docker
Introduction to DockerIntroduction to Docker
Introduction to DockerAditya Konarde
 
Detailed Introduction To Docker
Detailed Introduction To DockerDetailed Introduction To Docker
Detailed Introduction To Dockernklmish
 
Docker Overview - Rise of the Containers
Docker Overview - Rise of the ContainersDocker Overview - Rise of the Containers
Docker Overview - Rise of the ContainersRyan Hodgin
 
Docker presentasjon java bin
Docker presentasjon java binDocker presentasjon java bin
Docker presentasjon java binOlve Hansen
 
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 EcosystemVan Phuc
 
Environment isolation with Docker (Alex Medvedev, Alpari)
Environment isolation with Docker (Alex Medvedev, Alpari)Environment isolation with Docker (Alex Medvedev, Alpari)
Environment isolation with Docker (Alex Medvedev, Alpari)Symfoniacs
 
Drupal 8 - Improving your development workflow
Drupal 8 - Improving your development workflowDrupal 8 - Improving your development workflow
Drupal 8 - Improving your development workflowvaluebound
 
Docker Presentation at the OpenStack Austin Meetup | 2013-09-12
Docker Presentation at the OpenStack Austin Meetup | 2013-09-12Docker Presentation at the OpenStack Austin Meetup | 2013-09-12
Docker Presentation at the OpenStack Austin Meetup | 2013-09-12dotCloud
 
Application Deployment on Openstack
Application Deployment on OpenstackApplication Deployment on Openstack
Application Deployment on OpenstackDocker, Inc.
 
Be a happier developer with Docker: Tricks of the trade
Be a happier developer with Docker: Tricks of the tradeBe a happier developer with Docker: Tricks of the trade
Be a happier developer with Docker: Tricks of the tradeNicola Paolucci
 
[2015/2016] Apache Cordova
[2015/2016] Apache Cordova[2015/2016] Apache Cordova
[2015/2016] Apache CordovaIvano Malavolta
 
NLUUG Spring 2012 - OpenShift Primer
NLUUG Spring 2012 - OpenShift PrimerNLUUG Spring 2012 - OpenShift Primer
NLUUG Spring 2012 - OpenShift PrimerEric D. Schabell
 
Docker fundamentals
Docker fundamentalsDocker fundamentals
Docker fundamentalsAlper Unal
 

Semelhante a Dockerize your Symfony application - Symfony Live NYC 2014 (20)

Docker module 1
Docker module 1Docker module 1
Docker module 1
 
Docker for Dummies
Docker for DummiesDocker for Dummies
Docker for Dummies
 
2016 - Easing Your Way Into Docker: Lessons From a Journey to Production
2016 - Easing Your Way Into Docker: Lessons From a Journey to Production2016 - Easing Your Way Into Docker: Lessons From a Journey to Production
2016 - Easing Your Way Into Docker: Lessons From a Journey to Production
 
Killer Docker Workflows for Development
Killer Docker Workflows for DevelopmentKiller Docker Workflows for Development
Killer Docker Workflows for Development
 
Introduction to Docker - Vellore Institute of Technology
Introduction to Docker - Vellore Institute of TechnologyIntroduction to Docker - Vellore Institute of Technology
Introduction to Docker - Vellore Institute of Technology
 
Introduction to Docker - VIT Campus
Introduction to Docker - VIT CampusIntroduction to Docker - VIT Campus
Introduction to Docker - VIT Campus
 
Up and running with docker
Up and running with dockerUp and running with docker
Up and running with docker
 
Introduction to Docker
Introduction to DockerIntroduction to Docker
Introduction to Docker
 
Detailed Introduction To Docker
Detailed Introduction To DockerDetailed Introduction To Docker
Detailed Introduction To Docker
 
Docker Overview - Rise of the Containers
Docker Overview - Rise of the ContainersDocker Overview - Rise of the Containers
Docker Overview - Rise of the Containers
 
Docker presentasjon java bin
Docker presentasjon java binDocker presentasjon java bin
Docker presentasjon java bin
 
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
 
Environment isolation with Docker (Alex Medvedev, Alpari)
Environment isolation with Docker (Alex Medvedev, Alpari)Environment isolation with Docker (Alex Medvedev, Alpari)
Environment isolation with Docker (Alex Medvedev, Alpari)
 
Drupal 8 - Improving your development workflow
Drupal 8 - Improving your development workflowDrupal 8 - Improving your development workflow
Drupal 8 - Improving your development workflow
 
Docker Presentation at the OpenStack Austin Meetup | 2013-09-12
Docker Presentation at the OpenStack Austin Meetup | 2013-09-12Docker Presentation at the OpenStack Austin Meetup | 2013-09-12
Docker Presentation at the OpenStack Austin Meetup | 2013-09-12
 
Application Deployment on Openstack
Application Deployment on OpenstackApplication Deployment on Openstack
Application Deployment on Openstack
 
Be a happier developer with Docker: Tricks of the trade
Be a happier developer with Docker: Tricks of the tradeBe a happier developer with Docker: Tricks of the trade
Be a happier developer with Docker: Tricks of the trade
 
[2015/2016] Apache Cordova
[2015/2016] Apache Cordova[2015/2016] Apache Cordova
[2015/2016] Apache Cordova
 
NLUUG Spring 2012 - OpenShift Primer
NLUUG Spring 2012 - OpenShift PrimerNLUUG Spring 2012 - OpenShift Primer
NLUUG Spring 2012 - OpenShift Primer
 
Docker fundamentals
Docker fundamentalsDocker fundamentals
Docker fundamentals
 

Mais de André Rømcke

SymfonyCon 2019: Head first into Symfony Cache, Redis & Redis Cluster
SymfonyCon 2019:   Head first into Symfony Cache, Redis & Redis ClusterSymfonyCon 2019:   Head first into Symfony Cache, Redis & Redis Cluster
SymfonyCon 2019: Head first into Symfony Cache, Redis & Redis ClusterAndré Rømcke
 
SfDay 2019: Head first into Symfony Cache, Redis & Redis Cluster
SfDay 2019: Head first into Symfony Cache, Redis & Redis ClusterSfDay 2019: Head first into Symfony Cache, Redis & Redis Cluster
SfDay 2019: Head first into Symfony Cache, Redis & Redis ClusterAndré Rømcke
 
Symfony live London 2018 - Take your http caching to the next level with xke...
Symfony live London 2018 -  Take your http caching to the next level with xke...Symfony live London 2018 -  Take your http caching to the next level with xke...
Symfony live London 2018 - Take your http caching to the next level with xke...André Rømcke
 
PHP Benelux 2017 - Caching The Right Way
PHP Benelux 2017 -  Caching The Right WayPHP Benelux 2017 -  Caching The Right Way
PHP Benelux 2017 - Caching The Right WayAndré Rømcke
 
Look Towards 2.0 and Beyond - eZ Conference 2016
Look Towards 2.0 and Beyond -   eZ Conference 2016Look Towards 2.0 and Beyond -   eZ Conference 2016
Look Towards 2.0 and Beyond - eZ Conference 2016André Rømcke
 
PhpTour Lyon 2014 - Transparent caching & context aware http cache
PhpTour Lyon 2014 - Transparent caching & context aware http cachePhpTour Lyon 2014 - Transparent caching & context aware http cache
PhpTour Lyon 2014 - Transparent caching & context aware http cacheAndré Rømcke
 
eZ publish 5[-alpha1] Introduction & Architecture
eZ publish 5[-alpha1] Introduction & ArchitectureeZ publish 5[-alpha1] Introduction & Architecture
eZ publish 5[-alpha1] Introduction & ArchitectureAndré Rømcke
 
eZ Publish 5, Re architecture, pitfalls and opportunities
eZ Publish 5, Re architecture, pitfalls and opportunitieseZ Publish 5, Re architecture, pitfalls and opportunities
eZ Publish 5, Re architecture, pitfalls and opportunitiesAndré Rømcke
 

Mais de André Rømcke (8)

SymfonyCon 2019: Head first into Symfony Cache, Redis & Redis Cluster
SymfonyCon 2019:   Head first into Symfony Cache, Redis & Redis ClusterSymfonyCon 2019:   Head first into Symfony Cache, Redis & Redis Cluster
SymfonyCon 2019: Head first into Symfony Cache, Redis & Redis Cluster
 
SfDay 2019: Head first into Symfony Cache, Redis & Redis Cluster
SfDay 2019: Head first into Symfony Cache, Redis & Redis ClusterSfDay 2019: Head first into Symfony Cache, Redis & Redis Cluster
SfDay 2019: Head first into Symfony Cache, Redis & Redis Cluster
 
Symfony live London 2018 - Take your http caching to the next level with xke...
Symfony live London 2018 -  Take your http caching to the next level with xke...Symfony live London 2018 -  Take your http caching to the next level with xke...
Symfony live London 2018 - Take your http caching to the next level with xke...
 
PHP Benelux 2017 - Caching The Right Way
PHP Benelux 2017 -  Caching The Right WayPHP Benelux 2017 -  Caching The Right Way
PHP Benelux 2017 - Caching The Right Way
 
Look Towards 2.0 and Beyond - eZ Conference 2016
Look Towards 2.0 and Beyond -   eZ Conference 2016Look Towards 2.0 and Beyond -   eZ Conference 2016
Look Towards 2.0 and Beyond - eZ Conference 2016
 
PhpTour Lyon 2014 - Transparent caching & context aware http cache
PhpTour Lyon 2014 - Transparent caching & context aware http cachePhpTour Lyon 2014 - Transparent caching & context aware http cache
PhpTour Lyon 2014 - Transparent caching & context aware http cache
 
eZ publish 5[-alpha1] Introduction & Architecture
eZ publish 5[-alpha1] Introduction & ArchitectureeZ publish 5[-alpha1] Introduction & Architecture
eZ publish 5[-alpha1] Introduction & Architecture
 
eZ Publish 5, Re architecture, pitfalls and opportunities
eZ Publish 5, Re architecture, pitfalls and opportunitieseZ Publish 5, Re architecture, pitfalls and opportunities
eZ Publish 5, Re architecture, pitfalls and opportunities
 

Último

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
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is insideshinachiaurasa2
 
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
 
%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
 
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
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...masabamasaba
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...SelfMade bd
 
%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
 
+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
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
Harnessing ChatGPT - Elevating Productivity in Today's Agile Environment
Harnessing ChatGPT  - Elevating Productivity in Today's Agile EnvironmentHarnessing ChatGPT  - Elevating Productivity in Today's Agile Environment
Harnessing ChatGPT - Elevating Productivity in Today's Agile EnvironmentVictorSzoltysek
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdfPearlKirahMaeRagusta1
 
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
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in sowetomasabamasaba
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...masabamasaba
 
%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Hararemasabamasaba
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplatePresentation.STUDIO
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...Jittipong Loespradit
 
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2
 

Último (20)

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
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
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
 
%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
 
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...
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
%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
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
 
+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...
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
Harnessing ChatGPT - Elevating Productivity in Today's Agile Environment
Harnessing ChatGPT  - Elevating Productivity in Today's Agile EnvironmentHarnessing ChatGPT  - Elevating Productivity in Today's Agile Environment
Harnessing ChatGPT - Elevating Productivity in Today's Agile Environment
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..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 🔝✔️✔️
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
 
%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
 

Dockerize your Symfony application - Symfony Live NYC 2014

  • 1. Dockerize your Symfony application Docker: What, Why and How with Symfony? Symfony Live New York, Oct 9-10 2014! By @andrerom, VP Engineering at eZ Systems AS
  • 2. Who am I? André Rømcke: • Heads Engineering (Dev, QA & Support) at eZ Systems AS • PHP for 9 years, started with frontend in 96 <blink>#dhtml</blink> • Currently living in Lyon, France but from ~Oslo, Norway ! eZ Systems AS: • Maker of eZ Publish since 2001 • Norwegian based but with offices in 7 countries and hiring • Professional partners & Community users in all corners of the world ! eZ Publish • A Open source Enterprise Content Management System • Started using Symfony in 2012 (5.0), will complete the migration to Symfony in 2015 (6.0) with new product name: eZ Platform
  • 4. What is Docker? Environment as Micro services ! LEGO for developers?
  • 5. What is Docker? Currently on docker.com: “Docker - An open platform for distributed applications for developers and sysadmins.” ! ! Docker Engine is built on LXC ( cgroups, namespaces, Apparmor/SELinux, …) and Union file system to provide a layered container image format that can run on any recent Linux distro. ! Docker Hub is a cloud service for sharing container images and automating workflows, free for public, paid for private.
  • 6. Concept: Layers “Docker Engine” However lets use a more relevant example…
  • 7. Concept: Layers PHP-CPHP-FPM ContainerNginx ContainerMySQL Container PHP Image Base Image Nginx ImageMySQL Image PHP-PHP-FPM Image PH Base Image Base Image Bas m e Container layer Container layer Container layer Conta yer Example: $ sudo docker run -d php-fpm:5.6 ! ! ! ! ! ! ! • Starts a php-fpm container based on a php-fpm image tagged “5.6”
 • The php-fpm image extends a plain php image, which again extends a base image like debian/ubuntu/centos
 • You can write to file system inside container, but changes in container is not persisted when replaced with new version of image unless using volumes
  • 8. Concept: DockerFile • Defines a Docker image • A bit like VagrantFile meets Puppet/Chef/Anisibel, but using shell ! • $ sudo docker build -t apache .
 FROM debian:wheezy MAINTAINER Some Maintainer "docker-maint@docker" ! RUN apt-get -y install apache2 ! ENV APACHE_RUN_USER www-data ENV APACHE_RUN_GROUP www-data ENV APACHE_LOG_DIR /var/log/apache2 ! EXPOSE 80 ! CMD ["/usr/sbin/apache2ctl", "-D", "FOREGROUND"]
  • 9. • Just like you are used to with Vagrant or VM’s you can map ports to keep images generic ! • $ sudo docker run -d -p 81:80 —name=web-1 php:5.6-apache Host! Listen: 80 Concept: Port Mapping *:80 80 81 82 www-1
 :80 www-2
 :80 Varnish
 :80 Note: no advantage having more then one www instance other then for cluster testing on one node
  • 10. • Just like you are used to with Vagrant or VM’s you can map ports to keep images generic ! • $ sudo docker run -d -p 81:80 —name=web-1 php:5.6-apache VM! Listen: 80 8080 localhost:8080 Concept: Port Mapping 80 81 82 www-1
 :80 www-2
 :80 Varnish
 :80 Note: no advantage having more then one www instance other then for cluster testing on one node
  • 11. • Shares exposed ports and environment variables from one container to another ! • $ sudo docker run -d -p 81:80 --link db-1:db (…) VM! Listen: 80 Concept: Container Linking 8080 localhost:8080 80 81 82 www-1
 :80 www-2
 :80 db-1
 :3306 Varnish
 :80
  • 12. • Mounts a folder in Host/VM to a container • Can be read only or read-write ! • $ sudo docker run -v /vagrant/www:/www:rw —name=sf-vol (…) VM! Listen: 80 Concept: Data Volume 8080 localhost:8080 vagrant/files/www 80 81 82 www-1
 :80 www-2
 :80 db-1
 :3306 sf-volrw Varnish
 :80
  • 13. • Mounts all volumes in one container to others • Can be read only or read-write ! • $ sudo docker run -d -p 81:80 --volumes-from sf-vol (…) VM! Listen: 80 Concept: Sharing Data Volume 80 81 82 8080 localhost:8080 vagrant/files/www rw www-1
 :80 www-2
 :80 sf-vol db-1
 :3306 Varnish
 :80
  • 14. How does it compare to VM’s? Virtual Machines vs Docker App A App B Bin/Libs Bin/Libs Guest OS Guest OS HyperVisor Host OS Server App A App B Bin/Libs Bin/Libs Guest OS Guest OS “Docker Engine” Host OS Server
  • 15. How does it compare to VM’s? Virtual Machines vs Docker App A App B Bin/Libs Bin/Libs Guest OS Guest OS HyperVisor Host OS Server App A App B Bin/Libs Bin/Libs Guest OS Guest OS “Docker Engine” Host OS ServerClose to zero run time overhead!
  • 16. How does it compare to VM’s? App A App B Bin/Libs Bin/Libs Guest OS Guest OS “Docker Engine” Host OS Server Virtual Machines vs Docker App A App B Bin/Libs Bin/Libs Guest OS Guest OS HyperVisor Host OS Server “Machine” boots in less then a second Close to zero run time overhead!
  • 17. App A App B Bin/Libs Bin/Libs Guest OS Guest OS “Docker Engine” Host OS Server How does it compare to VM’s? Virtual Machines vs Docker App A App B Bin/Libs Bin/Libs Guest OS Guest OS HyperVisor Host OS Server Close to zero run time overhead! Shared “layers” share memory “Machine” boots in less then a second
  • 18. App A App B Bin/Libs Bin/Libs Guest OS Guest OS “Docker Engine” Host OS Server How does it compare to VM’s? Virtual Machines vs Docker App A App B Bin/Libs Bin/Libs Guest OS Guest OS HyperVisor Host OS Server Close to zero run time overhead! Image size advantage; i.e. OS image only downloaded once Shared “layers” share memory “Machine” boots in less then a second
  • 20. Why? Docker holds the promise of: • Stable official containers for everything* you need on Docker Hub • No need to care about OS/Linux-distro differences anymore • Develop once, use and deploy everywhere • Less need for using abstracted install recipes using Puppet/Chef/ Ansible** • Can replace capistrano, capifony, …. ! ! ! ! * Not yet, but getting there. Example: v1 of PHP container out recently ** However they are still very valid for configuration of your app
  • 21. Example: Not unrealistic that we will have a standard docker config ala fig which can be used on: Azure, Google Computer, Server, localhost, … ! How fig.yml currently looks like: web-1: image: php:5.6-apache ports: - "80:80" links: - db-1 volumes: - /vagrant/volumes/ezpublish:/var/www:rw db-1: image: mysql:5.6 environment: MYSQL_ROOT_PASSWORD: mysecretpassword Why? Check out Google Kubernetes!
 Already supported by Google and Azure.
  • 22. Why? Highly scalable: • “By forcing you to split out application in micro services it allows you to scale up part of the application very easily!”
 
 GOTO: • Google Kubernetes (for use on own, Azure or GoogleCloudPlatform) • Apache Mesos + Marathon • …Docker slides from DockerCon for more alternatives…
  • 23. High level Benefits Lets Developers iterate on environment like on code: • Develop & Use locally • Use for test system keeping test server clean • Deploy/Deliver to Ops/Sysadmins • $um: Run everywhere ! Allows Ops/Sysadmins to standardize around containers: • Can focus on maintain hosts, scaling, monitoring • Streamlined Deployments ! Benefits for your business: • Standardize environments & deployments across developers, whole organization and customers • Opportunity: new marketplace for your application • Operation Cost
  • 24. Examples of use and CI/CD
  • 25. Example: Single app, one node Server / VM Varnish www-1 sf-vol db-vol php- fpm-1 db-1 Example of this: Note for running Symfony-standard on this: • Rename app.php or app_dev.php to index.php, or change the rewrite rules • VagrantFile: Comment out d.run command for ezpublish:prepare • Correct settings in files/vagrant.yml
  • 26. Example: Single app, Cluster testing on one node Server / VM Varnish www-1 www-2 php- fpm-2 sf-vol db-vol php- fpm-1 db-1
  • 27. Example: Single app, several nodes Web Server / VM 1 www-1 sf-vol php- fpm-1 redis-1 load- balancer Data- base Binary storage Web Server / VM 2 www-2 sf-vol php- fpm-2 redis-2 Web Server / VM 3 sf-vol Adding nodes on dem and
  • 28. Example: Multiple apps, several nodes “PAAS” Web Server / VM 1 load- balancer Data- base Binary storage Adding nodes on dem and App N www sf-vol php- fpm redis App 3 www sf-vol php- fpm redis App 4 www sf-vol php- fpm redis App 1 www sf-vol php- fpm redis App 2 www sf-vol php- fpm redis Web Server / VM 2 App N www sf-vol php- fpm redis App 3 www sf-vol php- fpm redis App 4 www sf-vol php- fpm redis App 1 www sf-vol php- fpm redis App 2 www sf-vol php- fpm redis Web Server / VM 3 App 3 www sf-vol php- redis
  • 29. Continues Integration and Deployment? Docker Hub (Public/Private)All tests merge publish image symfony-standard pull latests stable parent image Symfony-standard on Docker Hub?
  • 30. Continues Integration and Deployment? Own containers (optional) Docker Hub (Public/Private) merge publish image Code Test on stable image merge deploy updated image Server / ! Azure /! Google Cloud /! … pull latests stable code Custom project Test on stable code pull latests stable image Note: Also checkout Pablo Godel’s talk “Rock Solid Deployment of Symfony Apps”
  • 31. The End Resources: • registry.hub.docker.com (Official and community made containers) • github.com/ezsystems/ezpublish-docker (referred to in slides) • ez.no/Blog/What-is-Docker-and-why-should-I-care ! • Running Docker on cluster: • https://github.com/GoogleCloudPlatform/kubernetes • mesosphere.com/learn/ • aws.amazon.com/blogs/aws/container-computing/ ! Twitter: @andrerom Joined.in: https://joind.in/12188 ! PS: eZ launches 100% Symfony CMS in 2015 called eZ Platform based on todays “New/Symfony stack” in eZ Publish 5.x