microsoft / vscode-azure-iot-toolkit

Azure IoT Hub extension for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=vsciot-vscode.azure-iot-toolkit
Other
73 stars 58 forks source link

IoT Edge - Deployment Manifest Build Issue #499

Open crazyoutlook opened 3 years ago

crazyoutlook commented 3 years ago

Hi,

I am following Live Video Analytics tutorial - https://docs.microsoft.com/en-us/azure/media-services/live-video-analytics-edge/custom-vision-tutorial.

I am stuck at step : Next, right-click src/edge/config/ deployment.customvision.amd64.json, and select Create Deployment for Single Device.

Error message which I am getting is :

There are errors in deployment json file: data.modulesContent.$edgeAgent['properties.desired'].runtime.settings.registryCredentials should NOT have additional properties

Prior to above step I have done : Right-click the src/edge/ deployment.customvision.template.json file, and select Generate IoT Edge Deployment Manifest.

All my Azure resource are up and running and IoT Edge runtime is also running in Azure cloud.

Please help

Amit

crazyoutlook commented 3 years ago

{ "$schema-template": "2.0.0", "modulesContent": { "$edgeAgent": { "properties.desired": { "schemaVersion": "1.0", "runtime": { "type": "docker", "settings": { "minDockerVersion": "v1.25", "loggingOptions": "", "registryCredentials": { "$CONTAINER_REGISTRY_USERNAME_myacr": { "username": "$CONTAINER_REGISTRY_USERNAME_myacr", "password": "$CONTAINER_REGISTRY_PASSWORD_myacr", "address": "$CONTAINER_REGISTRY_USERNAME_myacr.azurecr.io" }

        }
      }
    },
    "systemModules": {
      "edgeAgent": {
        "type": "docker",
        "settings": {
          "image": "mcr.microsoft.com/azureiotedge-agent:1.0",
          "createOptions": {}
        }
      },
      "edgeHub": {
        "type": "docker",
        "status": "running",
        "restartPolicy": "always",
        "settings": {
          "image": "mcr.microsoft.com/azureiotedge-hub:1.0",
          "createOptions": {
            "HostConfig": {
              "PortBindings": {
                "5671/tcp": [
                  {
                    "HostPort": "5671"
                  }
                ],
                "8883/tcp": [
                  {
                    "HostPort": "8883"
                  }
                ],
                "443/tcp": [
                  {
                    "HostPort": "443"
                  }
                ]
              }
            }
          }
        }
      }
    },
    "modules": {
      "lvaEdge": {
        "version": "1.0",
        "type": "docker",
        "status": "running",
        "restartPolicy": "always",
        "settings": {
          "image": "mcr.microsoft.com/media/live-video-analytics:1",
          "createOptions": {
            "HostConfig": {
              "LogConfig": {
                "Type": "",
                "Config": {
                  "max-size": "10m",
                  "max-file": "10"
                }
              },
              "Binds": [
                "$OUTPUT_VIDEO_FOLDER_ON_DEVICE:/var/media/",
                "$APPDATA_FOLDER_ON_DEVICE:/var/lib/azuremediaservices"
              ]
            }
          }
        }
      },

      "cv": {
        "version": "1.0",
        "type": "docker",
        "status": "running",
        "restartPolicy": "always",
        "settings": {
          "image": "$CONTAINER_REGISTRY_USERNAME_myacr.azurecr.io/cvtruck:latest",
          "createOptions": "{}"
        }
      },

      "rtspsim": {
        "version": "1.0",
        "type": "docker",
        "status": "running",
        "restartPolicy": "always",
        "settings": {
          "image": "mcr.microsoft.com/lva-utilities/rtspsim-live555:1.2",
          "createOptions": {
            "HostConfig": {
              "Binds": [
                "$INPUT_VIDEO_FOLDER_ON_DEVICE:/live/mediaServer/media"
              ]
            }
          }
        }
      }
    }
  }
},
"$edgeHub": {
  "properties.desired": {
    "schemaVersion": "1.0",
    "routes": {
      "LVAToHub": "FROM /messages/modules/lvaEdge/outputs/* INTO $upstream"
    },
    "storeAndForwardConfiguration": {
      "timeToLiveSecs": 7200
    }
  }
},
"lvaEdge": {
  "properties.desired": {
    "applicationDataDirectory": "/var/lib/azuremediaservices",
    "azureMediaServicesArmId": "/subscriptions/$SUBSCRIPTION_ID/resourceGroups/$RESOURCE_GROUP/providers/microsoft.media/mediaservices/$AMS_ACCOUNT",
    "aadTenantId": "$AAD_TENANT_ID",
    "aadServicePrincipalAppId": "$AAD_SERVICE_PRINCIPAL_ID",
    "aadServicePrincipalSecret": "$AAD_SERVICE_PRINCIPAL_SECRET",
    "aadEndpoint": "https://login.microsoftonline.com",
    "aadResourceId": "https://management.core.windows.net/",
    "armEndpoint": "https://management.azure.com/",
    "diagnosticsEventsOutputName": "AmsDiagnostics",
    "operationalEventsOutputName": "AmsOperational",        
    "logLevel": "Information",
    "logCategories": "Application,Events",
    "allowUnsecuredEndpoints": true,
    "telemetryOptOut": false
  }
}

} }

