-
Notifications
You must be signed in to change notification settings - Fork 72
run modules on vm
Github edited this page May 17, 2022
·
1 revision
-
Create and configure an ACR (Azure Container Registry)
-
Configure
.env
that was generated in theiotedgedev init
step with the ACR by modifying these lines with appropriate values:CONTAINER_REGISTRY_SERVER="localhost:5000" CONTAINER_REGISTRY_USERNAME="" CONTAINER_REGISTRY_PASSWORD=""
-
Push modules to ACR with
iotedgedev push
-
Add registry credentials to deployment manifest
-
Replace generated
deployment.template.json
fieldregistryCredentials
with"registryCredentials": { "privateAcr": { "username": "$CONTAINER_REGISTRY_USERNAME", "password": "$CONTAINER_REGISTRY_PASSWORD", "address": "$CONTAINER_REGISTRY_SERVER" } }
Note:
privateAcr
can be renamed to anything else -
Regenerate the
config/deployment.amd64.json
iotedgedev genconfig
-
-
Deploy modules to device
iotedgedev solution deploy
-
Troubleshooting
-
Verify modules deployment status via executing:
# Populate variables from .env edge_device_id=$(dotenv get DEVICE_CONNECTION_STRING | grep -oP '(?<=DeviceId=).*(?=;Shared)') iot_hub_connection_string=$(dotenv get IOTHUB_CONNECTION_STRING) # Execute query az iot hub module-identity list --device-id $edge_device_id --login $iot_hub_connection_string
-
SSH into the virtual machine and follow troubleshoot your IoT Edge device
-