SlideShare una empresa de Scribd logo
1 de 33
Full-Stack Plone Deployment with Ansible
Fulvio Casali & Steve McMahon
Plone Conference 2015
Budapest, Romania
What do we
mean by full
stack?
Approaches to full-stack deployment
Containers
Approaches to full-stack deployment
Orchestration
Is your unit of automation a component of the stack, or a full
server?
Container or Orchestration?
Server Orchestration Tools
Client-Server (Mostly)Agentless
A bit simpler
Your mileage may vary…
Simplicity Wins!
For our purposes
A Quick Introduction
to Ansible
Ansible
✤ Plays — a state specification
✤ Ideally idempotent
✤ Playbooks — Lists of plays
✤ Roles — Reusable lists of plays
YAML:
Python’s JSON
- List Item One
- List Item Two
- Key One: Value One
Key Two: Value Two
- List Item Four
Playbook Sample
- name: Update host
apt: upgrade=dist update_cache=yes
- name: Ensure optional packages
apt: pkg={{ item }} state=present
with_items: additional_packages
Templates & Variable Interpolation
eggs =
Plone
Pillow
{% if plone_additional_eggs %}
{% for egg in plone_additional_eggs %}
{{ egg }}
{% endfor %}
{% endif %}
Roles:
playbooks for use
inside playbooks.
Write them yourself;
or check them out via
Ansible Galaxy
Using roles
roles:
...
- role: plone.plone_server
tags: plone
- role: haproxy
when: install_loadbalancer
tags: haproxy
- role: varnish
when: install_proxycache
tags: varnish
...
Plone’s Ansible Toolkit
Two parts: the Plone Server Role and the Plone Playbook
Plone
Server Role
✤ Only the Zope/Plone Server
✤ In a ZEO configuration
✤ Includes process management
via Supervisor
✤ And backup, packing cron jobs
✤ Available on Ansible Galaxy
The Plone
Playbook
✤ Incorporates Plone Server Role
✤ Adds:
✤ Load balancer
✤ Proxy cache
✤ Web server / rewrite engine
✤ MTA & Admin
✤ Available via github.com/plone
Choosing your entry point
✤ Choose the Plone Server Role if you wish to pick and
choose your stack components. Incorporate it in your
own Playbook.
✤ Choose the Plone Playbook if you want the full stack
chosen by the Installer Team.
Plone Server Role:
Major Options
✤ Canned or custom buildout
✤ With canned buildout:
✤ ZEO client count
✤ Memory profile
✤ Additional eggs
Plone Ansible
Playbook
Full stack components
Integration Payoff:
Client Restart
✤ Playbook knows its component part and
can do things like install a client restart
script that:
✤ Restarts all ZEO clients
✤ Removes client from haproxy backend
before restart
✤ Fetches homepage of each virtualhost
after restart to load Zope object cache
✤ Adds client back to cluster after page
fetch
✤ Flushes varnish cache
Playbook: Major Options
All Plone Server Role options, plus…
Playbook
Options
✤ Skip installs of haproxy, varnish,
Nginx, Munin …
✤ Set up virtual hosts / SSL
✤ Tune cache
✤ Server packages, MOTD
✤ Postfix relay
But how to customize those variables in a maintainable way?
Customization Strategies
All options are configured via variables
Local Customization File
✤ Create a local-configure.yml file with variable settings
✤ Override any setting
✤ Samples provided for several typical configurations
✤ Just copy the sample to local-configure.yml and edit
✤ Pulls will never overwrite local-configure.yml
sample-medium.yml
admin_email:
plone_initial_password:
timezone: "UTCn"
muninnode_query_ips:
- ip.of.munin.monitor
plone_client_count: 2
plone_zodb_cache_size: 15000
plone_client_max_memory: 750MB
Use this strategy if you don’t like some of the major stack component choices
Alternative Strategy: Fork It
You fork it, you own it…
Testing
Ready to test locally via Vagrant.
vagrant up does a complete
provisioning of a virtualbox using Vagrant’s
Ansible provisioner.
State of the Ansible Kit
Every customization variable documented
Solid Documentation
docs.plone.org
Server Platforms Supported
Currently Ubuntu/Debian and CentOS
Server Platforms … Future
But we’d like to do more — with your help.
✤ Drinking young chimpanzee, CC BY Tambako The Jaguar Follow, https://www.flickr.com/photos/tambako
✤ Chimpanzee with a snack, CC BY NC SA, Dan, https://www.flickr.com/photos/dgermony/
✤ Baboons in a row, CC BY Tambako The Jaguar Follow, https://www.flickr.com/photos/tambako
✤ Portrait of a surprised baboon, CC BY Tambako The Jaguar Follow, https://www.flickr.com/photos/tambako
✤ Chacma Baboon - Papio ursinus, CC BY NC SA, Arno Meintjes, https://www.flickr.com/photos/arnolouise/
✤ Orangutan with baby, CC BY ND, Nathan Rupert, https://www.flickr.com/photos/nathaninsandiego/
✤ Baby orangutan, CC BY, Daniel Kleeman, https://www.flickr.com/photos/75821270@N00/
✤ Bornean Orangutan, CC NY ND, Josh More, https://www.flickr.com/photos/guppiecat/
✤ Mother and baby gibbons eating, CC BY Tambako The Jaguar Follow, https://www.flickr.com/photos/tambako
✤ Portrait of a gibbon, , CC BY Tambako The Jaguar Follow, https://www.flickr.com/photos/tambako
✤ Black and white gibbon, , CC BY Tambako The Jaguar Follow, https://www.flickr.com/photos/tambako
✤ Cute squirrel monkey, CC BY Tambako The Jaguar Follow, https://www.flickr.com/photos/tambako
✤ squirrel-monkeys-at-drusillas-park-zoo-018, CC BY NC ND, Dean Thorpe, https://www.flickr.com/photos/aspexdesign/
✤ Squirrel monkeys in the grass, CC BY Tambako The Jaguar Follow, https://www.flickr.com/photos/tambako
✤ IMG_4986 (do not feed), CC BY NC, Roland Harvey, https://www.flickr.com/photos/rolymo/
✤ Cornered, CC BY NC, Esther Simpson, https://www.flickr.com/photos/estherase/
✤ Howler Monkey WLD_4487, CC BY NC ND, https://www.flickr.com/photos/guppiecat/
✤ Ooooooo, CC BY NC SA, Len Radin, https://www.flickr.com/photos/drurydrama/
✤ Say aaahhhh!, CC BY NC ND, Abid Karamali, https://www.flickr.com/photos/abidk/
✤ Capuchin Monkeys, Manuel Antonio, Costa Rica, CC BY NC SA, Stephen Johnson,
https://www.flickr.com/photos/stephenjjohnson/
✤ Capuchin (tongue), CC BY NC SA, Jim Webber, https://www.flickr.com/photos/wwwebber/
Talk licensed CC BY 2.0
Primate photo licenses and attributions:

