SlideShare a Scribd company logo
DEPLOYING PLONE ON AMAZON
AWS
Kim Nguyen / kim@sixfeetup.com
ABOUT ME
➤ Working with Plone since 2003
➤ 350+ Plone sites at University of Wisconsin Oshkosh
➤ Developer → team lead → project manager
➤ Engineering team lead @ Six Feet Up
PLONE
It's hardcore
It can scale
BASIC PLONE STACK
BASIC PLONE STACK
➤ nginx web server
➤ (optional) varnish cache
➤ 2+ ZEO clients
➤ 1 ZEO server
MANUAL DEPLOYMENT
MANUAL DEPLOYMENT
➤ Provision a virtual machine (Digital Ocean, Linode, Amazon Lightsail)
➤ Set up firewall
➤ Download and run the Plone unified installer
➤ Set up nginx web server
➤ Set up automatic Plone start scripts
➤ Set up cron jobs (zeopack, backup)
➤ Remember to log in periodically to apply system updates
➤ Hope no one hacks into the system (no monitoring)
THERE IS A BETTER WAY
THE BETTER WAY
➤ Deploy repeatably, consistently
➤ Keep server configuration under version control
➤ Make all configuration changes in one place
➤ Use automation to deploy configuration changes
➤ Avoid logging into the servers
➤ NEVER MODIFY THE SERVERS DIRECTLY
WHY USE REPEATABLE DEPLOYMENTS
➤ There is never any question about what’s running on a given server
➤ Consistency of configuration → when you make a change in one Plone server, it is
made on all Plone servers
➤ With repeatable deployments you can easily create multiple environments for:
➤ testing
➤ Quality Assurance or staging
➤ production
➤ disaster recovery
TOOLS FOR REPEATABLE
DEPLOYMENTS
TOOLS FOR REPEATABLE DEPLOYMENTS
➤ Ansible (ansible.com)
➤ Terraform (terraform.io)
➤ Saltstack (saltstack.com)
PLONE ANSIBLE PLAYBOOK
PLONE ANSIBLE PLAYBOOK
➤ Use Ansible to provision a single full-stack Plone server github.com/plone/ansible-
playbook with
➤ a Plone ZEO cluster (1 ZEO server, 2 ZEO clients)
➤ supervisor for automatic start/stop of the Plone cluster
➤ HAProxy load balancing
➤ Varnish caching
➤ Nginx as a proxy and URL rewrite engine
➤ Postfix for outgoing mail
➤ munin-node, logwatch and fail2ban for monitoring and log analysis
➤ Vagrant and VirtualBox for testing the setup
BUT THAT’S JUST ONE SERVER
DEPLOY TO THE CLOUD
➤ For this demo, we will use Amazon AWS
➤ Biggest established cloud provider
➤ Continuing adoption growth
➤ Robust, well understood
➤ Many other services available (e.g. machine learning,
containers, databases)
➤ 66 availability zones in 21 geographic regions
DEPLOY TO THE CLOUD
DEMO: TERRAFORM
➤ Demo code: github.com/tkimnguyen/aws-auto-deploy-demo
➤ Terraform will provision servers using AWS:
➤ Create virtual private cloud (VPC)
➤ Define access control lists (ACLs)
➤ Create 2 Elastic Compute Cloud (EC2) instances
➤ A salt “master”
➤ A salt “minion” (the Plone server)
DEMO: SALT
➤ Then Terraform invokes Saltstack on the minion to set up our software
➤ Saltstack reads states stored on the master to:
➤ Install Plone
➤ Install and configure supervisor
AWS PREPARATION
➤ Create an AWS account at aws.amazon.com
➤ Create an AWS user at console.aws.amazon.com/iam
➤ Set up an access key pair called plone-conf-demo-sfup by importing your ssh public
key
➤ Add aws_access_key_id and aws_secret_access_key to your ~/.aws/
credentials file
LOCAL COMPUTER PREPARATION
➤ Install Terraform from www.terraform.io/downloads.html
git clone https://github.com/tkimnguyen/aws-auto-deploy-
demo.git
cd aws-auto-deploy-demo
cd terraform
terraform init
terraform plan
DEMO STEPS
➤ Apply the Terraform plan
terraform apply
➤ Obtain IP address of Plone server
terraform state pull aws_instance |egrep ‘"name"|public_ip"'
➤ ssh into Plone server
ssh -L8080:localhost:8080 ubuntu@18.209.237.90
➤ view salt progress log
tail -f /var/log/cloud-init-output.log
OTHER AWS GOODIES
OTHER AWS GOODIES
➤ CloudFront (aws.amazon.com/cloudfront) for content delivery network (caching)
around the world
➤ Shield for DDoS mitigation, Web Application Firewall
➤ CloudWatch (aws.amazon.com/cloudwatch) for monitoring and autoscaling
➤ Elastic Load Balancing (aws.amazon.com/elasticloadbalancing) for load balancing of
HTTP and HTTPS traffic, integration with Auto Scaling, monitoring & auditing
➤ Relational Database Service (aws.amazon.com/rds) with PostgreSQL
→ use with Plone RelStorage
→ now you have replication and failover
Deploying Plone on AWS
Planning Development Orchestration Support
QUESTIONS? PLEASE ASK!
KIM@SIXFEETUP.COM

