1 devop vs 1.000 servers - amazon ec2 and chef automation intro
DESCRIPTION
Short intro into Chef and infrastructure automation on the phpunconf in Hamburg, GermanyTRANSCRIPT
![Page 1: 1 DevOp vs 1.000 servers - Amazon EC2 and Chef automation intro](https://reader038.vdocument.in/reader038/viewer/2022103014/5482a63cb4af9f175f8b45a5/html5/thumbnails/1.jpg)
1 Admin vs. 1.000 Serversphpunconf Hamburg 2011
Thomas Metschke@tmetschke2011/09/10Peritor GmbH
DevO
p
![Page 2: 1 DevOp vs 1.000 servers - Amazon EC2 and Chef automation intro](https://reader038.vdocument.in/reader038/viewer/2022103014/5482a63cb4af9f175f8b45a5/html5/thumbnails/2.jpg)
Peritor GmbH
Consulting, development and workshops since 2005
2
DatabasesSelectionIntegrationMigration
Ruby & RoRCode ReviewSecurity ReviewWorkshopsDevelopment
PerformanceAnalysisOptimization
AutomationDeploymentWorkflowsClusters
![Page 3: 1 DevOp vs 1.000 servers - Amazon EC2 and Chef automation intro](https://reader038.vdocument.in/reader038/viewer/2022103014/5482a63cb4af9f175f8b45a5/html5/thumbnails/3.jpg)
3
![Page 4: 1 DevOp vs 1.000 servers - Amazon EC2 and Chef automation intro](https://reader038.vdocument.in/reader038/viewer/2022103014/5482a63cb4af9f175f8b45a5/html5/thumbnails/4.jpg)
EC2 & EucalyptusCluster Management
Automatic Configuration
Self Healing Clusters
Auto Scaling Clusters
One Click Deployment
One Click Cluster Cloning
Monitoring & Alerting
Logs & Accounting
Firewalls & Backups
Access & Rights Management
4
![Page 5: 1 DevOp vs 1.000 servers - Amazon EC2 and Chef automation intro](https://reader038.vdocument.in/reader038/viewer/2022103014/5482a63cb4af9f175f8b45a5/html5/thumbnails/5.jpg)
Project life cycle
Production & Growth
Concept & Developme
nt
Maturity &Decline
Niche /EOL
5
![Page 6: 1 DevOp vs 1.000 servers - Amazon EC2 and Chef automation intro](https://reader038.vdocument.in/reader038/viewer/2022103014/5482a63cb4af9f175f8b45a5/html5/thumbnails/6.jpg)
Cloud Computing
6
![Page 7: 1 DevOp vs 1.000 servers - Amazon EC2 and Chef automation intro](https://reader038.vdocument.in/reader038/viewer/2022103014/5482a63cb4af9f175f8b45a5/html5/thumbnails/7.jpg)
7
![Page 8: 1 DevOp vs 1.000 servers - Amazon EC2 and Chef automation intro](https://reader038.vdocument.in/reader038/viewer/2022103014/5482a63cb4af9f175f8b45a5/html5/thumbnails/8.jpg)
8
Amazon Elastic Compute Cloud
Virtual servers via API call
Pay per hour
Different instance types in different regions
![Page 9: 1 DevOp vs 1.000 servers - Amazon EC2 and Chef automation intro](https://reader038.vdocument.in/reader038/viewer/2022103014/5482a63cb4af9f175f8b45a5/html5/thumbnails/9.jpg)
9
Regions and Availability Zones
Regions Multiple Availability Zones
Slightly different costs
Availability Zones 4 x US-east – Northern Virginia
3 x US-west – Northern California
3 x EU-west – Ireland
2 x AP-southeast – Singapore
2 x AP-northeast – Tokyo
![Page 10: 1 DevOp vs 1.000 servers - Amazon EC2 and Chef automation intro](https://reader038.vdocument.in/reader038/viewer/2022103014/5482a63cb4af9f175f8b45a5/html5/thumbnails/10.jpg)
10
Server types
RAM Cores x ECU Arch Hourly Cost (US-East)
Monthly Cost(US-East)
Standard
Small 1.7 GB 1 x 1 32bit $0.085 $62
Large 7.5 GB 2 x 2 64bit $0.34 $248
Extra Large 15 GB 4 x 2 64bit $0.68 $496
High-Memory
Extra Large 17.1 GB
2 x 3.25 64bit $0.50 $366
Double Extra Large 34.2 GB
4 x 3.25 64bit $1.00 $732
Quadruple Extra Large
68.4 GB
8 x 3.25 64bit $2.00 $1464
High-CPU
Medium 1.7 GB 2x 2.5 32bit $0.17 $124
Extra Large 7 GB 8 x 2.5 64bit $0.68 $496
![Page 11: 1 DevOp vs 1.000 servers - Amazon EC2 and Chef automation intro](https://reader038.vdocument.in/reader038/viewer/2022103014/5482a63cb4af9f175f8b45a5/html5/thumbnails/11.jpg)
11
Amazon EC2 additional services
Elastic Load Balancing
Virtual Private Cloud
Elastic IP
CloudWatch
Spot instances
Elastic Block Storage
And a lot more …
![Page 12: 1 DevOp vs 1.000 servers - Amazon EC2 and Chef automation intro](https://reader038.vdocument.in/reader038/viewer/2022103014/5482a63cb4af9f175f8b45a5/html5/thumbnails/12.jpg)
12
Amazon EC2
![Page 13: 1 DevOp vs 1.000 servers - Amazon EC2 and Chef automation intro](https://reader038.vdocument.in/reader038/viewer/2022103014/5482a63cb4af9f175f8b45a5/html5/thumbnails/13.jpg)
13
Storage &IP Addresses
![Page 14: 1 DevOp vs 1.000 servers - Amazon EC2 and Chef automation intro](https://reader038.vdocument.in/reader038/viewer/2022103014/5482a63cb4af9f175f8b45a5/html5/thumbnails/14.jpg)
14
Single AZ Deployment
![Page 15: 1 DevOp vs 1.000 servers - Amazon EC2 and Chef automation intro](https://reader038.vdocument.in/reader038/viewer/2022103014/5482a63cb4af9f175f8b45a5/html5/thumbnails/15.jpg)
15
Multi AZ Deployment
![Page 16: 1 DevOp vs 1.000 servers - Amazon EC2 and Chef automation intro](https://reader038.vdocument.in/reader038/viewer/2022103014/5482a63cb4af9f175f8b45a5/html5/thumbnails/16.jpg)
Amazon EC2 is
16
Infrastructure as a Service
![Page 17: 1 DevOp vs 1.000 servers - Amazon EC2 and Chef automation intro](https://reader038.vdocument.in/reader038/viewer/2022103014/5482a63cb4af9f175f8b45a5/html5/thumbnails/17.jpg)
What you can build fast
17
![Page 18: 1 DevOp vs 1.000 servers - Amazon EC2 and Chef automation intro](https://reader038.vdocument.in/reader038/viewer/2022103014/5482a63cb4af9f175f8b45a5/html5/thumbnails/18.jpg)
18
But what if …
![Page 19: 1 DevOp vs 1.000 servers - Amazon EC2 and Chef automation intro](https://reader038.vdocument.in/reader038/viewer/2022103014/5482a63cb4af9f175f8b45a5/html5/thumbnails/19.jpg)
Heal and restore
19
![Page 20: 1 DevOp vs 1.000 servers - Amazon EC2 and Chef automation intro](https://reader038.vdocument.in/reader038/viewer/2022103014/5482a63cb4af9f175f8b45a5/html5/thumbnails/20.jpg)
Scaling up and down
Manual Time APILoad
20
Different triggers make it possible to scale any part of the infrastructure or create new clusters
![Page 21: 1 DevOp vs 1.000 servers - Amazon EC2 and Chef automation intro](https://reader038.vdocument.in/reader038/viewer/2022103014/5482a63cb4af9f175f8b45a5/html5/thumbnails/21.jpg)
Deployment
21
ClusterApplication
Handle deployments of applications out of source control systems or via http downloads. Allow update code on running servers. User management and GUI.
![Page 22: 1 DevOp vs 1.000 servers - Amazon EC2 and Chef automation intro](https://reader038.vdocument.in/reader038/viewer/2022103014/5482a63cb4af9f175f8b45a5/html5/thumbnails/22.jpg)
Automationis needed
flickr.com/photos/torek/378818160322
Configuration Healing Scaling Deployment
![Page 23: 1 DevOp vs 1.000 servers - Amazon EC2 and Chef automation intro](https://reader038.vdocument.in/reader038/viewer/2022103014/5482a63cb4af9f175f8b45a5/html5/thumbnails/23.jpg)
23
Chef– short intro
![Page 24: 1 DevOp vs 1.000 servers - Amazon EC2 and Chef automation intro](https://reader038.vdocument.in/reader038/viewer/2022103014/5482a63cb4af9f175f8b45a5/html5/thumbnails/24.jpg)
24
Chef
Open Source Provisioning Tool Configures your servers
Cookbooks & recipes
Ruby DSL
![Page 25: 1 DevOp vs 1.000 servers - Amazon EC2 and Chef automation intro](https://reader038.vdocument.in/reader038/viewer/2022103014/5482a63cb4af9f175f8b45a5/html5/thumbnails/25.jpg)
25
Chef Solo/Client
ChefSolo JSON
Cookbooks
(re)configurepushconfiguration
![Page 26: 1 DevOp vs 1.000 servers - Amazon EC2 and Chef automation intro](https://reader038.vdocument.in/reader038/viewer/2022103014/5482a63cb4af9f175f8b45a5/html5/thumbnails/26.jpg)
26
Cookbooks
Cookbooks
apache2
memcached
mysql
zend
![Page 27: 1 DevOp vs 1.000 servers - Amazon EC2 and Chef automation intro](https://reader038.vdocument.in/reader038/viewer/2022103014/5482a63cb4af9f175f8b45a5/html5/thumbnails/27.jpg)
27
Memcached Cookbook
Cookbooks
memcached
attributes
recipes
templates
![Page 28: 1 DevOp vs 1.000 servers - Amazon EC2 and Chef automation intro](https://reader038.vdocument.in/reader038/viewer/2022103014/5482a63cb4af9f175f8b45a5/html5/thumbnails/28.jpg)
28
Memcached Cookbook
memcached
attributes
default.rb
recipes
service.rb
install.rb
templates
default
memcached.conf.erb
![Page 29: 1 DevOp vs 1.000 servers - Amazon EC2 and Chef automation intro](https://reader038.vdocument.in/reader038/viewer/2022103014/5482a63cb4af9f175f8b45a5/html5/thumbnails/29.jpg)
29
Attributes
Set default values for variables to use in recipes & templates
cookbooks/memcached/attributes/default.rb
![Page 30: 1 DevOp vs 1.000 servers - Amazon EC2 and Chef automation intro](https://reader038.vdocument.in/reader038/viewer/2022103014/5482a63cb4af9f175f8b45a5/html5/thumbnails/30.jpg)
30
Recipes
Actual instructions to execute
cookbooks/memcached/recipes/service.rb
![Page 31: 1 DevOp vs 1.000 servers - Amazon EC2 and Chef automation intro](https://reader038.vdocument.in/reader038/viewer/2022103014/5482a63cb4af9f175f8b45a5/html5/thumbnails/31.jpg)
31
Recipes
cookbooks/memcached/recipes/install.rb
![Page 32: 1 DevOp vs 1.000 servers - Amazon EC2 and Chef automation intro](https://reader038.vdocument.in/reader038/viewer/2022103014/5482a63cb4af9f175f8b45a5/html5/thumbnails/32.jpg)
32
Templates
cookbooks/memcached/templates/default/memcached.conf.erb
![Page 33: 1 DevOp vs 1.000 servers - Amazon EC2 and Chef automation intro](https://reader038.vdocument.in/reader038/viewer/2022103014/5482a63cb4af9f175f8b45a5/html5/thumbnails/33.jpg)
33
/etc/chef/solo.json (configuration JSON)
Chef Solo Run
Run Chef solo
![Page 34: 1 DevOp vs 1.000 servers - Amazon EC2 and Chef automation intro](https://reader038.vdocument.in/reader038/viewer/2022103014/5482a63cb4af9f175f8b45a5/html5/thumbnails/34.jpg)
Let’s talk about cute little Monsters
34
![Page 35: 1 DevOp vs 1.000 servers - Amazon EC2 and Chef automation intro](https://reader038.vdocument.in/reader038/viewer/2022103014/5482a63cb4af9f175f8b45a5/html5/thumbnails/35.jpg)
Monster World
1.6 million DAU 8.2 million MAU Peak 130 servers ~ 240.000
requests per minute on average
35
![Page 36: 1 DevOp vs 1.000 servers - Amazon EC2 and Chef automation intro](https://reader038.vdocument.in/reader038/viewer/2022103014/5482a63cb4af9f175f8b45a5/html5/thumbnails/36.jpg)
Basic architecture
36
Load Balancer
App Server
App Server
App Server
App Server
App Server
App Server
Slave DBs
DBs
EBS Volume
S3
App Server
All configuration, management and deployment through Scalarium.No other tools needed.
App Server
EBS Volume
![Page 37: 1 DevOp vs 1.000 servers - Amazon EC2 and Chef automation intro](https://reader038.vdocument.in/reader038/viewer/2022103014/5482a63cb4af9f175f8b45a5/html5/thumbnails/37.jpg)
Flexibility and Scalability
1:5 facebook1:20 local social networks
![Page 38: 1 DevOp vs 1.000 servers - Amazon EC2 and Chef automation intro](https://reader038.vdocument.in/reader038/viewer/2022103014/5482a63cb4af9f175f8b45a5/html5/thumbnails/38.jpg)
Flexibility and Scalability
Cost savings of ~ 40%!
![Page 39: 1 DevOp vs 1.000 servers - Amazon EC2 and Chef automation intro](https://reader038.vdocument.in/reader038/viewer/2022103014/5482a63cb4af9f175f8b45a5/html5/thumbnails/39.jpg)
39
DEMO?
![Page 40: 1 DevOp vs 1.000 servers - Amazon EC2 and Chef automation intro](https://reader038.vdocument.in/reader038/viewer/2022103014/5482a63cb4af9f175f8b45a5/html5/thumbnails/40.jpg)
40
Want to try Scalarium
SignUp on
http://scalarium.com
and use it for free as long as you are in test & dev mode
Chef examples and guides
https://github.com/scalarium/example-cookbooks
http://wiki.opscode.com/display/chef/Resources
![Page 41: 1 DevOp vs 1.000 servers - Amazon EC2 and Chef automation intro](https://reader038.vdocument.in/reader038/viewer/2022103014/5482a63cb4af9f175f8b45a5/html5/thumbnails/41.jpg)
© Peritor GmbH - Alle Rechte vorbehalten / all rights reserved
Peritor GmbHBlücherstr. 22, Hof III Aufgang 610961 Berlin
Tel.: +49 (0)30 69 20 09 84 0Fax: +49 (0)30 69 20 09 84 9
Internet: www.peritor.comE-Mail: [email protected]