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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Hiroto Fukui
September 21, 2019
Programming
94
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
Transcript
24 slides
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ではジョブ実行時の環境変数をパラメーターに指定できる
More Decks by Hiroto Fukui
See All by Hiroto Fukui
メールアドレスを深堀りする
bary822
2
1.2k
kiba ETLで小さく始めるデータ分析基盤構築
bary822
3
300
AR_migrationの例外.pdf
bary822
0
92
GraphQLを_Rubyで気軽に試す.pdf
bary822
0
380
Other Decks in Programming
See All in Programming
Lean で手続き的プログラム の証明が書けるようになった
inoueasei
0
120
AI時代のIaC入門 〜なぜインフラをコードで管理したいのか?〜 / Introduction to IaC in the AI Era
akihisaikeda
6
1.6k
React Native経験者が Flutterを30⽇間触って驚いたこと
3saito
0
210
眠らない開発チームの作り方
biwakonbu
0
110
Kotlin Fest 2026: Kotlin コンパイラに Contribute してみよう! - Kotlin/Wasm で深い再帰を書けるようにした話
ternbusty
1
420
動画プレイヤーはなぜカクつくのか 〜Flutterのレンダリングとネイティブの境界を解剖する〜
naruogram
0
340
高速開発を止めずに 性能を上げる Flyleのシステム刷新と改善の歴史
azihsoyn
0
110
はじめてのPLATEAU
nokonoko1203
1
670
Growing PicoRuby's Ecosystem on ESP32
yuuu
2
150
Enforcing Your Architecture with Unit Tests in the AI Era (Swift Connection X)
steliosf
PRO
1
190
テストだけで見つかる? Rubyでつくるメソッド発掘器
izawa
0
160
はじめてのKubernetesコントリビューション
nasa9084
0
320
Featured
See All Featured
A designer walks into a library…
pauljervisheath
211
25k
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
440
Highjacked: Video Game Concept Design
rkendrick25
PRO
2
600
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
480
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
3
1.5k
New Earth Scene 8
popppiees
5
2.9k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
62k
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
1
320
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
2
570
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
2
4k
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.9k
[RailsConf 2023] Rails as a piece of cake
palkan
59
7.2k