简体   繁体   中英

Run Docker or cloud functions in google cloud iot core

I'm unable to find a way to run a docker or a cloud function in a Google Cloud IOT Core device(gateway) that I've setup

Is there a way for me to deploy a docker or a cloud function to a group of Google Cloud IOT Core devices(gateways) from the google cloud dashboard?

Also on a side note, is it possible for me to run say a linux command in a group of Google Cloud IOT Core devices(gateways)?

You could send commands to a device and respond to those commands on your devices however is appropriate for the device. If you were controlling a gateway, commands would be the way to control your device through IoT Core; your program could invoke shell scripts to handle commands on-device if it makes sense to do that (some devices may not be running an OS).

If you're trying to have a containerized solution for deploying to devices, I'm not sure there is a Google-supported solution on IoT core. Although there is persistent device configuration and shared state, which could be used as part of a solution for this, this type of information is not readily surfaced through the console.

My intuition is that you want to have some of your containerized execution or Cloud Function calls be invoked from the device. You can still do this through a PubSub message trigger; messages are sent when you publish telemetry events from the device .

There is a community tutorial covering how you could do this from Cloud Functions for device-to-device communication from IoT core:

But more generically for triggering code in the cloud from your device, you can look up the documentation for PubSub and functions in Google Cloud Pub/Sub triggers or you can learn more about using Docker from Cloud Run with triggers in Triggering from Cloud Pub/Sub .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM