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

Sync Data Ops November release branch #2290

Merged
merged 550 commits into from
Nov 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
550 commits
Select commit Hold shift + click to select a range
c2881d5
Merge pull request #2233 from sebassem/1417-feature-br
sebassem Nov 5, 2023
0280871
test
sebassem Nov 5, 2023
53d6e77
testing
sebassem Nov 5, 2023
fe030b7
Merge branch 'microsoft:1417-feature-br' into 1417-feature-br
sebassem Nov 5, 2023
e564be3
Merge pull request #2234 from sebassem/1417-feature-br
sebassem Nov 5, 2023
c43335a
Fixed InfluxDB deployment
luiscast84 Nov 5, 2023
d9f9d26
Added missing file in the Bootstrap
luiscast84 Nov 5, 2023
856c0a6
Merge pull request #2235 from luiscast84/1417-feature-br
sebassem Nov 6, 2023
c3c701d
Adjusted and cleaned up Start-Sleep time
luiscast84 Nov 6, 2023
0e402ee
test
sebassem Nov 6, 2023
899263f
Removed duplicated broker and updated brokerRef
luiscast84 Nov 6, 2023
c2a50d3
revert
sebassem Nov 6, 2023
6817f6a
Changed Mq to deploy as loadBalancer
luiscast84 Nov 6, 2023
584644a
Removed opc simulator and disabled tls
luiscast84 Nov 6, 2023
8feb072
test
sebassem Nov 6, 2023
31ce497
revert
sebassem Nov 6, 2023
f538426
Fixed Mq deployment
luiscast84 Nov 6, 2023
9fd8e01
Updated service for checking MQ broker IP
luiscast84 Nov 6, 2023
505a4bf
Merge branch 'microsoft:1417-feature-br' into 1417-feature-br
luiscast84 Nov 6, 2023
fae1aee
Added more time for services being available
luiscast84 Nov 6, 2023
597f6d3
Merge branch '1417-feature-br' of https://github.com/luiscast84/azure…
luiscast84 Nov 6, 2023
3e82c73
Added more time for InfluxDB services
luiscast84 Nov 6, 2023
dfd1957
Merge pull request #2236 from luiscast84/1417-feature-br
sebassem Nov 6, 2023
b45701d
Adjusted execution order and firewall rule
luiscast84 Nov 6, 2023
6035b8e
Fixed execution order for resources - InfluxDB
luiscast84 Nov 6, 2023
8cba2cb
Removed second deployment of mq loadBalancer
luiscast84 Nov 6, 2023
259d995
Merge branch 'microsoft:1417-feature-br' into 1417-feature-br
luiscast84 Nov 6, 2023
fcdb276
Created firewall rule before broker deployment
luiscast84 Nov 6, 2023
fd3d961
Restored firewall rule before sim deployment
luiscast84 Nov 6, 2023
88b1560
Merge pull request #2237 from luiscast84/1417-feature-br
sebassem Nov 7, 2023
484485c
Merge branch '1417-feature-br' of https://github.com/sebassem/azure_a…
sebassem Nov 7, 2023
82e5b6d
Increased time for simulator and fixed placeholder
luiscast84 Nov 7, 2023
4862a37
Merge branch 'microsoft:1417-feature-br' into 1417-feature-br
luiscast84 Nov 7, 2023
e279355
Merge pull request #2238 from luiscast84/1417-feature-br
sebassem Nov 7, 2023
901b13b
Merge branch 'microsoft:1417-feature-br' into 1417-feature-br
sebassem Nov 7, 2023
ac63e11
update role assignment
sebassem Nov 7, 2023
cc9922c
cpu
sebassem Nov 7, 2023
393f6ec
add limits
sebassem Nov 7, 2023
f32553d
add limits
sebassem Nov 7, 2023
1989272
testing
sebassem Nov 7, 2023
eb01bd6
Merge pull request #2239 from sebassem/1417-feature-br
sebassem Nov 7, 2023
8c8dccb
update code
sebassem Nov 7, 2023
ec585d2
testing
sebassem Nov 7, 2023
b655290
Merge branch 'microsoft:1417-feature-br' into 1417-feature-br
sebassem Nov 7, 2023
f00c6b0
Merge pull request #2240 from sebassem/1417-feature-br
sebassem Nov 7, 2023
997b4c9
testing
sebassem Nov 7, 2023
b3e189d
testing
sebassem Nov 7, 2023
8b2baa5
update
sebassem Nov 7, 2023
13ac887
Merge branch 'microsoft:1417-feature-br' into 1417-feature-br
sebassem Nov 7, 2023
eaa9b29
Merge pull request #2241 from sebassem/1417-feature-br
sebassem Nov 7, 2023
01e75e6
test
sebassem Nov 7, 2023
9ad3dc8
test
sebassem Nov 7, 2023
d3fed8d
Merge branch 'microsoft:1417-feature-br' into 1417-feature-br
sebassem Nov 7, 2023
4d0242a
Merge pull request #2242 from sebassem/1417-feature-br
sebassem Nov 7, 2023
7e87b26
Updated Mq configuration with latest changes
luiscast84 Nov 8, 2023
497fdbf
Merge pull request #2243 from luiscast84/1417-feature-br
sebassem Nov 8, 2023
eccc365
test
sebassem Nov 8, 2023
47abea7
Merge branch 'microsoft:1417-feature-br' into 1417-feature-br
sebassem Nov 8, 2023
b6d3860
testing
sebassem Nov 8, 2023
7886cf4
Merge pull request #2244 from sebassem/1417-feature-br
sebassem Nov 8, 2023
aa830b8
update yamls
sebassem Nov 8, 2023
5b02358
test
sebassem Nov 8, 2023
d8ea7f1
Merge branch 'microsoft:1417-feature-br' into 1417-feature-br
sebassem Nov 8, 2023
bac566f
Merge pull request #2245 from sebassem/1417-feature-br
sebassem Nov 8, 2023
c1341e4
testing
sebassem Nov 8, 2023
2b0efd0
Merge branch '1417-feature-br' of https://github.com/sebassem/azure_a…
sebassem Nov 8, 2023
2b5cc3b
Merge pull request #2246 from sebassem/1417-feature-br
sebassem Nov 8, 2023
6c82ef3
Hardcoded region for ADX
luiscast84 Nov 8, 2023
e337a79
Fixed adxlocation
luiscast84 Nov 8, 2023
f4af570
Merge pull request #2247 from luiscast84/1417-feature-br
sebassem Nov 8, 2023
ad1ebb3
initial readme comitt
sebassem Nov 8, 2023
d25145c
Improved logs
luiscast84 Nov 8, 2023
eb952b6
Merge branch '1417-feature-br' of https://github.com/luiscast84/azure…
luiscast84 Nov 8, 2023
72e91b5
Defined location for Ft1
luiscast84 Nov 8, 2023
650218f
Reverted config for Adx. Added param ft1 location
luiscast84 Nov 8, 2023
855a406
Merge pull request #2248 from luiscast84/1417-feature-br
sebassem Nov 8, 2023
3a4c0f1
Bugfix for EventGrid Mqtt
luiscast84 Nov 8, 2023
d75737a
Reverted Event Grid SP
luiscast84 Nov 8, 2023
5832307
Merge pull request #2249 from luiscast84/1417-feature-br
likamrat Nov 8, 2023
18efa27
Merge branch 'microsoft:1417-feature-br' into 1417-feature-br
sebassem Nov 9, 2023
7364c80
test
sebassem Nov 9, 2023
fa187a3
Deploying insecure Ft1 broker -test-
luiscast84 Nov 9, 2023
6cb29d4
Merge branch 'microsoft:1417-feature-br' into 1417-feature-br
luiscast84 Nov 9, 2023
98f95e7
updates
sebassem Nov 9, 2023
0bea5d8
Merge pull request #2252 from sebassem/1417-feature-br
sebassem Nov 9, 2023
151cc34
testing
sebassem Nov 9, 2023
955a3e3
removed show template
luiscast84 Nov 9, 2023
e0ffb7f
Reverted Az Cli non-interactive deployment
luiscast84 Nov 9, 2023
ec14144
Reverted custom location fix
luiscast84 Nov 9, 2023
49c70bc
test
luiscast84 Nov 9, 2023
ea8bc61
added namespaces back
luiscast84 Nov 9, 2023
c52408e
Test
luiscast84 Nov 9, 2023
0583c63
Merge branch 'microsoft:1417-feature-br' into 1417-feature-br
luiscast84 Nov 9, 2023
1f3de80
Merge pull request #2251 from luiscast84/1417-feature-br
sebassem Nov 9, 2023
214c90c
Renamed yml for Ft1 CloudConnector
luiscast84 Nov 9, 2023
213f52b
Merge branch 'microsoft:1417-feature-br' into 1417-feature-br
sebassem Nov 9, 2023
d51f830
add managed identity
sebassem Nov 9, 2023
eff59c2
update adx
sebassem Nov 9, 2023
06f4768
Merge pull request #2253 from sebassem/1417-feature-br
sebassem Nov 9, 2023
020c526
Changed frequency
luiscast84 Nov 9, 2023
8a37488
update kql
sebassem Nov 9, 2023
c590d98
Merge branch 'microsoft:1417-feature-br' into 1417-feature-br
sebassem Nov 9, 2023
0e3373f
Merge pull request #2254 from sebassem/1417-feature-br
sebassem Nov 9, 2023
77944be
Merge branch 'microsoft:1417-feature-br' into 1417-feature-br
luiscast84 Nov 9, 2023
dc2362e
Merge pull request #2255 from luiscast84/1417-feature-br
sebassem Nov 9, 2023
b0d4013
test
sebassem Nov 9, 2023
640e8d6
Merge branch '1417-feature-br' of https://github.com/sebassem/azure_a…
sebassem Nov 9, 2023
26288b5
test
sebassem Nov 9, 2023
89c8027
Merge branch 'microsoft:1417-feature-br' into 1417-feature-br
sebassem Nov 9, 2023
cda7f91
Merge pull request #2256 from sebassem/1417-feature-br
sebassem Nov 9, 2023
09e905c
update dashboard name
sebassem Nov 9, 2023
2ac296e
Merge branch '1417-feature-br' of https://github.com/sebassem/azure_a…
sebassem Nov 9, 2023
f6863ba
Merge branch 'microsoft:1417-feature-br' into 1417-feature-br
sebassem Nov 9, 2023
6a18a15
Merge pull request #2257 from sebassem/1417-feature-br
sebassem Nov 9, 2023
b514c2a
testing
luiscast84 Nov 9, 2023
6070db2
Chect pod
luiscast84 Nov 9, 2023
5b15c8a
Updated versions
luiscast84 Nov 10, 2023
49d9184
add volume
sebassem Nov 10, 2023
afc00e5
Merge branch '1417-feature-br' of https://github.com/sebassem/azure_a…
sebassem Nov 10, 2023
4c2513c
Merge pull request #2259 from sebassem/1417-feature-br
sebassem Nov 10, 2023
cee2824
Merge branch 'microsoft:1417-feature-br' into 1417-feature-br
luiscast84 Nov 10, 2023
d959f8c
Merge pull request #2258 from luiscast84/1417-feature-br
sebassem Nov 10, 2023
d9ce1d9
Added release RPs
luiscast84 Nov 10, 2023
6798c1a
Merge branch 'microsoft:1417-feature-br' into 1417-feature-br
luiscast84 Nov 10, 2023
4166ff7
Merge pull request #2260 from luiscast84/1417-feature-br
sebassem Nov 10, 2023
a3a521f
add role assignment
sebassem Nov 10, 2023
e2b81c8
Merge pull request #2262 from sebassem/1417-feature-br
sebassem Nov 10, 2023
46e0ec8
Merge pull request #2263 from microsoft/main
sebassem Nov 10, 2023
69238d0
role assignment
sebassem Nov 10, 2023
d15eaf6
testing
sebassem Nov 10, 2023
d391dbc
Merge branch 'microsoft:1417-feature-br' into 1417-feature-br
sebassem Nov 10, 2023
8ec6372
typo
sebassem Nov 10, 2023
24b8ef0
testing
sebassem Nov 10, 2023
1f738c2
Merge pull request #2264 from sebassem/1417-feature-br
sebassem Nov 10, 2023
619b40d
Add files via upload
sebassem Nov 12, 2023
bbaf151
add wallpaper and error handing
sebassem Nov 12, 2023
c896f88
Merge branch '1417-feature-br' of https://github.com/sebassem/azure_a…
sebassem Nov 12, 2023
47da1ba
add health check
sebassem Nov 12, 2023
5080173
testing
sebassem Nov 12, 2023
e296de4
namespace
sebassem Nov 12, 2023
c5373e4
wallpaper
sebassem Nov 12, 2023
d7cc0ab
use beta
sebassem Nov 12, 2023
d99aed8
Merge pull request #2267 from sebassem/1417-feature-br
sebassem Nov 12, 2023
e8c36aa
add credentials
sebassem Nov 12, 2023
1017a88
replace credentials
sebassem Nov 12, 2023
cf3307e
move mqttexplorer to bootstrap
sebassem Nov 12, 2023
7af6709
addin mqtt explorer setup
sebassem Nov 12, 2023
4fc8b42
mqtt explorer
sebassem Nov 12, 2023
c744284
add bookmarks
sebassem Nov 12, 2023
6a74493
update azd
sebassem Nov 12, 2023
690905d
replace ft1
sebassem Nov 12, 2023
dfbb720
Merge branch 'microsoft:1417-feature-br' into 1417-feature-br
sebassem Nov 12, 2023
4acf013
updates
sebassem Nov 12, 2023
e03b151
Merge branch '1417-feature-br' of https://github.com/sebassem/azure_a…
sebassem Nov 12, 2023
c8a8163
rename file
sebassem Nov 12, 2023
bf245b6
test
sebassem Nov 12, 2023
6b7a21a
,qtt
sebassem Nov 12, 2023
9f1e14d
test
sebassem Nov 12, 2023
95fffbd
test
sebassem Nov 12, 2023
2d5908a
add tags
sebassem Nov 12, 2023
15e0644
test
sebassem Nov 12, 2023
ac3f025
add bookmarks
sebassem Nov 12, 2023
141d221
remove grafana
sebassem Nov 12, 2023
b764f4f
mqtt explorer
sebassem Nov 12, 2023
ba2a4f2
add quick access
sebassem Nov 12, 2023
8b5bb9f
cleanup
sebassem Nov 12, 2023
b61fd57
test
sebassem Nov 12, 2023
7e09115
test
sebassem Nov 12, 2023
ecee55d
reduce wait
sebassem Nov 12, 2023
0734106
test
sebassem Nov 12, 2023
f3a9238
test
sebassem Nov 12, 2023
fb2467e
test
sebassem Nov 12, 2023
cebbc93
Merge pull request #2268 from sebassem/1417-feature-br
sebassem Nov 12, 2023
b965f9c
test
sebassem Nov 12, 2023
3553290
Merge pull request #2269 from sebassem/1417-feature-br
sebassem Nov 12, 2023
2373dfd
typo
sebassem Nov 13, 2023
537c8fa
Merge branch 'microsoft:1417-feature-br' into 1417-feature-br
sebassem Nov 13, 2023
b806a52
Merge pull request #2270 from sebassem/1417-feature-br
sebassem Nov 13, 2023
aadd785
test
sebassem Nov 13, 2023
9ade391
Merge branch 'microsoft:1417-feature-br' into 1417-feature-br
sebassem Nov 13, 2023
0b266c7
Merge pull request #2271 from sebassem/1417-feature-br
sebassem Nov 13, 2023
fc904ac
fix mqtt explorer
sebassem Nov 13, 2023
3812b3e
Merge branch 'microsoft:1417-feature-br' into 1417-feature-br
sebassem Nov 13, 2023
ef5c4f7
Merge pull request #2272 from sebassem/1417-feature-br
sebassem Nov 13, 2023
ac93a0e
add permission to topic
sebassem Nov 13, 2023
678e128
Merge branch '1417-feature-br' of https://github.com/sebassem/azure_a…
sebassem Nov 13, 2023
5e2e8d9
test msi eventgrid
sebassem Nov 13, 2023
0b28466
Add system-managed identity to event grid
sebassem Nov 13, 2023
6a4a58d
formatting
sebassem Nov 13, 2023
e9de530
formatting
sebassem Nov 13, 2023
e9579d9
typo
sebassem Nov 13, 2023
0e989b8
formatting
sebassem Nov 13, 2023
6691688
test
sebassem Nov 13, 2023
95ff605
Merge branch 'microsoft:1417-feature-br' into 1417-feature-br
sebassem Nov 13, 2023
77deda4
Merge pull request #2273 from sebassem/1417-feature-br
sebassem Nov 13, 2023
4e7411d
Update location parameter to use resource group
sebassem Nov 13, 2023
73e4cef
Refactor Azure EventGrid namespace location
sebassem Nov 13, 2023
41530d6
add adx ingestion
sebassem Nov 13, 2023
b82f998
Update MQTT bridge protocol version to v3
sebassem Nov 13, 2023
a3eed83
Testing fix for Cloud Connector
luiscast84 Nov 14, 2023
34ff473
Merge pull request #2276 from luiscast84/1417-feature-br
likamrat Nov 14, 2023
a6aacb0
fix a typo in yml (tag)
luiscast84 Nov 14, 2023
f6e7ba1
Merge branch 'microsoft:1417-feature-br' into 1417-feature-br
luiscast84 Nov 14, 2023
5c63c02
Merge pull request #2277 from luiscast84/1417-feature-br
likamrat Nov 14, 2023
78a97de
Merge branch 'microsoft:1417-feature-br' into 1417-feature-br
sebassem Nov 14, 2023
b90a744
v5
sebassem Nov 14, 2023
f33ab8c
test
sebassem Nov 14, 2023
f3e8014
remove readme
sebassem Nov 14, 2023
2ebb406
move code
sebassem Nov 14, 2023
e63c46a
Fix capitalization of AIO and update firewall rule
sebassem Nov 14, 2023
9390c42
add regions
sebassem Nov 14, 2023
4bbae2c
Update directory paths in aioConfig.psd1
sebassem Nov 14, 2023
ea5f0fc
Update database name in ADX dashboard
sebassem Nov 14, 2023
5e04f13
Merge pull request #2278 from sebassem/1417-feature-br
sebassem Nov 14, 2023
be07375
Update Bootstrap.ps1 with new wallpaper image URL
sebassem Nov 14, 2023
b223ab8
Merge branch 'microsoft:1417-feature-br' into 1417-feature-br
sebassem Nov 14, 2023
dc6850d
Merge pull request #2281 from sebassem/1417-feature-br
sebassem Nov 14, 2023
38a0b15
Merge pull request #2280 from microsoft/1417-feature-br
sebassem Nov 14, 2023
9dbb2cd
Merge branch 'microsoft:main' into main
sebassem Nov 14, 2023
306e03c
update regions
sebassem Nov 14, 2023
c9566b9
Merge branch 'microsoft:main' into main
sebassem Nov 14, 2023
708bd01
remove customLocation param
sebassem Nov 14, 2023
c3f5d2c
fixing adx uri
sebassem Nov 14, 2023
2cbe762
Fix Azure storage URL in AgLogonScript.ps1
sebassem Nov 14, 2023
feca5dc
azd improvements
sebassem Nov 14, 2023
63e962e
Refactored location parameter to use resource
sebassem Nov 14, 2023
7a2e1c3
Fix ADX dashboard file name typo
sebassem Nov 14, 2023
df5e9b6
Update GitHub account in main.azd.bicep file and
sebassem Nov 14, 2023
0d76c97
Update ADX dashboard URI in postprovision script
sebassem Nov 14, 2023
eaedc22
Update ADX cluster name and URI in dashboard
sebassem Nov 14, 2023
1b86cf6
Fix EventGrid role assignments in LogonScript.ps1
sebassem Nov 14, 2023
eb56bb4
Update MQTT Explorer and bookmark names
sebassem Nov 14, 2023
9297f4d
Changed target GitHub account to Microsoft in
sebassem Nov 14, 2023
a587feb
Merge branch 'microsoft:main' into main
sebassem Nov 14, 2023
aae8926
Merge branch 'main' of https://github.com/sebassem/azure_arc
sebassem Nov 14, 2023
9b4c5eb
Remove logo from SVG file
sebassem Nov 14, 2023
02eac36
Merge pull request #2282 from sebassem/main
sebassem Nov 14, 2023
0a10cf2
Updated coordenates for Redmond
luiscast84 Nov 14, 2023
d4d15e8
Merge pull request #2283 from luiscast84/main
sebassem Nov 14, 2023
42b1868
Add pip upgrade command to LogonScript.ps1
sebassem Nov 15, 2023
e6ba223
Merge branch 'microsoft:main' into main
sebassem Nov 15, 2023
7bf262d
Merge pull request #2285 from sebassem/main
sebassem Nov 15, 2023
458768a
update wallpaper
dkirby-ms Nov 15, 2023
7db3365
Merge pull request #2287 from dkirby-ms/hciboxwallpaper
dkirby-ms Nov 15, 2023
d774877
reinit
dkirby-ms Nov 15, 2023
336dc89
Merge pull request #2288 from dkirby-ms/new_vi_scenario
dkirby-ms Nov 15, 2023
1527ce0
Enable OPC
luiscast84 Nov 15, 2023
84cfc18
Fixed Typo
luiscast84 Nov 15, 2023
bc4d1bc
Merge branch 'microsoft:main' into main
luiscast84 Nov 15, 2023
26d1a49
Merge pull request #2289 from luiscast84/main
likamrat Nov 15, 2023
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
@@ -0,0 +1,149 @@
param (
[string]$adminUsername,
[string]$appId,
[string]$password,
[string]$tenantId,
[string]$subscriptionId,
[string]$location,
[string]$templateBaseUrl,
[string]$resourceGroup,
[string]$kubernetesDistribution,
[string]$videoIndexerAccountName,
[string]$videoIndexerAccountId,
[string]$rdpPort
)

