SlideShare uma empresa Scribd logo
1 de 27
Plone deployment 
made easy 
Pawel Lewicki 
Kim Chee Leong 
Goldmund, Wyldebeast & Wunderliebe 
{ lewicki, leong } @gw20e.com
Outline 
● From manual to automatic deployment 
● How Puppet and Fabric are used for 
deployment 
● Deployment demo in screencast 
● Puppet server orchestration 
● Fabric in detail
From manual to 
automatic deployment 
our path to automatic deployment
Typical Plone release 
@GWW 
● Mark eggs/modules using git tag 
● Update mr developer sources with tag 
● SSH to server 
● Clone new buildout in releases directory 
● Bootstrap buildout and execute 
● Switch previous release to new release 
● If on a cluster set-up, rinse and repeat
Plone release @GWW 
using Fabric 
● All previous steps in one Fabric script 
● Allows ‘dummy-proof’ releases 
Run: 
fab make_tag 
fab deploy 
fab switch 
And Bob is your uncle!
xkcd - automation 
http://xkcd.com/1319/
Why automatic 
deployment? 
● Avoid repetitive tasks 
● Error-proof 
● Immune to typo’s 
● Consistent environments 
● Time efficient
Why automatic 
deployment? 
● Avoid repetitive tasks 
● Error-proof 
● Immune to typo’s 
● Consistent environments 
● Time efficient 
nothing* should be done manually 
on the server
How Puppet and Fabric 
are used for deployment
Initial server setup with 
Puppet 
● Puppet is used for server orchestration 
● Puppet prepares the servers 
● When Puppet is done, Fabric is used to 
deploy buildouts
Puppet diagram
Buildout deployment with 
Fabric 
● Uses tst, acc and prd layers 
● Knows configuration for buildout 
● Deploys and runs buildouts 
● Does several other tasks
Fabric diagram
Deployment screencast 
using Puppet and Fabric
Puppet server 
orchestration 
paving the way for Fabric
Example Puppet config 
node 'ploneconf.puppet' { 
package { 'apache2': ensure => installed } 
appie::app { "ploneconfapp": 
envs => { 
prd => { uid => 3011 }, 
acc => { uid => 3012 }, 
tst => { uid => 3013 }, 
}, 
webserver => 'apache2', 
accountinfo => $gw20e::user_accounts, 
} 
class { 'ssh': 
server_options => { 
'PasswordAuthentication' => 'no', 
'PermitRootLogin' => 'no', 
}, 
} 
} 
1 / n
Puppet tasks 
● User accounts for TAP environments: 
o app-mysite-prd in /opt/APPS/mysite/prd 
o app-mysite-acc in /opt/APPS/mysite/acc 
o app-mysite-tst in /opt/APPS/mysite/tst 
● Webserver config is mapped to each 
application user 
$ cat /etc/apache2/sites-enabled/zzz-app-mysite-prd 
Include /opt/APPS/mysite/prd/sites-enabled/ 
● SSH Keys of developers are synced 
● Buildout cache is enabled
Fabric in detail 
using gww.buildout and gww.buildout-fabric
Plone Fabric features 
● Automatic deployment 
● Push buildout config using jinja templates 
● Extended TAP-layers 
● Switching between releases 
● But also; supports git branches, virtual host 
for webserver, copying zodb to local 
buildout.
Release switch using 
Fabric 
1. Update current symlink 
rm -f ~/current 
ln -s ~/releases/20141028 ~/current 
1. Start supervisor daemon in new buildout 
~/releases/20141028/bin/supervisord 
1. For each service in supervisor: 
a. Stop service in old buildout 
b. Start service in new buildout 
2. Shutdown supervisor in old buildout 
~/releases/20130101/bin/supervisorctl shutdown
● Fabric is controlled from the local buildout: 
./bin/fab -l 
Available commands: 
deploy Create new buildout in release dir 
switch Switch supervisor to latest buildout 
test Test if the connection is working 
● Deploying to test environment: 
./bin/fab deploy:layer=tst,branch=new-feature
Example deployment config (1/2) 
prdfrontend = dict( 
hosts=prd['hosts'], 
buildout='releases/frontend', 
varnish={'port': 48083}, 
haproxy={'port': 48082, 'instances': prd['instances'], }, 
webserver='apache2', 
sitename='ploneconfapp-prd.puppet', 
site_id=prd['site_id'], 
) 
prdbackend = dict( 
hosts=prd['hosts'], 
buildout='releases/backend', 
zeo=dict(base='/data1/APPS/ploneconfapp/prd', **prd['zeo']), 
)
Example Deployment config (2/2) 
prd = dict( 
hosts=['app-ploneconfapp-prd@ploneconf.puppet',], 
buildout=_datestamped('releases/%Y-%m-%d'), 
current_link='current', 
auto_switch=False, 
modules=_modules, 
third_party_modules=_third_party_modules, 
zeo={ 
'ip': ‘ploneconf.puppet’, 'port': 48081, 
}, 
instances={ 
'ports': {'instance0': 8080, 'instance1': 8081}, 
'ipaddresses': _servers, 
}, 
site_id=_site_id, 
credentials={'username': 'admin', 'password': 'secret', }, 
remote_configs={'clockusers': 'clockuser.cfg'}, 
sentry={ 
'dsn': 'https://usr:passwd@sentry.gw20e.com/29', 
'level': 'ERROR', 
}, 
)
Example jinja template / buildout 
[supervisor] 
programs += 
... 
{% if varnish %} 
60 varnish ${buildout:directory}/bin/varnish true 
{% endif %} 
{% if varnish %} 
[varnish] 
port = {{ varnish.port }} 
{% endif %}
Example jinja template / apache 
{% if varnish %} 
{% set port = varnish.port %} 
{% elif haproxy %} 
{% set port = haproxy.port %} 
{% else %} 
{% set port = instances.ports.instance0 %} 
{% endif %} 
<VirtualHost *:80> 
ServerName {{ sitename }} 
RewriteEngine on 
ProxyPass / http://localhost:{{ port }}/VirtualHostBase/http/{{ sitename }}:80/ 
ProxyPassReverse / http://localhost:{{ port }}/../http/{{ sitename }}:80/ 
</VirtualHost>
Github repositories 
● https://github.com/search?q=ploneconf2014_gww 
● Puppet module: 
o http://git.io/2NLMtg (shortened url) 
o https://github.com/Goldmund-Wyldebeast-Wunderliebe/puppet-appie 
● Fabric module: 
o http://git.io/kVdsnw (shortened url) 
o https://github.com/Goldmund-Wyldebeast- 
Wunderliebe/gww.buildout-fabric 
● GWW Plone buildout 
o http://git.io/PzdjqQ (shortened url) 
o https://github.com/Goldmund-Wyldebeast- 
Wunderliebe/gww.buildout
Thank you! 
Goldmund, Wyldebeast & Wunderliebe 
{ lewicki, leong } @gw20e.com