More Related Content

PPTX
Configure jasmine and karma for code coverage
PDF
Itb2018 cf apps to dev to production with command box cf-config docker
PDF
mykola marzhan - jenkins on aws spot instance
PDF
ITB2019 Scaling with CommandBox in Production! - Brad Wood
PPTX
Docker, OSS and Azure
PPTX
Controlling multiple VMs with the power of Python
PDF
Ansible 2.2
PPTX
Devops Boise - Israel Shirk - Pragmatic Migration to Infrastructure As Code
Configure jasmine and karma for code coverage
Itb2018 cf apps to dev to production with command box cf-config docker
mykola marzhan - jenkins on aws spot instance
ITB2019 Scaling with CommandBox in Production! - Brad Wood
Docker, OSS and Azure
Controlling multiple VMs with the power of Python
Ansible 2.2
Devops Boise - Israel Shirk - Pragmatic Migration to Infrastructure As Code

What's hot (20)

PDF
fmcsadmin 1.0.0
PPTX
WinOps 2017 - Docker on Windows, the Beginner's Guide
PPTX
Windows Containers and Docker: Why You Should Care
PDF
Vagrant for real (codemotion rome 2016)
PDF
Quickly extending into testing with docker
PPTX
Vagrant to-aws-flow
PDF
SV iOS Meetup Slides: YmsCoreBluetooth and Deep Core Bluetooth
PPTX
PDF
Bluetooth Over-The-Air Firmware Update
PDF
Drone your Ansible
PDF
Ansible Oxford - Cows & Containers
PPTX
"Puppet at SpaceX" - Jok Thuau of SpaceX - PuppetCamp LA '12
PDF
Automated Deployment with Capistrano
PDF
Puppet in the Pipeline
PDF
Jenkins Docker
PPTX
Ansible presentation
PDF
How to contribute Apache CloudStack
PDF
Investigation of testing with ansible
PPTX
Hadoop presentation
PDF
StackiFest16: Building a Cart
fmcsadmin 1.0.0
WinOps 2017 - Docker on Windows, the Beginner's Guide
Windows Containers and Docker: Why You Should Care
Vagrant for real (codemotion rome 2016)
Quickly extending into testing with docker
Vagrant to-aws-flow
SV iOS Meetup Slides: YmsCoreBluetooth and Deep Core Bluetooth
Bluetooth Over-The-Air Firmware Update
Drone your Ansible
Ansible Oxford - Cows & Containers
"Puppet at SpaceX" - Jok Thuau of SpaceX - PuppetCamp LA '12
Automated Deployment with Capistrano
Puppet in the Pipeline
Jenkins Docker
Ansible presentation
How to contribute Apache CloudStack
Investigation of testing with ansible
Hadoop presentation
StackiFest16: Building a Cart
Ad

Similar to Deploying Plone on AWS (20)