[System.Environment]::SetEnvironmentVariable('adminUsername', $adminUsername,[System.EnvironmentVariableTarget]::Machine)
[System.Environment]::SetEnvironmentVariable('appId', $appId,[System.EnvironmentVariableTarget]::Machine)
[System.Environment]::SetEnvironmentVariable('password', $password,[System.EnvironmentVariableTarget]::Machine)
[System.Environment]::SetEnvironmentVariable('tenantId', $tenantId,[System.EnvironmentVariableTarget]::Machine)
[System.Environment]::SetEnvironmentVariable('resourceGroup', $resourceGroup,[System.EnvironmentVariableTarget]::Machine)
[System.Environment]::SetEnvironmentVariable('location', $location,[System.EnvironmentVariableTarget]::Machine)
[System.Environment]::SetEnvironmentVariable('subscriptionId', $subscriptionId,[System.EnvironmentVariableTarget]::Machine)
[System.Environment]::SetEnvironmentVariable('templateBaseUrl', $templateBaseUrl,[System.EnvironmentVariableTarget]::Machine)
[System.Environment]::SetEnvironmentVariable('kubernetesDistribution', $kubernetesDistribution,[System.EnvironmentVariableTarget]::Machine)
[System.Environment]::SetEnvironmentVariable('videoIndexerAccountName', $videoIndexerAccountName,[System.EnvironmentVariableTarget]::Machine)
[System.Environment]::SetEnvironmentVariable('videoIndexerAccountId', $videoIndexerAccountId,[System.EnvironmentVariableTarget]::Machine)
[System.Environment]::SetEnvironmentVariable('rdpPort', $rdpPort,[System.EnvironmentVariableTarget]::Machine)

