Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
AWS初心者がCodenize.toolsでInfrastructure as Codeした話...
Search
Naoto Enokawa
July 24, 2015
0
830
AWS初心者がCodenize.toolsでInfrastructure as Codeした話/jawsug-beginner2-lt
JAWS-UG初心者支部【第2回】懇親会LT資料
https://jawsug-beginner.doorkeeper.jp/events/26430
Naoto Enokawa
July 24, 2015
Tweet
Share
More Decks by Naoto Enokawa
See All by Naoto Enokawa
CircleCI Orbs にコントリビュートした話 / Story contributed to CircleCI Orbs
enokawa
0
500
AWS re:Invent 2017行ってきました報告 / JAWS-UG Okinawa 20180106
enokawa
1
320
Roadworkerではじめる大量DNS移行 / Codenize Meetup
enokawa
0
3.2k
AWS構築のハマりポイントを詳しく解説 / Cloud on the BEACH 2016
enokawa
3
1.4k
JAWS DAYS 2016 ランチセッション
enokawa
0
550
AWS SDK for RubyでDynamoDBを操作してみた
enokawa
0
330
cloudpackインターン成果報告
enokawa
0
2k
ownCloud on AWS in Hackers Champloo 前夜祭 #hcmpl
enokawa
0
610
#jawsug 沖縄 勉強会「AWS触ってみたけどその後どうしてる?」
enokawa
0
94
Featured
See All Featured
Bash Introduction
62gerente
608
210k
Rails Girls Zürich Keynote
gr2m
94
13k
Fireside Chat
paigeccino
34
3.1k
Mobile First: as difficult as doing things right
swwweet
222
9k
A Tale of Four Properties
chriscoyier
157
23k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
Six Lessons from altMBA
skipperchong
27
3.5k
It's Worth the Effort
3n
183
28k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
229
52k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
28
900
Music & Morning Musume
bryan
46
6.2k
The Invisible Side of Design
smashingmag
298
50k
Transcript
AWSॳ৺ऀ͕ Codenize.toolsͰ Infrastructure as Codeͨ͠ Naoto Enokawa
ࣗݾհ • ͑ͷ͔Θ ͳ͓ͱ • cloudpack৽ଔ̍ • ԭೄੜ·Εԭೄҭͪ • JAWS-UGԭೄίΞϝϯόʔ
• AWSॳ৺ऀʗΫϥυΏͱΓ
Infrastructure as Code • ΠϯϑϥΛίʔυͰॻ͘ • ίʔυʹ͢Δ͜ͱͰϛεΛ͙ • εϐʔσΟʹΠϯϑϥΛௐୡͰ͖Δ
None
None
Piculet • Ruby • AWSͷSecurity GroupsΛίʔυԽ • ΫοΫύουͷ@sgwr_dts ͞Μ͕࡞
PiculetͷϝϦοτ • ΞΧϯτΛ·͍ͨͰSGΛҠߦͰ͖Δ • ։ൃˠεςʔδϯάˠຊ൪ͷSGҠߦ͕ϥΫ • 10͋ΕҠߦͰ͖Δ • --dry-runΦϓγϣϯ͕͑Δ
खॱ
खॱ • IAMϢʔβʔ࡞ • credentialsઃఆ • PiculetΠϯετʔϧ • Piculet࣮ߦʂ
IAMϢʔβʔ࡞ • SecurityGroupsͷૢ࡞ΛڐՄ͢Δ ϙϦγʔΛద༻ • IP੍ݶΛೖΕΔͱঘΑ͠
$ cat ~/.aws/credentials [dev] #։ൃڥ༻ aws_access_key_id = AKIXXXXXXXXXXXXXXXX aws_secret_access_key =
SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS [prod] #ຊ൪ڥ༻ aws_access_key_id = AKIXXXXXXXXXXXXXXXX aws_secret_access_key = SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS
$ gem install piculet
$ piculet -e -p dev -r ap-northeast-1 > Groupfile
͜ͷSG͕
security_group "web-sg" do ingress do permission :tcp, 80..80 do ip_ranges(
"0.0.0.0/0" ) end end end ͜Μͳײ͡
։ൃڥ͔Β ຊ൪ڥʹઃఆ͢Δʹ
$ piculet -a -p prod -r ap-northeast-1 ※--dry-runΦϓγϣϯ͑Δ͠ศརʂ
Future • Github(private)Ͱόʔδϣϯཧ • SGίʔυϨϏϡʔ
AWSॳ৺ऀ͕ Codenize.toolsͰ Infrastructure as Codeͨ͠ Naoto Enokawa