Mais conteúdo relacionado

Mais procurados

DevOps(2) : Vagrant - (MOSG)
DevOps(2) : Vagrant  -  (MOSG)DevOps(2) : Vagrant  -  (MOSG)
DevOps(2) : Vagrant - (MOSG)Soshi Nemoto
 
Puppet User Group Presentation - 15 March 2012
Puppet User Group Presentation - 15 March 2012Puppet User Group Presentation - 15 March 2012
Puppet User Group Presentation - 15 March 2012Walter Heck
 
DevOps(3) : Ansible - (MOSG)
DevOps(3) : Ansible - (MOSG)DevOps(3) : Ansible - (MOSG)
DevOps(3) : Ansible - (MOSG)Soshi Nemoto
 
Instruction: dev environment
Instruction: dev environmentInstruction: dev environment
Instruction: dev environmentSoshi Nemoto
 
Trust, but verify | Testing with Docker Containers
Trust, but verify | Testing with Docker ContainersTrust, but verify | Testing with Docker Containers
Trust, but verify | Testing with Docker ContainersNan Liu
 
How NOT to write in Node.js
How NOT to write in Node.jsHow NOT to write in Node.js
How NOT to write in Node.jsPiotr Pelczar
 
Adrian Mouat - Docker Tips and Tricks
 Adrian Mouat - Docker Tips and Tricks Adrian Mouat - Docker Tips and Tricks