# Create path
Write-Output "Create deployment path"
$tempDir = "C:\Temp"
New-Item -Path $tempDir -ItemType directory -Force

Start-Transcript "C:\Temp\Bootstrap.log"

$ErrorActionPreference = "SilentlyContinue"

##############################################################
# Change RDP Port
##############################################################
Write-Host "RDP port number from configuration is $rdpPort"
if (($rdpPort -ne $null) -and ($rdpPort -ne "") -and ($rdpPort -ne "3389")) {
Write-Host "Configuring RDP port number to $rdpPort"
$TSPath = 'HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server'
$RDPTCPpath = $TSPath + '\Winstations\RDP-Tcp'
Set-ItemProperty -Path $TSPath -name 'fDenyTSConnections' -Value 0

# RDP port
$portNumber = (Get-ItemProperty -Path $RDPTCPpath -Name 'PortNumber').PortNumber
Write-Host "Current RDP PortNumber: $portNumber"
if (!($portNumber -eq $rdpPort)) {
Write-Host Setting RDP PortNumber to $rdpPort
Set-ItemProperty -Path $RDPTCPpath -name 'PortNumber' -Value $rdpPort
Restart-Service TermService -force
}

#Setup firewall rules
if ($rdpPort -eq 3389) {
netsh advfirewall firewall set rule group="remote desktop" new Enable=Yes
}
else {
$systemroot = get-content env:systemroot
netsh advfirewall firewall add rule name="Remote Desktop - Custom Port" dir=in program=$systemroot\system32\svchost.exe service=termservice action=allow protocol=TCP localport=$RDPPort enable=yes
}

Write-Host "RDP port configuration complete."
}

