manager

command
v0.0.0-...-458b501 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 5, 2019 License: Apache-2.0 Imports: 12 Imported by: 0

README

Google Cloud IoT Core Device Manager Sample

Authentication

  • Create a project with the Google Cloud Console, and enable the Cloud IoT Core API.

  • From the Cloud Console, create a service account, download its json credentials file, then set the GCLOUD_PROJECT and GOOGLE_APPLICATION_CREDENTIALS environment variable:

    export GCLOUD_PROJECT=your-project-id
    export GOOGLE_APPLICATION_CREDENTIALS=/path/to/your-project-credentials.json
    

Run the sample

To build and run the sample:

go run manager.go

Before you can connect devices, you will need to generate public / private key credentials to register and connect.

The following commands generate keys suitable for use on a single device.

openssl req -x509 -newkey rsa:2048 -days 3650 -keyout rsa_private.pem -nodes -out \
    rsa_cert.pem -subj "/CN=unused"
openssl ecparam -genkey -name prime256v1 -noout -out ec_private.pem
openssl ec -in ec_private.pem -pubout -out ec_public.pem

Documentation

Overview

Command manager lets you manage Cloud IoT Core devices and registries.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL