Quickstart on Azure IoT Operations (AIO) for deploying with Azure IoT Operations Orchestrator using GitHub Actions.
This project leverages the following repos:
- Azure-Samples/azure-edge-extensions-aio-iac-terraform
- Azure-Samples/azure-edge-extensions-aio-datahistorian
For more information on azure-edge-extensions please refer to Azure-Samples/azure-edge-extensions.
Refer to the Azure-Samples/azure-edge-extensions-aio-iac-terraform Getting Started section for prerequisite requirements and instructions on registering the required providers.
Bootstrap will leverage azure-edge-extensions-aio-iac-terraform as modules to deploy a VM with k3s and AIO.
Bootstrap will be ran from an admin's machine or environment and it will create the necessary resources in order to allow for a GitHub operated CD with Terraform.
Bootstrapping your environment will setup the following components:
- Azure Resource Group.
- Azure VM with k3s installed.
- Azure IoT Operations.
- OPC PLC Simulator deployed on Azure IoT Operations.
- Service Principal with Owner access to the new Resource Group to be used by GitHub Actions.
- Azure Storage Account and Container for Terraform state.
Complete the following commands in order to bootstrap your environment:
- Generate a new ssh key to use with the new VM (replace the
<computer-username>
with the username that will be used for the VM):ssh-keygen -t rsa -b 4096 -C "<computer-username>" -f ~/.ssh/id_aio_rsa # Press enter twice unless you want a passphrase
- Login to the AZ CLI:
az login --tenant <tenant>.onmicrosoft.com
- Make sure your subscription is the one that you would like to use:
az account show
. - Change to the subscription that you would like to use if needed:
az account set -s <subscription-id>
- Make sure your subscription is the one that you would like to use:
- Add a
<unique-name>.auto.tfvars
file to the root of the bootstrap directory that contains the following (refer to bootstrap/sample.auto.tfvars.example for an example):// <project-root>/deploy/root-<unique-name>.tfvars name = "<unique-name>" location = "<location>"
- From the bootstrap directory execute the following:
terraform init terraform apply -auto-approve
Deploying and bootstrapping the entire environment will take some time (approximately 25 minutes since last time ran).
The result should be an environment deployed into a new Resource Group with a new out/quickstart.tfbackend file created. This file will be used for later steps.