# Downloading GitHub artifacts
Invoke-WebRequest ($templateBaseUrl + "artifacts/LogonScript.ps1") -OutFile "C:\Temp\LogonScript.ps1"
Invoke-WebRequest ($templateBaseUrl + "artifacts/longhorn.yaml") -OutFile "C:\Temp\longhorn.yaml"
Invoke-WebRequest ($templateBaseUrl + "artifacts/video/video.mp4") -OutFile "C:\Temp\video.mp4"
Invoke-WebRequest "https://raw.githubusercontent.com/microsoft/azure_arc/main/img/jumpstart_wallpaper.png" -OutFile "C:\Temp\wallpaper.png"
Invoke-WebRequest "https://github.com/certbot/certbot/releases/latest/download/certbot-beta-installer-win_amd64_signed.exe" -OutFile "C:\Temp\certbot-beta-installer-win_amd64_signed.exe"

##############################################################
# Install Azure CLI (64-bit not available via Chocolatey)
##############################################################
$ProgressPreference = 'SilentlyContinue'
Invoke-WebRequest -Uri https://aka.ms/installazurecliwindowsx64 -OutFile .\AzureCLI.msi
Start-Process msiexec.exe -Wait -ArgumentList '/I AzureCLI.msi /quiet'
Remove-Item .\AzureCLI.msi

