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. Mobile Traffic > 50 % Android and other native platforms

    Mobile-First Design! High availability APIs is essential
  2. Before switching to AWS, we used to be on Heroku

    platform. But... Somebody That I Used To Know
  3. 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
  4. EC2 instances + Auto setup + Centralized configuration + App

    deployment + Simple scaling = AWESOME! OpsWorks
  5. Create stack A stack represents a collection of EC2 instances

    that have a common purpose. Some stack names for example: ↟iCook ↟Inside ↟MyAwesomeApp ↟YourFantasticStartup
  6. Custom Chef JSON Centralized configuration as JSON For example, put

    your ↟3rd-Party service credentials ↟Targeted version of app to install
  7. 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
  8. 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
  9. 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
  10. 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
  11. Recap: Five steps to make it work Create Stack Config

    Layers Config App Add Instances Deploy
  12. 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--!