Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Managing Your AWS Infrastructure at Scale

Avatar for davidmat davidmat
August 25, 2015

Managing Your AWS Infrastructure at Scale

You know how to manage one instance - can you manage a thousand?

Avatar for davidmat

davidmat

August 25, 2015
Tweet

More Decks by davidmat

Other Decks in Technology

Transcript

  1. MANAGING YOUR AWS INFRA AT SCALE S U M M

    E R O F T E C H N O L O G Y 2 5 / 0 8 / 2 0 1 5 1
  2. INTRODUCTION • Instances x 1000 = Cost & complexity x

    1000 ? • Processes & best practices • Tools AS-IS TO-BE 3
  3. INTRODUCTION • First steps – Instances ~ Regular VMs in

    a DC • Manual • Diverges • Solution – Specify & manage the desired end state of your infrastructure independently of the EC2 instances & other running components 4
  4. INTRODUCTION • Benefits of dynamic cloud environments 1. Software-defined infrastructure

    2. Auto scaling & self healing 3. Fast environment provisioning 4. Reduce costs 5. Blue-green deployments 5
  5. PROVISIONING NEW EC2 INSTANCES • New instances ~ external events

    – New instances/environments – Scaling events – Replace failed instances – New version of software stack • Difficult to predict ⇒ process needed: – Automated – Repeatable – Consistent 7
  6. PROVISIONING NEW EC2 INSTANCES • Bootstrapping – “The process of

    automatically provisioning new instances & bringing them into service” • 2 most popular approaches: 1. Golden Images 2. Dynamic Configuration • Many possible combinations & hybrid models 8
  7. GOLDEN IMAGE • Amazon Machine Image (AMI) – “Template that

    provides all of the information required to launch an Amazon EC2 instance” • Options – AWS-Provided – Community – Marketplace – Custom AMI 9
  8. GOLDEN IMAGE • Advantages of custom AMIs – Increases speed

    – Reduces external dependencies – Removes the reliance on complex configuration scripts at launch time • Disadvantages of custom AMIs – Loss of agility – Complexity – Run-time configuration requirements 10
  9. GOLDEN IMAGES • Managing AMI Builds: Automate! – Speed –

    Version control – Repeatable, auditable • Process 1. Launch the latest version of the AMI 2. Execute the automated configuration 3. Create a new AMI based on the running instance • Tools – Packer – Aminator 11
  10. HYBRID MODELS • Decision Factors – Frequency of deployments –

    Reduction on external dependencies – Requirements to scale quickly 12
  11. DYNAMIC CONFIGURATION • Many tools & techniques – Simple scripts

    → centralized configuration management tools • Scripting your own solution – User Data & Cloud-Init • Shell script or cloud-init directives • Limited to 16kb • Ideal for simple use cases – Leveraging EC2 metadata • http://169.254.169.254/latest/meta-data/<key> – Resource Tagging 14
  12. DYNAMIC CONFIGURATION • Using configuration management tools – Push model

    • Master server needs info on nodes to manage • Load on master server • Need incoming ports on node opened – Pull model • Nodes scale up & down independently • Less load on master, more on node • Agent-based • No specific ports needed inbound 16
  13. RESOURCES • Building Fault Tolerant Applications on AWS (Whitepaper) Jeff

    Barr, Attila Narin, and JineshVaria • Managing Your AWS Infrastructure At Scale (Whitepaper) Shaun Pearce and Steven Bryen • ARC402 – Deployment Automation (reInvent 2014) Chris Munns 17