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

Add support for connectedmachinename parameter #204

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all 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
5 changes: 3 additions & 2 deletions tools/aide-userconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"SchemaVersion": "1.1",
"SchemaVersion": "1.3",
"Version": "1.0",
"AksEdgeProduct": "AKS Edge Essentials - K3s",
"AksEdgeProductUrl": "",
Expand All @@ -22,7 +22,8 @@
"Auth": {
"ServicePrincipalId": "",
"Password": ""
}
},
"ConnectedMachineName": ""
},
"AksEdgeConfigFile": "aksedge-config.json"
}
5 changes: 4 additions & 1 deletion tools/modules/AksEdgeDeploy/AksEdgeDeploy-AES.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ function Install-AideArcServer {
Push-Location $env:TEMP
try {
# Download the installation package
Invoke-WebRequest -Uri "https://aka.ms/azcmagent-windows" -TimeoutSec 30 -OutFile "$env:TEMP\install_windows_azcmagent.ps1"
Invoke-WebRequest -Uri "https://aka.ms/azcmagent-windows" -TimeoutSec 300 -OutFile "$env:TEMP\install_windows_azcmagent.ps1"
# Install the hybrid agent
& "$env:TEMP\install_windows_azcmagent.ps1"
if ($LASTEXITCODE -ne 0) {
Expand Down Expand Up @@ -260,6 +260,9 @@ function Connect-AideArcServer {
$tags += @("--tags","AKSEE=$clustername")
}
$connectargs += $tags
if ($aicfg.ConnectedMachineName) {
$connectargs += @("--resource-name","$($aicfg.ConnectedMachineName)")
}
$hostSettings = Get-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings' | Select-Object ProxyServer, ProxyEnable
if ($hostSettings.ProxyEnable) {
& $azcmagentexe config set proxy.url $($hostSettings.ProxyServer)
Expand Down
Binary file modified tools/modules/AksEdgeDeploy/AksEdgeDeploy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion tools/modules/AksEdgeDeploy/AksEdgeDeploy.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
RootModule = 'AksEdgeDeploy.psm1'

# Version number of this module.
ModuleVersion = '1.0.240904.1500'
ModuleVersion = '1.0.241002.1000'

# Supported PSEditions
# CompatiblePSEditions = @()
Expand Down
11 changes: 7 additions & 4 deletions tools/modules/AksEdgeDeploy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ The `Start-AideWorkflow` function in the modole does the following:

```json
{
"SchemaVersion": "1.2",
"SchemaVersion": "1.3",
"Version": "1.0",
"AksEdgeProduct" : "AKS Edge Essentials - K3s",
"AksEdgeConfig": {
Expand Down Expand Up @@ -68,12 +68,12 @@ Find below the details of the supported parameters in the json file.

|Node| Parameter | Required | Type / Values | Comments |
|-| --------- | -------- |---------------- | -------- |
|SchemaVersion| - | Mandatory | 1.1 | Fixed value, schema version. Reserved |
|SchemaVersion| - | Mandatory | 1.3 | Fixed value, schema version. Reserved |
|Version| - | Mandatory | 1.0 | Fixed value, json instance version |
|AksEdgeProduct| - | Mandatory | AKS Edge Essentials - K8s <br> AKS Edge Essentials - K3s | Desired product K8s or K3s |
|AksEdgeProductUrl| - | Optional | URL | URL to download the MSI |
|Azure | ClusterName | Optional | String | Name of the cluster for Arc connection. Default is hostname-distribution (abc-k8s or def-k3s)|
|| SubscriptionName | Mandatory | GUID | Name of the Azure Subscription |
|| SubscriptionName | Mandatory | String | Name of the Azure Subscription |
|| SubscriptionId | Optional | GUID | Azure Subscription ID |
|| TenantId | Optional | GUID | Azure Tenant ID |
|| ResourceGroupName | Mandatory | String | ResourceGroupName |
Expand All @@ -82,7 +82,10 @@ Find below the details of the supported parameters in the json file.
|| CustomLocationOID | Optional | GUID | ObjectID for the custom location resource provider |
|| `Auth`.ServicePrincipalId |Mandatory | GUID | Specify service principal appID to use|
|| `Auth`.Password |Mandatory| String | Specify the password (in clear) |
|| EnableWorkloadIdentity |Optional| Boolean | Enable secure workload access to azure resource |
|| EnableWorkloadIdentity |Optional| Boolean | Enable secure workload access to azure resource (only for AIO)|
|| EnableKeyManagement |Optional| Boolean | Enables Key management (key rotation) (only for AIO)|
|| GatewayResourceId |Optional| String | Resource Id for the Arc Gateway resource (only for AIO)|
|| ConnectedMachineName |Optional| String | Specify the resource name for connected machine agent. Default is hostname |
|InstallOptions| InstallPath | Optional | String | Path to install the product |
|| VhdxPath | Optional | String | Path to store the vhdx files |
|VSwitch| Name | Optional | String | Name for the external switch, mandatory for ScalableCluster|
Expand Down
15 changes: 11 additions & 4 deletions tools/modules/AksEdgeDeploy/aide-ucschema.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"properties": {
"SchemaVersion": {
"type": "string",
"default": "1.2",
"default": "1.3",
"description": "Version of the schema/format of the json"
},
"Version": {
Expand Down Expand Up @@ -74,13 +74,20 @@
}
},
"EnableWorkloadIdentity": {
"type": "boolean"
"type": "boolean",
"description": "Enables Workload Identity (only for AIO)"
},
"EnableKeyManagement": {
"type": "boolean"
"type": "boolean",
"description": "Enables Key management (key rotation) (only for AIO)"
},
"GatewayResourceId": {
"type": "string"
"type": "string",
"description": "Resource Id for the Arc Gateway resource (only for AIO)"
},
"ConnectedMachineName":{
"type": "string",
"description": "Connected Machine name used for Azure Arc enabled Server"
}
}
},
Expand Down
11 changes: 6 additions & 5 deletions tools/modules/AksEdgeDeploy/aide-userconfig.puml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jsonDiagram {
}
arrow {
LineThickness 0.5
LineStyle 2;6
LineStyle 2,6
}
highlight {
BackgroundColor black
Expand All @@ -21,7 +21,7 @@ jsonDiagram {
</style>
#highlight "SchemaVersion"
{
"SchemaVersion":"1.2",
"SchemaVersion":"1.3",
"Version":"1.0",
"AksEdgeProduct" : [
"AKS Edge Essentials - K8s",
Expand All @@ -41,9 +41,10 @@ jsonDiagram {
"ServicePrincipalId" : "GUID",
"Password" : "String"
},
"EnableWorkloadIdentity" : "Boolean",
"EnableKeyManagement" : "Boolean",
"GatewayResourceId": "String"
"//EnableWorkloadIdentity//" : "Boolean",
"//EnableKeyManagement//" : "Boolean",
"//GatewayResourceId//": "String",
"ConnectedMachineName": "String"
}
,
"InstallOptions":{
Expand Down
7 changes: 4 additions & 3 deletions tools/scripts/AksEdgeQuickStart/AksEdgeQuickStart.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ param(
[string] $Tag
)
#Requires -RunAsAdministrator
New-Variable -Name gAksEdgeQuickStartVersion -Value "1.0.240904.1500" -Option Constant -ErrorAction SilentlyContinue
New-Variable -Name gAksEdgeQuickStartVersion -Value "1.0.241002.1000" -Option Constant -ErrorAction SilentlyContinue

New-Variable -Option Constant -ErrorAction SilentlyContinue -Name arcLocations -Value @(
"southcentralus", "westus", "westus2", "westus3", "centralus", "eastus", "eastus2", "eastus3", "westcentralus", "northcentralus", "brazilsouth",
Expand Down Expand Up @@ -60,7 +60,7 @@ if ($UseK8s) {
# Here string for the json content
$aideuserConfig = @"
{
"SchemaVersion": "1.1",
"SchemaVersion": "1.3",
"Version": "1.0",
"AksEdgeProduct": "$productName",
"AksEdgeProductUrl": "",
Expand All @@ -75,7 +75,8 @@ $aideuserConfig = @"
"Auth":{
"ServicePrincipalId":"",
"Password":""
}
},
"ConnectedMachineName": ""
},
"AksEdgeConfigFile": "aksedge-config.json"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ param(
[string] $Tag
)
#Requires -RunAsAdministrator
New-Variable -Name gAksEdgeRemoteDeployVersion -Value "1.0.240904.1500" -Option Constant -ErrorAction SilentlyContinue
New-Variable -Name gAksEdgeRemoteDeployVersion -Value "1.0.241002.1000" -Option Constant -ErrorAction SilentlyContinue
if (! [Environment]::Is64BitProcess) {
Write-Host "Error: Run this in 64bit Powershell session" -ForegroundColor Red
exit -1
Expand All @@ -42,7 +42,7 @@ if ($UseK8s) {
# Here string for the json content
$aideuserConfig = @"
{
"SchemaVersion": "1.1",
"SchemaVersion": "1.3",
"Version": "1.0",
"AksEdgeProduct": "$productName",
"AksEdgeProductUrl": "",
Expand All @@ -57,7 +57,8 @@ $aideuserConfig = @"
"Auth":{
"ServicePrincipalId":"",
"Password":""
}
},
"ConnectedMachineName": ""
},
"AksEdgeConfigFile": "aksedge-config.json"
}
Expand Down
7 changes: 4 additions & 3 deletions tools/scripts/AksEdgeRemoteDeploy/AksEdgeRemoteDeploy.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ param(
[Switch] $GetManagedServiceToken
)
#Requires -RunAsAdministrator
New-Variable -Name gAksEdgeRemoteDeployVersion -Value "1.0.240904.1500" -Option Constant -ErrorAction SilentlyContinue
New-Variable -Name gAksEdgeRemoteDeployVersion -Value "1.0.241002.1000" -Option Constant -ErrorAction SilentlyContinue
if (! [Environment]::Is64BitProcess) {
Write-Host "Error: Run this in 64bit Powershell session" -ForegroundColor Red
exit -1
Expand All @@ -39,7 +39,7 @@ if ($UseK8s) {
# Here string for the json content
$aideuserConfig = @"
{
"SchemaVersion": "1.1",
"SchemaVersion": "1.3",
"Version": "1.0",
"AksEdgeProduct": "$productName",
"AksEdgeProductUrl": "",
Expand All @@ -54,7 +54,8 @@ $aideuserConfig = @"
"Auth":{
"ServicePrincipalId":"",
"Password":""
}
},
"ConnectedMachineName": ""
},
"AksEdgeConfigFile": "aksedge-config.json"
}
Expand Down