SlideShare a Scribd company logo
1 of 42
Download to read offline
From development to continuous deployment.
Docker
Alin Voinea
Eau de Web, Romania
Plone
&
What is?
What is Docker?
Docker is for your system...
What is Docker?
...what virtualenv is for Python
What is Docker?
● Isolated environment
● Same environment (Linux, Mac, Windows...)
● Same environment (Devel, Production)
● Use your favorite Linux distribution
● ...or, build it from scratch
Before Docker
Installing and running Plone
without Docker
Plone - w/o Docker
Libraries
● libz (dev)
● libjpeg (dev)*
● readline (dev)*
● libexpat (dev)
● libssl or openssl (dev)
● libxml2 >= 2.7.8 (dev)*
● libxslt >= 1.1.26 (dev)*
Source:docs.plone.org
Python
● Python 2.7 (dev), built with support for
expat (xml.parsers.expat), zlib and ssl.
● (Python XML support may be a separate
package on some platforms.)*
● virtualenv*
Plone - w/o Docker
Minimal build
~/$ mkdir Plone-5
~/$ cd Plone-5
~/Plone-5$ virtualenv-2.7 zinstance
~/Plone-5$ cd zinstance
~/Plone-5/zinstance$ bin/pip install zc.buildout
~/Plone-5/zinstance$
echo """
[buildout]
extends =
http://dist.plone.org/release/5-latest/versions.cfg
parts =
instance
[instance]
recipe = plone.recipe.zope2instance
user = admin:admin
http-address = 8080
eggs =
Plone
Pillow
""" > buildout.cfg
Source:docs.plone.org
Plone - w/o Docker
This will start a long download and build process ...
Errors like "SyntaxError: ("'return' outside function"..."" may be ignored.
After it finished you can start Plone in foreground-mode with:
$ bin/buildout
$ bin/instance fg
Source:docs.plone.org
Installing and running Plone
with Docker
Plone - w/ Docker
$ docker run -p 8080:8080 plone
hub.docker.com/_/plone
Plone Add-ons
Plone Add-ons
$ docker run 
-e ADDONS=”eea.facetednavigation collective.easyform” 
plone
Develop Plone Add-ons
$ mkdir src
$ cd src
$ git clone https://github.com/collective/eea.facetednavigation
$ chown -R 500 ../src
$ docker run 
-e ADDONS=”eea.facetednavigation” 
-e DEVELOP=”src/eea.facetednavigation” 
-v /host/path/to/src:/plone/instance/src 
plone fg
Debugging - pdb.set_trace()
● Run Plone from the inside of the container
$ docker run -it -e… plone bash
$ bin/instance fg
.
..
...
Zope ready to handle requests
...
(pdb)
Storage
Where is my Data.fs?
● Docker volume
$ docker run plone
$ docker volume ls
local f2b18118ef8c5e7c9ef10ef418f27e2a51502220ddecc218c9d28f
● Default location
$ ls /var/lib/docker/volumes
f2b18118ef8c5e7c9ef10ef418f27e2a51502220ddecc218c9d28f
Where is my Data.fs?
● Docker volume labels
$ docker run -v plone-data:/data plone
$ docker volume ls
plone-data
Where is my Data.fs?
● Unlabeled Docker volumes
$ docker run --name my-plone plone
$ docker volume ls
e2c080c412bc4d33b7d740ca7fee25
● On remove:
$ docker rm -v my-plone
$ docker volume ls
OMG, WHERE IS MY DATA?
Where is my Data.fs?
● Always LABEL your Docker volumes to avoid data loss
$ docker run --name=my-plone -v plone-data:/data plone
● On remove
$ docker rm -v my-plone
$ docker volume ls
plone-data
● Explicitly remove volumes:
$ docker volume rm plone-data
ZEO
# zeo client 1
$ docker run --link=zeo 
-e ZEO_ADDRESS=zeo:8100 plone
ZEO Server / ZEO Clients
# zeo server
$ docker run --name=zeo plone zeoserver
# zeo client 1
$ docker run --link=zeo 
-e ZEO_ADDRESS=zeo:8100 plone
Extend
Extending
● extended_buildout.cfg
● Dockerfile
Extend: extended_buildout.cfg
[buildout]
eggs +=
plone.restapi
collective.easyform
collective.solr
eea.facetednavigation
Extend: Dockerfile
FROM plone:5.0.6
USER root
RUN apt-get install -y ...
USER plone
COPY extended_buildout.cfg /plone/instance/
RUN bin/buildout -c my_buildout.cfg
Extend: Build & Run
$ docker build -t my-plone:5 .
$ docker run my-plone:5
Extend: Dockerfile documentation
docs.docker.com/engine/reference/builder
Orchestration: Single host
$ pip install docker-compose
Docker Compose: Plone & ZEO
$ vim docker-compose.yml
$ docker-compose up
$ docker-compose scale plone=3
version: "2"
volumes:
plone-data:
driver: local
services:
plone:
image: plone
environment:
- ZEO_ADDRESS=zeo:8100
zeo:
image: plone
command: zeoserver
volumes:
- plone-data:/data
Docker Compose: Load balancer
$ vim docker-compose.yml
$ docker-compose up
services:
...
load-balancer :
image: eeacms/haproxy
ports:
- 80:5000
- 1936:1936
environment:
- BACKENDS=plone
- BACKENDS_PORT=8080
- DNS_ENABLED=True
Docker Compose: Demo
https://youtu.be/DumoVlrOk4w
Docker Compose: Documentation
docs.docker.com/compose
Orchestration: Multiple hosts
Rancher
“A Complete Platform for Running
Containers”
Rancher: Install & running
$ docker run -p 8080:8080 rancher/server
Rancher: Demo
https://youtu.be/44zzuAUS-1M
Continuous Deployment
Docs
● hub.docker.com/_/plone
● docs.plone.org (soon)
● docker.com
● rancher.com
● github.com/eea?query=docker
Thanks
● Sven Strack
● Antonio de Marinis
● Eau de Web
● Liana Voinea (my wife)
Docker and plone