# Installing tools
Write-Header "Installing Chocolatey Apps"
$chocolateyAppList = 'az.powershell,kubernetes-cli,kubernetes-helm,vscode'
Start-Process msiexec.exe -Wait -ArgumentList '/I AzureCLI.msi /quiet'
Start-Process msiexec.exe -Wait -ArgumentList '/I AzureCLI.msi /quiet'
Start-Process "C:\Temp\certbot-beta-installer-win_amd64_signed.exe" -Wait -ArgumentList '/S'

try {
choco config get cacheLocation
}
catch {
Write-Output "Chocolatey not detected, trying to install now"
Invoke-Expression ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
}

Write-Host "Chocolatey Apps Specified"

$appsToInstall = $chocolateyAppList -split "," | ForEach-Object { "$($_.Trim())" }

foreach ($app in $appsToInstall)
{
Write-Host "Installing $app"
& choco install $app /y -Force | Write-Output
}

# Enable VirtualMachinePlatform feature, the vm reboot will be done in DSC extension
Enable-WindowsOptionalFeature -Online -FeatureName VirtualMachinePlatform -NoRestart

# Disable Microsoft Edge sidebar
$RegistryPath = 'HKLM:\SOFTWARE\Policies\Microsoft\Edge'
$Name = 'HubsSidebarEnabled'
$Value = '00000000'
# Create the key if it does not exist
If (-NOT (Test-Path $RegistryPath)) {
New-Item -Path $RegistryPath -Force | Out-Null
}
New-ItemProperty -Path $RegistryPath -Name $Name -Value $Value -PropertyType DWORD -Force

