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
Hiroto Fukui
September 21, 2019
Programming
0
53
Deploy from slack
Practical guide to install a way to deploy static web site using Slash command.
Hiroto Fukui
September 21, 2019
Tweet
Share
More Decks by Hiroto Fukui
See All by Hiroto Fukui
メールアドレスを深堀りする
bary822
2
1.1k
kiba ETLで小さく始めるデータ分析基盤構築
bary822
3
250
AR_migrationの例外.pdf
bary822
0
51
GraphQLを_Rubyで気軽に試す.pdf
bary822
0
270
Other Decks in Programming
See All in Programming
生成AI時代のフルスタック開発
kenn
6
550
Cursor/Devin全社導入の理想と現実
saitoryc
29
22k
Orleans + Sekiban + SignalR でリアルタイムWeb作ってみた
tomohisa
0
250
Boast Code Party / RubyKaigi 2025 After Event
lemonade_37
0
110
GitHub Copilot for Azureを使い倒したい
ymd65536
1
330
REALITY コマンド作成チュートリアル
nishiuriraku
0
120
Instrumentsを使用した アプリのパフォーマンス向上方法
hinakko
0
250
VitestのIn-Source Testingが便利
taro28
9
2.5k
Optimizing JRuby 10
headius
0
600
ウォンテッドリーの「ココロオドル」モバイル開発 / Wantedly's "kokoro odoru" mobile development
kubode
2
580
fieldalignmentから見るGoの構造体
kuro_kurorrr
0
140
データと事例で振り返るDevin導入の"リアル" / The Realities of Devin Reflected in Data and Case Studies
rkaga
3
2k
Featured
See All Featured
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
5
600
Large-scale JavaScript Application Architecture
addyosmani
512
110k
Designing for humans not robots
tammielis
253
25k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
29
1.7k
Building a Modern Day E-commerce SEO Strategy
aleyda
40
7.3k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
How to Ace a Technical Interview
jacobian
276
23k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
49k
[RailsConf 2023] Rails as a piece of cake
palkan
54
5.5k
Building Better People: How to give real-time feedback that sticks.
wjessup
368
19k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
331
21k
A Tale of Four Properties
chriscoyier
159
23k
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ではジョブ実行時の環境変数をパラメーターに指定できる