Adrian Mouat - Docker Tips and TricksKevin Cross
 
Test Driven Development with Puppet - PuppetConf 2014
Test Driven Development with Puppet - PuppetConf 2014Test Driven Development with Puppet - PuppetConf 2014
Test Driven Development with Puppet - PuppetConf 2014Puppet
 
Infrastructure = code - 1 year later
Infrastructure = code - 1 year laterInfrastructure = code - 1 year later
Infrastructure = code - 1 year laterChristian Ortner
 
Fabric workshop(1) - (MOSG)
Fabric workshop(1) - (MOSG)Fabric workshop(1) - (MOSG)
Fabric workshop(1) - (MOSG)Soshi Nemoto
 
Zero Downtime Deployment with Ansible
Zero Downtime Deployment with AnsibleZero Downtime Deployment with Ansible
Zero Downtime Deployment with AnsibleStein Inge Morisbak
 
Magento 2 Seminar - Miguel Balparda - M2 with PHP 7 and Varnish
Magento 2 Seminar - Miguel Balparda - M2 with PHP 7 and VarnishMagento 2 Seminar - Miguel Balparda - M2 with PHP 7 and Varnish
Magento 2 Seminar - Miguel Balparda - M2 with PHP 7 and VarnishYireo
 
How to Write Node.js Module
How to Write Node.js ModuleHow to Write Node.js Module
How to Write Node.js ModuleFred Chien
 
Using cgroups in docker container
Using cgroups in docker containerUsing cgroups in docker container
Using cgroups in docker containerVinay Jindal
 
How to make a large C++-code base manageable
How to make a large C++-code base manageableHow to make a large C++-code base manageable
How to make a large C++-code base manageablecorehard_by
 

Mais procurados (18)

DevOps(2) : Vagrant - (MOSG)
DevOps(2) : Vagrant  -  (MOSG)DevOps(2) : Vagrant  -  (MOSG)
DevOps(2) : Vagrant - (MOSG)
 
Puppet User Group Presentation - 15 March 2012
Puppet User Group Presentation - 15 March 2012Puppet User Group Presentation - 15 March 2012
Puppet User Group Presentation - 15 March 2012
 
DevOps(3) : Ansible - (MOSG)
DevOps(3) : Ansible - (MOSG)DevOps(3) : Ansible - (MOSG)
DevOps(3) : Ansible - (MOSG)
 
Instruction: dev environment
Instruction: dev environmentInstruction: dev environment
Instruction: dev environment
 
Trust, but verify | Testing with Docker Containers
Trust, but verify | Testing with Docker ContainersTrust, but verify | Testing with Docker Containers
Trust, but verify | Testing with Docker Containers
 
How NOT to write in Node.js
How NOT to write in Node.jsHow NOT to write in Node.js
How NOT to write in Node.js
 
Adrian Mouat - Docker Tips and Tricks
 Adrian Mouat - Docker Tips and Tricks Adrian Mouat - Docker Tips and Tricks
Adrian Mouat - Docker Tips and Tricks
 
Test Driven Development with Puppet - PuppetConf 2014
Test Driven Development with Puppet - PuppetConf 2014Test Driven Development with Puppet - PuppetConf 2014
Test Driven Development with Puppet - PuppetConf 2014
 
Vagrant
VagrantVagrant
Vagrant
 
Everything as a code
Everything as a codeEverything as a code
Everything as a code
 
Infrastructure = code - 1 year later
Infrastructure = code - 1 year laterInfrastructure = code - 1 year later
Infrastructure = code - 1 year later
 
Fabric workshop(1) - (MOSG)
Fabric workshop(1) - (MOSG)Fabric workshop(1) - (MOSG)
Fabric workshop(1) - (MOSG)
 
Zero Downtime Deployment with Ansible
Zero Downtime Deployment with AnsibleZero Downtime Deployment with Ansible
Zero Downtime Deployment with Ansible
 
