Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
kumogata-template
Codenize Meetup #1

2016/12/08

Naoya Nakazawa @n0ts
• Naoya Nakazawa @n0ts
• (Inframents, Inc.)
• re:Invent 2016
• Codenize Tools
• kumogata-template AWS CloudFormation
• kum...
Kumogata
😇
Kumogata
🤔
AWSTemplateFormatVersion "2010-09-09"
Description (<<-EOS).undent
Kumogata Sample Template
You can use Here document!
EOS
...
😀
😊
myEC2Instance do
Type "AWS::EC2::Instance"
Properties do
ImageId "ami-XXXXXXXX"
InstanceType { Ref "InstanceType" }
KeyNam...
😲
🤔
😎
Kumogata-template
🤗🤗🤗🤗
https://github.com/n0ts/
kumogata-template
😆
Kumogata-template
• Kumogata Ruby 😇
• Kumogata 100% 👍
• Gem *
• https://rubygems.org/gems/kumogata-
template
+ +
$ gem install kumogata-template
$ kumogata-template init codenize
Saved template to codenize.rb
$cat codezine.rb
AWSTemplateFormatVersion "2010-09-09"
Description (<<-EOS).undent
Kumogata Template - codenize stack
EOS
...
$ kumogata-template [create|update]
codezine.rb codezine
※kumogata
Kumogata
myEC2Instance do
Type "AWS::EC2::Instance"
Properties do
ImageId "ami-XXXXXXXX"
InstanceType { Ref "InstanceType" }
KeyNam...
Kumogata-template
user_data =<<EOS
yum install -y httpd
service httpd start
EOS
_ec2_instance "my",
image_id: "ami-XXXXXXXX",
ref_instance_t...
🤗
• : 50
•
• 1 Ruby :
100
• Kumogata2 😤
•
...
• API Gateway 😊
Kumogata
• CloudFormation
• JSON 1,500
...
• CloudFormation OUTPUT 60
• T CloudFormation AWS
API
-
Thx!
kumogata-template の紹介
Upcoming SlideShare
Loading in …5
×

kumogata-template の紹介

8,908 views

Published on

2016/12/08 Codezine Meetup #1

Published in: Technology
  • Be the first to comment

  • Be the first to like this

kumogata-template の紹介

  1. 1. kumogata-template Codenize Meetup #1
 2016/12/08
 Naoya Nakazawa @n0ts
  2. 2. • Naoya Nakazawa @n0ts • (Inframents, Inc.) • re:Invent 2016 • Codenize Tools • kumogata-template AWS CloudFormation • kumogata • Roadworker (Amazon Route 53) • Barkdog (Datadog Monitor) • Boxen (macOS) • dashdog Datgadog Dashboard ...
  3. 3. Kumogata 😇
  4. 4. Kumogata 🤔
  5. 5. AWSTemplateFormatVersion "2010-09-09" Description (<<-EOS).undent Kumogata Sample Template You can use Here document! EOS Parameters do InstanceType do Default "t1.micro" Description "Instance Type" Type "String" end end Resources do myEC2Instance do Type "AWS::EC2::Instance" Properties do ImageId "ami-XXXXXXXX" InstanceType { Ref "InstanceType" } KeyName "your_key_name" UserData do Fn__Base64 (<<-EOS).undent #!/bin/bash yum install -y httpd service httpd start EOS end end end end Outputs do AZ do Value do Fn__GetAtt "myEC2Instance", "AvailabilityZone" end end end
  6. 6. 😀
  7. 7. 😊
  8. 8. myEC2Instance do Type "AWS::EC2::Instance" Properties do ImageId "ami-XXXXXXXX" InstanceType { Ref "InstanceType" } KeyName "your_key_name" UserData do Fn__Base64 (<<-EOS).undent #!/bin/bash yum install -y httpd service httpd start EOS end end end
  9. 9. 😲
  10. 10. 🤔
  11. 11. 😎
  12. 12. Kumogata-template 🤗🤗🤗🤗
  13. 13. https://github.com/n0ts/ kumogata-template
  14. 14. 😆
  15. 15. Kumogata-template • Kumogata Ruby 😇 • Kumogata 100% 👍 • Gem * • https://rubygems.org/gems/kumogata- template
  16. 16. + +
  17. 17. $ gem install kumogata-template
  18. 18. $ kumogata-template init codenize Saved template to codenize.rb
  19. 19. $cat codezine.rb AWSTemplateFormatVersion "2010-09-09" Description (<<-EOS).undent Kumogata Template - codenize stack EOS Parameters do _parameter "name", default: "codenize", description: "name of this stack" _parameter "service", default: "service", description: "codenize service" _parameter "version", default: "1.0.0", description: "codenize version" end Mappings do end Resources do _s3_bucket "codenize" end Outputs do _output_s3 "codenize" end
  20. 20. $ kumogata-template [create|update] codezine.rb codezine ※kumogata
  21. 21. Kumogata
  22. 22. myEC2Instance do Type "AWS::EC2::Instance" Properties do ImageId "ami-XXXXXXXX" InstanceType { Ref "InstanceType" } KeyName "your_key_name" UserData do Fn__Base64 (<<-EOS).undent #!/bin/bash yum install -y httpd service httpd start EOS end end end
  23. 23. Kumogata-template
  24. 24. user_data =<<EOS yum install -y httpd service httpd start EOS _ec2_instance "my", image_id: "ami-XXXXXXXX", ref_instance_type: "instance_type", key_name: "your_key_name", user_data: user_data
  25. 25. 🤗
  26. 26. • : 50 • • 1 Ruby : 100
  27. 27. • Kumogata2 😤 • ... • API Gateway 😊
  28. 28. Kumogata • CloudFormation • JSON 1,500 ... • CloudFormation OUTPUT 60 • T CloudFormation AWS API
  29. 29. -
  30. 30. Thx!

×