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
Deploy from slack
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Hiroto Fukui
September 21, 2019
Programming
71
0
Share
Deploy from slack
Practical guide to install a way to deploy static web site using Slash command.
Hiroto Fukui
September 21, 2019
More Decks by Hiroto Fukui
See All by Hiroto Fukui
メールアドレスを深堀りする
bary822
2
1.2k
kiba ETLで小さく始めるデータ分析基盤構築
bary822
3
280
AR_migrationの例外.pdf
bary822
0
66
GraphQLを_Rubyで気軽に試す.pdf
bary822
0
340
Other Decks in Programming
See All in Programming
YJITとZJITにはイカなる違いがあるのか?
nakiym
0
220
10年分の技術的負債、完済へ ― Claude Code主導のAI駆動開発でスポーツブルを丸ごとリプレイスした話
takuya_houshima
0
2.5k
Running Swift without an OS
kishikawakatsumi
0
830
「話せることがない」を乗り越える 〜日常業務から登壇テーマをつくる思考法〜
shoheimitani
4
780
Reactive ❤️ Loom: A Forbidden Love Story
franz1981
2
240
KagglerがMixSeekを触ってみた
morim
0
380
煩雑なSkills管理をSoC(関心の分離)により解決する――関心を分離し、プロンプトを部品として育てるためのOSSを作った話 / Solving Complex Skills Management Through SoC (Separation of Concerns)
nrslib
4
900
一度始めたらやめられない開発効率向上術 / Findy あなたのdotfilesを教えて!
k0kubun
4
2.9k
Exploring RuboCop with MCP
koic
0
610
LM Linkで(非力な!)ノートPCでローカルLLM
seosoft
0
490
How Swift's Type System Guides AI Agents
koher
0
250
The Monolith Strikes Back: Why AI Agents ❤️ Rails Monoliths
serradura
0
320
Featured
See All Featured
Rebuilding a faster, lazier Slack
samanthasiow
85
9.5k
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.1k
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
160
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
1.2k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
2.9k
Prompt Engineering for Job Search
mfonobong
0
270
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
430
Faster Mobile Websites
deanohume
310
31k
Building an army of robots
kneath
306
46k
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1k
Transcript
Slackからデプロイ Hiroto Fukui @bary822
self self.name => Hiroto Fukui self.sns => @bary822 self.titles =>
[‘app engineer’, ‘data engineer’] self.companies => [‘rakuten’, ‘grooves’] self.likes => [‘dog’, ‘camping’,’SUP‘, ruby’]
Osaka Tokyo
None
Slackからデプロイしたい
?
前提 - サービスの静的サイト - Ruby製 - https://www.crowd-agent.com/agent/ - コードはGitHub -
S3でホスティング - bundle exec middleman s3_sync -e=production でデプロイ
? S3
1. /deploy production する 2. 任意のURLにPOSTリクエストを発行 3. レスポンスに応じてメッセージを表示
? S3
AWS Lambda FaaS(Function as a Service) 1. Lambda関数がリクエストを受け付ける 2. GitHubからコードをダウンロード
3. コマンド実行 4. S3 APIを呼び出してsync(デプロイ)
? S3
API Gateway Lambda S3
API Gateway Lambda S3
None
API Gateway Lambda CircleCI S3
API Gateway Lambda CircleCI S3
3秒ルール - Slashコマンドは3秒以内に何らかのメッセージを返す必要がある - それを超えるとエラーメッセージが表示される リクエストを受け取ると とりあえず何かを返すのが吉
API Gateway Lambda 1st CircleCI Lambda 2nd S3
リクエストがLambdaに届いた時にとりあえず返す CircleCI APIから200が返ってきた時に返す
よくあるかもしれない質問
Slashコマンドが呼ぶAPIの認証方法 - Slashコマンド毎にユニークなトークンがヘッダーに入ってPOSTされる - API Gatewayでそれを検証
Lambdaの無料枠内で収まるのでは - 多分収まる - デプロイするのは開発者ではない - マーケティングの人 - デプロイ回数をコントロールできない前提があった
CIに入れるとpushする度にデプロイされるのでは - DEPLOY という環境変数を見るようにした - Lambdaから呼び出す時のみ DEPLOY=true を設定 - CircleCI
APIではジョブ実行時の環境変数をパラメーターに指定できる