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
暇に任せてProxmoxコンソール 作ってみました
karugamo
2
720
採用事例の少ないSvelteを選んだ理由と それを正解にするためにやっていること
oekazuma
2
1k
MCP with Cloudflare Workers
yusukebe
2
220
テストコード書いてみませんか?
onopon
2
170
fs2-io を試してたらバグを見つけて直した話
chencmd
0
240
ゆるやかにgolangci-lintのルールを強くする / Kyoto.go #56
utgwkk
2
420
競技プログラミングへのお誘い@阪大BOOSTセミナー
kotamanegi
0
360
Итераторы в Go 1.23: зачем они нужны, как использовать, и насколько они быстрые?
lamodatech
0
890
見えないメモリを観測する: PHP 8.4 `pg_result_memory_size()` とSQL結果のメモリ管理
kentaroutakeda
0
450
Jakarta EE meets AI
ivargrimstad
0
260
rails statsで大解剖 🔍 “B/43流” のRailsの育て方を歴史とともに振り返ります
shoheimitani
2
950
テストケースの名前はどうつけるべきか?
orgachem
PRO
0
150
Featured
See All Featured
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
38
1.9k
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
Mobile First: as difficult as doing things right
swwweet
222
9k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.3k
Raft: Consensus for Rubyists
vanstee
137
6.7k
Statistics for Hackers
jakevdp
796
220k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
48
2.2k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
3
170
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
330
21k
Building Adaptive Systems
keathley
38
2.3k
We Have a Design System, Now What?
morganepeng
51
7.3k
Navigating Team Friction
lara
183
15k
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ΛͬͯҰ࣌τʔΫϯΛऔಘ
τʔΫϯΛͬͯΞΫηε
͝੩ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