PPTX
Using AWS, Terraform, and Ansible to Automate Splunk at Scale
PDF
Terraforming your Infrastructure on GCP
PPTX
An intro to Docker, Terraform, and Amazon ECS
PPTX
Building services on AWS in China region
PDF
2013 PyCon SG - Building your cloud infrastructure with Python
PDF
Getting Started with DevOps on AWS [Mar 2020]
PDF
AWS DevOps - Terraform, Docker, HashiCorp Vault
PDF
Workshop Infrastructure as Code - Suestra
PPTX
Scaling Your App With Docker Swarm using Terraform, Packer on Openstack
PDF
AWS Blue_Green Deployment Using Terraform Guide.pdf
PPTX
How to deploy a smart city platform?
PPTX
re:Invent CON320 Tracing and Debugging for Containerized Services
PDF
Microservices with Terraform, Docker and the Cloud. Chicago Coders Conference...
PDF
Terraform GitOps on Codefresh
PPTX
Orchestrating Docker with Terraform and Consul by Mitchell Hashimoto
PPTX
Building Efficient, Scalable and Resilient Front-end logging service with AWS
PPTX
Building Efficient, Scalable and Resilient Front-end logging service with AWS
PPTX
Deep Dive on Amazon Elastic Container Service (ECS) I AWS Dev Day 2018
PDF
Priming Your Teams For Microservice Deployment to the Cloud
PPTX
RIMA-Infrastructure as a code with Terraform.pptx
Using AWS, Terraform, and Ansible to Automate Splunk at Scale
Terraforming your Infrastructure on GCP
An intro to Docker, Terraform, and Amazon ECS
Building services on AWS in China region
2013 PyCon SG - Building your cloud infrastructure with Python
Getting Started with DevOps on AWS [Mar 2020]
AWS DevOps - Terraform, Docker, HashiCorp Vault
Workshop Infrastructure as Code - Suestra
Scaling Your App With Docker Swarm using Terraform, Packer on Openstack
AWS Blue_Green Deployment Using Terraform Guide.pdf
How to deploy a smart city platform?
re:Invent CON320 Tracing and Debugging for Containerized Services
Microservices with Terraform, Docker and the Cloud. Chicago Coders Conference...
Terraform GitOps on Codefresh
Orchestrating Docker with Terraform and Consul by Mitchell Hashimoto
Building Efficient, Scalable and Resilient Front-end logging service with AWS
Building Efficient, Scalable and Resilient Front-end logging service with AWS
Deep Dive on Amazon Elastic Container Service (ECS) I AWS Dev Day 2018
Priming Your Teams For Microservice Deployment to the Cloud
RIMA-Infrastructure as a code with Terraform.pptx
Ad

More from T. Kim Nguyen (20)

PDF
Your Plone [Intranet] in a Box™
PDF
Permissions & Security in Plone
PDF
How to Setup a Plone Intranet in Half a Day (Python Web Conf 2020)
PDF
Melding React with the Ultra Secure Plone Content Repository
PDF
A Case Study: Measuring Productivity in Education
PDF
State of Plone 2017
PDF
Have Content Quality, Will Search Your Intranet, by Fulvio Casali
PDF
I broke what? Taking over maintenance on existing (well loved) projects, by B...
PDF
TU Dresden: A Large-Scale Plone Deployment Case Study, by Sebastian Gottfried
PDF
TUD-Chat – a moderated chat add-on for Plone, by Sebastian Schietzold
PDF
Plone as a Conference Management System, by Adriana Ramírez V. and Gildardo ...
PDF
Our Castle's Strength
PDF
Plone Futures, Plone Conference 2016 Keynote by Eric Steele
PDF
Trajectory: Integrating SQL Data into your Plone Site, Plone Conference 2016,...
PDF
Web Development with Vim by Johannes Raggam
PDF
Gold in Rio
PPTX
Top 5 secrets of distributed teams / Christina McNeill & T. Kim Nguyen
PDF
Easy online business processes with Plone forms and workflow
PDF
Plone for CMS review group at UW Oshkosh
PDF
PloneEdu.org: New Opportunities, New Frontiers
Your Plone [Intranet] in a Box™
Permissions & Security in Plone
How to Setup a Plone Intranet in Half a Day (Python Web Conf 2020)
Melding React with the Ultra Secure Plone Content Repository
A Case Study: Measuring Productivity in Education
State of Plone 2017
Have Content Quality, Will Search Your Intranet, by Fulvio Casali
I broke what? Taking over maintenance on existing (well loved) projects, by B...
TU Dresden: A Large-Scale Plone Deployment Case Study, by Sebastian Gottfried
TUD-Chat – a moderated chat add-on for Plone, by Sebastian Schietzold
Plone as a Conference Management System, by Adriana Ramírez V. and Gildardo ...
Our Castle's Strength
Plone Futures, Plone Conference 2016 Keynote by Eric Steele
Trajectory: Integrating SQL Data into your Plone Site, Plone Conference 2016,...
Web Development with Vim by Johannes Raggam
Gold in Rio
Top 5 secrets of distributed teams / Christina McNeill & T. Kim Nguyen
Easy online business processes with Plone forms and workflow
Plone for CMS review group at UW Oshkosh
PloneEdu.org: New Opportunities, New Frontiers

