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

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

Post on 15-Jan-2015

4.678 views

Category:

Technology

7 download

Embed Size (px)

DESCRIPTION

 

TRANSCRIPT

  • 1. re:G ene rateAWS AWS CloudFormation 2013.11.27 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. 2013 CloudFormation ! 2013/2/7 Amazon S3 Amazon RDS! 2013/2/20 EBS-Optimized EC2 Auto Scaling Group ! 2013/8/12 ! 2013/9/17 VPC! 2013/10/14 2 2013 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 ! CloudFormation ! ! ! Cloud-init ! CloudFormation helpers ! CloudFormer ! Tips ! 3 2013 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. ! CloudFormation4 2013 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. AWS CloudFormation ! EC2ELBAWS ! ! AWS 5 2013 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. AWS CloudFormation Elastic Load BalancingS3Cloud Formation SNS EC2EC2 Auto Scaling6CloudWatch 2013 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. ! BlogWeb ! WordPress, Redmine ! DBEC27 2013 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. ! CloudFormation ! AWS 8 2013 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. AWS Elastic BeanstalkOpsWorksCloudFormation 9 2013 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. CloudFormation ! ! ElasticBeanstalk ElasticBeanstalk10 2013 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. ! 11 2013 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. ! EC2S3RDS ! ! App Serve r12Web Serve r 2013 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. ! Amazon EC2 ! Amazon EC2 ! Amazon Elastic Block StoreEBS ! Elastic Load Balancers ! Amazon EC2 Elastic IP ! Auto Scaling ! Auto Scaling ! Amazon RDS ! Amazon RDS ! Amazon RDS ! Amazon DynamoDB ! Amazon SimpleDB ! Amazon SQS ! Amazon SNS ! Amazon SNS 13! ! ! ! ! ! ! ! ! !AWS Elastic Beanstalk Amazon CloudWatch Amazon Route 53 DNS Amazon CloudFront Amazon S3 AWS Identity and Access Management Amazon ElastiCache Amazon ElastiCache Amazon ElastiCache Amazon Virtual Private Cloud VPC ACL 2013 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. ! AWS Management Console ! AWS Command Line Tool http://aws.amazon.com/cli/! SDKJava : http://aws.amazon.com/jp/sdkforjava/ .NET : http://aws.amazon.com/jp/sdkfornet/ PHP : http://aws.amazon.com/jp/sdkforphp/ Ruby : http://docs.aws.amazon.com/AWSSdkDocsRuby/latest/ DeveloperGuide/ruby-dg-setup.html JavaScript : http://aws.amazon.com/documentation/sdkforjavascript/ Python : http://docs.pythonboto.org/en/latest/ 14 2013 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. ! S3! http://aws.amazon.com/cloudformation/aws- cloudformation-templates/! ! 15 2013 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. AWS Management Console-116 2013 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. AWS Management Console-2 URL S317 2013 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. AWS Management Console-3 18 2013 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 Management Console-419 2013 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. AWS Management Console-520 2013 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. AWS Management Console-621 2013 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. AWS Management Console-722 2013 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. AWS Management Console-823 2013 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. AWS Management Console-924 2013 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. AWS Management Console-10 25 2013 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. AWS Management Console-11 26 2013 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. ! 27 2013 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. { "AWSTemplateFormatVersion" : "2010-09-09","Description" : Sample", "Parameters" : { "KeyName" : { "Description" : Sample key, "Type" : "String" } }, "Mappings" : { },! CloudFormation ! ! JSON"Resources" : { "Ec2Instance" : { "Type" : "AWS::EC2::Instance", "Properties" : { "SecurityGroups" : [ { "Ref" : "InstanceSecurityGroup" } ], "KeyName" : { "Ref" : "KeyName" }, "ImageId" : { "Fn::FindInMap" : [ "RegionMap", { "Ref" : "AWS::Region" }, "AMI" ]} } }, "InstanceSecurityGroup" : { "Type" : "AWS::EC2::SecurityGroup", "Properties" : { "GroupDescription" : "Enable SSH access via port 22", "SecurityGroupIngress" : [ { "IpProtocol" : "tcp", "FromPort" : "22", "ToPort" : "22", "CidrIp" : "0.0.0.0/0" }] } } }28} 2013 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. "AWSTemplateFormatVersion" : 2010-09-09", 2010-09-09"Description" : "Valid JSON strings up to 4K",{"Parameters" : { set of parameters }, "Mappings" : { set of mappings }, Conditions" : { set of conditions }, "Resources" : { set of resources }, "Outputs" : { set of outputs } }29CloudFormation DB Hashtable AMI ParametersConditionMapping EC2RDS 2013 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. Parameters { "AWSTemplateFormatVersion" : 2010-09-09", "Description" : "Valid JSON strings up to 4K", "Parameters" : { set of parameters }, "Mappings" : { set of mappings }, Conditions" : { set of conditions }, "Resources" : { set of resources },CloudFormation DB"Outputs" : { set of outputs } }30 2013 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. Parameters ! ! "Parameters" : { "Age":{ "Type":"Number", Default : 30, MinValue: 20, MaxValue: 60, "Description":"input your age. }, "FirstName":{ "Type":"String", "Description":"input your first name. }, }31 2013 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. 32. Parameters ! Type String Number CommaDelimitedListDefaultNoEcho*****AllowedValues [true,false] AllowedPattern[a-zA-Z]*MaxLengthMinLengthMaxValueMinValueDescriptionConstraintDescription32AllowedPatternMaxLength 2013 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. Parameters ! Ref ! Resources" : { MyServer":{ Type":AWS::EC2::Instance", Properties : { KeyName: { Ref : Age}, Tags : { Ref : FirstName} } } }33 2013 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. ! ! !