Magento 2 Seminar - Miguel Balparda - M2 with PHP 7 and Varnish
Magento 2 Seminar - Miguel Balparda - M2 with PHP 7 and VarnishMagento 2 Seminar - Miguel Balparda - M2 with PHP 7 and Varnish
Magento 2 Seminar - Miguel Balparda - M2 with PHP 7 and Varnish
 
How to Write Node.js Module
How to Write Node.js ModuleHow to Write Node.js Module
How to Write Node.js Module
 
Using cgroups in docker container
Using cgroups in docker containerUsing cgroups in docker container
Using cgroups in docker container
 
Npm: beyond 'npm i'
Npm: beyond 'npm i'Npm: beyond 'npm i'
Npm: beyond 'npm i'
 
How to make a large C++-code base manageable
How to make a large C++-code base manageableHow to make a large C++-code base manageable
How to make a large C++-code base manageable
 

Destaque

Goldmund, Wyldebeast & Wunderliebe - Responsive Webdesign Workshop
Goldmund, Wyldebeast & Wunderliebe - Responsive Webdesign WorkshopGoldmund, Wyldebeast & Wunderliebe - Responsive Webdesign Workshop
Goldmund, Wyldebeast & Wunderliebe - Responsive Webdesign WorkshopKim Chee Leong
 
PyGrunn - Buildout presentation
PyGrunn - Buildout presentationPyGrunn - Buildout presentation
PyGrunn - Buildout presentationKim Chee Leong
 
Essential Plone development tools - Plone conf 2012
Essential Plone development tools - Plone conf 2012Essential Plone development tools - Plone conf 2012
Essential Plone development tools - Plone conf 2012Kim Chee Leong
 
Responsive webdesign presentatie - Nederlandse Plone gebruikersdag 2012
Responsive webdesign presentatie - Nederlandse Plone gebruikersdag 2012Responsive webdesign presentatie - Nederlandse Plone gebruikersdag 2012
Responsive webdesign presentatie - Nederlandse Plone gebruikersdag 2012Kim Chee Leong
 
Automated Deployment with Maven - going the whole nine yards
Automated Deployment with Maven - going the whole nine yardsAutomated Deployment with Maven - going the whole nine yards
Automated Deployment with Maven - going the whole nine yardsJohn Ferguson Smart Limited
 
Start-up kid - Arduino workshop
Start-up kid - Arduino workshopStart-up kid - Arduino workshop
Start-up kid - Arduino workshopKim Chee Leong
 

Destaque (6)

Goldmund, Wyldebeast & Wunderliebe - Responsive Webdesign Workshop
Goldmund, Wyldebeast & Wunderliebe - Responsive Webdesign WorkshopGoldmund, Wyldebeast & Wunderliebe - Responsive Webdesign Workshop
Goldmund, Wyldebeast & Wunderliebe - Responsive Webdesign Workshop
 
PyGrunn - Buildout presentation
PyGrunn - Buildout presentationPyGrunn - Buildout presentation
PyGrunn - Buildout presentation
 
Essential Plone development tools - Plone conf 2012
Essential Plone development tools - Plone conf 2012Essential Plone development tools - Plone conf 2012
Essential Plone development tools - Plone conf 2012
 
Responsive webdesign presentatie - Nederlandse Plone gebruikersdag 2012
Responsive webdesign presentatie - Nederlandse Plone gebruikersdag 2012Responsive webdesign presentatie - Nederlandse Plone gebruikersdag 2012
Responsive webdesign presentatie - Nederlandse Plone gebruikersdag 2012
 
Automated Deployment with Maven - going the whole nine yards
Automated Deployment with Maven - going the whole nine yardsAutomated Deployment with Maven - going the whole nine yards
Automated Deployment with Maven - going the whole nine yards
 
Start-up kid - Arduino workshop
Start-up kid - Arduino workshopStart-up kid - Arduino workshop
Start-up kid - Arduino workshop
 

Semelhante a Plone deployment made easy

Capistrano deploy Magento project in an efficient way
Capistrano deploy Magento project in an efficient wayCapistrano deploy Magento project in an efficient way
Capistrano deploy Magento project in an efficient waySylvain Rayé
 