Más contenido relacionado

Similar a Full-Stack Deployment with Ansible

Full-Stack Plone Deployment with Ansible
Full-Stack Plone Deployment with AnsibleFull-Stack Plone Deployment with Ansible
Full-Stack Plone Deployment with AnsibleSteve McMahon
 
CPANTS: Kwalitative website and its tools
CPANTS: Kwalitative website and its toolsCPANTS: Kwalitative website and its tools
CPANTS: Kwalitative website and its toolscharsbar
 
What python can learn from java
What python can learn from javaWhat python can learn from java
What python can learn from javajbellis
 
Deploying Plone on AWS
Deploying Plone on AWSDeploying Plone on AWS
Deploying Plone on AWST. Kim Nguyen
 
Caching Up and Down the Stack
Caching Up and Down the StackCaching Up and Down the Stack
Caching Up and Down the StackDan Kuebrich
 
Adventures in infrastructure as code
Adventures in infrastructure as codeAdventures in infrastructure as code
Adventures in infrastructure as codeJulian Simpson
 
Challenges when building high profile editorial sites
Challenges when building high profile editorial sitesChallenges when building high profile editorial sites
Challenges when building high profile editorial sitesYann Malet
 
Fargate 를 이용한 ECS with VPC 1부
Fargate 를 이용한 ECS with VPC 1부Fargate 를 이용한 ECS with VPC 1부
Fargate 를 이용한 ECS with VPC 1부Hyun-Mook Choi
 
