Skip to content

Commit

Permalink
Update start runbook to start core VMs
Browse files Browse the repository at this point in the history
  • Loading branch information
jonnyry authored Jan 5, 2024
1 parent 9c59b80 commit 769ce02
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ FEATURES:

ENHANCEMENTS:
* Switch from OpenCensus to OpenTelemetry for logging ([#3762](https://github.com/microsoft/AzureTRE/pull/3762))
* Extend PowerShell auto start script to start core VMs ([#3811](https://github.com/microsoft/AzureTRE/issues/3811))
* Use managed identity for API connection to CosmosDB ([#345](https://github.com/microsoft/AzureTRE/issues/345))
* Switch to Structured Firewall Logs ([#3816](https://github.com/microsoft/AzureTRE/pull/3816))

Expand Down
9 changes: 8 additions & 1 deletion docs/tre-admins/start-stop.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ foreach ($Group in $ResourceGroups) {

### Automating `start`

To restart the TRE core services (Firewall, Application Gateway(s), Virtual Machine Scale Sets, and MySQL), you can use `make tre-start`. Depending on your workflow, you might not be able to easily execute the `make` target. Alternatively, you can create a second Runbook and execute it manually. The PowerShell code to start TRE core services is below:
To restart the TRE core services (Firewall, Application Gateway(s), Virtual Machine Scale Sets, Virtual Machines, and MySQL), you can use `make tre-start`. Depending on your workflow, you might not be able to easily execute the `make` target. Alternatively, you can create a second Runbook and execute it manually. The PowerShell code to start TRE core services is below:

```powershell
try {
Expand Down Expand Up @@ -189,5 +189,12 @@ foreach ($Group in $ResourceGroups) {
Write-Output "Starting VMSS '$($item.Name)'"
Start-AzVmss -ResourceGroupName $item.ResourceGroupName -VMScaleSetName $item.Name
}
# Start VMs
$VM = Get-AzVM -ResourceGroupName $Group.ResourceGroupName
foreach ($item in $VM) {
Write-Output "Starting VM '$($item.Name)'"
Start-AzVm -ResourceGroupName $item.ResourceGroupName -Name $item.Name
}
}
```

0 comments on commit 769ce02

Please sign in to comment.