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
OK Google, Deploy the iOS app
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
asmz
March 26, 2019
Technology
980
1
Share
OK Google, Deploy the iOS app
OK Google, iOSアプリをデプロイして
Talked at GCPUG Sendai #1
asmz
March 26, 2019
More Decks by asmz
See All by asmz
Firebase App Testing Agentで始めるAIベースの柔軟なE2Eテスト
asmz
0
1.2k
モバイルアプリ開発へE2Eテストを導入しよう
asmz
0
260
React Native+Expoで始めるWebフロント開発
asmz
0
690
UIデザインを考える全ての人たちに捧げる Apple Human Interface Guidelinesのススメ
asmz
1
2.7k
Overview of Swift and iOS App development
asmz
0
1.3k
How to get mobile app logs using Firebase Crashlytics
asmz
0
910
Cooperate with Adobe XD, Zeplin and Xcode
asmz
1
3.2k
phpconsen LT
asmz
0
810
SWWDC 39
asmz
1
290
Other Decks in Technology
See All in Technology
Bill One 開発エンジニア 紹介資料
sansan33
PRO
6
18k
エージェントスキルを作って自分のインプットに役立てよう
tsubakimoto_s
0
350
AzureのIaC管理からログ調査まで、随所に役立つSkillsとCustom-Instructions / Boosting IaC and Log Analysis with Skills
aeonpeople
0
230
MLOps導入のための組織作りの第一歩
akasan
0
330
[最強DB講義]推薦システム | 基礎編
recsyslab
PRO
1
170
社内エンジニア勉強会の醍醐味と苦しみ/tamadev
nishiuma
0
210
Rapid Start: Faster Internet Connections, with Ruby's Help
kazuho
2
500
Revisiting [CLS] and Patch Token Interaction in Vision Transformers
yu4u
0
360
Good Enough Types: Heuristic Type Inference for Ruby
riseshia
1
220
サイボウズ 開発本部採用ピッチ / Cybozu Engineer Recruit
cybozuinsideout
PRO
10
78k
20260428_Product Management Summit_Loglass_JoeHirose
loglassjoe
0
970
20年前の「OSS革命」に学ぶ AI時代の生存戦略
samakada
0
430
Featured
See All Featured
AI Search: Where Are We & What Can We Do About It?
aleyda
0
7.3k
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
180
The Curious Case for Waylosing
cassininazir
0
300
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.8k
A Modern Web Designer's Workflow
chriscoyier
698
190k
Raft: Consensus for Rubyists
vanstee
141
7.4k
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
140
We Are The Robots
honzajavorek
0
220
The Language of Interfaces
destraynor
162
26k
Claude Code のすすめ
schroneko
67
220k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
199
73k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
231
23k
Transcript
OK Google, iOSアプリをデプロイして 2019/03/26 GCPUG Sendai #1 Akira Shimizu /
asmz 1
2 誰なのか? • Akira Shimizu / asmz (@_asmz) • https://asmz.beer/
• 株式会社ビデオマーケット 仙台オフィス • iOSエンジニア • GCP周辺技術が割と好き ◦ Firebase、Actions on Google etc...
3 今回やってみたこと
4 今回やってみたこと 開発中のアプリベータ 版、最新版が欲しいんだ けど... う〜ん、 起きたくない...zzZ
5 今回やってみたこと OK Google, iOSアプリをデプロイし て〜 ワカリマシタ
6 今回やってみたこと Zzz... デプロイガ オワリマシタヨ きたきた〜 わ〜い
7 本日の材料
iOSアプリCI/CD 本日の材料 Actions on Google 物理デバイス 8 Google Home Raspberry
Pi Cloud IoT Core Cloud Datastore Cloud Functions Bitrise Google Assistant Dialogflow
9 下ごしらえ
10 下ごしらえ • まずはiOSアプリCI環境を構築します Push Hook delivery (development) upload -
Code signing - Provisioning - Build (production) download 省 略
11 下ごしらえ • デプロイに必要なもの ◦ 対象ブランチ ◦ BitriseのWorkflow • Workflowとは
◦ ビルドに必要な一連の作業フ ローを定義したもの ◦ 開発用、本番用などビルドの 種類分用意する
12 下ごしらえ • 対象ブランチとWorkflowが決まれば、Webhook URLでCIタスクをKickすることが可能!
13 システム構築
14 User Devices Mobile App CI/CD Google Home Actions on
Google Raspberry Pi Cloud IoT Core Cloud Datastore Cloud Functions Cloud Functions Bitrise Google Assistant Dialogflow 全体構成
15 【往路】 Google Home→ デプロイ開始
16 Google Home→ デプロイ開始 16 User Devices Mobile App CI/CD
Google Home Actions on Google Cloud Datastore Cloud Functions Bitrise Google Assistant Dialogflow POINT!
• Dialogflowとは ◦ 自然言語解析エンジン ◦ 人間の普通の会話形式の言葉を聞き取り、解析 ◦ Googleアシスタント用アプリの開発プラットフォーム「Actions on Google」に統合
17 音声アシスタント接続、言語解析 Google Home Google Assistant Server Dialogflow
音声アシスタント接続、言語解析 • Entity定義 ◦ 発話内容をパラメータ値にマッピング 18 発話内容 パラメータ値
音声アシスタント接続、言語解析 • Intent定義 ◦ 音声アシスタントのメインフローを定義 19 音声アシスタントが POSTに必要なパラメー タ値を聞き出す
音声アシスタント接続、言語解析 • Fulfillment定義 ◦ 必要なパラメータ取得後に行う処理を定義 20 今回はCloud Functionsへ Webhookするよう設定
21 解析したパラメータをBitriseへPOST 21 User Devices Mobile App CI/CD Google Home
Actions on Google Cloud Datastore Cloud Functions Bitrise Google Assistant Dialogflow ① パラメータ: branch, workflow ② Webhook URLへ POST ③ Bitriseレスポンスの「ビ ルド番号」保存
22 【復路】 デプロイ終了 → Google Home
23 デプロイ終了 → Google Home User Devices Mobile App CI/CD
Google Home Raspberry Pi Cloud IoT Core Cloud Datastore Cloud Functions Bitrise POINT!
Cloud IoT Coreとは 24 • GCPから各種IoTデバイスと接続・管理・データ取り込 みなどを行えるフルマネージドサービス ◦ クラウド⇔デバイス双方向通信が可能 Cloud
IoT Core 各種IoTデバイス・センサー HTTPS / MQTT
Cloud IoT Coreとは 25 • レジストリ作成 利用するプロトコル 端末からの上りイベント を流すPub/Subトピック
Cloud IoT Coreとは 26 • 端末定義 デバイス側でキーペアを 作成し、公開鍵をコン ソールに設定
Cloud IoT Coreとは 27 • デバイス側MQTTクライアント設定(ex. Node.js)
Cloud IoT Coreとは 28 • デバイス側MQTTクライアント設定(ex. Node.js) • これでクラウド⇔デ バイス双方向通信
が可能に!
29 デプロイ終了通知をIoT Coreへ伝達 User Devices Mobile App CI/CD Google Home
Raspberry Pi Cloud IoT Core Cloud Datastore Cloud Functions Bitrise ① パラメータ: ビルド番号 ② ビルド番号存在 チェック ③ メッセージ(ビルド番 号)送信
30 Raspberry Piで通知受信、発話 User Devices Mobile App CI/CD Google Home
Raspberry Pi Cloud IoT Core Cloud Datastore Cloud Functions Bitrise
Raspberry Piで通知受信し発話 31 • 「google-home-notifier」で同一ネットワーク内のGoogle Homeへ発話指示 ◦ https://github.com/noelportugal/google-home-notifier
32 完成!
成果物 33 ビルド番号 373 番の デプロイがおわりましたよ 約10分後
34 感想・まとめ
35 やってみての感想 • 定型的な作業向き ◦ ベータ版アプリの再配布 ◦ 環境違いのベータ版の配布 など • リスク低な作業向き
◦ リリースビルドなど間違えたくないデプロイは音声より文字 での確認の方がしやすい
36 やってみての学び • アイデア次第でいろんなことに応用できそう • Cloud IoT Coreを使った、クラウドから物理デバイス との双方向通信は、結構応用が効きそう ◦
重度障害発生時に音で知らせる、パトランプ回す ◦ Webからの家電操作(ラズパイ+赤外線リモコン) 便利な使い方あれば、 ぜひGCPUG Sendaiで発表を!
37 Enjoy Engineering! 2019/03/26 GCPUG Sendai #1 Akira Shimizu /
asmz
38 [PR] 個人開発アプリのご紹介 • ITイベント・勉強会検索アプリ「EVENTech」 ◦ connpass検索機能使えなくて不便ですよね... ◦ あります、検索機能。 ◦
https://eventech.asmz.beer/