Integrating microservices with apache camel on kubernetes
Integrating microservices with apache camel on kubernetesIntegrating microservices with apache camel on kubernetes
Integrating microservices with apache camel on kubernetesClaus Ibsen
 
Rapid scaling in_the_cloud_with_puppet
Rapid scaling in_the_cloud_with_puppetRapid scaling in_the_cloud_with_puppet
Rapid scaling in_the_cloud_with_puppetCarl Caum
 
Puppet for dummies - ZendCon 2011 Edition
Puppet for dummies - ZendCon 2011 EditionPuppet for dummies - ZendCon 2011 Edition
Puppet for dummies - ZendCon 2011 EditionJoshua Thijssen
 
Abusing the Cloud for Fun and Profit
Abusing the Cloud for Fun and ProfitAbusing the Cloud for Fun and Profit
Abusing the Cloud for Fun and ProfitAlan Pinstein
 
Nagios Conference 2011 - Nathan Vonnahme - Writing Custom Nagios Plugins In Perl
Nagios Conference 2011 - Nathan Vonnahme - Writing Custom Nagios Plugins In PerlNagios Conference 2011 - Nathan Vonnahme - Writing Custom Nagios Plugins In Perl
Nagios Conference 2011 - Nathan Vonnahme - Writing Custom Nagios Plugins In PerlNagios
 
HTTP cache @ PUG Rome 03-29-2011
HTTP cache @ PUG Rome 03-29-2011HTTP cache @ PUG Rome 03-29-2011
HTTP cache @ PUG Rome 03-29-2011Alessandro Nadalin
 
WooCommerce System Status
WooCommerce System StatusWooCommerce System Status
WooCommerce System StatusRodolfo Melogli
 
Puppet for dummies - PHPBenelux UG edition
Puppet for dummies - PHPBenelux UG editionPuppet for dummies - PHPBenelux UG edition
Puppet for dummies - PHPBenelux UG editionJoshua Thijssen
 
Acceptance testing plone sites and add ons with robot framework and selenium
Acceptance testing plone sites and add ons with robot framework and seleniumAcceptance testing plone sites and add ons with robot framework and selenium
Acceptance testing plone sites and add ons with robot framework and seleniumAsko Soukka
 
Scaling to-5000-nodes
Scaling to-5000-nodesScaling to-5000-nodes
Scaling to-5000-nodesPhilip Watts
 

Similar a Full-Stack Deployment with Ansible (20)

Full-Stack Plone Deployment with Ansible
Full-Stack Plone Deployment with AnsibleFull-Stack Plone Deployment with Ansible
Full-Stack Plone Deployment with Ansible
 
CPANTS: Kwalitative website and its tools
CPANTS: Kwalitative website and its toolsCPANTS: Kwalitative website and its tools
CPANTS: Kwalitative website and its tools
 
What python can learn from java
What python can learn from javaWhat python can learn from java
What python can learn from java
 
Deploying Plone on AWS
Deploying Plone on AWSDeploying Plone on AWS
Deploying Plone on AWS
 
Caching Up and Down the Stack
Caching Up and Down the StackCaching Up and Down the Stack
Caching Up and Down the Stack
 
Adventures in infrastructure as code
Adventures in infrastructure as codeAdventures in infrastructure as code
Adventures in infrastructure as code
 
Challenges when building high profile editorial sites
Challenges when building high profile editorial sitesChallenges when building high profile editorial sites
Challenges when building high profile editorial sites
 
Fargate 를 이용한 ECS with VPC 1부
Fargate 를 이용한 ECS with VPC 1부Fargate 를 이용한 ECS with VPC 1부
Fargate 를 이용한 ECS with VPC 1부
 
Integrating microservices with apache camel on kubernetes
Integrating microservices with apache camel on kubernetesIntegrating microservices with apache camel on kubernetes
Integrating microservices with apache camel on kubernetes
 
