Deploy in the Cloud

301 views

Published on

Published in: Technology, Business
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
301
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
0
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Deploy in the Cloud

  1. 1. PabloCantero @pablocantero Deploy in the cloud
  2. 2. We were happy with our deploy process
  3. 3. Featured branches, Pull Requests, Continuous Integration etc, all that stuff.
  4. 4. Edson (Hudson)
  5. 5. Deploy made by push master deploy into the staging production deploy into the production
  6. 6. $  git  pull $  git  checkout  production $  git  rebase  master $  git  push  origin  production
  7. 7. But... where is the CLOUD?
  8. 8. Would the Cloud must be sexier?
  9. 9. •Launch Configuration •Auto Scaling Group •Scaling Policies •Metrics •Alarms Auto Scaling
  10. 10. WARNING... As a programer the next slides with commands would appear beautiful, but don’t trust them, they can be very dangerous
  11. 11. as-­‐create-­‐launch-­‐config  my_autoscale_config      -­‐-­‐image-­‐id  ami-­‐XXXXXXXX      -­‐-­‐instance-­‐type  m1.small      -­‐-­‐group  "My  Security  Group  Name"
  12. 12. as-­‐create-­‐auto-­‐scaling-­‐group  my_autoscale_group      -­‐-­‐availability-­‐zones  us-­‐east-­‐1X      -­‐-­‐launch-­‐configuration  my_autoscale_config      -­‐-­‐min-­‐size  1      -­‐-­‐max-­‐size  3      -­‐-­‐load-­‐balancers  my_load_balancer_name      -­‐-­‐health-­‐check-­‐type  ELB      -­‐-­‐grace-­‐period  300
  13. 13. as-­‐put-­‐scaling-­‐policy  ScaleUp      -­‐-­‐auto-­‐scaling-­‐group  my_autoscale_group      -­‐-­‐adjustment=1      -­‐-­‐type  ChangeInCapacity      -­‐-­‐cooldown  300
  14. 14. mon-­‐put-­‐metric-­‐alarm  AlarmName        -­‐-­‐comparison-­‐operator    value        -­‐-­‐evaluation-­‐periods    value    -­‐-­‐metric-­‐name    value        -­‐-­‐namespace    value        -­‐-­‐period    value        -­‐-­‐statistic  value        -­‐-­‐threshold    value      [-­‐-­‐actions-­‐enabled  value  ]      [-­‐-­‐alarm-­‐actions  value[,value...]  ]      [-­‐-­‐alarm-­‐description  value  ]      [-­‐-­‐dimensions   "key1=value1,key2=value2..."  ]      [-­‐-­‐ok-­‐actions  value[,value...]  ]      [-­‐-­‐unit  value  ]      [-­‐-­‐insufficient-­‐data-­‐actions     value[,value...]  ]
  15. 15. They can be very dangerous
  16. 16. require  "aws-­‐sdk" class  QueueSizeMetric    def  initialize        AWS.config  access_key_id:  "…",  secret_access_key:  "…"      end    def  put        metric  =  AWS::CloudWatch::Metric.new  "Worker",   "QueueSize"        size      =  SidekiqMetric.new.queue_size        metric.put_data  [{value:  size}]    end end
  17. 17. 10 instances per 10 hours costs the same as 100 instances per 1 hour Rules in the Cloud
  18. 18. Talk is cheap, show me in practice...
  19. 19. PabloCantero @pablocantero Thank you

×