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
3 Effective Rules for Using Signals in Angular
manfredsteyer
PRO
1
100
ローコードSaaSのUXを向上させるためのTypeScript
taro28
1
630
ペアーズにおけるAmazon Bedrockを⽤いた障害対応⽀援 ⽣成AIツールの導⼊事例 @ 20241115配信AWSウェビナー登壇
fukubaka0825
6
2k
Compose 1.7のTextFieldはPOBox Plusで日本語変換できない
tomoya0x00
0
200
リアーキテクチャxDDD 1年間の取り組みと進化
hsawaji
1
220
最新TCAキャッチアップ
0si43
0
200
Tauriでネイティブアプリを作りたい
tsucchinoko
0
370
cmp.Or に感動した
otakakot
3
220
카카오페이는 어떻게 수천만 결제를 처리할까? 우아한 결제 분산락 노하우
kakao
PRO
0
110
flutterkaigi_2024.pdf
kyoheig3
0
150
.NET のための通信フレームワーク MagicOnion 入門 / Introduction to MagicOnion
mayuki
1
1.8k
Creating a Free Video Ad Network on the Edge
mizoguchicoji
0
120
Featured
See All Featured
Designing for humans not robots
tammielis
250
25k
BBQ
matthewcrist
85
9.3k
How to Ace a Technical Interview
jacobian
276
23k
KATA
mclloyd
29
14k
Designing on Purpose - Digital PM Summit 2013
jponch
115
7k
Large-scale JavaScript Application Architecture
addyosmani
510
110k
[RailsConf 2023] Rails as a piece of cake
palkan
52
4.9k
The Invisible Side of Design
smashingmag
298
50k
The Pragmatic Product Professional
lauravandoore
31
6.3k
Building a Scalable Design System with Sketch
lauravandoore
459
33k
Measuring & Analyzing Core Web Vitals
bluesmoon
4
130
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
27
840
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ΛͬͯҰ࣌τʔΫϯΛऔಘ
τʔΫϯΛͬͯΞΫηε
͝੩ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