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・Hubot・Slackで ChatOpsする話[実装編]
Search
Kazuhisa Togo
November 08, 2016
Programming
0
830
AWS・Hubot・Slackで ChatOpsする話[実装編]
AWSとHubotを用いてSlackと連携したChatOpsを行った際の実装をお話します。
Kazuhisa Togo
November 08, 2016
Tweet
Share
More Decks by Kazuhisa Togo
See All by Kazuhisa Togo
Continuous Deployment with Go on AWS ECS
ktogo
1
4k
Golangで支えるハイパフォーマンスAPI
ktogo
6
2.9k
SIMD meets ES7
ktogo
0
95
Other Decks in Programming
See All in Programming
NSOutlineView何もわからん:( 前編 / I Don't Understand About NSOutlineView :( Pt. 1
usagimaru
0
340
as(型アサーション)を書く前にできること
marokanatani
10
2.7k
ピラミッド、アイスクリームコーン、SMURF: 自動テストの最適バランスを求めて / Pyramid Ice-Cream-Cone and SMURF
twada
PRO
10
1.3k
RubyLSPのマルチバイト文字対応
notfounds
0
120
Streams APIとTCPフロー制御 / Web Streams API and TCP flow control
tasshi
2
350
카카오페이는 어떻게 수천만 결제를 처리할까? 우아한 결제 분산락 노하우
kakao
PRO
0
110
Make Impossible States Impossibleを 意識してReactのPropsを設計しよう
ikumatadokoro
0
200
3 Effective Rules for Using Signals in Angular
manfredsteyer
PRO
0
120
Webの技術スタックで マルチプラットフォームアプリ開発を可能にするElixirDesktopの紹介
thehaigo
2
1k
cmp.Or に感動した
otakakot
3
200
광고 소재 심사 과정에 AI를 도입하여 광고 서비스 생산성 향상시키기
kakao
PRO
0
170
3 Effective Rules for Using Signals in Angular
manfredsteyer
PRO
1
100
Featured
See All Featured
Site-Speed That Sticks
csswizardry
0
27
Gamification - CAS2011
davidbonilla
80
5k
Typedesign – Prime Four
hannesfritz
40
2.4k
The Cost Of JavaScript in 2023
addyosmani
45
6.8k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
StorybookのUI Testing Handbookを読んだ
zakiyama
27
5.3k
Building a Modern Day E-commerce SEO Strategy
aleyda
38
6.9k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
28
8.2k
RailsConf 2023
tenderlove
29
900
How to Think Like a Performance Engineer
csswizardry
20
1.1k
Rebuilding a faster, lazier Slack
samanthasiow
79
8.7k
A Tale of Four Properties
chriscoyier
156
23k
Transcript
AWSɾHubotɾSlackͰ ChatOps͢Δ ࣮ ฤ Kazuhisa Togo
ΞϓϦέʔγϣϯߏ
HubotͰSlackʹଓɺ࿈ܞ
Node.js ͰՔಇ
DockerͰ ΞϓϦέʔγϣϯΛԾԽ
EC2 ΠϯϑϥશAWS
Πϯϑϥ
EC2 ECS ECR
EC2 ECS ECR ؋Ϛγϯ DockerίϯςφΛΒͤΔ
EC2 ECS ECR DockerίϯςφͷϚωδϝϯτ ࢮ׆ࢹͳͲ
EC2 ECS ECR DockerΠϝʔδͷϓϥΠϕʔτஷଂݿ
EC2 ECS ECR 3ͭ߹ΘͤͯDockerίϯςφཧ
σϓϩΠ
CIπʔϧ
CodeDeployͱΈ߹Θͤͯ Continuous Deployment CodeDeploy
ϦιʔεɺΞϓϦέʔγϣϯͷ σϓϩΠ
CodeDeploy S3 EC2 ͓͓·͔ͳྲྀΕ
CodeD S3 ϦϙδτϦʹ git push
CodeD S3 GitHub Hook
CodeD S3 ϒϥϯνͷσʔλΛऔಘ Ϗϧυˍςετ
CodeDeploy S3 E σϓϩΠ༻ͷϑΝΠϧҰࣜΛΞʔΧΠϒ S3ʹసૹ
CodeDeploy S3 EC2 ४උ͕Ͱ͖ͨΒCodeDeployݺͼग़͠
CodeDeploy S3 EC2 S3͔ΒΞʔΧΠϒΛμϯϩʔυ ల։ɾΠϯετʔϧ
CodeDeploy S3 EC2 Πϯετʔϧॲཧ ྃޙͷޙย͚
CodeDeploy S3 EC2 σϓϩΠΛશࣗಈԽ
CodeDeploy S3 EC2 ChatOpsΛͬͨϓϩηε EC2
CodeDeploy S3 EC2 Bot͔ΒσϓϩΠࢦࣔ EC2
CodeDeploy S3 EC2 εςʔδϯάڥʹσϓϩΠͨ͠༰Λ ϓϩμΫγϣϯڥʹσϓϩΠ EC2
ίϯςφͷ σϓϩΠ
ECR ͓͓·͔ͳྲྀΕ ECS
ECR CIͷϑοΫ·Ͱڞ௨ pushΛϑοΫͯࣗ͠ಈͰ։࢝ ECS
ECR CircleCIͰ docker build ECS
ECR ECRʹ docker push ECS
ECR ECS͔Βࢀর λά࣍ୈͰखଓ͖ແ͠Ͱߋ৽ ECS
ECR λεΫΛ্ཱͪ͛͢ͱ ৽͍͠Πϝʔδ͕ࣗಈద༻ ECS
ECR ͜ΕશࣗಈԽ͕Մೳ ECS
AWS-SDK
खް͍SDK Node.js SDK
όονىಈ ੲͳ͕Βͷ git pull σϓϩΠetc. Node.js SDK
ΠϯελϯεͷIPΛऔಘͨ͠Γ͢Δͷʹ SDKେ׆༂ Node.js SDK
ΞΫηε੍ޚ
ϝοηʔδͷߘϢʔβʔ SlackଆͰ ݪଇ ೝূࡁΈ
௨ৗ HubotଆͰIDͷνΣοΫ͚ͩͰOK
APIΛۦͯ͠ as_user ͱ͔͞ΕͪΌͬͨ߹ྫ֎ ͦͷ߹ݖݶΛݟ͠·͠ΐ͏
τʔΫϯͷηΩϡϦςΟʔ
S3 EC2 ιʔείʔυʹೝূใΛॻ͖ࠐΉͱ ͯ͢ͷܦ࿏Ͱ伴Λ࿐ͯ͠͠·͏
Task Definition Ͱڥมͱͯ͠ఆٛ ECS
࿙Ӯ͠͏ΔՕॴΛେ͖͘ݮ ECS
ΫϩεΞΧϯτΞΫηε
AWSΞΧϯτΛ͍ͯ͠Δ߹ ΞΫηεͰ͖ͳ͍
ΫϩεΞΧϯτΞΫηε
ϩʔϧΛ࡞
STSΛͬͯҰ࣌τʔΫϯΛऔಘ
τʔΫϯΛͬͯΞΫηε
͝੩ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