Rapid scaling in_the_cloud_with_puppet
Rapid scaling in_the_cloud_with_puppetRapid scaling in_the_cloud_with_puppet
Rapid scaling in_the_cloud_with_puppet
 
Puppet for dummies - ZendCon 2011 Edition
Puppet for dummies - ZendCon 2011 EditionPuppet for dummies - ZendCon 2011 Edition
Puppet for dummies - ZendCon 2011 Edition
 
Abusing the Cloud for Fun and Profit
Abusing the Cloud for Fun and ProfitAbusing the Cloud for Fun and Profit
Abusing the Cloud for Fun and Profit
 
Nagios Conference 2011 - Nathan Vonnahme - Writing Custom Nagios Plugins In Perl
Nagios Conference 2011 - Nathan Vonnahme - Writing Custom Nagios Plugins In PerlNagios Conference 2011 - Nathan Vonnahme - Writing Custom Nagios Plugins In Perl
Nagios Conference 2011 - Nathan Vonnahme - Writing Custom Nagios Plugins In Perl
 
HTTP cache @ PUG Rome 03-29-2011
HTTP cache @ PUG Rome 03-29-2011HTTP cache @ PUG Rome 03-29-2011
HTTP cache @ PUG Rome 03-29-2011
 
WooCommerce System Status
WooCommerce System StatusWooCommerce System Status
WooCommerce System Status
 
Capistrano
CapistranoCapistrano
Capistrano
 
Puppet for dummies - PHPBenelux UG edition
Puppet for dummies - PHPBenelux UG editionPuppet for dummies - PHPBenelux UG edition
Puppet for dummies - PHPBenelux UG edition
 
Yahoo is open to developers
Yahoo is open to developersYahoo is open to developers
Yahoo is open to developers
 
Acceptance testing plone sites and add ons with robot framework and selenium
Acceptance testing plone sites and add ons with robot framework and seleniumAcceptance testing plone sites and add ons with robot framework and selenium
Acceptance testing plone sites and add ons with robot framework and selenium
 
Scaling to-5000-nodes
Scaling to-5000-nodesScaling to-5000-nodes
Scaling to-5000-nodes
 

Último

Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
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
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
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
 
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
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceanilsa9823
 
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
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
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
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️anilsa9823
 
+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
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 

Último (20)

Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
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
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
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
 
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 ...
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female 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 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
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-...
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
+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...
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 