How I hack on puppet modules
How I hack on puppet modulesHow I hack on puppet modules
How I hack on puppet modulesKris Buytaert
 
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)Puppet
 
如何透過 Go-kit 快速搭建微服務架構應用程式實戰
如何透過 Go-kit 快速搭建微服務架構應用程式實戰如何透過 Go-kit 快速搭建微服務架構應用程式實戰
如何透過 Go-kit 快速搭建微服務架構應用程式實戰KAI CHU CHUNG
 
OSDC.no 2015 introduction to node.js workshop
OSDC.no 2015 introduction to node.js workshopOSDC.no 2015 introduction to node.js workshop
OSDC.no 2015 introduction to node.js workshopleffen
 
How Puppet Enables the Use of Lightweight Virtualized Containers - PuppetConf...
How Puppet Enables the Use of Lightweight Virtualized Containers - PuppetConf...How Puppet Enables the Use of Lightweight Virtualized Containers - PuppetConf...
How Puppet Enables the Use of Lightweight Virtualized Containers - PuppetConf...Puppet
 
Automating Complex Setups with Puppet
Automating Complex Setups with PuppetAutomating Complex Setups with Puppet
Automating Complex Setups with PuppetKris Buytaert
 
How to go the extra mile on monitoring
How to go the extra mile on monitoringHow to go the extra mile on monitoring
How to go the extra mile on monitoringTiago Simões
 
Integrating cloud stack with puppet
Integrating cloud stack with puppetIntegrating cloud stack with puppet
Integrating cloud stack with puppetPuppet
 
Web Applications with Eclipse RT and Docker in the Cloud
Web Applications with Eclipse RT and Docker in the CloudWeb Applications with Eclipse RT and Docker in the Cloud
Web Applications with Eclipse RT and Docker in the CloudMarkus Knauer
 
Tensorflow in Docker
Tensorflow in DockerTensorflow in Docker
Tensorflow in DockerEric Ahn
 
Ansible Automation to Rule Them All
Ansible Automation to Rule Them AllAnsible Automation to Rule Them All
Ansible Automation to Rule Them AllTim Fairweather
 
Our Puppet Story – Patterns and Learnings (sage@guug, March 2014)
Our Puppet Story – Patterns and Learnings (sage@guug, March 2014)Our Puppet Story – Patterns and Learnings (sage@guug, March 2014)
Our Puppet Story – Patterns and Learnings (sage@guug, March 2014)DECK36
 
Getting started with puppet and vagrant (1)
Getting started with puppet and vagrant (1)Getting started with puppet and vagrant (1)
Getting started with puppet and vagrant (1)Puppet
 
Bangpypers april-meetup-2012
Bangpypers april-meetup-2012Bangpypers april-meetup-2012
Bangpypers april-meetup-2012Deepak Garg
 
From Dev to DevOps
From Dev to DevOpsFrom Dev to DevOps
From Dev to DevOpsAgile Spain
 
Kubernetes laravel and kubernetes
Kubernetes   laravel and kubernetesKubernetes   laravel and kubernetes
Kubernetes laravel and kubernetesWilliam Stewart
 
Moving from Jenkins 1 to 2 declarative pipeline adventures
Moving from Jenkins 1 to 2 declarative pipeline adventuresMoving from Jenkins 1 to 2 declarative pipeline adventures
Moving from Jenkins 1 to 2 declarative pipeline adventuresFrits Van Der Holst
 

Semelhante a Plone deployment made easy (20)

Capistrano deploy Magento project in an efficient way
Capistrano deploy Magento project in an efficient wayCapistrano deploy Magento project in an efficient way
Capistrano deploy Magento project in an efficient way
 
One-Man Ops
One-Man OpsOne-Man Ops
One-Man Ops
 
How I hack on puppet modules
How I hack on puppet modulesHow I hack on puppet modules
How I hack on puppet modules
 
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)
 
如何透過 Go-kit 快速搭建微服務架構應用程式實戰
如何透過 Go-kit 快速搭建微服務架構應用程式實戰如何透過 Go-kit 快速搭建微服務架構應用程式實戰
如何透過 Go-kit 快速搭建微服務架構應用程式實戰
 
