- az command line installed
- azure account + subscription, enough rights to create a resources and resource groups
- azure devops enabled
- have linux edge device (for now)
- Fill out all values in
deploy/config.yml
.
Anything that does not exist yet will be automatically created - Deploy resources
Linux Manually run
deploy/deploy_resource_group.sh
Windows Manually runpowershell -ExecutionPolicy ByPass -File .\deploy_resource_group.ps1
This will install az iot extension locally, create a resource group and iot hub as specified in the config.
- Make your device / vm iot ready
Follow theInstall the latest runtime version
steps found here: https://docs.microsoft.com/nl-nl/azure/iot-edge/how-to-install-iot-edge-linux - After running 2.2 (sub 2) you can find an iot hub instance in the configured resource group.
- Go to
portal.azure.com
><your resource group>
><your iot hub>
>IoT Edge
>Add an IoT Edge device
- Enter a name for the device and click
Save
- Click refresh
- Click on the device name
- Copy the primary connection string
- Go to
- Make your device register itself to iot hub
Follow theConfigure the security daemon > Option 1: Manual provisioning
steps found here: https://docs.microsoft.com/nl-nl/azure/iot-edge/how-to-install-iot-edge-linux
- Open azure devops (dev.azure.com)
- Clone the repo to your devops environment
Go torepos
><current repository>
>import repository
. Entergit
/<url to this repo>
><your repo name>
. - Generate build pipeline
pipelines
>build
>new
>azure repos git
>your repo
>run
- Create service principal
Go toproject settings
>service connections
>new service connection
>azure resource manager
and select the subscription and resource group that you specified in the config file - Manually create release pipeline
Go topipelines
>releases
>new
>new release pipeline
>empty job
.- Add your repo as artifact. Set trigger to continuous deployment on your desired branch. Create branch if needed
- Select stage 1
- add 2 tasks;
- Use python 3.7
- Azure CLI.
Set service principal (4) as subscription.
Browse to repo/deploy.sh.
SelectAccess service principal details in script
- Save
- Push something to the branch you selected in 2.4 (sub 5.1)
- Verify build success on azure devops
- Verify release success on azure devops
- Verify the following responds
Healthy
on the IoT Edge device:curl localhost:5001; echo ""
- Check build status
- Check build feedback
- Check release status
- check release loggings
- Check existence of AMLS in your resource group
- Check existence of workspace, model and image in AMLS via portal
- Check hub exists in your resource group
- Check device is registered in your hub
- Check device is available in your hub
- Check number of modules listed in the hub for your device
- Verify 3 modules listed per
sudo iotedge list
on your edge device - Verify status of modules/containers per
sudo iotedge list
anddocker ps