More Related Content

What's hot

What's hot (19)

Dockerizing pharo
Dockerizing pharoDockerizing pharo
Dockerizing pharo
 
Usando docker en Azure
Usando docker en AzureUsando docker en Azure
Usando docker en Azure
 
Conan.io - The C/C++ package manager for Developers
Conan.io - The C/C++ package manager for DevelopersConan.io - The C/C++ package manager for Developers
Conan.io - The C/C++ package manager for Developers
 
DrupalCafe Vol.35 - Dockerで始めるDrupal
DrupalCafe Vol.35 - Dockerで始めるDrupalDrupalCafe Vol.35 - Dockerで始めるDrupal
DrupalCafe Vol.35 - Dockerで始めるDrupal
 
Python - Flask - miniapp - ignite
Python - Flask - miniapp - ignitePython - Flask - miniapp - ignite
Python - Flask - miniapp - ignite
 
當專案漸趕,當遷移也不再那麼難 (Ship Your Projects with Docker EcoSystem)
當專案漸趕,當遷移也不再那麼難 (Ship Your Projects with Docker EcoSystem)當專案漸趕,當遷移也不再那麼難 (Ship Your Projects with Docker EcoSystem)
當專案漸趕,當遷移也不再那麼難 (Ship Your Projects with Docker EcoSystem)
 
Workshop - Golang language
Workshop - Golang languageWorkshop - Golang language
Workshop - Golang language
 
Docker in Action
Docker in ActionDocker in Action
Docker in Action
 
Iniciando com Docker
Iniciando com DockerIniciando com Docker
Iniciando com Docker
 
Docker 101
Docker 101Docker 101
Docker 101
 
Ratpack On the Docks
Ratpack On the DocksRatpack On the Docks
Ratpack On the Docks
 
Groovy Powered Clean Code
Groovy Powered Clean CodeGroovy Powered Clean Code
Groovy Powered Clean Code
 
Docker Introduction
Docker IntroductionDocker Introduction
Docker Introduction
 
Docker - from development to production (PHPNW 2017-09-05)
Docker - from development to production (PHPNW 2017-09-05)Docker - from development to production (PHPNW 2017-09-05)
Docker - from development to production (PHPNW 2017-09-05)
 
Meetup #24 Docker for Node Developer
Meetup #24 Docker for Node DeveloperMeetup #24 Docker for Node Developer
Meetup #24 Docker for Node Developer
 
Builder and BuildKit
Builder and BuildKitBuilder and BuildKit
Builder and BuildKit
 
Deploying a Pylons app to Google App Engine
Deploying a Pylons app to Google App EngineDeploying a Pylons app to Google App Engine
Deploying a Pylons app to Google App Engine
 
Gitlab - Creating C++ applications with Gitlab CI
Gitlab - Creating C++ applications with Gitlab CIGitlab - Creating C++ applications with Gitlab CI
Gitlab - Creating C++ applications with Gitlab CI
 
