[awsマイスターシリーズ] aws opsworks

Download [AWSマイスターシリーズ] AWS OpsWorks

Post on 15-Jan-2015

3.419 views

Category:

Technology

2 download

Embed Size (px)

DESCRIPTION

 

TRANSCRIPT

  • 1. re:G eneAWS rateAWS OpsWorks 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.

2. Agenda ! ! ! ! ! ! ! Introduction Chef OpsWorks OpsWorks OpsWorks OpsWorks 2 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. 3. Agenda ! ! ! ! ! ! ! Introduction Chef OpsWorks OpsWorks OpsWorks OpsWorks 3 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. 4. Introduction Most IT organizations still install and maintain computers the same way the automotive industry built cars in the early 1900's: An individual craftsman manually manipulates a machine into being, and manually maintains it afterward.IT1900 Steve Traugott, Sterling Software, NASA Ames Research Center http://www.infrastructures.org/bootstrap/ALL.shtml 4 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. 5. Infrastructure as Code ! 1! Infrastructure as Code 5 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. 6. ChefRight Scale State of 2013 industry survey http://www.rightscale.com/blog/cloud-industry-insights/rightscale-statecloud-2013-look-ahead 6 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. 7. OpsWorks ! AWS DevOps Chef-Solo(Chef) 7 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. 8. OpsWorks ! ! SaaS E Web 8 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. 9. Agenda ! ! ! ! ! ! ! Introduction Chef OpsWorks OpsWorks OpsWorks OpsWorks 9 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. 10. Chef ! ChefCookbook Cookbookpackage httpd install10httpd.co nf Ruby 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. 11. Chef ! ! Recipe ! OS11 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. 12. Chef ! Ruby # haproxy case node[:platform] when 'ubuntu' package 'haproxy' do action :install end end12 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. 13. + Eric Joyner ericjoyner.com13 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. 14. Agenda ! ! ! ! ! ! ! Introduction Chef OpsWorks OpsWorks OpsWorks OpsWorks 14 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. 15. OpsWorks EC2 OpsWorks Agent talks withOpsWorks15 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. 16. OpsWorks EC2 OpsWorks Agent OpsWorks AgentChef solo16 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. 17. OpsWorks! AWS ! 17 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. 18. ()OpsWorks OpsWorks S/W We HAProxy 18 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. 19. AWS Elastic BeanstalkOpsWorksCloudFormation 19 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. 20. OpsWorks ! AMI Amazon LinuxUbuntu 12.04LTS! Chef9,11 ! VPC VPC, VPC! ELB! OpsWorks 20 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. 21. OpsWorks ! AWS! AWS CLI OpsWorksEndPointus-east-1( https://opsworks.us-east-1.amazonaws.com$ aws opsworks describe-stacks! AWS SDK for Java / .NET / PHP / Python / Ruby 21 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. 22. OpsWorks )Stack (JSON)Load BalancerApp Server Database UserLBWeb /AppWeb /AppDBAWS Management Console22 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. 23. OpsWorks ! Setup Configure Deploy Undeploy Shutdown 45 23 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. 24. ! OpsWorks ! DB ! ! 24 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. 25. ! EBS RAID Security Group 25 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. 26. ! EC2 ! AZVPC 26 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. 27. App ! ! Ruby on Rails / PHP / Node.js(JavaScript) / Static(HTML) / Other(Java)! Git / Subversion / HTTP archive / S3 Archive / Other27 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. 28. OpsWorks ! 28 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. 29. ! 24/7 29 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. 30. ! Auto Healing agentOpsWorkspolling Auto Healing 3-5 OpsWorks Elastic IPElastic IPagentagent30 EIPEIP EBSEBS Volume 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. 31. ! JSON"opsworks": { "layers": { "php-app": { "id": "4a2a56c8-f909-4b39-81f8-556536d20648", "instances": { "php-app2": { "elastic_ip": null, "region": "us-west-2", "booted_at": "2013-02-26T20:41:10+00:00", "ip": "192.112.235.192", "aws_instance_id": "i-34037f06", "availability_zone": "us-west-2a", "instance_type": "c1.medium", "private_dns_name": "ip-10-252-0-203.us-west-2.com "private_ip": "10.252.0.203", "created_at": "2013-02-26T20:39:39+00:00", "status": "online", "backends": 8, $ opsworks-agent-cli get-json "public_dns_name": "ec2-192-112-235-192.uswest-2.compute.amazonaws.com" }, "php-app1": { ... } }, "name": "PHP Application Server" }, 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. "lb": {! ! 31{ 32. ! ! ! SSH key GitHub Enterprise SSH32 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. 33. ! Setup / Congure / Deploy ! Install Dependencies Ruby gems Update Dependencies Ruby gems Update Cookbooks cookbook Execute Recipes 33 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. 34. ! CloudWatch CPU / Memory / Load / Processes 34 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. 35. ! AWS OpsWorks ! OpsWorks { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "ec2:*", "s3:*", "opsworks:*", "iam:PassRole"], "Resource": "*" } ] }35 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc. 36. Agenda ! ! ! ! ! ! ! Introduction Chef OpsWorks OpsWorks OpsWorks OpsWorks 36 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consen