Skip to content

Commit

Permalink
Merge pull request #2741 from mrhoads/fix-azure-iot-ops
Browse files Browse the repository at this point in the history
Patch azure-iot-ops extension to use azure-identiy 1.17.1
  • Loading branch information
mrhoads authored Oct 4, 2024
2 parents f317c52 + db6f093 commit 612f825
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
1 change: 1 addition & 0 deletions azure_jumpstart_ag/artifacts/PowerShell/AgLogonScript.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ if ($industry -eq "retail") {
}

if ($industry -eq "manufacturing") {
Update-AzureIoTOpsExtension
Deploy-AIO
Deploy-ManufacturingConfigs
$mqttIpArray=Set-MQTTIpAddress
Expand Down
2 changes: 0 additions & 2 deletions azure_jumpstart_ag/artifacts/PowerShell/Modules/common.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@ function Deploy-AzCLI {
}
}


Write-Host "[$(Get-Date -Format t)] INFO: Az CLI configuration complete!" -ForegroundColor Green
Write-Host
}

function Deploy-AzPowerShell {
Expand Down
15 changes: 15 additions & 0 deletions azure_jumpstart_ag/artifacts/PowerShell/Modules/manufacturing.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -577,3 +577,18 @@ function Deploy-ManufacturingBookmarks {
$quickAccess.Namespace($AgConfig.AgDirectories.AgDir).Self.InvokeVerb("pintohome")
$quickAccess.Namespace($AgConfig.AgDirectories.AgLogsDir).Self.InvokeVerb("pintohome")
}

function Update-AzureIoTOpsExtension {
try {
Write-Host "Starting patching of azure-iot-ops extension..." -ForegroundColor Green
& "C:\Program Files\Microsoft SDKs\Azure\CLI2\python.exe" -m pip install -U --target "C:\Program Files\Microsoft SDKs\Azure\CLI2\Lib\site-packages\azure-cli-extensions\azure-iot-ops" azure-identity==1.17.1
if ($LASTEXITCODE -eq 0) {
Write-Host "Installation of azure-iot-ops extension completed successfully." -ForegroundColor Green
} else {
Write-Host "Installation of azure-iot-ops extension failed with exit code $LASTEXITCODE." -ForegroundColor Red
}
} catch {
Write-Host "An error occurred during the patching of the azure-iot-ops extension." -ForegroundColor Red
Write-Host $_.Exception.Message -ForegroundColor Red
}
}

0 comments on commit 612f825

Please sign in to comment.