# Disable Microsoft Edge first-run Welcome screen
$RegistryPath = 'HKLM:\SOFTWARE\Policies\Microsoft\Edge'
$Name = 'HideFirstRunExperience'
$Value = '00000001'
# Create the key if it does not exist
If (-NOT (Test-Path $RegistryPath)) {
New-Item -Path $RegistryPath -Force | Out-Null
}
New-ItemProperty -Path $RegistryPath -Name $Name -Value $Value -PropertyType DWORD -Force

# Creating scheduled task for LogonScript.ps1
$Trigger = New-ScheduledTaskTrigger -AtLogOn
$Action = New-ScheduledTaskAction -Execute "PowerShell.exe" -Argument 'C:\Temp\LogonScript.ps1'
Register-ScheduledTask -TaskName "LogonScript" -Trigger $Trigger -User $adminUsername -Action $Action -RunLevel "Highest" -Force

# Disabling Windows Server Manager Scheduled Task
Get-ScheduledTask -TaskName ServerManager | Disable-ScheduledTask

# Install Hyper-V and reboot
Write-Host "Installing Hyper-V and restart"
Enable-WindowsOptionalFeature -Online -FeatureName Containers -All -NoRestart
Enable-WindowsOptionalFeature -Online -FeatureName VirtualMachinePlatform -NoRestart
Install-WindowsFeature -Name Hyper-V -IncludeAllSubFeature -IncludeManagementTools -Restart

# Clean up Bootstrap.log
Stop-Transcript
$logSuppress = Get-Content C:\Temp\Bootstrap.log | Where-Object { $_ -notmatch "Host Application: powershell.exe" }
$logSuppress | Set-Content C:\Temp\Bootstrap.log -Force
Original file line number Diff line number Diff line change
@@ -0,0 +1,235 @@
Start-Transcript -Path C:\Temp\LogonScript.log