Docker Ecosystem: Part III - Machine
Docker Ecosystem: Part III - MachineDocker Ecosystem: Part III - Machine
Docker Ecosystem: Part III - Machine
 

Viewers also liked

Plone + AWS at Plone Symposium tokyo 2015
Plone + AWS at Plone Symposium tokyo 2015Plone + AWS at Plone Symposium tokyo 2015
Plone + AWS at Plone Symposium tokyo 2015
Manabu Terada
 

Viewers also liked (8)

Plone + AWS at Plone Symposium tokyo 2015
Plone + AWS at Plone Symposium tokyo 2015Plone + AWS at Plone Symposium tokyo 2015
Plone + AWS at Plone Symposium tokyo 2015
 
Trace Lessons Learned H4Dip Stanford 2016
Trace Lessons Learned H4Dip Stanford 2016 Trace Lessons Learned H4Dip Stanford 2016
Trace Lessons Learned H4Dip Stanford 2016
 
Aggregate db Lessons Learned H4Dip Stanford 2016
Aggregate db Lessons Learned H4Dip Stanford 2016Aggregate db Lessons Learned H4Dip Stanford 2016
Aggregate db Lessons Learned H4Dip Stanford 2016
 
Peacekeeping Lessons Learned H4Dip Stanford 2016
Peacekeeping Lessons Learned H4Dip Stanford 2016Peacekeeping Lessons Learned H4Dip Stanford 2016
Peacekeeping Lessons Learned H4Dip Stanford 2016
 
Space Evaders Lessons Learned H4Dip Stanford 2016
Space Evaders Lessons Learned H4Dip Stanford 2016Space Evaders Lessons Learned H4Dip Stanford 2016
Space Evaders Lessons Learned H4Dip Stanford 2016
 
Exodus Lessons Learned H4Dip Stanford 2016
Exodus Lessons Learned H4Dip Stanford 2016Exodus Lessons Learned H4Dip Stanford 2016
Exodus Lessons Learned H4Dip Stanford 2016
 
Hacking CT Lessons Learned H4Dip Stanford 2016
Hacking CT Lessons Learned H4Dip Stanford 2016Hacking CT Lessons Learned H4Dip Stanford 2016
Hacking CT Lessons Learned H4Dip Stanford 2016
 
Fatal journeys (Team 621) Lessons Learned H4Dip Stanford 2016
Fatal journeys (Team 621) Lessons Learned H4Dip Stanford 2016Fatal journeys (Team 621) Lessons Learned H4Dip Stanford 2016
Fatal journeys (Team 621) Lessons Learned H4Dip Stanford 2016
 

Similar to Docker and plone

Introduction to Docker and Containers
Introduction to Docker and ContainersIntroduction to Docker and Containers
Introduction to Docker and Containers
Docker, Inc.
 
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
Docker, Inc.
 

Similar to Docker and plone (20)

From zero to Docker
From zero to DockerFrom zero to Docker
From zero to Docker
 
Introduction to Docker and Containers
Introduction to Docker and ContainersIntroduction to Docker and Containers
Introduction to Docker and Containers
 
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
 
Introduction to Docker at SF Peninsula Software Development Meetup @Guidewire
Introduction to Docker at SF Peninsula Software Development Meetup @GuidewireIntroduction to Docker at SF Peninsula Software Development Meetup @Guidewire
Introduction to Docker at SF Peninsula Software Development Meetup @Guidewire
 
Docker linuxday 2015
Docker linuxday 2015Docker linuxday 2015
Docker linuxday 2015
 
Streamline your development environment with docker
Streamline your development environment with dockerStreamline your development environment with docker
Streamline your development environment with docker
 
Docker n co
Docker n coDocker n co
Docker n co
 
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
 
Docker 1 0 1 0 1: a Docker introduction, actualized for the stable release of...
Docker 1 0 1 0 1: a Docker introduction, actualized for the stable release of...Docker 1 0 1 0 1: a Docker introduction, actualized for the stable release of...
Docker 1 0 1 0 1: a Docker introduction, actualized for the stable release of...
 
Perspectives on Docker
Perspectives on DockerPerspectives on Docker
Perspectives on Docker
 
Introduction to Docker, December 2014 "Tour de France" Bordeaux Special Edition
Introduction to Docker, December 2014 "Tour de France" Bordeaux Special EditionIntroduction to Docker, December 2014 "Tour de France" Bordeaux Special Edition
Introduction to Docker, December 2014 "Tour de France" Bordeaux Special Edition
 
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
 
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
 
