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
asmz
March 26, 2019
Technology
1
740
OK Google, Deploy the iOS app
OK Google, iOSアプリをデプロイして
Talked at GCPUG Sendai #1
asmz
March 26, 2019
Tweet
Share
More Decks by asmz
See All by asmz
Recommend Apple Human Interface Guidelines
asmz
1
1.8k
Overview of Swift and iOS App development
asmz
0
1.1k
How to get mobile app logs using Firebase Crashlytics
asmz
0
750
Cooperate with Adobe XD, Zeplin and Xcode
asmz
1
2.9k
phpconsen LT
asmz
0
640
SWWDC 39
asmz
1
150
Create voice assistant app by Dialogflow
asmz
0
770
SWWDC 34
asmz
0
620
SWWDC 30
asmz
1
2.4k
Other Decks in Technology
See All in Technology
MLOpsの「あるある」課題の解決と、そのためのライブラリgokart
mski_iksm
1
150
10Xでのデータ基盤の変遷とこれから: データマネジメントのリアル 〜BtoB企業3社の歩みとこれから〜
10xinc
6
1.2k
LeSSはスクラムではない!?LeSSにおけるスクラムマスターの振る舞い方とは / Scrum Master Behavior in LeSS
toma_sm
0
130
Oracle Cloud Infrastructure:2024年9月度サービス・アップデート
oracle4engineer
PRO
0
360
Oracle Database 23ai 新機能#4 Real Application Clusters
oracle4engineer
PRO
0
110
エンジニアは伝え方が9割/90% of what engineers need is communication skills
ykanoh
2
160
OPENLOGI Company Profile for engineer
hr01
1
12k
KDD2024参加報告
cyberagentdevelopers
PRO
1
210
Perlで始めるeBPF: 自作Loaderの作り方 / Getting started with eBPF in Perl_How to create your own Loader
takehaya
1
210
「ばん・さく・つき・たー!」にならないためにSHIROBAKOから 学んだこと
ysknsid25
3
420
【shownet.conf_】革新と伝統を融合したファシリティ
shownet
PRO
0
250
普通の Web エンジニアのための様相論理入門 #yapcjapan / YAPC Hakodate 2024
ytaka23
2
530
Featured
See All Featured
VelocityConf: Rendering Performance Case Studies
addyosmani
324
23k
Docker and Python
trallard
40
3k
Large-scale JavaScript Application Architecture
addyosmani
509
110k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
26
4k
Teambox: Starting and Learning
jrom
131
8.7k
StorybookのUI Testing Handbookを読んだ
zakiyama
26
5.1k
A Modern Web Designer's Workflow
chriscoyier
692
190k
Designing with Data
zakiwarfel
98
5.1k
A better future with KSS
kneath
235
17k
Speed Design
sergeychernyshev
22
460
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.2k
Adopting Sorbet at Scale
ufuk
73
8.9k
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/