2ac870aacc
Co-authored-by: github-actions <github-actions@github.com> |
||
---|---|---|
.. | ||
README.md | ||
alerts.bicep | ||
create_device.sh | ||
devices.bicep | ||
discoveryService.bicep | ||
function.bicep | ||
iothub.bicep | ||
main.bicep | ||
observability.bicep | ||
redis.bicep | ||
starter-kit-workbook.json | ||
storage.bicep | ||
workbook.bicep |
README.md
Deploying infrastructure using Bicep
This folder contains the Bicep files to deploy the Starter-Kit infrastructure.
This guide shows how to manually deploy it.
Prerequisites
Make sure to have the following tool installed:
Deploying the infrastructure
Step 1: Login to Azure using the AZ CLI:
az login --tenant <tenant-id>
Step 2: Create target resource group
az group create --location <location> --resource-group <resource-group-name>
Step 3: Start deployment
az deployment group create --resource-group <resource-group-name> --template-file ./main.bicep --parameters uniqueSolutionPrefix="<unique-name>" resetPin=<based-on-your-setup> deployDevice=true edgeGatewayName="<gateway-device-name>" useDiscoveryService=true
Developing
Device creation
For device creation debugging, there are alternatives other than deploying the whole solution:
Option 1: Run bash script locally
FACADE_SERVER_URL="https://myapp.com/api" IOTHUB_CONNECTION_STRING="<iothub-connection-string>" LORA_CLI_URL="https://github.com/Azure/iotedge-lorawan-starterkit/releases/download/v<current-version>/lora-cli.linux-x64.tar.gz" EDGE_GATEWAY_NAME="<iotedge-device-name>" STATION_DEVICE_NAME="<concentrator-device-name>" DEPLOY_DEVICE=1 RESET_PIN=<concentrator-reset-pin> LORA_VERSION="<lora-starter-kit-release-version>" ./create_device.sh
Option 2: Run the device provisioning Bicep
az deployment group create --resource-group <resource-group-name> --template-file ./devices.bicep --parameters iothubName="<unique-name>"
resetPin=<based-on-your-setup> edgeGatewayName="<gateway-device-name>" spiSpeed=<based-on-your-setup> spiDev=<based-on-your-setup> functionAppName="<function-name>" region="<lora-region>" stationEui="<concentrator-device-name>" logAnalyticsName="<log-analytics-name>"
loraCliUrl="<lora-cli-linux-musl-version-download-url>" version="<lora-starter-kit-release-version>" deployDevice=true