SlideShare una empresa de Scribd logo
1 de 61
Descargar para leer sin conexión
Jan Löffler, CTO Plesk
AutoScaling WordPress with
Docker & AWS
code.talks 2016
Sebastian Vettel
Who uses
WordPress?
Usain Bolt Katy Perry Snoop Dog LL Cool J
Kim Kardashian The Rolling Stones Sylvester Stallone Mötley Crüe
Beyoncé Justin Bieber Justin Timberlake Alanis Morissette
Usain Bolt Katy Perry Snoop Dog LL Cool J
Kim Kardashian Mötley Crüe
Beyoncé Alanis MorissetteJustin Bieber
TechCrunch Metro The New Yorker BBC America
MTV News The Official Star Wars Blog Sony Music Facebook Newsroom
Time.com CNN UPS Mozilla Blog
http://w3techs.com/technologies/history_overview/content_management/all/y
# WEBSITES WORLDWIDE
1.085.358.537
http://www.internetlivestats.com/total-number-of-websites/
# WEBSITES WORLDWIDE
1.085.358.692
http://www.internetlivestats.com/total-number-of-websites/
38% of E-Shops
26,6%
2,7%
2,2%
#SPEED
High Traffic Sites???
NEED
FOR
SPEED
my-wordpress-site.com
my-wordpress-site.com
MYSQL ServerLoad-Balancer
my-wordpress-site.com
MYSQL ServerLoad-Balancer
File Storage
my-wordpress-site.com
MYSQL Server
Load-Balancer
File Storage
CDN
MYSQL Server
Easy-peasy, isn’t it?
DEPLOYMENT
doubled to 30%
http://www.rightscale.com/blog/cloud-industry-insights/cloud-computing-trends-2016-state-cloud-survey
my-wordpress-site
Modern
Web-Development
2016
IMMUTABLE
INFRASTRUCTURE
IMMUTABLE STACKS
ELB myapp-v1
jans-wordpress.com
EC2
+ Docker
EC2
+ Docker
EC2
+ Docker
100%
IMMUTABLE STACKS
ELB myapp-v1
EC2
+ Docker
EC2
+ Docker
EC2
+ Docker
ELB myapp-v2
EC2
+ Docker
EC2
+ Docker
jans-wordpress.com
90% 10%
IMMUTABLE STACKS
ELB myapp-v1
EC2
+ Docker
EC2
+ Docker
EC2
+ Docker
ELB myapp-v2
EC2
+ Docker
EC2
+ Docker
jans-wordpress.com
0% 100%
APP INSTANCE
VM (EC2)
Basis Image (AMI)
Docker Container
Application
✓ VPC
✓ Security
Groups
✓ AutoScaling
✓ CloudWatch
✓ CloudFront
✓ Route53
✓ Docker Runtime
✓ Logging
✓ Monitoring
✓ Security config
✓ Debian
✓ Nginx
✓ php7-fpm
✓ NewRelic
AWS
API
Docker Registry
docker pull
docker push
AMI
THE WISH
THE REALITY
$ accept-vpc-peering-connection$
$ allocate-address$
$ allocate-hosts$
$ assign-private-ip-addresses$
$ associate-address$
$ associate-dhcp-options$
$ associate-route-table$
$ attach-classic-link-vpc$
$ attach-internet-gateway$
$ attach-network-interface$
$ attach-volume$
$ attach-vpn-gateway$
$ authorize-security-group-egress$
$ authorize-security-group-ingress$
$ bundle-instance$
$ cancel-bundle-task$
$ cancel-conversion-task$
$ cancel-export-task$
$ cancel-import-task$
$ cancel-reserved-instances-listing$
$ cancel-spot-fleet-requests$
$ cancel-spot-instance-requests$
$ confirm-product-instance$
$ copy-image$
$ copy-snapshot$
$ create-customer-gateway$
$ create-dhcp-options$
$ create-flow-logs$
$ create-image$
$ create-instance-export-task$
$ create-internet-gateway$
$ create-key-pair$
$ create-nat-gateway$
$ create-network-acl$
$ create-network-acl-entry$
$ create-network-interface
$ create-reserved-instances-listing$
$ create-route$
$ create-route-table$
$ create-security-group$
$ create-snapshot$
$ create-spot-datafeed-subscription$
$ create-subnet$
$ create-tags$
$ create-volume$
$ create-vpc$
$ create-vpc-endpoint$
$ create-vpc-peering-connection$
$ create-vpn-connection$
$ create-vpn-connection-route$
$ create-vpn-gateway$
$ delete-customer-gateway$
$ delete-dhcp-options$
$ delete-flow-logs$
$ delete-internet-gateway$
$ delete-key-pair$
$ delete-nat-gateway$
$ delete-network-acl$
$ delete-network-acl-entry$
$ delete-network-interface$
$ delete-placement-group$
$ delete-route$
$ delete-route-table$
$ delete-security-group$
$ delete-snapshot$
$ delete-spot-datafeed-subscription$
$ delete-subnet$
$ delete-tags$
$ delete-volume$
$ delete-vpc$
$ delete-vpc-endpoints$
$ delete-vpc-peering-connection$
$ delete-vpn-connection$
$ delete-vpn-connection-route$
$ delete-vpn-gateway$
$ deregister-image$
$ describe-account-attributes$
$ describe-addresses$
$ describe-availability-zones$
$ describe-bundle-tasks$
$ describe-classic-link-instances$
$ describe-conversion-tasks$
$ describe-customer-gateways$
$ describe-dhcp-options$
$ describe-export-tasks$
$ describe-flow-logs$
$ describe-host-reservation-offerings$
$ describe-host-reservations$
$ describe-hosts$
$ describe-id-format$
$ describe-identity-id-format$
$ describe-image-attribute$
$ describe-images$
$ describe-import-image-tasks$
$ describe-import-snapshot-tasks$
$ describe-instance-attribute$
$ describe-instance-status$
$ describe-instances$
$ describe-internet-gateways$
$ describe-key-pairs$
$ describe-moving-addresses$
$ describe-nat-gateways$
$ describe-network-acls$
$ describe-network-interface-attribute$
$ describe-network-interfaces$
$ describe-placement-groups$
$ describe-prefix-lists$
$ describe-regions$
$ describe-reserved-
$ describe-reserved-
$ describe-reserved-
modifications$
$ describe-reserved-
$ describe-route-tab
$ describe-scheduled
$ describe-scheduled
$ describe-security-
$ describe-security-
$ describe-snapshot-
$ describe-snapshots
$ describe-spot-data
$ describe-spot-flee
$ describe-spot-flee
$ describe-spot-flee
$ describe-spot-inst
$ describe-spot-pric
$ describe-stale-sec
$ describe-subnets$
$ describe-tags$
$ describe-volume-at
$ describe-volume-st
$ describe-volumes$
$ describe-vpc-attri
$ describe-vpc-class
$ describe-vpc-class
$ describe-vpc-endpo
$ describe-vpc-endpo
$ describe-vpc-peeri
$ describe-vpcs$
$ describe-vpn-conne
$ describe-vpn-gatew
$ detach-classic-lin
$ detach-internet-ga
$ detach-network-int
$ detach-volume$
210 calls for EC2 only
$ accept-vpc-peering-connection$
$ allocate-address$
$ allocate-hosts$
$ assign-private-ip-addresses$
$ associate-address$
$ associate-dhcp-options$
$ associate-route-table$
$ attach-classic-link-vpc$
$ attach-internet-gateway$
$ attach-network-interface$
$ attach-volume$
$ attach-vpn-gateway$
$ authorize-security-group-egress$
$ authorize-security-group-ingress$
$ bundle-instance$
$ cancel-bundle-task$
$ cancel-conversion-task$
$ cancel-export-task$
$ cancel-import-task$
$ cancel-reserved-instances-listing$
$ cancel-spot-fleet-requests$
$ cancel-spot-instance-requests$
$ confirm-product-instance$
$ copy-image$
$ copy-snapshot$
$ create-customer-gateway$
$ create-dhcp-options$
$ create-flow-logs$
$ create-image$
$ create-instance-export-task$
$ create-internet-gateway$
$ create-key-pair$
$ create-nat-gateway$
$ create-network-acl$
$ create-network-acl-entry$
$ create-network-interface
$ create-reserved-instances-listing$
$ create-route$
$ create-route-table$
$ create-security-group$
$ create-snapshot$
$ create-spot-datafeed-subscription$
$ create-subnet$
$ create-tags$
$ create-volume$
$ create-vpc$
$ create-vpc-endpoint$
$ create-vpc-peering-connection$
$ create-vpn-connection$
$ create-vpn-connection-route$
$ create-vpn-gateway$
$ delete-customer-gateway$
$ delete-dhcp-options$
$ delete-flow-logs$
$ delete-internet-gateway$
$ delete-key-pair$
$ delete-nat-gateway$
$ delete-network-acl$
$ delete-network-acl-entry$
$ delete-network-interface$
$ delete-placement-group$
$ delete-route$
$ delete-route-table$
$ delete-security-group$
$ delete-snapshot$
$ delete-spot-datafeed-subscription$
$ delete-subnet$
$ delete-tags$
$ delete-volume$
$ delete-vpc$
$ delete-vpc-endpoints$
$ delete-vpc-peering-connection$
$ delete-vpn-connection$
$ delete-vpn-connection-route$
$ delete-vpn-gateway$
$ deregister-image$
$ describe-account-attributes$
$ describe-addresses$
$ describe-availability-zones$
$ describe-bundle-tasks$
$ describe-classic-link-instances$
$ describe-conversion-tasks$
$ describe-customer-gateways$
$ describe-dhcp-options$
$ describe-export-tasks$
$ describe-flow-logs$
$ describe-host-reservation-offerings$
$ describe-host-reservations$
$ describe-hosts$
$ describe-id-format$
$ describe-identity-id-format$
$ describe-image-attribute$
$ describe-images$
$ describe-import-image-tasks$
$ describe-import-snapshot-tasks$
$ describe-instance-attribute$
$ describe-instance-status$
$ describe-instances$
$ describe-internet-gateways$
$ describe-key-pairs$
$ describe-moving-addresses$
$ describe-nat-gateways$
$ describe-network-acls$
$ describe-network-interface-attribute$
$ describe-network-interfaces$
$ describe-placement-groups$
$ describe-prefix-lists$
$ describe-regions$
$ describe-reserved-
$ describe-reserved-
$ describe-reserved-
modifications$
$ describe-reserved-
$ describe-route-tab
$ describe-scheduled
$ describe-scheduled
$ describe-security-
$ describe-security-
$ describe-snapshot-
$ describe-snapshots
$ describe-spot-data
$ describe-spot-flee
$ describe-spot-flee
$ describe-spot-flee
$ describe-spot-inst
$ describe-spot-pric
$ describe-stale-sec
$ describe-subnets$
$ describe-tags$
$ describe-volume-at
$ describe-volume-st
$ describe-volumes$
$ describe-vpc-attri
$ describe-vpc-class
$ describe-vpc-class
$ describe-vpc-endpo
$ describe-vpc-endpo
$ describe-vpc-peeri
$ describe-vpcs$
$ describe-vpn-conne
$ describe-vpn-gatew
$ detach-classic-lin
$ detach-internet-ga
$ detach-network-int
$ detach-volume$
210 calls for EC2 only
S3
ELB
RDS
CloudFrontCloudWatch
AutoScaling
Route53
Events
IAM
S3api
SNS
PLESK WORDPRESS AWS SCALER
https://github.com/plesk/wordpress-aws-scaler
AWS
manage-
wordpress.sh
Docker Registry
docker pull
docker push
AMI
PLESK WORDPRESS AWS SCALER
manage-wordpress.sh create
Too quick? How does it work internally?
Install AWS CLI (https://docs.aws.amazon.com/cli/latest/userguide/installing.html)
$ sudo pip install awscli
$ aws configure
$ aws --version
Clone WordPress AWS Scaler git repo (https://github.com/plesk/wordpress-aws-scaler)
$ git clone https://github.com/plesk/wordpress-aws-scaler.git
$ cd wordpress-aws-scaler
Build Docker Image and Upload to Docker Hub (https://hub.docker.com/explore/)
$ docker build -t janloeffler/wordpress-aws-scaler:latest .
$ docker push janloeffler/wordpress-aws-scaler:latest
List existing AWS resources
List existing AWS Resources
$ aws ec2 describe-vps
$ aws ec2 describe-security-groups
$ aws ec2 describe-instances
$ aws rds describe-db-instances
[...]
Do this for all AWS components
$ aws autoscaling
$ aws ec2
$ aws cloudfront
$ aws cloudwatch
$ aws elb
$ aws rds
$ aws s3
$ aws route53
$ aws events
Create new resources
Create new AWS Resources
$ aws ec2 create-vpc
$ aws ec2 create-security-group
[...]
Do this for all AWS components
$ aws autoscaling
$ aws ec2
$ aws cloudfront
$ aws cloudwatch
$ aws elb
$ aws rds
$ aws s3
$ aws route53
$ aws events
Create new Launch Configuration
Generate EC2-User-Data Script to run directly after booting EC2 VM
$ cat >ec2-user-data.sh <<EOL
#!/bin/bash
docker pull janloeffler/wordpress-aws-scaler:latest
docker run -d -p 80:80 -p 443:443 -e WORDPRESS_DB_HOST='${DB}' -e
WORDPRESS_DB_USER='${DB_USERNAME}' -e WORDPRESS_DB_PASSWORD='${DB_PASSWORD}' -e
WORDPRESS_DB_NAME='${DB_NAME}' -e WORDPRESS_DB_PREFIX='${WORDPRESS_DB_PREFIX}' -e
WORDPRESS_URL='http://${ELB}' -e WORDPRESS_TITLE='${WORDPRESS_TITLE}' -e
WORDPRESS_USER_EMAIL='${WORDPRESS_USER_EMAIL}' -e NEWRELIC_KEY='${NEWRELIC_KEY}' -e
NEWRELIC_NAME='${NEWRELIC_NAME}' -e S3_KEY='${IAM_USER_KEY}' -e
S3_SECRET='${IAM_USER_SECRET}' -e S3_BUCKET='${S3_BUCKET_NAME}' -e
S3_BUCKET_URL='${S3_URL}' -it janloeffler/wordpress-aws-scaler:latest
EOL
Create new Launch Configuration for AutoScaling
$ aws autoscaling create-launch-configuration --launch-configuration-name $LC_NAME --
image-id $AMI --instance-type $INSTANCE_TYPE --key-name $KEYNAME --security-groups
$SEC_GROUP_ID --user-data file://ec2-user-data.sh
You must love JSON !!! ;-)
{
"Reservations": [
{
"OwnerId": "699328319947",
"ReservationId": "r-041ac13209e0d4eef",
"Groups": [],
"RequesterId": "226008221399",
"Instances": [
{
"Monitoring": {
"State": "enabled"
},
"PublicDnsName": "ec2-52-210-200-157.eu-west-1.compute.amazonaws.com",
"State": {
"Code": 16,
"Name": "running"
},
"EbsOptimized": false,
"LaunchTime": "2016-09-05T12:19:54.000Z",
"PublicIpAddress": "52.210.200.157",
"PrivateIpAddress": "172.31.25.83",
"ProductCodes": [
{
"ProductCodeId": "4jvb72q6a56js2x7jzd24jar5",
"ProductCodeType": "marketplace"
}
],
"VpcId": "vpc-fffbe19a",
"StateTransitionReason": "",
"InstanceId": "i-0ea3384a24a3c6aba",
"ImageId": "ami-64385917",
"PrivateDnsName": "ip-172-31-25-83.eu-west-1.compute.internal",
"KeyName": "Marko Heijnen",
"SecurityGroups": [
{
"GroupName": "WordPress-Docker-Test",
"GroupId": "sg-1b8dde7c"
}
],
"ClientToken": "70aa81e1-10a3-4b83-acc7-62702015d06e_subnet-cff90cb9_1",
"SubnetId": "subnet-cff90cb9",
"InstanceType": "m3.medium",
"NetworkInterfaces": [
{
"Status": "in-use",
"MacAddress": "06:c0:22:65:b4:ed",
"SourceDestCheck": true,
"VpcId": "vpc-fffbe19a",
"Description": "",
"Association": {
"PublicIp": "52.210.200.157",
"PublicDnsName": "ec2-52-210-200-157.eu-west-1.compute.amazonaws.com",
"IpOwnerId": "amazon"
},
"NetworkInterfaceId": "eni-2f4efa63",
"PrivateIpAddresses": [
{
"PrivateDnsName": "ip-172-31-25-83.eu-west-1.compute.internal",
"Association": {
"PublicIp": "52.210.200.157",
"PublicDnsName": "ec2-52-210-200-157.eu-west-1.compute.amazonaws.com",
"IpOwnerId": "amazon"
},
"Primary": true,
"PrivateIpAddress": "172.31.25.83"
}
],
"PrivateDnsName": "ip-172-31-25-83.eu-west-1.compute.internal",
"Attachment": {
"Status": "attached",
"DeviceIndex": 0,
"DeleteOnTermination": true,
"AttachmentId": "eni-attach-7f9031a0",
"AttachTime": "2016-09-05T12:19:54.000Z"
},
[…]
WP CUP – RACE DAY 1
single-server
avg 3.86 sec for 947 hits
auto-scaling
avg 1.45 sec for 9.866 hits
Fastest Lap 216 ms
180 RPS < 3sec
Fastest Lap 99 ms
1.000 RPS < sec
No Caching!!!
Plesk Mission
“We simplify the lives of web
professionals.”
Docker
WordPress CDN
ELB &
AutoScaling
DB
Route53
code.talks 2016, Hamburg
“High traffic sites with WordPress,
Docker & AWS”
How to auto-scale WordPress on AWS
and make it fly!
Passion for
Web Development
Jan Löffler
CTO Plesk
● @jlsoft2
● jan@plesk.com
Marko Heijnen
WordPress Contributor
● @markoheijnen
● mheijnen@plesk.com
https://github.com/plesk/wordpress-aws-scaler
https://www.slideshare.net/plesk
“When you walk through your website architecture and you wonder
who could be so stupid to test it with 10.000 parallel requests per
second. But if you want to be successful and play in the first league, it
is important to think about it before your traffic increases”
Jan Löffler @jlsoft2
https://github.com/plesk/wordpress-aws-scaler
BACKUP
Web Development Key Tools – what web developers need and use
59
26,6% of all websites
worldwide
2,7% 2,2%
(high traffic sites)
70% of developers use git as primary
source management solution
Increasing usage by web agencies
38% of all online stores worldwide
runs on top of WordPress as plugin
developed by automattic
used by 30% of IT companies
increased from 13% to 30% in 12 months
further 35% plan introduction
Sources: w3techs.com, Rightscale, StackOverflow Survey 2015, 2016, Netcraft
311% growth
17.2% usage
26.8% growth
17.9% usage
14.9% growth
16% of all webservers
22% of all active sites
continuously growing,
while Apache is shrinking
WordPress Management
Free SSL everywhere
http2 50+ extensions
CLI
Automatic Updates
Site Migration
Free support
30+ languages
nginx
Server Security DNS
✔
Plesk Onyx: Continuous Delivery Deployment Pipeline (sample)
61
Jenkins runs as Docker
container managed by
Plesk
Plesk Multi Server
Extension installs
three environments
Apps managed
by Plesk via Docker

Más contenido relacionado

La actualidad más candente

Site Performance - From Pinto to Ferrari
Site Performance - From Pinto to FerrariSite Performance - From Pinto to Ferrari
Site Performance - From Pinto to Ferrari
Joseph Scott
 
Socket applications
Socket applicationsSocket applications
Socket applications
João Moura
 

La actualidad más candente (6)

Atmosphere Conference 2015: Taming the Modern Datacenter
Atmosphere Conference 2015: Taming the Modern DatacenterAtmosphere Conference 2015: Taming the Modern Datacenter
Atmosphere Conference 2015: Taming the Modern Datacenter
 
Przemysław Iwanek - ABC AWS, budowanie infrastruktury przy pomocy Terraform
Przemysław Iwanek - ABC AWS, budowanie infrastruktury przy pomocy TerraformPrzemysław Iwanek - ABC AWS, budowanie infrastruktury przy pomocy Terraform
Przemysław Iwanek - ABC AWS, budowanie infrastruktury przy pomocy Terraform
 
BDD - Buzzword Driven Development - Build the next cool app for fun and for.....
BDD - Buzzword Driven Development - Build the next cool app for fun and for.....BDD - Buzzword Driven Development - Build the next cool app for fun and for.....
BDD - Buzzword Driven Development - Build the next cool app for fun and for.....
 
Site Performance - From Pinto to Ferrari
Site Performance - From Pinto to FerrariSite Performance - From Pinto to Ferrari
Site Performance - From Pinto to Ferrari
 
AWSをテラフォーミングする会(Terraformハンズオン)
AWSをテラフォーミングする会(Terraformハンズオン)AWSをテラフォーミングする会(Terraformハンズオン)
AWSをテラフォーミングする会(Terraformハンズオン)
 
Socket applications
Socket applicationsSocket applications
Socket applications
 

Similar a code.talks 2016 Hamburg - Plesk - AutoScaling WordPress with Docker & AWS - by Jan Löffler

CloudCon Data Mining Presentation
CloudCon Data Mining PresentationCloudCon Data Mining Presentation
CloudCon Data Mining Presentation
Brian Johnson
 

Similar a code.talks 2016 Hamburg - Plesk - AutoScaling WordPress with Docker & AWS - by Jan Löffler (20)

Container Days 2017 Hamburg - Plesk - How Docker helps tune Websites into Ra...
 Container Days 2017 Hamburg - Plesk - How Docker helps tune Websites into Ra... Container Days 2017 Hamburg - Plesk - How Docker helps tune Websites into Ra...
Container Days 2017 Hamburg - Plesk - How Docker helps tune Websites into Ra...
 
(GAM304) How Riot Games re:Invented Their AWS Model | AWS re:Invent 2014
(GAM304) How Riot Games re:Invented Their AWS Model | AWS re:Invent 2014(GAM304) How Riot Games re:Invented Their AWS Model | AWS re:Invent 2014
(GAM304) How Riot Games re:Invented Their AWS Model | AWS re:Invent 2014
 
From One to Many: Diving Deeper into Evolving VPC Design (ARC310-R2) - AWS re...
From One to Many: Diving Deeper into Evolving VPC Design (ARC310-R2) - AWS re...From One to Many: Diving Deeper into Evolving VPC Design (ARC310-R2) - AWS re...
From One to Many: Diving Deeper into Evolving VPC Design (ARC310-R2) - AWS re...
 
AWS における サーバーレスの基礎からチューニングまで
AWS における サーバーレスの基礎からチューニングまでAWS における サーバーレスの基礎からチューニングまで
AWS における サーバーレスの基礎からチューニングまで
 
[funka] Adaptive Images in Responsive Web Design
[funka] Adaptive Images in Responsive Web Design[funka] Adaptive Images in Responsive Web Design
[funka] Adaptive Images in Responsive Web Design
 
OSDC 2017 | Modern Secrets Management with Vault by Seth Vargo
OSDC 2017 | Modern Secrets Management with Vault by Seth VargoOSDC 2017 | Modern Secrets Management with Vault by Seth Vargo
OSDC 2017 | Modern Secrets Management with Vault by Seth Vargo
 
OSDC 2017 - Seth Vargo - Taming the modern data center
OSDC 2017 - Seth Vargo - Taming the modern data centerOSDC 2017 - Seth Vargo - Taming the modern data center
OSDC 2017 - Seth Vargo - Taming the modern data center
 
OSDC 2017 | Taming the Modern Data Center by Seth Vargo
OSDC 2017 | Taming the Modern Data Center by Seth VargoOSDC 2017 | Taming the Modern Data Center by Seth Vargo
OSDC 2017 | Taming the Modern Data Center by Seth Vargo
 
Securing Your BBC Identity
Securing Your BBC IdentitySecuring Your BBC Identity
Securing Your BBC Identity
 
8 Lessons Learned from Using Kafka in 1500 microservices - confluent streamin...
8 Lessons Learned from Using Kafka in 1500 microservices - confluent streamin...8 Lessons Learned from Using Kafka in 1500 microservices - confluent streamin...
8 Lessons Learned from Using Kafka in 1500 microservices - confluent streamin...
 
SDPHP - Percona Toolkit (It's Basically Magic)
SDPHP - Percona Toolkit (It's Basically Magic)SDPHP - Percona Toolkit (It's Basically Magic)
SDPHP - Percona Toolkit (It's Basically Magic)
 
CloudKit
CloudKitCloudKit
CloudKit
 
Push the web with HTML5
Push the web with HTML5Push the web with HTML5
Push the web with HTML5
 
Kubernates를 위한 Chaos Engineering in Action :: 윤석찬 (AWS 테크에반젤리스트)
Kubernates를 위한 Chaos Engineering in Action :: 윤석찬 (AWS 테크에반젤리스트) Kubernates를 위한 Chaos Engineering in Action :: 윤석찬 (AWS 테크에반젤리스트)
Kubernates를 위한 Chaos Engineering in Action :: 윤석찬 (AWS 테크에반젤리스트)
 
The Enterprise Wor/d/thy/Press
The Enterprise Wor/d/thy/PressThe Enterprise Wor/d/thy/Press
The Enterprise Wor/d/thy/Press
 
Continuous Integration and Deployment Best Practices on AWS
Continuous Integration and Deployment Best Practices on AWSContinuous Integration and Deployment Best Practices on AWS
Continuous Integration and Deployment Best Practices on AWS
 
Utbildningsradion 2011
Utbildningsradion 2011Utbildningsradion 2011
Utbildningsradion 2011
 
Load testing with Blitz
Load testing with BlitzLoad testing with Blitz
Load testing with Blitz
 
CloudCon Data Mining Presentation
CloudCon Data Mining PresentationCloudCon Data Mining Presentation
CloudCon Data Mining Presentation
 
High-Quality JavaScript
High-Quality JavaScriptHigh-Quality JavaScript
High-Quality JavaScript
 

Más de Plesk

Plesk Onyx - New Release - all details
Plesk Onyx - New Release - all detailsPlesk Onyx - New Release - all details
Plesk Onyx - New Release - all details
Plesk
 

Más de Plesk (16)

Sitejet @CloudFest 2022
Sitejet @CloudFest  2022Sitejet @CloudFest  2022
Sitejet @CloudFest 2022
 
cPanel SEO – Being online is not enough @CloudFest 2022
cPanel SEO – Being online is not enough @CloudFest 2022 cPanel SEO – Being online is not enough @CloudFest 2022
cPanel SEO – Being online is not enough @CloudFest 2022
 
How our partners provide better support thanks to 360 Monitoring @Cloudfest 2...
How our partners provide better support thanks to 360 Monitoring @Cloudfest 2...How our partners provide better support thanks to 360 Monitoring @Cloudfest 2...
How our partners provide better support thanks to 360 Monitoring @Cloudfest 2...
 
The Journey of monitoring a WordPress Fleet @Cloudfest 2022
The Journey of monitoring a WordPress Fleet @Cloudfest 2022The Journey of monitoring a WordPress Fleet @Cloudfest 2022
The Journey of monitoring a WordPress Fleet @Cloudfest 2022
 
Boost Your Server - the Plesk Roadmap 2022 @Cloudfest 2022
Boost Your Server - the Plesk Roadmap 2022 @Cloudfest 2022Boost Your Server - the Plesk Roadmap 2022 @Cloudfest 2022
Boost Your Server - the Plesk Roadmap 2022 @Cloudfest 2022
 
Plesk WP Toolkit - Growing Together @Cloudfest 2022
Plesk WP Toolkit - Growing Together @Cloudfest 2022Plesk WP Toolkit - Growing Together @Cloudfest 2022
Plesk WP Toolkit - Growing Together @Cloudfest 2022
 
WebPros at CloudFest 2022 - Walk the New Revenue Avenues of Server Management
WebPros at CloudFest 2022 - Walk the New Revenue Avenues of Server ManagementWebPros at CloudFest 2022 - Walk the New Revenue Avenues of Server Management
WebPros at CloudFest 2022 - Walk the New Revenue Avenues of Server Management
 
A Platform for Builders - How to win Web Developers?
 A Platform for Builders - How to win Web Developers? A Platform for Builders - How to win Web Developers?
A Platform for Builders - How to win Web Developers?
 
World Cloud Summit 2017: How can service providers offer a ready to code and ...
World Cloud Summit 2017: How can service providers offer a ready to code and ...World Cloud Summit 2017: How can service providers offer a ready to code and ...
World Cloud Summit 2017: How can service providers offer a ready to code and ...
 
Webinar: Sell Solutions, Not Infrastructure!
Webinar: Sell Solutions, Not Infrastructure!Webinar: Sell Solutions, Not Infrastructure!
Webinar: Sell Solutions, Not Infrastructure!
 
Hosting Industry Insights in Numbers by Diarmuid Daltún, CSO Plesk
Hosting Industry Insights in Numbers by Diarmuid Daltún, CSO PleskHosting Industry Insights in Numbers by Diarmuid Daltún, CSO Plesk
Hosting Industry Insights in Numbers by Diarmuid Daltún, CSO Plesk
 
Winning the game with WordPress hosting solutions powered by Plesk Onyx
Winning the game with WordPress hosting solutions powered by Plesk OnyxWinning the game with WordPress hosting solutions powered by Plesk Onyx
Winning the game with WordPress hosting solutions powered by Plesk Onyx
 
Plesk Onyx - New Release - all details
Plesk Onyx - New Release - all detailsPlesk Onyx - New Release - all details
Plesk Onyx - New Release - all details
 
6 killer KPIs to regrow your lazy cloud business
6 killer KPIs to regrow your lazy cloud business6 killer KPIs to regrow your lazy cloud business
6 killer KPIs to regrow your lazy cloud business
 
Container Days Conference Plesk 2016 - How AWS, Docker and Microservices infl...
Container Days Conference Plesk 2016 - How AWS, Docker and Microservices infl...Container Days Conference Plesk 2016 - How AWS, Docker and Microservices infl...
Container Days Conference Plesk 2016 - How AWS, Docker and Microservices infl...
 
whd.usa Plesk 2016 - More than just a control panel - reveal the power of Web...
whd.usa Plesk 2016 - More than just a control panel - reveal the power of Web...whd.usa Plesk 2016 - More than just a control panel - reveal the power of Web...
whd.usa Plesk 2016 - More than just a control panel - reveal the power of Web...
 

Último

哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
ydyuyu
 
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdfpdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
JOHNBEBONYAP1
 
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girlsRussian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Monica Sydney
 
PowerDirector Explination Process...pptx
PowerDirector Explination Process...pptxPowerDirector Explination Process...pptx
PowerDirector Explination Process...pptx
galaxypingy
 
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样
ayvbos
 
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
ydyuyu
 
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
ayvbos
 
Indian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
Indian Escort in Abu DHabi 0508644382 Abu Dhabi EscortsIndian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
Indian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
Monica Sydney
 

Último (20)

20240508 QFM014 Elixir Reading List April 2024.pdf
20240508 QFM014 Elixir Reading List April 2024.pdf20240508 QFM014 Elixir Reading List April 2024.pdf
20240508 QFM014 Elixir Reading List April 2024.pdf
 
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
 
20240509 QFM015 Engineering Leadership Reading List April 2024.pdf
20240509 QFM015 Engineering Leadership Reading List April 2024.pdf20240509 QFM015 Engineering Leadership Reading List April 2024.pdf
20240509 QFM015 Engineering Leadership Reading List April 2024.pdf
 
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdfpdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
 
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
 
Meaning of On page SEO & its process in detail.
Meaning of On page SEO & its process in detail.Meaning of On page SEO & its process in detail.
Meaning of On page SEO & its process in detail.
 
"Boost Your Digital Presence: Partner with a Leading SEO Agency"
"Boost Your Digital Presence: Partner with a Leading SEO Agency""Boost Your Digital Presence: Partner with a Leading SEO Agency"
"Boost Your Digital Presence: Partner with a Leading SEO Agency"
 
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
 
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girlsRussian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
 
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
 
PowerDirector Explination Process...pptx
PowerDirector Explination Process...pptxPowerDirector Explination Process...pptx
PowerDirector Explination Process...pptx
 
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样
 
Vip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac Room
Vip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac RoomVip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac Room
Vip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac Room
 
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
 
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
 
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
 
Power point inglese - educazione civica di Nuria Iuzzolino
Power point inglese - educazione civica di Nuria IuzzolinoPower point inglese - educazione civica di Nuria Iuzzolino
Power point inglese - educazione civica di Nuria Iuzzolino
 
Indian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
Indian Escort in Abu DHabi 0508644382 Abu Dhabi EscortsIndian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
Indian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
 
APNIC Updates presented by Paul Wilson at ARIN 53
APNIC Updates presented by Paul Wilson at ARIN 53APNIC Updates presented by Paul Wilson at ARIN 53
APNIC Updates presented by Paul Wilson at ARIN 53
 
best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...
best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...
best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...
 

code.talks 2016 Hamburg - Plesk - AutoScaling WordPress with Docker & AWS - by Jan Löffler

  • 1. Jan Löffler, CTO Plesk AutoScaling WordPress with Docker & AWS code.talks 2016
  • 3.
  • 4.
  • 6. Usain Bolt Katy Perry Snoop Dog LL Cool J Kim Kardashian The Rolling Stones Sylvester Stallone Mötley Crüe Beyoncé Justin Bieber Justin Timberlake Alanis Morissette
  • 7. Usain Bolt Katy Perry Snoop Dog LL Cool J Kim Kardashian Mötley Crüe Beyoncé Alanis MorissetteJustin Bieber
  • 8. TechCrunch Metro The New Yorker BBC America MTV News The Official Star Wars Blog Sony Music Facebook Newsroom Time.com CNN UPS Mozilla Blog
  • 17.
  • 24.
  • 29.
  • 30.
  • 31. IMMUTABLE STACKS ELB myapp-v1 jans-wordpress.com EC2 + Docker EC2 + Docker EC2 + Docker 100%
  • 32. IMMUTABLE STACKS ELB myapp-v1 EC2 + Docker EC2 + Docker EC2 + Docker ELB myapp-v2 EC2 + Docker EC2 + Docker jans-wordpress.com 90% 10%
  • 33. IMMUTABLE STACKS ELB myapp-v1 EC2 + Docker EC2 + Docker EC2 + Docker ELB myapp-v2 EC2 + Docker EC2 + Docker jans-wordpress.com 0% 100%
  • 34. APP INSTANCE VM (EC2) Basis Image (AMI) Docker Container Application ✓ VPC ✓ Security Groups ✓ AutoScaling ✓ CloudWatch ✓ CloudFront ✓ Route53 ✓ Docker Runtime ✓ Logging ✓ Monitoring ✓ Security config ✓ Debian ✓ Nginx ✓ php7-fpm ✓ NewRelic
  • 37. $ accept-vpc-peering-connection$ $ allocate-address$ $ allocate-hosts$ $ assign-private-ip-addresses$ $ associate-address$ $ associate-dhcp-options$ $ associate-route-table$ $ attach-classic-link-vpc$ $ attach-internet-gateway$ $ attach-network-interface$ $ attach-volume$ $ attach-vpn-gateway$ $ authorize-security-group-egress$ $ authorize-security-group-ingress$ $ bundle-instance$ $ cancel-bundle-task$ $ cancel-conversion-task$ $ cancel-export-task$ $ cancel-import-task$ $ cancel-reserved-instances-listing$ $ cancel-spot-fleet-requests$ $ cancel-spot-instance-requests$ $ confirm-product-instance$ $ copy-image$ $ copy-snapshot$ $ create-customer-gateway$ $ create-dhcp-options$ $ create-flow-logs$ $ create-image$ $ create-instance-export-task$ $ create-internet-gateway$ $ create-key-pair$ $ create-nat-gateway$ $ create-network-acl$ $ create-network-acl-entry$ $ create-network-interface $ create-reserved-instances-listing$ $ create-route$ $ create-route-table$ $ create-security-group$ $ create-snapshot$ $ create-spot-datafeed-subscription$ $ create-subnet$ $ create-tags$ $ create-volume$ $ create-vpc$ $ create-vpc-endpoint$ $ create-vpc-peering-connection$ $ create-vpn-connection$ $ create-vpn-connection-route$ $ create-vpn-gateway$ $ delete-customer-gateway$ $ delete-dhcp-options$ $ delete-flow-logs$ $ delete-internet-gateway$ $ delete-key-pair$ $ delete-nat-gateway$ $ delete-network-acl$ $ delete-network-acl-entry$ $ delete-network-interface$ $ delete-placement-group$ $ delete-route$ $ delete-route-table$ $ delete-security-group$ $ delete-snapshot$ $ delete-spot-datafeed-subscription$ $ delete-subnet$ $ delete-tags$ $ delete-volume$ $ delete-vpc$ $ delete-vpc-endpoints$ $ delete-vpc-peering-connection$ $ delete-vpn-connection$ $ delete-vpn-connection-route$ $ delete-vpn-gateway$ $ deregister-image$ $ describe-account-attributes$ $ describe-addresses$ $ describe-availability-zones$ $ describe-bundle-tasks$ $ describe-classic-link-instances$ $ describe-conversion-tasks$ $ describe-customer-gateways$ $ describe-dhcp-options$ $ describe-export-tasks$ $ describe-flow-logs$ $ describe-host-reservation-offerings$ $ describe-host-reservations$ $ describe-hosts$ $ describe-id-format$ $ describe-identity-id-format$ $ describe-image-attribute$ $ describe-images$ $ describe-import-image-tasks$ $ describe-import-snapshot-tasks$ $ describe-instance-attribute$ $ describe-instance-status$ $ describe-instances$ $ describe-internet-gateways$ $ describe-key-pairs$ $ describe-moving-addresses$ $ describe-nat-gateways$ $ describe-network-acls$ $ describe-network-interface-attribute$ $ describe-network-interfaces$ $ describe-placement-groups$ $ describe-prefix-lists$ $ describe-regions$ $ describe-reserved- $ describe-reserved- $ describe-reserved- modifications$ $ describe-reserved- $ describe-route-tab $ describe-scheduled $ describe-scheduled $ describe-security- $ describe-security- $ describe-snapshot- $ describe-snapshots $ describe-spot-data $ describe-spot-flee $ describe-spot-flee $ describe-spot-flee $ describe-spot-inst $ describe-spot-pric $ describe-stale-sec $ describe-subnets$ $ describe-tags$ $ describe-volume-at $ describe-volume-st $ describe-volumes$ $ describe-vpc-attri $ describe-vpc-class $ describe-vpc-class $ describe-vpc-endpo $ describe-vpc-endpo $ describe-vpc-peeri $ describe-vpcs$ $ describe-vpn-conne $ describe-vpn-gatew $ detach-classic-lin $ detach-internet-ga $ detach-network-int $ detach-volume$ 210 calls for EC2 only
  • 38. $ accept-vpc-peering-connection$ $ allocate-address$ $ allocate-hosts$ $ assign-private-ip-addresses$ $ associate-address$ $ associate-dhcp-options$ $ associate-route-table$ $ attach-classic-link-vpc$ $ attach-internet-gateway$ $ attach-network-interface$ $ attach-volume$ $ attach-vpn-gateway$ $ authorize-security-group-egress$ $ authorize-security-group-ingress$ $ bundle-instance$ $ cancel-bundle-task$ $ cancel-conversion-task$ $ cancel-export-task$ $ cancel-import-task$ $ cancel-reserved-instances-listing$ $ cancel-spot-fleet-requests$ $ cancel-spot-instance-requests$ $ confirm-product-instance$ $ copy-image$ $ copy-snapshot$ $ create-customer-gateway$ $ create-dhcp-options$ $ create-flow-logs$ $ create-image$ $ create-instance-export-task$ $ create-internet-gateway$ $ create-key-pair$ $ create-nat-gateway$ $ create-network-acl$ $ create-network-acl-entry$ $ create-network-interface $ create-reserved-instances-listing$ $ create-route$ $ create-route-table$ $ create-security-group$ $ create-snapshot$ $ create-spot-datafeed-subscription$ $ create-subnet$ $ create-tags$ $ create-volume$ $ create-vpc$ $ create-vpc-endpoint$ $ create-vpc-peering-connection$ $ create-vpn-connection$ $ create-vpn-connection-route$ $ create-vpn-gateway$ $ delete-customer-gateway$ $ delete-dhcp-options$ $ delete-flow-logs$ $ delete-internet-gateway$ $ delete-key-pair$ $ delete-nat-gateway$ $ delete-network-acl$ $ delete-network-acl-entry$ $ delete-network-interface$ $ delete-placement-group$ $ delete-route$ $ delete-route-table$ $ delete-security-group$ $ delete-snapshot$ $ delete-spot-datafeed-subscription$ $ delete-subnet$ $ delete-tags$ $ delete-volume$ $ delete-vpc$ $ delete-vpc-endpoints$ $ delete-vpc-peering-connection$ $ delete-vpn-connection$ $ delete-vpn-connection-route$ $ delete-vpn-gateway$ $ deregister-image$ $ describe-account-attributes$ $ describe-addresses$ $ describe-availability-zones$ $ describe-bundle-tasks$ $ describe-classic-link-instances$ $ describe-conversion-tasks$ $ describe-customer-gateways$ $ describe-dhcp-options$ $ describe-export-tasks$ $ describe-flow-logs$ $ describe-host-reservation-offerings$ $ describe-host-reservations$ $ describe-hosts$ $ describe-id-format$ $ describe-identity-id-format$ $ describe-image-attribute$ $ describe-images$ $ describe-import-image-tasks$ $ describe-import-snapshot-tasks$ $ describe-instance-attribute$ $ describe-instance-status$ $ describe-instances$ $ describe-internet-gateways$ $ describe-key-pairs$ $ describe-moving-addresses$ $ describe-nat-gateways$ $ describe-network-acls$ $ describe-network-interface-attribute$ $ describe-network-interfaces$ $ describe-placement-groups$ $ describe-prefix-lists$ $ describe-regions$ $ describe-reserved- $ describe-reserved- $ describe-reserved- modifications$ $ describe-reserved- $ describe-route-tab $ describe-scheduled $ describe-scheduled $ describe-security- $ describe-security- $ describe-snapshot- $ describe-snapshots $ describe-spot-data $ describe-spot-flee $ describe-spot-flee $ describe-spot-flee $ describe-spot-inst $ describe-spot-pric $ describe-stale-sec $ describe-subnets$ $ describe-tags$ $ describe-volume-at $ describe-volume-st $ describe-volumes$ $ describe-vpc-attri $ describe-vpc-class $ describe-vpc-class $ describe-vpc-endpo $ describe-vpc-endpo $ describe-vpc-peeri $ describe-vpcs$ $ describe-vpn-conne $ describe-vpn-gatew $ detach-classic-lin $ detach-internet-ga $ detach-network-int $ detach-volume$ 210 calls for EC2 only S3 ELB RDS CloudFrontCloudWatch AutoScaling Route53 Events IAM S3api SNS
  • 44. Too quick? How does it work internally? Install AWS CLI (https://docs.aws.amazon.com/cli/latest/userguide/installing.html) $ sudo pip install awscli $ aws configure $ aws --version Clone WordPress AWS Scaler git repo (https://github.com/plesk/wordpress-aws-scaler) $ git clone https://github.com/plesk/wordpress-aws-scaler.git $ cd wordpress-aws-scaler Build Docker Image and Upload to Docker Hub (https://hub.docker.com/explore/) $ docker build -t janloeffler/wordpress-aws-scaler:latest . $ docker push janloeffler/wordpress-aws-scaler:latest
  • 45. List existing AWS resources List existing AWS Resources $ aws ec2 describe-vps $ aws ec2 describe-security-groups $ aws ec2 describe-instances $ aws rds describe-db-instances [...] Do this for all AWS components $ aws autoscaling $ aws ec2 $ aws cloudfront $ aws cloudwatch $ aws elb $ aws rds $ aws s3 $ aws route53 $ aws events
  • 46. Create new resources Create new AWS Resources $ aws ec2 create-vpc $ aws ec2 create-security-group [...] Do this for all AWS components $ aws autoscaling $ aws ec2 $ aws cloudfront $ aws cloudwatch $ aws elb $ aws rds $ aws s3 $ aws route53 $ aws events
  • 47. Create new Launch Configuration Generate EC2-User-Data Script to run directly after booting EC2 VM $ cat >ec2-user-data.sh <<EOL #!/bin/bash docker pull janloeffler/wordpress-aws-scaler:latest docker run -d -p 80:80 -p 443:443 -e WORDPRESS_DB_HOST='${DB}' -e WORDPRESS_DB_USER='${DB_USERNAME}' -e WORDPRESS_DB_PASSWORD='${DB_PASSWORD}' -e WORDPRESS_DB_NAME='${DB_NAME}' -e WORDPRESS_DB_PREFIX='${WORDPRESS_DB_PREFIX}' -e WORDPRESS_URL='http://${ELB}' -e WORDPRESS_TITLE='${WORDPRESS_TITLE}' -e WORDPRESS_USER_EMAIL='${WORDPRESS_USER_EMAIL}' -e NEWRELIC_KEY='${NEWRELIC_KEY}' -e NEWRELIC_NAME='${NEWRELIC_NAME}' -e S3_KEY='${IAM_USER_KEY}' -e S3_SECRET='${IAM_USER_SECRET}' -e S3_BUCKET='${S3_BUCKET_NAME}' -e S3_BUCKET_URL='${S3_URL}' -it janloeffler/wordpress-aws-scaler:latest EOL Create new Launch Configuration for AutoScaling $ aws autoscaling create-launch-configuration --launch-configuration-name $LC_NAME -- image-id $AMI --instance-type $INSTANCE_TYPE --key-name $KEYNAME --security-groups $SEC_GROUP_ID --user-data file://ec2-user-data.sh
  • 48. You must love JSON !!! ;-) { "Reservations": [ { "OwnerId": "699328319947", "ReservationId": "r-041ac13209e0d4eef", "Groups": [], "RequesterId": "226008221399", "Instances": [ { "Monitoring": { "State": "enabled" }, "PublicDnsName": "ec2-52-210-200-157.eu-west-1.compute.amazonaws.com", "State": { "Code": 16, "Name": "running" }, "EbsOptimized": false, "LaunchTime": "2016-09-05T12:19:54.000Z", "PublicIpAddress": "52.210.200.157", "PrivateIpAddress": "172.31.25.83", "ProductCodes": [ { "ProductCodeId": "4jvb72q6a56js2x7jzd24jar5", "ProductCodeType": "marketplace" } ], "VpcId": "vpc-fffbe19a", "StateTransitionReason": "", "InstanceId": "i-0ea3384a24a3c6aba", "ImageId": "ami-64385917", "PrivateDnsName": "ip-172-31-25-83.eu-west-1.compute.internal", "KeyName": "Marko Heijnen", "SecurityGroups": [ { "GroupName": "WordPress-Docker-Test", "GroupId": "sg-1b8dde7c" } ], "ClientToken": "70aa81e1-10a3-4b83-acc7-62702015d06e_subnet-cff90cb9_1", "SubnetId": "subnet-cff90cb9", "InstanceType": "m3.medium", "NetworkInterfaces": [ { "Status": "in-use", "MacAddress": "06:c0:22:65:b4:ed", "SourceDestCheck": true, "VpcId": "vpc-fffbe19a", "Description": "", "Association": { "PublicIp": "52.210.200.157", "PublicDnsName": "ec2-52-210-200-157.eu-west-1.compute.amazonaws.com", "IpOwnerId": "amazon" }, "NetworkInterfaceId": "eni-2f4efa63", "PrivateIpAddresses": [ { "PrivateDnsName": "ip-172-31-25-83.eu-west-1.compute.internal", "Association": { "PublicIp": "52.210.200.157", "PublicDnsName": "ec2-52-210-200-157.eu-west-1.compute.amazonaws.com", "IpOwnerId": "amazon" }, "Primary": true, "PrivateIpAddress": "172.31.25.83" } ], "PrivateDnsName": "ip-172-31-25-83.eu-west-1.compute.internal", "Attachment": { "Status": "attached", "DeviceIndex": 0, "DeleteOnTermination": true, "AttachmentId": "eni-attach-7f9031a0", "AttachTime": "2016-09-05T12:19:54.000Z" }, […]
  • 49. WP CUP – RACE DAY 1 single-server avg 3.86 sec for 947 hits auto-scaling avg 1.45 sec for 9.866 hits Fastest Lap 216 ms 180 RPS < 3sec Fastest Lap 99 ms 1.000 RPS < sec No Caching!!!
  • 50. Plesk Mission “We simplify the lives of web professionals.”
  • 52. code.talks 2016, Hamburg “High traffic sites with WordPress, Docker & AWS” How to auto-scale WordPress on AWS and make it fly! Passion for Web Development Jan Löffler CTO Plesk ● @jlsoft2 ● jan@plesk.com Marko Heijnen WordPress Contributor ● @markoheijnen ● mheijnen@plesk.com
  • 54.
  • 55.
  • 56. “When you walk through your website architecture and you wonder who could be so stupid to test it with 10.000 parallel requests per second. But if you want to be successful and play in the first league, it is important to think about it before your traffic increases” Jan Löffler @jlsoft2
  • 59. Web Development Key Tools – what web developers need and use 59 26,6% of all websites worldwide 2,7% 2,2% (high traffic sites) 70% of developers use git as primary source management solution Increasing usage by web agencies 38% of all online stores worldwide runs on top of WordPress as plugin developed by automattic used by 30% of IT companies increased from 13% to 30% in 12 months further 35% plan introduction Sources: w3techs.com, Rightscale, StackOverflow Survey 2015, 2016, Netcraft 311% growth 17.2% usage 26.8% growth 17.9% usage 14.9% growth 16% of all webservers 22% of all active sites continuously growing, while Apache is shrinking
  • 60. WordPress Management Free SSL everywhere http2 50+ extensions CLI Automatic Updates Site Migration Free support 30+ languages nginx Server Security DNS
  • 61. ✔ Plesk Onyx: Continuous Delivery Deployment Pipeline (sample) 61 Jenkins runs as Docker container managed by Plesk Plesk Multi Server Extension installs three environments Apps managed by Plesk via Docker