crazyoutlook commented 3 years ago

{ "modulesContent": { "$edgeAgent": { "properties.desired": { "schemaVersion": "1.0", "runtime": { "type": "docker", "settings": { "minDockerVersion": "v1.25", "loggingOptions": "", "registryCredentials": { "$CONTAINER_REGISTRY_USERNAME_myacr": { "username": "$CONTAINER_REGISTRY_USERNAME_myacr", "password": "$CONTAINER_REGISTRY_PASSWORD_myacr", "address": "$CONTAINER_REGISTRY_USERNAME_myacr.azurecr.io" } } } }, "systemModules": { "edgeAgent": { "type": "docker", "settings": { "image": "mcr.microsoft.com/azureiotedge-agent:1.0", "createOptions": "{}" } }, "edgeHub": { "type": "docker", "status": "running", "restartPolicy": "always", "settings": { "image": "mcr.microsoft.com/azureiotedge-hub:1.0", "createOptions": "{\"HostConfig\":{\"PortBindings\":{\"5671/tcp\":[{\"HostPort\":\"5671\"}],\"8883/tcp\":[{\"HostPort\":\"8883\"}],\"443/tcp\":[{\"HostPort\":\"443\"}]}}}" } } }, "modules": { "lvaEdge": { "version": "1.0", "type": "docker", "status": "running", "restartPolicy": "always", "settings": { "image": "mcr.microsoft.com/media/live-video-analytics:1", "createOptions": "{\"HostConfig\":{\"LogConfig\":{\"Type\":\"\",\"Config\":{\"max-size\":\"10m\",\"max-file\":\"10\"}},\"Binds\":[\"$OUTPUT_VIDEO_FOLDER_ON_DEVICE:/var/media/\",\"$APPDATA_FOLDER_ON_DEVICE:/var/lib/azuremediaservices\"]}}" } }, "cv": { "version": "1.0", "type": "docker", "status": "running", "restartPolicy": "always", "settings": { "image": "$CONTAINER_REGISTRY_USERNAME_myacr.azurecr.io/cvtruck:latest", "createOptions": "{}" } }, "rtspsim": { "version": "1.0", "type": "docker", "status": "running", "restartPolicy": "always", "settings": { "image": "mcr.microsoft.com/lva-utilities/rtspsim-live555:1.2", "createOptions": "{\"HostConfig\":{\"Binds\":[\"$INPUT_VIDEO_FOLDER_ON_DEVICE:/live/mediaServer/media\"]}}" } } } } }, "$edgeHub": { "properties.desired": { "schemaVersion": "1.0", "routes": { "LVAToHub": "FROM /messages/modules/lvaEdge/outputs/* INTO $upstream" }, "storeAndForwardConfiguration": { "timeToLiveSecs": 7200 } } }, "lvaEdge": { "properties.desired": { "applicationDataDirectory": "/var/lib/azuremediaservices", "azureMediaServicesArmId": "/subscriptions/$SUBSCRIPTION_ID/resourceGroups/$RESOURCE_GROUP/providers/microsoft.media/mediaservices/$AMS_ACCOUNT", "aadTenantId": "$AAD_TENANT_ID", "aadServicePrincipalAppId": "$AAD_SERVICE_PRINCIPAL_ID", "aadServicePrincipalSecret": "$AAD_SERVICE_PRINCIPAL_SECRET", "aadEndpoint": "https://login.microsoftonline.com", "aadResourceId": "https://management.core.windows.net/", "armEndpoint": "https://management.azure.com/", "diagnosticsEventsOutputName": "AmsDiagnostics", "operationalEventsOutputName": "AmsOperational", "logLevel": "Information", "logCategories": "Application,Events", "allowUnsecuredEndpoints": true, "telemetryOptOut": false } } } }