Build Azure IoT Modules using Azure Devops Agent in Arm32v7 architecture

Few weeks back, I got a chance to go through IoT platform services provided by Azure and found that it is quite matured by the depth of service they provide. As a Devops Engineer, I always thought of building and deploying IoT Apps/Modules on a memory constraint environment because its bit more challenging than usual machine architecture. Being a great fan of Azure Devops Services, I decided to create a dockerized version of Az Devops Agent with necessary tools for building and deploying Azure IoT Modules baked in arm32v7 device architecture. I made extensive use of my RPi 4(4GB) for creating the ‘Golden’ image by trial and error in Alpine , but later moved to Ubuntu distribution as many of the libraries were not ready available in Alpine distribution and was taking time to find the appropriate libs.

The image is good to run in any arm32v7 devices as I build the image within the same device architecture and image consumes around .85 GB.

Steps to run the Azure Devops Agent
1. Need to get the PAT Token from Azure Devops Organization. Use the below link to generate the token from the menu. Please dont forget to change the <OrgName>
https://dev.azure.com/<OrgName>/_usersSettings/tokens
2. Pull the image from the Docker Hub
docker pull mysticrenji/azdevopsagent-iotedge
3. Once you pull the image snd get the PAT, you use the below commands to run the container
docker run -e AZP_URL={AZ DEVOPS URL} -e AZP_TOKEN={PAT} -e AZP_AGENT_NAME={AGENTNAME} -v /var/run/docker.sock:/var/run/docker.sock {ImageName}
where
AZ DEVOPS URL -> https://dev.azure.com/<OrgName&gt;
PAT -> Personal Access Tokens
AGENTNAME -> Any suitable Agent name. By default this new agent would be mapped under Default Agent pools. To change this behavior, need to change the start.sh script in the github repo and build the image
ImageName – Name of the image

undefined

And my Pipeline for building and deploying Azure IoT Module would roughly look like this.
undefined
undefined


Yep, thats all. Try it and please let me know , if you are stuck with something.

The dockerfile and the related scripts has been placed at the below Github repo and also at the DockerHub
https://github.com/mysticrenji/AzDevops_IoTBuildAgent
https://hub.docker.com/repository/docker/mysticrenji/azdevopsagent-iotedge

2 thoughts on “Build Azure IoT Modules using Azure Devops Agent in Arm32v7 architecture

  1. Pingback: Build Az IoT Modules inside Raspberry Pi using K3s Az Devops Agents – Ignite the code within

  2. Pingback: Build Azure IoT Modules using Azure DevOps Agent in Arm32v7 architecture – techbeatly

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s