Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Testing insecure Ft1 broker #2251

Merged
merged 9 commits into from
Nov 9, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@
"Microsoft.HybridCompute",
"Microsoft.GuestConfiguration",
"Microsoft.HybridConnectivity",
"Microsoft.Symphony",
"Microsoft.Bluefin",
"Microsoft.DeviceRegistry",
"Microsoft.EventGrid",
"Microsoft.ExtendedLocation"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -365,8 +365,8 @@ catch {
Write-Host "`n"
Write-Host "[$(Get-Date -Format t)] INFO: Installing the Azure IoT Ops CLI extension" -ForegroundColor Gray
Write-Host "`n"
az extension add --source ([System.Net.HttpWebRequest]::Create('https://aka.ms/aziotopscli-latest').GetResponse().ResponseUri.AbsoluteUri) -y

#az extension add --source ([System.Net.HttpWebRequest]::Create('https://aka.ms/aziotopscli-latest').GetResponse().ResponseUri.AbsoluteUri) -y
az extension add --source https://azedgecli.blob.core.windows.net/drop/azure_iot_ops-0.0.5a8.dev2-py3-none-any.whl
##############################################################
# Deploy FT1
##############################################################
Expand All @@ -375,7 +375,7 @@ Write-Host "[$(Get-Date -Format t)] INFO: Deploying ft1 to the cluster" -Foregro
Write-Host "`n"

$keyVaultId = (az keyvault list -g $resourceGroup --resource-type vault --query "[0].id" -o tsv)
az iot ops init --cluster $arcClusterName -g $resourceGroup --kv-id $keyVaultId --sp-app-id $spnClientID --sp-object-id $spnObjectId --sp-secret $spnClientSecret --location eastus2euap --cluster-location $location
az iot ops init --cluster $arcClusterName -g $resourceGroup --kv-id $keyVaultId --sp-app-id $spnClientID --sp-object-id $spnObjectId --sp-secret $spnClientSecret --location eastus2euap --cluster-location $location --mq-service-type loadBalancer --mq-insecure true --show-template true

Write-Host "[$(Get-Date -Format t)] INFO: Preparing Event Grid Role Assignment" -ForegroundColor Gray
$extensionPrincipalId = (az k8s-extension show --cluster-name $arcClusterName --name "mq" --resource-group $resourceGroup --cluster-type "connectedClusters" --output json | ConvertFrom-Json).identity.principalId
Expand Down Expand Up @@ -404,7 +404,7 @@ Start-Sleep -Seconds 60
## Adding MQTT load balancer
#kubectl create namespace arc
$mqconfigfile = "$Ft1ToolsDir\mq_loadBalancer.yml"
$mqListenerService = "mq-1883-listener"
$mqListenerService = "aio-mq-dmqtt-frontend"
Write-Host "[$(Get-Date -Format t)] INFO: Configuring the MQ Event Grid bridge" -ForegroundColor Gray
$eventGridHostName = (az eventgrid namespace list --resource-group $resourceGroup --query "[0].topicSpacesConfiguration.hostname" -o tsv)
(Get-Content -Path $mqconfigfile) -replace 'eventGridPlaceholder', $eventGridHostName | Set-Content -Path $mqconfigfile
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,4 @@
apiVersion: mq.iotoperations.azure.com/v1beta1
kind: BrokerListener
metadata:
name: "mq-1883-listener"
namespace: azure-iot-operations
spec:
serviceType: loadBalancer
brokerRef: "broker"
authenticationEnabled: false
authorizationEnabled: false
serviceName: mq-1883-listener
port: 1883
---
apiVersion: mq.iotoperations.azure.com/v1beta1
kind: MqttBridgeTopicMap
metadata:
name: my-topic-map
Expand Down Expand Up @@ -45,10 +32,3 @@ spec:
authentication:
systemAssignedManagedIdentity:
audience: https://eventgrid.azure.net
localBrokerConnection:
endpoint: aio-mq-dmqtt-frontend:8883
tls:
tlsEnabled: true
trustedCaCertificateConfigMap: aio-ca-trust-bundle-test-only
authentication:
kubernetes: {}