Recently uploaded (20)

PPTX
Introduction about ICD -10 and ICD11 on 5.8.25.pptx
PPTX
Module 1 - Cyber Law and Ethics 101.pptx
PDF
Decoding a Decade: 10 Years of Applied CTI Discipline
PPTX
Introuction about ICD -10 and ICD-11 PPT.pptx
PPTX
Introuction about WHO-FIC in ICD-10.pptx
PPTX
E -tech empowerment technologies PowerPoint
PPTX
Digital Literacy And Online Safety on internet
PDF
The Internet -By the Numbers, Sri Lanka Edition
PPT
isotopes_sddsadsaadasdasdasdasdsa1213.ppt
PDF
The New Creative Director: How AI Tools for Social Media Content Creation Are...
PDF
Cloud-Scale Log Monitoring _ Datadog.pdf
PPTX
CHE NAA, , b,mn,mblblblbljb jb jlb ,j , ,C PPT.pptx
PDF
RPKI Status Update, presented by Makito Lay at IDNOG 10
PPTX
Slides PPTX World Game (s) Eco Economic Epochs.pptx
PDF
WebRTC in SignalWire - troubleshooting media negotiation
PPTX
INTERNET------BASICS-------UPDATED PPT PRESENTATION
PDF
SASE Traffic Flow - ZTNA Connector-1.pdf
PDF
Tenda Login Guide: Access Your Router in 5 Easy Steps
DOCX
Unit-3 cyber security network security of internet system
PDF
Vigrab.top – Online Tool for Downloading and Converting Social Media Videos a...
Introduction about ICD -10 and ICD11 on 5.8.25.pptx
Module 1 - Cyber Law and Ethics 101.pptx
Decoding a Decade: 10 Years of Applied CTI Discipline
Introuction about ICD -10 and ICD-11 PPT.pptx
Introuction about WHO-FIC in ICD-10.pptx
E -tech empowerment technologies PowerPoint
Digital Literacy And Online Safety on internet
The Internet -By the Numbers, Sri Lanka Edition
isotopes_sddsadsaadasdasdasdasdsa1213.ppt
The New Creative Director: How AI Tools for Social Media Content Creation Are...
Cloud-Scale Log Monitoring _ Datadog.pdf
CHE NAA, , b,mn,mblblblbljb jb jlb ,j , ,C PPT.pptx
RPKI Status Update, presented by Makito Lay at IDNOG 10
Slides PPTX World Game (s) Eco Economic Epochs.pptx
WebRTC in SignalWire - troubleshooting media negotiation
INTERNET------BASICS-------UPDATED PPT PRESENTATION
SASE Traffic Flow - ZTNA Connector-1.pdf
Tenda Login Guide: Access Your Router in 5 Easy Steps
Unit-3 cyber security network security of internet system
Vigrab.top – Online Tool for Downloading and Converting Social Media Videos a...

