This is an IoT Central gateway module for Azure Media Services LVA edge. The full documentation which shows you how to modify the IoT Edge module code for the live video analytics (LVA) modules can be found at UPDATE_LINK
To complete the steps in this tutorial, you need:
- Node.js v13 or later
- Visual Studio Code with TSLint extension installed
- Docker engine
- An Azure Container Registry to host your versions of the modules
- An Azure Media Services account.
If you haven't already cloned the repository, use the following command to clone it to a suitable location on your local machine:
git clone https://github.com/UPDATE_LINK/lva-gateway
Open the cloned lva-gateway repository folder with VS Code.
- If you haven't already done so, create a folder called storage in the local copy of the lva-gateway repository. This folder is ignored by Git so as to prevent you accidentally checking in any confidential information.
- Copy the file deployment.amd64.json from the setup folder to the storage folder.
- In VS Code, open the the storage/deployment.amd64.json file.
- Edit the
registryCredentials
section to add your Azure Container Registry credentials. - Edit the
LvaEdgeGatewayModule
module section to add the name of your image and your AMS account name in theenv:amsAccountName:value
. - See the Create a live video analytics application in Azure IoT Central UPDATE_LINK for more information about how to complete the configuration.
-
Before you try to build the code for the first time, run the install command. This command installs the required packages and runs the setup scripts.
npm install
-
Edit the ./setup/imageConfig.json file to update the image named based on your container registry name:
{ "arch": "amd64", "imageName": "[Server].azurecr.io/lva-edge-gateway", "versionTag": "latest" }
-
Use the VS Code terminal to run the docker login command. Use the same credentials that you provided in the deployment manifest for the modules.
docker login [your server].azurecr.io
-
Use the VS Code terminal to run the commands to build the image and push it to your docker container registry. The build scripts deploy the image to your container registry. The output in the VS Code terminal window shows you if the build is successful.
npm run dockerbuild npm run dockerpush