1 DevOp vs 1.000 servers - Amazon EC2 and Chef automation intro

  • 7,082 views
Uploaded on

Short intro into Chef and infrastructure automation on the phpunconf in Hamburg, Germany

Short intro into Chef and infrastructure automation on the phpunconf in Hamburg, Germany

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
7,082
On Slideshare
0
From Embeds
0
Number of Embeds
6

Actions

Shares
Downloads
42
Comments
0
Likes
5

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. DevOp
    1 Admin vs. 1.000 Serversphpunconf Hamburg 2011
    Thomas Metschke
    @tmetschke
    2011/09/10
    Peritor GmbH
  • 2. Peritor GmbH
    Consulting, development and workshops since 2005
    2
    Databases
    Selection
    Integration
    Migration
    Automation
    Deployment
    Workflows
    Clusters
    Ruby & RoR
    Code Review
    Security Review
    Workshops
    Development
    Performance
    Analysis
    Optimization
  • 3. 3
  • 4. 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
  • 5. Project life cycle
    Maturity &Decline
    Production& Growth
    Concept & Development
    Niche /
    EOL
    5
  • 6. Cloud Computing
    6
  • 7. 7
  • 8. Amazon Elastic Compute Cloud
    Virtual servers via API call
    Pay per hour
    Different instance types in different regions
    8
  • 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
    9
  • 10. Server types
    10
  • 11. Amazon EC2 additional services
    11
    Elastic Load Balancing
    Virtual Private Cloud 
    Elastic IP
    CloudWatch
    Spot instances
    Elastic Block Storage
    And a lot more …
  • 12. Amazon EC2
    12
  • 13. 13
    Storage &IP Addresses
  • 14. Single AZ Deployment
    14
  • 15. Multi AZ Deployment
    15
  • 16. Amazon EC2 is
    16
    Infrastructure as a Service
  • 17. What you can build fast
    17
  • 18. But what if …
    18
  • 19. Heal and restore
    19
  • 20. Scaling up and down
    Manual
    Time
    API
    Load
    20
    Different triggers make it possible to scale any part of the infrastructure or create new clusters
  • 21. Deployment
    21
    Cluster
    Application
    Handle deployments of applications out of source control systems or via http downloads. Allow update code on running servers. User management and GUI.
  • 22. Automationis needed
    flickr.com/photos/torek/3788181603
    22
  • 26. 23
    Chef– short intro
  • 27. Chef
    Open Source Provisioning Tool
    Configures your servers
    Cookbooks & recipes
    Ruby DSL
    24
  • 28. Chef Solo/Client
    25
    Chef
    Solo
    JSON
    push
    configuration
    (re)configure
    Cookbooks
  • 29. Cookbooks
    26
    Cookbooks
    apache2
    memcached
    mysql
    zend
  • 30. Memcached Cookbook
    27
    Cookbooks
    memcached
    attributes
    recipes
    templates
  • 31. Memcached Cookbook
    28
    memcached
    attributes
    default.rb
    recipes
    service.rb
    install.rb
    templates
    default
    memcached.conf.erb
  • 32. Attributes
    29
    cookbooks/memcached/attributes/default.rb
    Set defaultvaluesfor variables to use in recipes & templates
  • 33. Recipes
    30
    cookbooks/memcached/recipes/service.rb
    Actualinstructions to execute
  • 34. Recipes
    31
    cookbooks/memcached/recipes/install.rb
  • 35. Templates
    cookbooks/memcached/templates/default/memcached.conf.erb
    32
  • 36. /etc/chef/solo.json (configuration JSON)
    Chef Solo Run
    33
    Run Chef solo
  • 37. Let’s talk about cute little Monsters
    34
  • 38. Monster World
    1.6 million DAU
    8.2 million MAU
    Peak 130 servers
    ~ 240.000 requests per minute on average
    35
  • 39. Basic architecture
    36
    App Server
    App Server
    EBS Volume
    Load Balancer
    App Server
    App Server
    DBs
    App Server
    App Server
    EBS Volume
    App Server
    Slave DBs
    App Server
    All configuration, management and deployment through Scalarium.
    No other tools needed.
    S3
  • 40. Flexibility and Scalability
    1:5 facebook
    1:20 local social networks
  • 41. Flexibility and Scalability
    Cost savings of ~ 40%!
  • 42. DEMO?
    39
  • 43. 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
    40