Set-ExecutionPolicy Bypass -Scope Process -Force

# Parameters
$schemaVersionAksEdgeConfig = "1.9"
$versionAksEdgeConfig = "1.0"
$guid = ([System.Guid]::NewGuid()).ToString().subString(0,5).ToLower()
$clusterName = "$Env:resourceGroup-$guid"

# Configure AKS disk
$storagePoolName = "AKS"
$diskName = "AKSData"
$disks = Get-Disk | Where-Object partitionStyle -eq "raw" | Get-PhysicalDisk
$storageName = Get-StorageSubsystem | Select-Object -expand FriendlyName
New-StoragePool -FriendlyName $storagePoolName -StorageSubSystemFriendlyName $storageName -PhysicalDisks $disks
New-VirtualDisk -StoragePoolFriendlyName $storagePoolName -FriendlyName $diskName -Size (500GB) -ResiliencySettingName Simple
Get-VirtualDisk -FriendlyName $diskName | Get-Disk | Initialize-Disk -Passthru | New-Partition -AssignDriveLetter -UseMaximumSize | Format-Volume -NewFileSystemLabel $diskName

# Install AKS EE
$letter = Get-Volume | Where-Object FileSystemLabel -eq $diskName
$installPath = "$($letter.DriveLetter):\AKSEdge"
New-Item -Path $installPath -ItemType Directory
$aksEEk3sUrl = 'https://aka.ms/aks-edge/k3s-msi'
$tempDir = "C:\Temp"
$ProgressPreference = "SilentlyContinue"
Invoke-WebRequest $aksEEk3sUrl -OutFile $tempDir\AKSEEK3s.msi
msiexec.exe /i $tempDir\AKSEEK3s.msi INSTALLDIR=$installPath /q /passive
Start-Sleep 45

Import-Module AksEdge
Get-Command -Module AKSEdge | Format-Table Name, Version

# Here string for the json content
$aksedgeConfig = @"
{
"SchemaVersion": "$schemaVersionAksEdgeConfig",
"Version": "$versionAksEdgeConfig",
"DeploymentType": "SingleMachineCluster",
"Init": {
"ServiceIPRangeSize": 30
},
"Network": {
"NetworkPlugin": "$networkplugin",
"InternetDisabled": false
},
"User": {
"AcceptEula": true,
"AcceptOptionalTelemetry": true
},
"Arc": {
"ClusterName": "$clusterName",
"Location": "${env:location}",
"ResourceGroupName": "${env:resourceGroup}",
"SubscriptionId": "${env:subscriptionId}",
"TenantId": "${env:tenantId}",
"ClientId": "${env:appId}",
"ClientSecret": "${env:password}"
},
"Machines": [
{
"LinuxNode": {
"CpuCount": 12,
"MemoryInMB": 50000,
"DataSizeInGB": 300
}
}
]
}
"@

Set-Content -Path $tempDir\aksedge-config.json -Value $aksedgeConfig -Force

New-AksEdgeDeployment -JsonConfigFilePath $tempDir\aksedge-config.json

Write-Host "`n"
Write-Host "Checking kubernetes nodes"
Write-Host "`n"
kubectl get nodes -o wide
Write-Host "`n"

# az version
az -v

# Login as service principal
az login --service-principal --username $Env:appId --password $Env:password --tenant $Env:tenantId

# Set default subscription to run commands against
# "subscriptionId" value comes from clientVM.json ARM template, based on which
# subscription user deployed ARM template to. This is needed in case Service
# Principal has access to multiple subscriptions, which can break the automation logic
az account set --subscription $Env:subscriptionId

# Installing Azure CLI extensions
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.3.17
az extension add --name k8s-extension
Write-Host "`n"

# Registering Azure Arc providers
Write-Host "Registering Azure Arc providers, hold tight..."
Write-Host "`n"
az provider register --namespace Microsoft.Kubernetes --wait
az provider register --namespace Microsoft.KubernetesConfiguration --wait
az provider register --namespace Microsoft.HybridCompute --wait
az provider register --namespace Microsoft.GuestConfiguration --wait
az provider register --namespace Microsoft.HybridConnectivity --wait
az provider register --namespace Microsoft.ExtendedLocation --wait

az provider show --namespace Microsoft.Kubernetes -o table
Write-Host "`n"
az provider show --namespace Microsoft.KubernetesConfiguration -o table
Write-Host "`n"
az provider show --namespace Microsoft.HybridCompute -o table
Write-Host "`n"
az provider show --namespace Microsoft.GuestConfiguration -o table
Write-Host "`n"
az provider show --namespace Microsoft.HybridConnectivity -o table
Write-Host "`n"
az provider show --namespace Microsoft.ExtendedLocation -o table
Write-Host "`n"

# Onboarding the cluster to Azure Arc
Write-Host "Onboarding the AKS Edge Essentials cluster to Azure Arc..."
Write-Host "`n"

$kubectlMonShell = Start-Process -PassThru PowerShell { for (0 -lt 1) { kubectl get pod -A; Start-Sleep -Seconds 5; Clear-Host } }