Full-Stack Deployment with Ansible

  • 1. Full-Stack Plone Deployment with Ansible Fulvio Casali & Steve McMahon Plone Conference 2015 Budapest, Romania
  • 2. What do we mean by full stack?
  • 3. Approaches to full-stack deployment Containers
  • 4. Approaches to full-stack deployment Orchestration
  • 5. Is your unit of automation a component of the stack, or a full server? Container or Orchestration?
  • 6. Server Orchestration Tools Client-Server (Mostly)Agentless A bit simpler
  • 7. Your mileage may vary… Simplicity Wins! For our purposes
  • 9. Ansible ✤ Plays — a state specification ✤ Ideally idempotent ✤ Playbooks — Lists of plays ✤ Roles — Reusable lists of plays
  • 10. YAML: Python’s JSON - List Item One - List Item Two - Key One: Value One Key Two: Value Two - List Item Four
  • 11. Playbook Sample - name: Update host apt: upgrade=dist update_cache=yes - name: Ensure optional packages apt: pkg={{ item }} state=present with_items: additional_packages
  • 12. Templates & Variable Interpolation eggs = Plone Pillow {% if plone_additional_eggs %} {% for egg in plone_additional_eggs %} {{ egg }} {% endfor %} {% endif %}
  • 13. Roles: playbooks for use inside playbooks. Write them yourself; or check them out via Ansible Galaxy
  • 14. Using roles roles: ... - role: plone.plone_server tags: plone - role: haproxy when: install_loadbalancer tags: haproxy - role: varnish when: install_proxycache tags: varnish ...
  • 15. Plone’s Ansible Toolkit Two parts: the Plone Server Role and the Plone Playbook
  • 16. Plone Server Role ✤ Only the Zope/Plone Server ✤ In a ZEO configuration ✤ Includes process management via Supervisor ✤ And backup, packing cron jobs ✤ Available on Ansible Galaxy
  • 17. The Plone Playbook ✤ Incorporates Plone Server Role ✤ Adds: ✤ Load balancer ✤ Proxy cache ✤ Web server / rewrite engine ✤ MTA & Admin ✤ Available via github.com/plone
  • 18. Choosing your entry point ✤ Choose the Plone Server Role if you wish to pick and choose your stack components. Incorporate it in your own Playbook. ✤ Choose the Plone Playbook if you want the full stack chosen by the Installer Team.
  • 19. Plone Server Role: Major Options ✤ Canned or custom buildout ✤ With canned buildout: ✤ ZEO client count ✤ Memory profile ✤ Additional eggs
  • 21. Integration Payoff: Client Restart ✤ Playbook knows its component part and can do things like install a client restart script that: ✤ Restarts all ZEO clients ✤ Removes client from haproxy backend before restart ✤ Fetches homepage of each virtualhost after restart to load Zope object cache ✤ Adds client back to cluster after page fetch ✤ Flushes varnish cache
  • 22. Playbook: Major Options All Plone Server Role options, plus…
  • 23. Playbook Options ✤ Skip installs of haproxy, varnish, Nginx, Munin … ✤ Set up virtual hosts / SSL ✤ Tune cache ✤ Server packages, MOTD ✤ Postfix relay
  • 24. But how to customize those variables in a maintainable way? Customization Strategies All options are configured via variables
  • 25. Local Customization File ✤ Create a local-configure.yml file with variable settings ✤ Override any setting ✤ Samples provided for several typical configurations ✤ Just copy the sample to local-configure.yml and edit ✤ Pulls will never overwrite local-configure.yml
  • 27. Use this strategy if you don’t like some of the major stack component choices Alternative Strategy: Fork It You fork it, you own it…
  • 28. Testing Ready to test locally via Vagrant. vagrant up does a complete provisioning of a virtualbox using Vagrant’s Ansible provisioner.
  • 29. State of the Ansible Kit
  • 30. Every customization variable documented Solid Documentation docs.plone.org
  • 31. Server Platforms Supported Currently Ubuntu/Debian and CentOS
  • 32. Server Platforms … Future But we’d like to do more — with your help.
  • 33. ✤ Drinking young chimpanzee, CC BY Tambako The Jaguar Follow, https://www.flickr.com/photos/tambako ✤ Chimpanzee with a snack, CC BY NC SA, Dan, https://www.flickr.com/photos/dgermony/ ✤ Baboons in a row, CC BY Tambako The Jaguar Follow, https://www.flickr.com/photos/tambako ✤ Portrait of a surprised baboon, CC BY Tambako The Jaguar Follow, https://www.flickr.com/photos/tambako ✤ Chacma Baboon - Papio ursinus, CC BY NC SA, Arno Meintjes, https://www.flickr.com/photos/arnolouise/ ✤ Orangutan with baby, CC BY ND, Nathan Rupert, https://www.flickr.com/photos/nathaninsandiego/ ✤ Baby orangutan, CC BY, Daniel Kleeman, https://www.flickr.com/photos/75821270@N00/ ✤ Bornean Orangutan, CC NY ND, Josh More, https://www.flickr.com/photos/guppiecat/ ✤ Mother and baby gibbons eating, CC BY Tambako The Jaguar Follow, https://www.flickr.com/photos/tambako ✤ Portrait of a gibbon, , CC BY Tambako The Jaguar Follow, https://www.flickr.com/photos/tambako ✤ Black and white gibbon, , CC BY Tambako The Jaguar Follow, https://www.flickr.com/photos/tambako ✤ Cute squirrel monkey, CC BY Tambako The Jaguar Follow, https://www.flickr.com/photos/tambako ✤ squirrel-monkeys-at-drusillas-park-zoo-018, CC BY NC ND, Dean Thorpe, https://www.flickr.com/photos/aspexdesign/ ✤ Squirrel monkeys in the grass, CC BY Tambako The Jaguar Follow, https://www.flickr.com/photos/tambako ✤ IMG_4986 (do not feed), CC BY NC, Roland Harvey, https://www.flickr.com/photos/rolymo/ ✤ Cornered, CC BY NC, Esther Simpson, https://www.flickr.com/photos/estherase/ ✤ Howler Monkey WLD_4487, CC BY NC ND, https://www.flickr.com/photos/guppiecat/ ✤ Ooooooo, CC BY NC SA, Len Radin, https://www.flickr.com/photos/drurydrama/ ✤ Say aaahhhh!, CC BY NC ND, Abid Karamali, https://www.flickr.com/photos/abidk/ ✤ Capuchin Monkeys, Manuel Antonio, Costa Rica, CC BY NC SA, Stephen Johnson, https://www.flickr.com/photos/stephenjjohnson/ ✤ Capuchin (tongue), CC BY NC SA, Jim Webber, https://www.flickr.com/photos/wwwebber/ Talk licensed CC BY 2.0 Primate photo licenses and attributions:

Notas del editor

  1. A delivery stack for Plone adequate for production purposes, plus supporting server requirements like monitoring, log analysis and mail-transfer agent
  2. There are two major paradigms for automated deployment: containers and orchestration. Containers, for example Docker and Juju. In the container paradigm, the working units are the individual applications that make up the stack.
  3. With the orchestration paradigm, the units are full servers. A state specification is applied to a server by an orchestration engine. The same specification may build many servers. Background note: I’m not really distinguishing between orchestration and automation.
  4. The idea of disposable appliances makes full-server automation the right choice for me. Your choices may differ.
  5. The open-source server provisioning space is dominated by four tools. Chef is built on Ruby and Erlang (no kidding) and uses Ruby for its configuration language. YUCK! Puppet is built on Ruby and uses Ruby for its configuration language. YUCK! SaltStack and Ansible are built in Python and use YAML for configuration. We choose Python.
  6. The installer team chose Ansible — simply because it made more sense to the people who wanted to work on a Plone server provisioning kit.
  7. This photo doesn’t have any connection with the subject. Nor do any of the others. They’re just to keep the audience awake :)
  8. An Ansible, by the way, is a device for instantaneous communication at a distance. It was invented by the physicist Shevek in Ursula K. Le Guin’s marvelous science-fiction novel The Dispossessed. Too bad Ansible Corporation used sports metaphors for the Ansible configuration units.
  9. YAML: YAML Ain’t Markup Language YAML is used for all Ansible’s configuration specifications. YAML expresses python data structures in a text outline format Basic units: strings, numbers, dictionaries and lists
  10. This is a fragment of a playbook. It is a list of two items. Each of the items is a dictionary. Each item in this case uses Ubuntu’s “apt” package manager. The second item executes an operation on a list of items specified in a variable.
  11. Ansible playbooks may use Jinja2’s template language wherever they use strings. Ansible can also copy whole template files to the server. This is a fragment of the buildout.cfg template used in the Plone Ansible kit.
  12. Galaxy is Ansible’s PyPI
  13. The top-level playbook — the one you actually run — is mostly a list of roles to be played. This is a fragment from Plone’s Ansible Playbook.
  14. Since the components of the stack are known in the full playbook, we can use that knowledge for integration. The client restart script is a good example. It uses a lot of knowledge from the stack to manage a smooth client restart. Zero downtime to restart clients (when using more than one client).
  15. The easiest strategy: use a configuration file.
  16. Here’s an example local configuration — without the extensive commenting. This sample is aimed at a server with 2GB of RAM and a couple of cores. Sample configs go down to “very small” — targeting a half-gigabyte server.
  17. Alternatively, fork the toolkit and customize the role use.
  18. Local testing is amazingly easy. A Vagrant config file is included. Just type “vagrant up” to create your target server in a virtualbox — complete with port mappings for all the major components.
  19. Want to see the Plone Ansible Playbook on FreeBSD or other servers? So do we. Join the team. Targets should typically be the latest stable or LTS release of an OS or distribution. Remember, cloud servers are disposable; there is no reason to target an old distribution.
  20. Questions or ideas?