Skip to content

Commit f79719f

Browse files
authored
Merge pull request #288691 from dominicbetts/release-aio-m3-quickstarts
AIO: Add Powershell to M3 quickstarts
2 parents 00509e5 + a53caea commit f79719f

File tree

2 files changed

+29
-9
lines changed

2 files changed

+29
-9
lines changed

.openpublishing.publish.config.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,12 @@
236236
"branch": "main",
237237
"branch_mapping": {}
238238
},
239+
{
240+
"path_to_root": "azure-iot-operations-samples-m3",
241+
"url": "https://github.com/Azure-Samples/explore-iot-operations",
242+
"branch": "release-m3",
243+
"branch_mapping": {}
244+
},
239245
{
240246
"path_to_root": "azure-iot-sdk-node",
241247
"url": "https://github.com/Azure/azure-iot-sdk-node",

articles/iot-operations/get-started-end-to-end-sample/quickstart-configure.md

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@ In this quickstart, you use a Bicep file to configure your Azure IoT Operations
3131

3232
Have an instance of Azure IoT Operations Preview deployed in a Kubernetes cluster. The [Quickstart: Run Azure IoT Operations Preview in GitHub Codespaces with K3s](quickstart-deploy.md) provides simple instructions to deploy an Azure IoT Operations instance that you can use for the quickstarts.
3333

34-
The [jq](https://jqlang.github.io/jq/download/) utility installed in your shell environment.
35-
3634
Unless otherwise noted, you can run the console commands in this quickstart in either a Bash or PowerShell environment.
3735

3836
## What problem will we solve?
@@ -43,18 +41,18 @@ The data that OPC UA servers expose can have a complex structure and can be diff
4341

4442
This quickstart uses the OPC PLC simulator to generate sample data. To deploy the OPC PLC simulator, run the following command:
4543

46-
<!-- TODO: Change branch to main before merging the release branch -->
44+
<!-- TODO: Change branch to main in two places below before merging the release branch. Don't delete the samples release-m3 branch until the updates are done in the docs repo. -->
4745

4846
```console
4947
kubectl apply -f https://raw.githubusercontent.com/Azure-Samples/explore-iot-operations/release-m3/samples/quickstarts/opc-plc-deployment.yaml
5048
```
5149

5250
The following snippet shows the YAML file that you applied:
5351

54-
:::code language="yaml" source="~/azure-iot-operations-samples/samples/quickstarts/opc-plc-deployment.yaml":::
52+
:::code language="yaml" source="~/azure-iot-operations-samples-m3/samples/quickstarts/opc-plc-deployment.yaml":::
5553

5654
> [!CAUTION]
57-
> This configuration isn't secure. Don't use this configuration in a production environment.
55+
> This configuration uses a self-signed application instance certificate. Don't use this configuration in a production environment. To learn more, see [Configure OPC UA certificates infrastructure for the connector for OPC UA](../discover-manage-assets/howto-configure-opcua-certificates-infrastructure.md).
5856
5957
To establish mutual trust between the OPC PLC simulator and the OPC UA connector, run the following commands:
6058

@@ -133,20 +131,36 @@ Run the following commands to download and run the Bicep file that configures yo
133131
- Adds a dataflow that manipulates the messages from the simulated oven.
134132
- Creates an Azure Event Hubs instance to receive the data.
135133

136-
<!-- TODO: Fix download link, possibly remove jq, and add PowerShell version -->
134+
<!-- TODO: Fix download link -->
137135

138136
Download the Bicep file to your local environment from [quickstart.bicep](https://dev.azure.com/msazure/One/_git/azure-iot-operations-tests?path=%2F.pipelines%2Fbicep%2Fquickstart.bicep)
139137

138+
# [Bash](#tab/bash)
139+
140140
```bash
141141
# wget https://dev.azure.com/msazure/One/_git/azure-iot-operations-tests?path=/.pipelines/bicep/quickstart.bicep -O quickstart.bicep
142142

143-
AIO_EXTENSION_NAME=$(az k8s-extension list -g $RESOURCE_GROUP --cluster-name $CLUSTER_NAME --cluster-type connectedClusters | jq -r '.[] | select(.extensionType == "microsoft.iotoperations") | .id | split("/")[-1]')
144-
AIO_INSTANCE_NAME=$(az iot ops list -g $RESOURCE_GROUP | jq -r '.[0].name')
145-
CUSTOM_LOCATION_NAME=$(az iot ops list -g $RESOURCE_GROUP | jq -r '.[0].extendedLocation.name | split("/")[-1]')
143+
AIO_EXTENSION_NAME=$(az k8s-extension list -g $RESOURCE_GROUP --cluster-name $CLUSTER_NAME --cluster-type connectedClusters --query "[?extensionType == 'microsoft.iotoperations'].id" -o tsv | awk -F'/' '{print $NF}')
144+
AIO_INSTANCE_NAME=$(az iot ops list -g $RESOURCE_GROUP --query "[0].name" -o tsv)
145+
CUSTOM_LOCATION_NAME=$(az iot ops list -g $RESOURCE_GROUP --query "[0].extendedLocation.name" -o tsv | awk -F'/' '{print $NF}')
146+
147+
az deployment group create --subscription $SUBSCRIPTION_ID --resource-group $RESOURCE_GROUP --template-file quickstart.bicep --parameters clusterName=$CLUSTER_NAME customLocationName=$CUSTOM_LOCATION_NAME aioExtensionName=$AIO_EXTENSION_NAME aioInstanceName=$AIO_INSTANCE_NAME
148+
```
149+
150+
# [PowerShell](#tab/powershell)
151+
152+
```powershell
153+
# wget https://dev.azure.com/msazure/One/_git/azure-iot-operations-tests?path=/.pipelines/bicep/quickstart.bicep -O quickstart.bicep
154+
155+
$AIO_EXTENSION_NAME = (az k8s-extension list -g $RESOURCE_GROUP --cluster-name $CLUSTER_NAME --cluster-type connectedClusters --query "[?extensionType == 'microsoft.iotoperations'].id" -o tsv) -split '/' | Select-Object -Last 1
156+
$AIO_INSTANCE_NAME = $(az iot ops list -g $RESOURCE_GROUP --query "[0].name" -o tsv)
157+
$CUSTOM_LOCATION_NAME = (az iot ops list -g $RESOURCE_GROUP --query "[0].extendedLocation.name" -o tsv) -split '/' | Select-Object -Last 1
146158
147159
az deployment group create --subscription $SUBSCRIPTION_ID --resource-group $RESOURCE_GROUP --template-file quickstart.bicep --parameters clusterName=$CLUSTER_NAME customLocationName=$CUSTOM_LOCATION_NAME aioExtensionName=$AIO_EXTENSION_NAME aioInstanceName=$AIO_INSTANCE_NAME
148160
```
149161

162+
---
163+
150164
## Verify data is flowing to MQTT broker
151165

152166
[!INCLUDE [deploy-mqttui](../includes/deploy-mqttui.md)]

0 commit comments

Comments
 (0)