Skip to content
This repository has been archived by the owner on Oct 9, 2020. It is now read-only.

Latest commit

 

History

History
51 lines (39 loc) · 1.57 KB

tutorial.md

File metadata and controls

51 lines (39 loc) · 1.57 KB

DevicePilot onboarding for Google Cloud IoT Core users

Run script

./script.sh

When prompted click here to open key file and copy its content into DevicePilot.

Alternatively, follow each step manually in the next page.

Run manually

Configure project

gcloud projects list && read -p "PROJECT_ID: " PROJECT_ID

Configure topic

(select, copy and paste this code manually, without using the top right icon)

gcloud pubsub topics list | sed -n 's/.*\/topics\///p' && read -p "Topic: " TOPIC

Set project

gcloud config set project $PROJECT_ID

Create service account

gcloud iam service-accounts create devicepilot-subscriber --display-name "DevicePilot Subscriber"

Create subscription

gcloud pubsub subscriptions create devicepilot-subscription --topic=$TOPIC --topic-project=$PROJECT_ID

Add service account to subscription

gcloud beta pubsub subscriptions add-iam-policy-binding devicepilot-subscription --member=serviceAccount:devicepilot-subscriber@$PROJECT_ID.iam.gserviceaccount.com --role=roles/pubsub.subscriber

Create key

gcloud iam service-accounts keys create --iam-account=devicepilot-subscriber@$PROJECT_ID.iam.gserviceaccount.com key.json

Copy key into DevicePilot

Click here to open key file and copy its content into DevicePilot.