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

Auto-scaling Applications in 10 Minutes

Auto-scaling Applications in 10 Minutes

This talk will show how to deploy a CakePHP application with AWS OpsWorks. It will cover auto scalling by time range or server load, and how the load is distributed between the servers.

Zumba Technology

September 01, 2013
Tweet

More Decks by Zumba Technology

Other Decks in Technology

Transcript

  1. Auto Scaling
    Applications in
    10 Minutes
    Juan Basso @jrbasso
    System Architect - Zumba Fitness

    View Slide

  2. Ingredients
    AWS Account
    AWS OpsWorks
    Chef Cookbooks
    Your Awesome App
    Some Money
    Patience

    View Slide

  3. Some Terms
    AWS: Amazon Web Services
    EC2: Amazon Elastic Compute Cloud
    ELB: Elastic Load Balancing
    RDS: Amazon Relational Database Service

    View Slide

  4. Architecture Evolution

    View Slide

  5. Starting

    View Slide

  6. Separate the Load

    View Slide

  7. More Instances for the Load

    View Slide

  8. Auto Scaling

    View Slide

  9. Getting There With OpsWorks

    View Slide

  10. What is OpsWorks?
    Free Tool with AWS Account
    Simple Interface for Setup the Deployment
    Easy Setup of Auto Scaling
    DevOps Application Management Service

    View Slide

  11. What is Necessary?
    AWS Account
    Application in Some Repository
    Create Chef Cookbooks
    Put the Cookbooks on Some Repository

    View Slide

  12. Chef Cookbooks???
    n
    o
    d
    e
    [
    :
    d
    e
    p
    l
    o
    y
    ]
    .
    e
    a
    c
    h d
    o |
    a
    p
    p
    l
    i
    c
    a
    t
    i
    o
    n
    , d
    e
    p
    l
    o
    y
    |
    i
    n
    c
    l
    u
    d
    e
    _
    r
    e
    c
    i
    p
    e '
    a
    p
    a
    c
    h
    e
    2
    :
    :
    s
    e
    r
    v
    i
    c
    e
    '
    e
    x
    e
    c
    u
    t
    e '
    S
    e
    t
    u
    p P
    H
    P d
    e
    f
    a
    u
    l
    t t
    i
    m
    e
    z
    o
    n
    e
    ' d
    o
    a
    c
    t
    i
    o
    n :
    r
    u
    n
    c
    o
    m
    m
    a
    n
    d "
    s
    e
    d -
    i '
    s
    /
    ;
    d
    a
    t
    e
    \
    .
    t
    i
    m
    e
    z
    o
    n
    e
    .
    *
    /
    d
    a
    t
    e
    .
    t
    i
    m
    e
    z
    o
    n
    e = U
    T
    C
    /
    g
    '
    `
    p
    h
    p -
    r '
    e
    c
    h
    o p
    h
    p
    _
    i
    n
    i
    _
    l
    o
    a
    d
    e
    d
    _
    f
    i
    l
    e
    (
    )
    ;
    '
    `
    "
    u
    s
    e
    r '
    r
    o
    o
    t
    '
    n
    o
    t
    i
    f
    i
    e
    s :
    r
    e
    l
    o
    a
    d
    , r
    e
    s
    o
    u
    r
    c
    e
    s
    (
    :
    s
    e
    r
    v
    i
    c
    e =
    > "
    a
    p
    a
    c
    h
    e
    2
    "
    )
    , :
    d
    e
    l
    a
    y
    e
    d
    e
    n
    d
    e
    n
    d

    View Slide

  13. Components
    Stack
    Layers
    Instances
    Application

    View Slide

  14. OpsWorks Step-By-Step

    View Slide

  15. Links and Configs
    Application: git://github.com/croogo/croogo.git (tag v1.5.3)
    Cookbook: git://github.com/jrbasso/croogo-cookbook
    Setup: c
    a
    k
    e
    p
    h
    p
    :
    :
    s
    e
    t
    u
    p
    Configure: p
    h
    p
    :
    :
    t
    i
    m
    e
    z
    o
    n
    e
    _
    c
    f
    g
    Deploy: c
    r
    o
    o
    g
    o
    :
    :
    i
    n
    s
    t
    a
    l
    l
    and p
    h
    p
    :
    :
    t
    i
    m
    e
    z
    o
    n
    e
    _
    c
    f
    g
    Create the RDS and ELB beforehand
    Import database data
    PS: Sessions are going to be stored on DB

    View Slide

  16. Create the Load Balancer

    View Slide

  17. Create the Database

    View Slide

  18. Welcome Page from OpsWorks

    View Slide

  19. Creating the Stack (Part 1)

    View Slide

  20. Creating the Stack (Part 2)

    View Slide

  21. Creating PHP Layer

    View Slide

  22. Configuring PHP Layer

    View Slide

  23. Before Setup Instances

    View Slide

  24. Creating the Instance

    View Slide

  25. 24/7 Instance Created

    View Slide

  26. Created Load and Time Based
    Instances

    View Slide

  27. Setting Up Time Based
    Instances

    View Slide

  28. Setting Up Load Based
    Instances

    View Slide

  29. Creating Application

    View Slide

  30. Application Created

    View Slide

  31. Monitoring Servers

    View Slide

  32. Auto Starting a Load Instance

    View Slide

  33. Questions?

    View Slide