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

Does OpsWorks work?

Does OpsWorks work?

Presented at AWS User Group Taipei #1.

Richard Lee

April 19, 2013
Tweet

More Decks by Richard Lee

Other Decks in Technology

Transcript

  1. Does OpsWorks Work?
    Richard Lee
    Polydice, Inc.

    View Slide

  2. DevOps &
    Mobile
    @ Polydice
    @dlackty everywhere.
    Richard Lee

    View Slide

  3. View Slide

  4. View Slide

  5. View Slide

  6. View Slide

  7. View Slide

  8. View Slide

  9. Mobile Traffic > 50 %
    Android and other native platforms
    Mobile-First Design!
    High availability APIs is essential

    View Slide

  10. What is OpsWorks?

    View Slide

  11. Before switching to AWS, we used
    to be on Heroku platform. But...
    Somebody That I Used To Know

    View Slide

  12. Based on AWS
    Simple scaling
    Almost no operation cost
    Git-base deployment
    Lots of addons
    Good
    No system softs
    Addons reliability
    AWS US East region
    Routergate
    Issues
    I still recommend Heroku for startups
    but not suitable for complicated stack

    View Slide

  13. PaaS IaaS
    OpsWorks
    Here!

    View Slide

  14. View Slide

  15. EC2 instances +
    Auto setup +
    Centralized configuration +
    App deployment +
    Simple scaling = AWESOME!
    OpsWorks

    View Slide

  16. OpsWorks 101
    Your first course of OpsWorks

    View Slide

  17. Five steps to make it work
    Create
    Stack
    Config
    Layers
    Config
    App
    Add
    Instances
    Deploy

    View Slide

  18. Create stack
    A stack represents a collection of EC2 instances that have a
    common purpose.
    Some stack names for example:
    ↟iCook
    ↟Inside
    ↟MyAwesomeApp
    ↟YourFantasticStartup

    View Slide

  19. Stack naming

    View Slide

  20. Limited AMIs
    ↟Amazon Linux
    ↟Ubuntu 12.04

    View Slide

  21. Limited AMIs
    ↟Amazon Linux
    ↟Ubuntu 12.04

    View Slide

  22. AWS region &
    Availability zone

    View Slide

  23. Instances naming
    ↟Numerical
    ↟US Cities
    ↟Baked Goods

    View Slide

  24. Custom Chef JSON
    Centralized configuration as JSON
    For example, put your
    ↟3rd-Party service credentials
    ↟Targeted version of app to install

    View Slide

  25. Five steps to make it work
    Create
    Stack
    Config
    Layers
    Config
    App
    Add
    Instances
    Deploy

    View Slide

  26. Add layers
    A layer is a blueprint for a set of EC2 instances.
    For example:
    ↟Rails App Layer
    ↟MySQL Server Layer
    ↟Memcached layer
    ↟Redis layer

    View Slide

  27. Many built-in layers!

    View Slide

  28. View Slide

  29. View Slide

  30. View Slide

  31. What if there’re no built-in stacks for your need?
    Just create custom layer and add Chef recipes
    ↟Tons of open sourced cookbooks
    ↟Fork the AWS official cookbooks and make changes
    Resources
    ↟Peepcode’s video series Meet Chef
    ↟Polydice’s Cookbooks on GitHub

    View Slide

  32. View Slide

  33. Five steps to make it work
    Create
    Stack
    Config
    Layers
    Config
    App
    Add
    Instances
    Deploy

    View Slide

  34. Config app
    An app represents code stored in a repository that you
    want to install on application server instances.
    More than just copy file & restart server:
    ↟Notify load balancer
    ↟Assets precompile
    ↟Other tasks via custom recipes

    View Slide

  35. Many built-in app types,
    And built-in repo types!

    View Slide

  36. View Slide

  37. Five steps to make it work
    Create
    Stack
    Config
    Layers
    Config
    App
    Add
    Instances
    Deploy

    View Slide

  38. Create instances
    Instance are created based on layers.
    ↟24/7 instances
    ↟Time-based instance
    ↟Load-based instances
    Notice:
    ↟Only one layer per instance
    ↟You can also associate Elastic IP to instances

    View Slide

  39. View Slide

  40. View Slide

  41. Five steps to make it work
    Create
    Stack
    Config
    Layers
    Config
    App
    Add
    Instances
    Deploy

    View Slide

  42. Deploy
    Perform commands on slected instances
    ↟Deploy
    ↟Rollback
    ↟Exectue recipes
    ↟Update custom cookbooks / dependencies

    View Slide

  43. View Slide

  44. Recap: Five steps to make it work
    Create
    Stack
    Config
    Layers
    Config
    App
    Add
    Instances
    Deploy

    View Slide

  45. Results

    View Slide

  46. iCook is now fully OpsWorks-based!
    Spent 4 weeks working on this migration
    ↟4 layers (Rails / Worker / Redis / ElasticSearch)
    ↟Integrated with RDS / ElasticCache / ELB
    ↟Few 24/7 instances with some time-based ones
    ↟Performance++ & Response time--
    ↟Cost--!

    View Slide

  47. Email: [email protected]
    Twitter & GitHub: @dlackty
    Thank You!

    View Slide

  48. Q & A?

    View Slide