VM Scheduler
What It Does
Section titled “What It Does”The VM Start/Stop scheduler manages the Pexip Infinity VMs (Management Node and Conference Node) by starting them during service hours and deallocating them outside of service hours. This reduces Azure compute costs by only running VMs when the Verify by Video service is available to citizens.
Managed VMs
Section titled “Managed VMs”| Environment | Management Node | Conference Node |
|---|---|---|
| Test | vm-node-mgmt-test | vm-node-conf-test |
| Production | vm-node-mgmt-core | vm-node-conf-core |
Schedule
Section titled “Schedule”The scheduler runs 4 times per hour on a cron schedule:
55,35,25,5 * * * *Each run determines the appropriate action based on service hours (sourced from the IAS /video/v2/service_hours endpoint):
- Within service hours + VMs deallocated → Start VMs, then run the post-start script (seeds the VMR pool)
- Outside service hours + VMs running → Deallocate VMs
- No action needed → Skip
Workflow Files
Section titled “Workflow Files”| Workflow | Environment | Target Resource Groups |
|---|---|---|
vm-start-stop-test.yml | test | rg-node-management-test, rg-node-conference-test |
vm-start-stop-prod.yml | prod | rg-node-management, rg-node-conference |
Pausing the Scheduler
Section titled “Pausing the Scheduler”During maintenance windows (e.g., Pexip upgrades, infrastructure changes), operators should pause the scheduler to prevent it from starting or stopping VMs unexpectedly.
Via the GitHub UI
Section titled “Via the GitHub UI”- Navigate to the repository → Actions tab
- Select the workflow (e.g., “VM Start/Stop Scheduler (Production)”)
- Click the ⋯ menu (top right of the workflow page)
- Select Disable workflow
Via the GitHub CLI
Section titled “Via the GitHub CLI”# Disable the production schedulergh workflow disable "vm-start-stop-prod.yml" --repo Maximus-Canada/verify-by-video
# Disable the test schedulergh workflow disable "vm-start-stop-test.yml" --repo Maximus-Canada/verify-by-videoResuming the Scheduler
Section titled “Resuming the Scheduler”Via the GitHub UI
Section titled “Via the GitHub UI”- Navigate to Actions → select the disabled workflow
- Click Enable workflow (banner at top of workflow page)
Via the GitHub CLI
Section titled “Via the GitHub CLI”gh workflow enable "vm-start-stop-prod.yml" --repo Maximus-Canada/verify-by-videoWhen to Pause
Section titled “When to Pause”- Pexip upgrades - VMs must remain on during the upgrade process and not be deallocated by the scheduler
- Infrastructure maintenance - any Azure operations that require VMs to be in a specific state
- Troubleshooting - when investigating VM issues and you need to prevent state changes
Important Notes
Section titled “Important Notes”- Disabling a workflow prevents all triggers (schedule, manual dispatch, and any other). To run it one-off while disabled, re-enable it, run manually, then disable again.
- Disabled workflows retain their run history - nothing is lost.
- Anyone with write access to the repository can disable/enable workflows.
- Consider notifying the team when disabling a scheduler so others know VMs may be in an unexpected state.
Manual Override
Section titled “Manual Override”Both scheduler workflows support workflow_dispatch with override inputs to force specific actions regardless of the schedule:
| Input | Effect |
|---|---|
runScaleDown: true | Force deallocate VMs (bypass schedule check) |
runScaleUp: true | Force start VMs (bypass schedule check) |
runPostStartScript: true | Force post-start script (bypass schedule check) |
This is useful for manually starting VMs outside service hours (e.g., for evening maintenance) without needing to fully enable the scheduler.