OSDC.no 2015 introduction to node.js workshop
OSDC.no 2015 introduction to node.js workshopOSDC.no 2015 introduction to node.js workshop
OSDC.no 2015 introduction to node.js workshop
 
How Puppet Enables the Use of Lightweight Virtualized Containers - PuppetConf...
How Puppet Enables the Use of Lightweight Virtualized Containers - PuppetConf...How Puppet Enables the Use of Lightweight Virtualized Containers - PuppetConf...
How Puppet Enables the Use of Lightweight Virtualized Containers - PuppetConf...
 
Automating Complex Setups with Puppet
Automating Complex Setups with PuppetAutomating Complex Setups with Puppet
Automating Complex Setups with Puppet
 
How to go the extra mile on monitoring
How to go the extra mile on monitoringHow to go the extra mile on monitoring
How to go the extra mile on monitoring
 
Integrating cloud stack with puppet
Integrating cloud stack with puppetIntegrating cloud stack with puppet
Integrating cloud stack with puppet
 
Beyond Puppet
Beyond PuppetBeyond Puppet
Beyond Puppet
 
Web Applications with Eclipse RT and Docker in the Cloud
Web Applications with Eclipse RT and Docker in the CloudWeb Applications with Eclipse RT and Docker in the Cloud
Web Applications with Eclipse RT and Docker in the Cloud
 
Tensorflow in Docker
Tensorflow in DockerTensorflow in Docker
Tensorflow in Docker
 
Ansible Automation to Rule Them All
Ansible Automation to Rule Them AllAnsible Automation to Rule Them All
Ansible Automation to Rule Them All
 
Our Puppet Story – Patterns and Learnings (sage@guug, March 2014)
Our Puppet Story – Patterns and Learnings (sage@guug, March 2014)Our Puppet Story – Patterns and Learnings (sage@guug, March 2014)
Our Puppet Story – Patterns and Learnings (sage@guug, March 2014)
 
Getting started with puppet and vagrant (1)
Getting started with puppet and vagrant (1)Getting started with puppet and vagrant (1)
Getting started with puppet and vagrant (1)
 
Bangpypers april-meetup-2012
Bangpypers april-meetup-2012Bangpypers april-meetup-2012
Bangpypers april-meetup-2012
 
From Dev to DevOps
From Dev to DevOpsFrom Dev to DevOps
From Dev to DevOps
 
Kubernetes laravel and kubernetes
Kubernetes   laravel and kubernetesKubernetes   laravel and kubernetes
Kubernetes laravel and kubernetes
 
Moving from Jenkins 1 to 2 declarative pipeline adventures
Moving from Jenkins 1 to 2 declarative pipeline adventuresMoving from Jenkins 1 to 2 declarative pipeline adventures
Moving from Jenkins 1 to 2 declarative pipeline adventures
 

Último

Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...Nitya salvi
 
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
 
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
 
%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
 
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...masabamasaba
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech studentsHimanshiGarg82
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrandmasabamasaba
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionOnePlan Solutions
 
Generic or specific? Making sensible software design decisions
Generic or specific? Making sensible software design decisionsGeneric or specific? Making sensible software design decisions
Generic or specific? Making sensible software design decisionsBert Jan Schrijver
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastPapp Krisztián
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
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
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...masabamasaba
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesVictorSzoltysek
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park masabamasaba
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfVishalKumarJha10
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 

Último (20)

Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
 
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
 
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
 
%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
 
+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...
 
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
Generic or specific? Making sensible software design decisions
Generic or specific? Making sensible software design decisionsGeneric or specific? Making sensible software design decisions
Generic or specific? Making sensible software design decisions
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
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-...
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 

