Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Deploy from slack
Search
Hiroto Fukui
September 21, 2019
Programming
83
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
290
AR_migrationの例外.pdf
bary822
0
82
GraphQLを_Rubyで気軽に試す.pdf
bary822
0
370
Other Decks in Programming
See All in Programming
変化を抱擁するドキュメントの作り方 - ビジネスルール駆動開発がもたらす、コードとの新しい関係
ioki
2
220
『寄り添うラジオ』をAIで作る 体験価値から逆算した、会話しないUXと品質設計
theoriatec2024
3
180
Verilogで学ぶCPU自作入門.pdf
uyuki234
2
1.6k
巨大モノリシックアプリ モダン化大作戦
ktcryomm
1
1.1k
AHC070解法紹介
eijirou
0
130
WebMCP Challenge に星空観察アプリで参加した話
okajun35
0
190
FreeBSDでZabbixを動かす
kenkino
0
320
The Rails Doctrine Decade
koic
2
340
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
270
Everything will be SERVERLESS — 信じて運用した10年の経験値 / Everything Will be Serverless — Lessons Learned from 10 Years of Operational Experience
seike460
PRO
1
450
ゲームコントローラやキーボードのファームウェアをSwiftで書く
kishikawakatsumi
1
250
LoopHub - ローカルで動く GitHub で、AI と共同開発
jugyo
1
570
Featured
See All Featured
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
3k
How to train your dragon (web standard)
notwaldorf
97
6.8k
Large-scale JavaScript Application Architecture
addyosmani
515
110k
How Software Deployment tools have changed in the past 20 years
geshan
1
34k
HDC tutorial
michielstock
2
880
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
250
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.8k
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
470
Making the Leap to Tech Lead
cromwellryan
135
10k
Ten Tips & Tricks for a 🌱 transition
stuffmc
1
240
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
62k
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ではジョブ実行時の環境変数をパラメーターに指定できる