Docker for mere mortals
Docker for mere mortalsDocker for mere mortals
Docker for mere mortals
 
Docker slides
Docker slidesDocker slides
Docker slides
 
Workshop : 45 minutes pour comprendre Docker avec Jérôme Petazzoni
Workshop : 45 minutes pour comprendre Docker avec Jérôme PetazzoniWorkshop : 45 minutes pour comprendre Docker avec Jérôme Petazzoni
Workshop : 45 minutes pour comprendre Docker avec Jérôme Petazzoni
 
Introduction to Docker, December 2014 "Tour de France" Edition
Introduction to Docker, December 2014 "Tour de France" EditionIntroduction to Docker, December 2014 "Tour de France" Edition
Introduction to Docker, December 2014 "Tour de France" Edition
 
Puppet Camp Chicago 2014: Docker and Puppet: 1+1=3 (Intermediate)
Puppet Camp Chicago 2014: Docker and Puppet: 1+1=3 (Intermediate)Puppet Camp Chicago 2014: Docker and Puppet: 1+1=3 (Intermediate)
Puppet Camp Chicago 2014: Docker and Puppet: 1+1=3 (Intermediate)
 
Docker Insight
Docker InsightDocker Insight
Docker Insight
 
Powercoders · Docker · Fall 2021.pptx
Powercoders · Docker · Fall 2021.pptxPowercoders · Docker · Fall 2021.pptx
Powercoders · Docker · Fall 2021.pptx
 

More from Alin Voinea

More from Alin Voinea (15)

EEA & Eau de Web Front-end add-ons - Plone conference 2023
EEA & Eau de Web Front-end add-ons - Plone conference 2023 EEA & Eau de Web Front-end add-ons - Plone conference 2023
EEA & Eau de Web Front-end add-ons - Plone conference 2023
 
EEA Faceted Navigation and Plone 6.pdf
EEA Faceted Navigation and Plone 6.pdfEEA Faceted Navigation and Plone 6.pdf
EEA Faceted Navigation and Plone 6.pdf
 
EEA Volto Add-ons - Plone Conference 2020
EEA Volto Add-ons - Plone Conference 2020EEA Volto Add-ons - Plone Conference 2020
EEA Volto Add-ons - Plone Conference 2020
 
Plone 6 / Volto Dexterity Content Types - Schema & Layout
Plone 6 / Volto Dexterity Content Types - Schema & LayoutPlone 6 / Volto Dexterity Content Types - Schema & Layout
Plone 6 / Volto Dexterity Content Types - Schema & Layout
 
Docker & rancher
Docker & rancherDocker & rancher
Docker & rancher
 
Continuous Delivery/Deployment w/ Gitflow, Docker, Jenkins and Rancher
Continuous Delivery/Deployment w/ Gitflow, Docker, Jenkins and RancherContinuous Delivery/Deployment w/ Gitflow, Docker, Jenkins and Rancher
Continuous Delivery/Deployment w/ Gitflow, Docker, Jenkins and Rancher
 
Faceted navigation in Plone 5
Faceted navigation in Plone 5Faceted navigation in Plone 5
Faceted navigation in Plone 5
 
Plone and docker
Plone and dockerPlone and docker
Plone and docker
 
Kotti CMS 101
Kotti CMS 101Kotti CMS 101
Kotti CMS 101
 
Developing Single Page Applications on Plone using AngularJS
Developing Single Page Applications on Plone using AngularJSDeveloping Single Page Applications on Plone using AngularJS
Developing Single Page Applications on Plone using AngularJS
 
Responsive design in plone
Responsive design in ploneResponsive design in plone
Responsive design in plone
 
Display eea’s semantic content with elasticsearch and node.js applications sh...
Display eea’s semantic content with elasticsearch and node.js applications sh...Display eea’s semantic content with elasticsearch and node.js applications sh...
Display eea’s semantic content with elasticsearch and node.js applications sh...
 
New EEA Plone Add-ons
New EEA Plone Add-onsNew EEA Plone Add-ons
New EEA Plone Add-ons
 
Python eggs (RO)
Python eggs (RO)Python eggs (RO)
Python eggs (RO)
 
Data visualization in plone
Data visualization in ploneData visualization in plone
Data visualization in plone
 

Recently uploaded

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Recently uploaded (20)

Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
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
 
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
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
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
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
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
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 

Docker and plone