Plone deployment made easy

  • 1. Plone deployment made easy Pawel Lewicki Kim Chee Leong Goldmund, Wyldebeast & Wunderliebe { lewicki, leong } @gw20e.com
  • 2. Outline ● From manual to automatic deployment ● How Puppet and Fabric are used for deployment ● Deployment demo in screencast ● Puppet server orchestration ● Fabric in detail
  • 3. From manual to automatic deployment our path to automatic deployment
  • 4. Typical Plone release @GWW ● Mark eggs/modules using git tag ● Update mr developer sources with tag ● SSH to server ● Clone new buildout in releases directory ● Bootstrap buildout and execute ● Switch previous release to new release ● If on a cluster set-up, rinse and repeat
  • 5. Plone release @GWW using Fabric ● All previous steps in one Fabric script ● Allows ‘dummy-proof’ releases Run: fab make_tag fab deploy fab switch And Bob is your uncle!
  • 6. xkcd - automation http://xkcd.com/1319/
  • 7. Why automatic deployment? ● Avoid repetitive tasks ● Error-proof ● Immune to typo’s ● Consistent environments ● Time efficient
  • 8. Why automatic deployment? ● Avoid repetitive tasks ● Error-proof ● Immune to typo’s ● Consistent environments ● Time efficient nothing* should be done manually on the server
  • 9. How Puppet and Fabric are used for deployment
  • 10. Initial server setup with Puppet ● Puppet is used for server orchestration ● Puppet prepares the servers ● When Puppet is done, Fabric is used to deploy buildouts
  • 12. Buildout deployment with Fabric ● Uses tst, acc and prd layers ● Knows configuration for buildout ● Deploys and runs buildouts ● Does several other tasks
  • 14. Deployment screencast using Puppet and Fabric
  • 15. Puppet server orchestration paving the way for Fabric
  • 16. Example Puppet config node 'ploneconf.puppet' { package { 'apache2': ensure => installed } appie::app { "ploneconfapp": envs => { prd => { uid => 3011 }, acc => { uid => 3012 }, tst => { uid => 3013 }, }, webserver => 'apache2', accountinfo => $gw20e::user_accounts, } class { 'ssh': server_options => { 'PasswordAuthentication' => 'no', 'PermitRootLogin' => 'no', }, } } 1 / n
  • 17. Puppet tasks ● User accounts for TAP environments: o app-mysite-prd in /opt/APPS/mysite/prd o app-mysite-acc in /opt/APPS/mysite/acc o app-mysite-tst in /opt/APPS/mysite/tst ● Webserver config is mapped to each application user $ cat /etc/apache2/sites-enabled/zzz-app-mysite-prd Include /opt/APPS/mysite/prd/sites-enabled/ ● SSH Keys of developers are synced ● Buildout cache is enabled
  • 18. Fabric in detail using gww.buildout and gww.buildout-fabric
  • 19. Plone Fabric features ● Automatic deployment ● Push buildout config using jinja templates ● Extended TAP-layers ● Switching between releases ● But also; supports git branches, virtual host for webserver, copying zodb to local buildout.
  • 20. Release switch using Fabric 1. Update current symlink rm -f ~/current ln -s ~/releases/20141028 ~/current 1. Start supervisor daemon in new buildout ~/releases/20141028/bin/supervisord 1. For each service in supervisor: a. Stop service in old buildout b. Start service in new buildout 2. Shutdown supervisor in old buildout ~/releases/20130101/bin/supervisorctl shutdown
  • 21. ● Fabric is controlled from the local buildout: ./bin/fab -l Available commands: deploy Create new buildout in release dir switch Switch supervisor to latest buildout test Test if the connection is working ● Deploying to test environment: ./bin/fab deploy:layer=tst,branch=new-feature
  • 22. Example deployment config (1/2) prdfrontend = dict( hosts=prd['hosts'], buildout='releases/frontend', varnish={'port': 48083}, haproxy={'port': 48082, 'instances': prd['instances'], }, webserver='apache2', sitename='ploneconfapp-prd.puppet', site_id=prd['site_id'], ) prdbackend = dict( hosts=prd['hosts'], buildout='releases/backend', zeo=dict(base='/data1/APPS/ploneconfapp/prd', **prd['zeo']), )
  • 23. Example Deployment config (2/2) prd = dict( hosts=['app-ploneconfapp-prd@ploneconf.puppet',], buildout=_datestamped('releases/%Y-%m-%d'), current_link='current', auto_switch=False, modules=_modules, third_party_modules=_third_party_modules, zeo={ 'ip': ‘ploneconf.puppet’, 'port': 48081, }, instances={ 'ports': {'instance0': 8080, 'instance1': 8081}, 'ipaddresses': _servers, }, site_id=_site_id, credentials={'username': 'admin', 'password': 'secret', }, remote_configs={'clockusers': 'clockuser.cfg'}, sentry={ 'dsn': 'https://usr:passwd@sentry.gw20e.com/29', 'level': 'ERROR', }, )
  • 24. Example jinja template / buildout [supervisor] programs += ... {% if varnish %} 60 varnish ${buildout:directory}/bin/varnish true {% endif %} {% if varnish %} [varnish] port = {{ varnish.port }} {% endif %}
  • 25. Example jinja template / apache {% if varnish %} {% set port = varnish.port %} {% elif haproxy %} {% set port = haproxy.port %} {% else %} {% set port = instances.ports.instance0 %} {% endif %} <VirtualHost *:80> ServerName {{ sitename }} RewriteEngine on ProxyPass / http://localhost:{{ port }}/VirtualHostBase/http/{{ sitename }}:80/ ProxyPassReverse / http://localhost:{{ port }}/../http/{{ sitename }}:80/ </VirtualHost>
  • 26. Github repositories ● https://github.com/search?q=ploneconf2014_gww ● Puppet module: o http://git.io/2NLMtg (shortened url) o https://github.com/Goldmund-Wyldebeast-Wunderliebe/puppet-appie ● Fabric module: o http://git.io/kVdsnw (shortened url) o https://github.com/Goldmund-Wyldebeast- Wunderliebe/gww.buildout-fabric ● GWW Plone buildout o http://git.io/PzdjqQ (shortened url) o https://github.com/Goldmund-Wyldebeast- Wunderliebe/gww.buildout
  • 27. Thank you! Goldmund, Wyldebeast & Wunderliebe { lewicki, leong } @gw20e.com

