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
840
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
97
Other Decks in Programming
See All in Programming
rails statsで大解剖 🔍 “B/43流” のRailsの育て方を歴史とともに振り返ります
shoheimitani
2
930
KMP와 kotlinx.rpc로 서버와 클라이언트 동기화
kwakeuijin
0
140
Symfony Mapper Component
soyuka
2
730
Fibonacci Function Gallery - Part 1
philipschwarz
PRO
0
220
数十万行のプロジェクトを Scala 2から3に完全移行した
xuwei_k
0
270
PHPとAPI Platformで作る本格的なWeb APIアプリケーション(入門編) / phpcon 2024 Intro to API Platform
ttskch
0
220
Refactor your code - refactor yourself
xosofox
1
260
情報漏洩させないための設計
kubotak
1
140
Go の GC の不得意な部分を克服したい
taiyow
3
780
Mermaid x AST x 生成AI = コードとドキュメントの完全同期への道
shibuyamizuho
0
160
StarlingMonkeyを触ってみた話 - 2024冬
syumai
3
270
return文におけるstd::moveについて
onihusube
1
1.1k
Featured
See All Featured
Making Projects Easy
brettharned
116
5.9k
No one is an island. Learnings from fostering a developers community.
thoeni
19
3k
Facilitating Awesome Meetings
lara
50
6.1k
Into the Great Unknown - MozCon
thekraken
33
1.5k
The Art of Programming - Codeland 2020
erikaheidi
53
13k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
10
810
Rebuilding a faster, lazier Slack
samanthasiow
79
8.7k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
191
16k
Designing for Performance
lara
604
68k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
159
15k
How STYLIGHT went responsive
nonsquared
95
5.2k
Faster Mobile Websites
deanohume
305
30k
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ΛͬͯҰ࣌τʔΫϯΛऔಘ
τʔΫϯΛͬͯΞΫηε
͝੩ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