Deploying Plone on AWS

  • 1. DEPLOYING PLONE ON AMAZON AWS Kim Nguyen / kim@sixfeetup.com
  • 2. ABOUT ME ➤ Working with Plone since 2003 ➤ 350+ Plone sites at University of Wisconsin Oshkosh ➤ Developer → team lead → project manager ➤ Engineering team lead @ Six Feet Up
  • 5. BASIC PLONE STACK ➤ nginx web server ➤ (optional) varnish cache ➤ 2+ ZEO clients ➤ 1 ZEO server
  • 7. MANUAL DEPLOYMENT ➤ Provision a virtual machine (Digital Ocean, Linode, Amazon Lightsail) ➤ Set up firewall ➤ Download and run the Plone unified installer ➤ Set up nginx web server ➤ Set up automatic Plone start scripts ➤ Set up cron jobs (zeopack, backup) ➤ Remember to log in periodically to apply system updates ➤ Hope no one hacks into the system (no monitoring)
  • 8. THERE IS A BETTER WAY
  • 9. THE BETTER WAY ➤ Deploy repeatably, consistently ➤ Keep server configuration under version control ➤ Make all configuration changes in one place ➤ Use automation to deploy configuration changes ➤ Avoid logging into the servers ➤ NEVER MODIFY THE SERVERS DIRECTLY
  • 10. WHY USE REPEATABLE DEPLOYMENTS ➤ There is never any question about what’s running on a given server ➤ Consistency of configuration → when you make a change in one Plone server, it is made on all Plone servers ➤ With repeatable deployments you can easily create multiple environments for: ➤ testing ➤ Quality Assurance or staging ➤ production ➤ disaster recovery
  • 12. TOOLS FOR REPEATABLE DEPLOYMENTS ➤ Ansible (ansible.com) ➤ Terraform (terraform.io) ➤ Saltstack (saltstack.com)
  • 14. PLONE ANSIBLE PLAYBOOK ➤ Use Ansible to provision a single full-stack Plone server github.com/plone/ansible- playbook with ➤ a Plone ZEO cluster (1 ZEO server, 2 ZEO clients) ➤ supervisor for automatic start/stop of the Plone cluster ➤ HAProxy load balancing ➤ Varnish caching ➤ Nginx as a proxy and URL rewrite engine ➤ Postfix for outgoing mail ➤ munin-node, logwatch and fail2ban for monitoring and log analysis ➤ Vagrant and VirtualBox for testing the setup
  • 15. BUT THAT’S JUST ONE SERVER
  • 16. DEPLOY TO THE CLOUD
  • 17. ➤ For this demo, we will use Amazon AWS ➤ Biggest established cloud provider ➤ Continuing adoption growth ➤ Robust, well understood ➤ Many other services available (e.g. machine learning, containers, databases) ➤ 66 availability zones in 21 geographic regions DEPLOY TO THE CLOUD
  • 18. DEMO: TERRAFORM ➤ Demo code: github.com/tkimnguyen/aws-auto-deploy-demo ➤ Terraform will provision servers using AWS: ➤ Create virtual private cloud (VPC) ➤ Define access control lists (ACLs) ➤ Create 2 Elastic Compute Cloud (EC2) instances ➤ A salt “master” ➤ A salt “minion” (the Plone server)
  • 19. DEMO: SALT ➤ Then Terraform invokes Saltstack on the minion to set up our software ➤ Saltstack reads states stored on the master to: ➤ Install Plone ➤ Install and configure supervisor
  • 20. AWS PREPARATION ➤ Create an AWS account at aws.amazon.com ➤ Create an AWS user at console.aws.amazon.com/iam ➤ Set up an access key pair called plone-conf-demo-sfup by importing your ssh public key ➤ Add aws_access_key_id and aws_secret_access_key to your ~/.aws/ credentials file
  • 21. LOCAL COMPUTER PREPARATION ➤ Install Terraform from www.terraform.io/downloads.html git clone https://github.com/tkimnguyen/aws-auto-deploy- demo.git cd aws-auto-deploy-demo cd terraform terraform init terraform plan
  • 22. DEMO STEPS ➤ Apply the Terraform plan terraform apply ➤ Obtain IP address of Plone server terraform state pull aws_instance |egrep ‘"name"|public_ip"' ➤ ssh into Plone server ssh -L8080:localhost:8080 ubuntu@18.209.237.90 ➤ view salt progress log tail -f /var/log/cloud-init-output.log
  • 24. OTHER AWS GOODIES ➤ CloudFront (aws.amazon.com/cloudfront) for content delivery network (caching) around the world ➤ Shield for DDoS mitigation, Web Application Firewall ➤ CloudWatch (aws.amazon.com/cloudwatch) for monitoring and autoscaling ➤ Elastic Load Balancing (aws.amazon.com/elasticloadbalancing) for load balancing of HTTP and HTTPS traffic, integration with Auto Scaling, monitoring & auditing ➤ Relational Database Service (aws.amazon.com/rds) with PostgreSQL → use with Plone RelStorage → now you have replication and failover
  • 26. Planning Development Orchestration Support QUESTIONS? PLEASE ASK! KIM@SIXFEETUP.COM