# Connect Arc-enabled kubernetes
Connect-AksEdgeArc -JsonConfigFilePath $tempDir\aksedge-config.json

#####################################################################
### Install ingress-nginx
#####################################################################
helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx
helm repo update
helm install ingress-nginx ingress-nginx/ingress-nginx

#####################################################################
### Longhorn setup for RWX-capable storage class
#####################################################################
Write-Host "Creating longhorn storage on AKS EE cluster."
kubectl apply -f c:\temp\longhorn.yaml
Start-Sleep -Seconds 30

#####################################################################
### Video Indexer setup
#####################################################################
$viApiVersion="2023-06-02-preview"
$extensionName="videoindexer"
#$version="1.0.28-preview" # switch to blank
$namespace="video-indexer"
$releaseTrain="release" # switch to release
$storageClass="longhorn"

Write-Host "Create Cognitive Services on VI resource provider"
$createResourceUri = "https://management.azure.com/subscriptions/${env:subscriptionId}/resourceGroups/${env:resourceGroup}/providers/Microsoft.VideoIndexer/accounts/${env:videoIndexerAccountName}/CreateExtensionDependencies?api-version=${viApiVersion}"
$result = $(az rest --method post --uri $createResourceUri) | ConvertFrom-Json

Write-Host "Retrieving Cognitive Service Credentials..."
$getSecretsUri="https://management.azure.com/subscriptions/${env:subscriptionId}/resourceGroups/${env:resourceGroup}/providers/Microsoft.VideoIndexer/accounts/${env:videoIndexerAccountName}/ListExtensionDependenciesData?api-version=$viApiVersion"
$csResourcesData=$(az rest --method post --uri $getSecretsUri) | ConvertFrom-Json
Write-Host

Write-Host "Getting VM public IP address..."
$hostname = hostname
$ipAddresses = az vm list-ip-addresses -g $env:resourceGroup -n $hostname | ConvertFrom-Json
$ipAddress = $ipAddresses.virtualMachine.network.publicIpAddresses[0].ipAddress

Write-Host "Installing Video Indexer extension into AKS EE cluster."
az k8s-extension create --name $extensionName `
--extension-type Microsoft.VideoIndexer `
--scope cluster `
--release-namespace $namespace `
--cluster-name $clusterName `
--resource-group $Env:resourceGroup `
--cluster-type connectedClusters `
--release-train $releaseTrain `
--auto-upgrade-minor-version false `
--config-protected-settings "speech.endpointUri=$($csResourcesData.speechCognitiveServicesEndpoint)" `
--config-protected-settings "speech.secret=$($csResourcesData.speechCognitiveServicesPrimaryKey)" `
--config-protected-settings "translate.endpointUri=$($csResourcesData.translatorCognitiveServicesEndpoint)" `
--config-protected-settings "translate.secret=$($csResourcesData.translatorCognitiveServicesPrimaryKey)" `
--config "videoIndexer.accountId=${Env:videoIndexerAccountId}" `
--config "frontend.endpointUri=https://$ipAddress" `
--config "storage.storageClass=$storageClass" `
--config "storage.accessMode=ReadWriteMany"

# Allow access to the frontend through the VM NIC interface
Write-Host "Adding Windows Defender firewall rule for VI frontend..."
New-NetFirewallRule -DisplayName "Allow Inbound Port 80" -Direction Inbound -LocalPort 80 -Protocol TCP -Action Allow
New-NetFirewallRule -DisplayName "Allow Inbound Port 443" -Direction Inbound -LocalPort 443 -Protocol TCP -Action Allow

Write-Host "Adding port forward for VI frontend..."
Start-Sleep -Seconds 20
$ing = kubectl get ing videoindexer-vi-arc -n $namespace -o json | ConvertFrom-Json
$ingIp = $ing.status.loadBalancer.ingress.ip
netsh interface portproxy add v4tov4 listenaddress=0.0.0.0 listenport=80 connectaddress=$ingIp connectport=80
netsh interface portproxy add v4tov4 listenaddress=0.0.0.0 listenport=443 connectaddress=$ingIp connectport=443

# Kill the open PowerShell monitoring kubectl get pods
Stop-Process -Id $kubectlMonShell.Id

# Install Postman
choco install postman /y -Force

# Removing the LogonScript Scheduled Task so it won't run on next reboot
Unregister-ScheduledTask -TaskName "LogonScript" -Confirm:$false
Start-Sleep -Seconds 5
$ProgressPreference = "Continue"

# Changing to Client VM wallpaper
$imgPath = "C:\Temp\wallpaper.png"
$code = @'
using System.Runtime.InteropServices;
namespace Win32{

public class Wallpaper{
[DllImport("user32.dll", CharSet=CharSet.Auto)]
static extern int SystemParametersInfo (int uAction , int uParam , string lpvParam , int fuWinIni) ;

public static void SetWallpaper(string thePath){
SystemParametersInfo(20,0,thePath,3);
}
}
}
'@

add-type $code
[Win32.Wallpaper]::SetWallpaper($imgPath)
Stop-Process -Name powershell -Force

Stop-Transcript
Loading
Loading