Azure

From bibbleWiki
Jump to navigation Jump to search

set subscription

az account set --subscription "readable name"

list hubs

az iot hub module-identity list --device-id <device> --hub-name <hub>

list current subscription

az account show

Add iot extension

az extension add --name azure-cli-iot-ext
az extension update --name azure-cli-iot-ext

build a docker module

sudo docker build  --rm -f "EdgeSolution/modules/SampleModule/Dockerfile.amd64" -t xxxxx.azurecr.io/samplemodule:0.0.1-amd64 "EdgeSolution/modules/SampleModule"

push to registry

sudo docker push xxxxx.azurecr.io/samplemodule:0.0.1-amd64

list modules

az iot hub module-identity list --device-id <device> --hub-name <hub>

delete module

This is the way to refresh the image delete and push

  docker rm -f "SimulatedTemperatureSensor"