From 1c491a40a0d7caa7399042256255c503945f155d Mon Sep 17 00:00:00 2001 From: Seif Bassem <38246040+sebassem@users.noreply.github.com> Date: Tue, 15 Oct 2024 12:19:29 +0300 Subject: [PATCH 1/6] Update PowerShell module versions in AgConfig-manufacturing.psd1 and AgConfig-retail.psd1 --- .../PowerShell/AgConfig-manufacturing.psd1 | 12 ++++++------ .../artifacts/PowerShell/AgConfig-retail.psd1 | 6 +++--- .../artifacts/PowerShell/Modules/common.psm1 | 15 +++++++++++++-- 3 files changed, 22 insertions(+), 11 deletions(-) diff --git a/azure_jumpstart_ag/artifacts/PowerShell/AgConfig-manufacturing.psd1 b/azure_jumpstart_ag/artifacts/PowerShell/AgConfig-manufacturing.psd1 index 1df6ed3ab..2e600e902 100644 --- a/azure_jumpstart_ag/artifacts/PowerShell/AgConfig-manufacturing.psd1 +++ b/azure_jumpstart_ag/artifacts/PowerShell/AgConfig-manufacturing.psd1 @@ -62,12 +62,12 @@ # PowerShell modules PowerShellModules = @( - 'Az.ConnectedKubernetes', - 'Az.KubernetesConfiguration', - 'Az.Kusto', - 'Az.EventGrid', - 'Az.Storage', - 'Az.EventHub' + @{name='Az.ConnectedKubernetes'; version="0.10.3"}, + @{name='Az.KubernetesConfiguration'; version="latest"}, + @{name='Az.Kusto'; version="latest"}, + @{name='Az.EventGrid'; version="latest"}, + @{name='Az.Storage'; version="latest"}, + @{name='Az.EventHub'; version="latest"} ) # Chocolatey packages list diff --git a/azure_jumpstart_ag/artifacts/PowerShell/AgConfig-retail.psd1 b/azure_jumpstart_ag/artifacts/PowerShell/AgConfig-retail.psd1 index 53483614f..96252442d 100644 --- a/azure_jumpstart_ag/artifacts/PowerShell/AgConfig-retail.psd1 +++ b/azure_jumpstart_ag/artifacts/PowerShell/AgConfig-retail.psd1 @@ -52,9 +52,9 @@ # PowerShell modules PowerShellModules = @( - 'Az.ConnectedKubernetes' - 'Az.KubernetesConfiguration' - 'Az.Kusto' + @{name='Az.ConnectedKubernetes'; version="0.10.3"}, + @{name='Az.KubernetesConfiguration'; version="latest"}, + @{name='Az.Kusto'; version="latest"} ) # Chocolatey packages list diff --git a/azure_jumpstart_ag/artifacts/PowerShell/Modules/common.psm1 b/azure_jumpstart_ag/artifacts/PowerShell/Modules/common.psm1 index 703319840..6e6cfb553 100644 --- a/azure_jumpstart_ag/artifacts/PowerShell/Modules/common.psm1 +++ b/azure_jumpstart_ag/artifacts/PowerShell/Modules/common.psm1 @@ -37,10 +37,21 @@ function Deploy-AzPowerShell { Connect-AzAccount -Credential $psCred -TenantId $Env:spnTenantId -ServicePrincipal -Subscription $subscriptionId | Out-File -Append -FilePath ($AgConfig.AgDirectories["AgLogsDir"] + "\AzPowerShell.log") Set-AzContext -Subscription $subscriptionId # Install PowerShell modules + # Making module install dynamic if ($AgConfig.PowerShellModules.Count -ne 0) { - Write-Host "[$(Get-Date -Format t)] INFO: Installing PowerShell modules: " ($AgConfig.PowerShellModules -join ', ') -ForegroundColor Gray + Write-Host "[$(Get-Date -Format t)] INFO: Installing PowerShell modules" -ForegroundColor Gray foreach ($module in $AgConfig.PowerShellModules) { - Install-Module -Name $module -Force | Out-File -Append -FilePath ($AgConfig.AgDirectories["AgLogsDir"] + "\AzPowerShell.log") + $moduleName = $module.name + $moduleVersion = $module.version + if ($moduleVersion -ne "latest" -and $null -ne $moduleVersion) { + # Install extension with specific version + Install-Module $moduleName -Repository PSGallery -Force -AllowClobber -ErrorAction Stop -RequiredVersion $moduleVersion + Write-Host "Installed $moduleName version $moduleVersion" + } else { + # Install extension without specifying a version + Install-Module -Name $moduleName -Force + Write-Host "Installed $moduleName (latest version)" + } } } From 122ea00dc7a1276a29a5961937ff12bbf7b0b1c6 Mon Sep 17 00:00:00 2001 From: Francisco Cabrera Date: Tue, 15 Oct 2024 15:26:29 -0400 Subject: [PATCH 2/6] Migrate Contoso Bakeries to MCR (#2774) --- .../bicep/artifacts/Settings/mqtt_listener.yml | 2 +- .../bicep/artifacts/Settings/mqtt_simulator.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/azure_edge_iot_ops_jumpstart/aio_manufacturing/bicep/artifacts/Settings/mqtt_listener.yml b/azure_edge_iot_ops_jumpstart/aio_manufacturing/bicep/artifacts/Settings/mqtt_listener.yml index 98de044fc..056c3bcf0 100644 --- a/azure_edge_iot_ops_jumpstart/aio_manufacturing/bicep/artifacts/Settings/mqtt_listener.yml +++ b/azure_edge_iot_ops_jumpstart/aio_manufacturing/bicep/artifacts/Settings/mqtt_listener.yml @@ -16,7 +16,7 @@ spec: spec: containers: - name: mqtt-listener - image: jumpstartprod.azurecr.io/contoso-bakeries-mqtt-listener:latest + image: mcr.microsoft.com/jumpstart/scenarios/mqtt_listener:1.0.0 resources: limits: memory: "512Mi" diff --git a/azure_edge_iot_ops_jumpstart/aio_manufacturing/bicep/artifacts/Settings/mqtt_simulator.yml b/azure_edge_iot_ops_jumpstart/aio_manufacturing/bicep/artifacts/Settings/mqtt_simulator.yml index 43dd9d215..8550d7885 100644 --- a/azure_edge_iot_ops_jumpstart/aio_manufacturing/bicep/artifacts/Settings/mqtt_simulator.yml +++ b/azure_edge_iot_ops_jumpstart/aio_manufacturing/bicep/artifacts/Settings/mqtt_simulator.yml @@ -14,7 +14,7 @@ spec: spec: containers: - name: mqtt-simulator - image: jumpstartprod.azurecr.io/contoso-bakeries-mqtt-simulator:latest + image: mcr.microsoft.com/jumpstart/scenarios/mqtt_simulator:1.0.0 resources: limits: cpu: "1" From 7c4c1bb82d1b61ee4db3aea3e3ab073d6162cba6 Mon Sep 17 00:00:00 2001 From: ldabas-msft <122379109+ldabas-msft@users.noreply.github.com> Date: Mon, 21 Oct 2024 20:26:12 +0100 Subject: [PATCH 3/6] Add files via upload --- .../azuredeploy.parameters.json | 51 +++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 azure_edge_iot_ops_jumpstart/acsa_fault_detection/azuredeploy.parameters.json diff --git a/azure_edge_iot_ops_jumpstart/acsa_fault_detection/azuredeploy.parameters.json b/azure_edge_iot_ops_jumpstart/acsa_fault_detection/azuredeploy.parameters.json new file mode 100644 index 000000000..316317c9f --- /dev/null +++ b/azure_edge_iot_ops_jumpstart/acsa_fault_detection/azuredeploy.parameters.json @@ -0,0 +1,51 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "vmSize": { + "value": "Standard_D8s_v3" + }, + "vmName": { + "value": "ACSA-Win-Demo" + }, + "kubernetesDistribution": { + "value": "k3s" + }, + "windowsNode": { + "value": false + }, + "adminUsername": { + "value": "arcdemo" + }, + "adminPassword": { + "value": "ArcPassword123!!" + }, + "appId": { + "value": "XXXXXXXXX" + }, + "password": { + "value": "XXXXXXXXXX" + }, + "tenantId": { + "value": "XXXXXXXXX" + }, + "subscriptionId": { + "value": "XXXXXXXXXX" + }, + "location": { + "value": "XXXXXXXX" + }, + "deployBastion": { + "value": true + }, + "bastionHostName": { + "value": "Arc-Win-Demo-Bastion" + }, + "storageAccountName": { + "value": "XXXXXXX" + }, + "storageContainer": { + "value": "fault-detection" + } + } +} \ No newline at end of file From 6ac705611d1889004b5e7f9bcf097b90a3bf43a2 Mon Sep 17 00:00:00 2001 From: ldabas-msft <122379109+ldabas-msft@users.noreply.github.com> Date: Mon, 21 Oct 2024 20:27:44 +0100 Subject: [PATCH 4/6] Update azuredeploy.json --- .../acsa_fault_detection/azuredeploy.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/azure_edge_iot_ops_jumpstart/acsa_fault_detection/azuredeploy.json b/azure_edge_iot_ops_jumpstart/acsa_fault_detection/azuredeploy.json index de070adc9..c673d560b 100644 --- a/azure_edge_iot_ops_jumpstart/acsa_fault_detection/azuredeploy.json +++ b/azure_edge_iot_ops_jumpstart/acsa_fault_detection/azuredeploy.json @@ -154,7 +154,8 @@ } }, "variables": { - "templateBaseUrl": "[concat('https://raw.githubusercontent.com/', parameters('githubAccount'), '/azure_arc/', parameters('githubBranch'), '/azure_edge_iot_ops_jumpstart/acsa_fault_detection/')]", + "templateBaseUrl": "[concat('https://raw.githubusercontent.com/', parameters('githubAccount'), '/azure_arc/refs/heads/', parameters('githubBranch'), '/azure_edge_iot_ops_jumpstart/acsa_fault_detection/')]", + "vmName": "[concat(parameters('vmName'))]", "vmName": "[concat(parameters('vmName'))]", "publicIpAddressName": "[concat(parameters('vmName'), '-PIP' )]", "networkInterfaceName": "[concat(parameters('vmName'),'-NIC')]", From 7bc76669f4a9f1318fe1f6ebc1cae25e284e3ecc Mon Sep 17 00:00:00 2001 From: ldabas-msft <122379109+ldabas-msft@users.noreply.github.com> Date: Mon, 21 Oct 2024 20:48:16 +0100 Subject: [PATCH 5/6] Update LogonScript.ps1 --- .../acsa_fault_detection/artifacts/LogonScript.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure_edge_iot_ops_jumpstart/acsa_fault_detection/artifacts/LogonScript.ps1 b/azure_edge_iot_ops_jumpstart/acsa_fault_detection/artifacts/LogonScript.ps1 index b9491a4f0..efd095373 100644 --- a/azure_edge_iot_ops_jumpstart/acsa_fault_detection/artifacts/LogonScript.ps1 +++ b/azure_edge_iot_ops_jumpstart/acsa_fault_detection/artifacts/LogonScript.ps1 @@ -208,7 +208,7 @@ az account set --subscription $Env:subscriptionId az config set extension.use_dynamic_install=yes_without_prompt Write-Host "`n" Write-Host "Installing Azure CLI extensions" -az extension add --name connectedk8s --version 1.9.3 +az extension add --name connectedk8s --version 1.3.17 az extension add --name k8s-extension Write-Host "`n" From f51c2a0fca185e21f50d4f3091fd222cd0be2bf8 Mon Sep 17 00:00:00 2001 From: ldabas-msft <122379109+ldabas-msft@users.noreply.github.com> Date: Mon, 21 Oct 2024 21:09:31 +0100 Subject: [PATCH 6/6] Update azuredeploy.json --- .../acsa_fault_detection/azuredeploy.json | 1 - 1 file changed, 1 deletion(-) diff --git a/azure_edge_iot_ops_jumpstart/acsa_fault_detection/azuredeploy.json b/azure_edge_iot_ops_jumpstart/acsa_fault_detection/azuredeploy.json index c673d560b..47a629020 100644 --- a/azure_edge_iot_ops_jumpstart/acsa_fault_detection/azuredeploy.json +++ b/azure_edge_iot_ops_jumpstart/acsa_fault_detection/azuredeploy.json @@ -156,7 +156,6 @@ "variables": { "templateBaseUrl": "[concat('https://raw.githubusercontent.com/', parameters('githubAccount'), '/azure_arc/refs/heads/', parameters('githubBranch'), '/azure_edge_iot_ops_jumpstart/acsa_fault_detection/')]", "vmName": "[concat(parameters('vmName'))]", - "vmName": "[concat(parameters('vmName'))]", "publicIpAddressName": "[concat(parameters('vmName'), '-PIP' )]", "networkInterfaceName": "[concat(parameters('vmName'),'-NIC')]", "networkSecurityGroupName": "[concat(parameters('vmName'), '-NSG')]",