1 DevOp vs 1.000 servers - Amazon EC2 and Chef automation intro
-
Upload
thomas-metschke -
Category
Technology
-
view
7.915 -
download
0
description
Transcript of 1 DevOp vs 1.000 servers - Amazon EC2 and Chef automation intro
1 Admin vs. 1.000 Serversphpunconf Hamburg 2011
Thomas Metschke@tmetschke2011/09/10Peritor GmbH
DevO
p
Peritor GmbH
Consulting, development and workshops since 2005
2
DatabasesSelectionIntegrationMigration
Ruby & RoRCode ReviewSecurity ReviewWorkshopsDevelopment
PerformanceAnalysisOptimization
AutomationDeploymentWorkflowsClusters
3
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
Project life cycle
Production & Growth
Concept & Developme
nt
Maturity &Decline
Niche /EOL
5
Cloud Computing
6
7
8
Amazon Elastic Compute Cloud
Virtual servers via API call
Pay per hour
Different instance types in different regions
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
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
11
Amazon EC2 additional services
Elastic Load Balancing
Virtual Private Cloud
Elastic IP
CloudWatch
Spot instances
Elastic Block Storage
And a lot more …
12
Amazon EC2
13
Storage &IP Addresses
14
Single AZ Deployment
15
Multi AZ Deployment
Amazon EC2 is
16
Infrastructure as a Service
What you can build fast
17
18
But what if …
Heal and restore
19
Scaling up and down
Manual Time APILoad
20
Different triggers make it possible to scale any part of the infrastructure or create new clusters
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.
Automationis needed
flickr.com/photos/torek/378818160322
Configuration Healing Scaling Deployment
23
Chef– short intro
24
Chef
Open Source Provisioning Tool Configures your servers
Cookbooks & recipes
Ruby DSL
25
Chef Solo/Client
ChefSolo JSON
Cookbooks
(re)configurepushconfiguration
26
Cookbooks
Cookbooks
apache2
memcached
mysql
zend
27
Memcached Cookbook
Cookbooks
memcached
attributes
recipes
templates
28
Memcached Cookbook
memcached
attributes
default.rb
recipes
service.rb
install.rb
templates
default
memcached.conf.erb
29
Attributes
Set default values for variables to use in recipes & templates
cookbooks/memcached/attributes/default.rb
30
Recipes
Actual instructions to execute
cookbooks/memcached/recipes/service.rb
31
Recipes
cookbooks/memcached/recipes/install.rb
32
Templates
cookbooks/memcached/templates/default/memcached.conf.erb
33
/etc/chef/solo.json (configuration JSON)
Chef Solo Run
Run Chef solo
Let’s talk about cute little Monsters
34
Monster World
1.6 million DAU 8.2 million MAU Peak 130 servers ~ 240.000
requests per minute on average
35
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
Flexibility and Scalability
1:5 facebook1:20 local social networks
Flexibility and Scalability
Cost savings of ~ 40%!
39
DEMO?
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
© 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]