Notas do Editor

  1. In this talk we’ll explain how we automated the deployment of Plone sites and which tools are used. Gradually we made the moved from manual deployment to automatic. Shared experience with Django deployments Ask who deploys Plone buildouts for a customer, company or organisation?
  2. First explain how our typical Plone setup looks like. Collection of building blocks, based on best practices. We have ours, you probably have yours. Cluster, buildout-template with varnish and TAP
  3. What is a release? Modules with specific functionality, such as content/theme Mr developer specific from prd env In the past we used eggs Explain how we used the release checklist/procedure at our customer
  4. This is much easier :] Ofcourse first release on test and acc, too weed out possible problems
  5. Accurate depiction Start automating tasks you’re familiar with Releases are not happening often! Possibly mention release calendar
  6. Repetitive tasks: it easy to mess up when doing a rep. task Error-proof: you should have encountered possible errors on tst and acc Typo’s and consistent env: with automatic deployment. naming git tags and dirs is done for you. manual.. Time efficient: in the long run you’ll save time next slide contains “nothing* should be done manually on the server”
  7. nothing should be done using SSH shell except for debugging purposes Fabric is the base of our automatic deployment, but there is more… (ba dum tss)
  8. Puppet is one way todo server orchestration, Chef and Ansible are popular tools. Also used to setup server monitoring and do system upgrades Written in Ruby, reasonable easy to write modules. Many modules available. No SSH login, uses separate agen
  9. Agents update periodalcialy Why are we using seperate user accounts? Webserver config is managable Buildout cache is enabled per user
  10. Explain why Puppet should not be used to deploy buildouts. It should be explicit. Use SSH forward agent to git clone repositories on remote server
  11. Why are we using seperate user accounts? Webserver config is managable Buildout cache is enabled per user
  12. What is missing here?
  13. Why are we using seperate user accounts? Webserver config is managable Buildout cache is enabled per user
  14. Also explain why Puppet should not be used to deploy buildouts
  15. Also explain why Puppet should not be used to deploy buildouts Supervisor is socket based
  16. Explain production setup; three tier architecure fe with apache, varnish and haproxy be with ZODB
  17. What is missing here?
  18. What is missing here?