Please read this Microsoft Tech Blog for more details
- Install Terramform and Azure Cli in Windows
- Run
terraform.exe apply -auto-approve
. If there is error related to function keys, delete func/GetDeviceConnectionString.json and func/AddSshConnectionFunction.json re-run the command as it has the timing issue. - Run
terraform.exe refresh
, and it will populate the AzureFunctionBaseUrl, LifeCycleHookUrl and GetDeviceConnectionStringKey.
- Update appsettings.json by replacing and .
- Open powershell in AzureHybridCloudLabEnvironment\IoTSshClientService.
- Run
dotnet publish -p:PublishProfile=FolderProfileWinx64
for Windows ordotnet publish -p:PublishProfile=FolderProfileMacOSx64
for MacOS - Go to AzureHybridCloudLabEnvironment\IoTSshClientService\bin\Debug\net6.0\win-x64\publish\win-x64\ or \AzureHybridCloudLabEnvironment\IoTSshClientService\bin\Debug\net6.0\osx-x64\publish\osx-x64
- Copy all files to lab PC that students need to remote.
- Open Powershell as Administrator
- Run
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
- Copy the deployment package into a folder.
- To deploy the windows services
deploy.ps1
, and undeploy the windows servicesdeploy.ps1
.
check for connectivity ansible windows -m win_ping
Run ansible-playbook InstallIoTSshClientService.yaml
- Open terminal and create SSH tunnel.
ssh bastion@<IP> -p22 -L 3389:0.0.0.0:3389
- Enter the SSH server password.
- Open Remote Desktop client and connect to localhost.
- Enter the Windows username and passowrd.
You can set SshConnction.Variables With MachineName {"Email":"cywong@vtc.edu.hk","MachineName":"L332-A0","SeatNumber":"0"} With just seat number, and it pick from the list computer in lab {"Email":"cywong@vtc.edu.hk","SeatNumber":"0"}