Skip to content

Commit 6ece1a0

Browse files
committed
self-hosted-runners: use Azure VM type with local storage
Let's switch to Standard_D8plds_v5. The "d" stands for: d – Diskfull (local temp disk is present) This means that we get an additional drive on the VM (D:\) that is blaziingly fast. It leads to a ~25% speed increase when doing heavy IO operations. Ref: https://learn.microsoft.com/en-us/azure/virtual-machines/managed-disks-overview#temporary-disk Ref: https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources Ref: https://azureprice.net/vm/Standard_D8plds_v5 Signed-off-by: Dennis Ameling (he/him) <[email protected]>
1 parent 8b273b8 commit 6ece1a0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

.github/workflows/create-azure-self-hosted-runners.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ env:
3737
DEALLOCATE_IMMEDIATELY: ${{ github.event.inputs.deallocate_immediately }}
3838
# This has to be a public URL that the VM can access after creation
3939
POST_DEPLOYMENT_SCRIPT_URL: https://raw.githubusercontent.com/${{ github.repository }}/${{ github.ref_name }}/azure-self-hosted-runners/post-deployment-script.ps1
40+
# Note that you'll need "p" (arm64 processor) and ideally "l" (local temp disk). The number 8 stands for 8 CPU-cores.
41+
# For a convenient overview of all arm64 VM types, see e.g. https://azureprice.net/?_cpuArchitecture=Arm64
42+
AZURE_VM_TYPE: Standard_D8plds_v5
4043

4144
# The following secrets are required for this workflow to run:
4245
# AZURE_CREDENTIALS - Credentials for the Azure CLI. It's recommended to set up a resource
@@ -150,7 +153,7 @@ jobs:
150153
with:
151154
resourceGroupName: ${{ secrets.AZURE_RESOURCE_GROUP }}
152155
template: ./azure-self-hosted-runners/azure-arm-template.json
153-
parameters: ./azure-self-hosted-runners/azure-arm-template-example-parameters.json githubActionsRunnerRegistrationUrl="${{ env.ACTIONS_RUNNER_REGISTRATION_URL }}" githubActionsRunnerToken="${{ env.ACTIONS_RUNNER_TOKEN }}" postDeploymentPsScriptUrl="${{ env.POST_DEPLOYMENT_SCRIPT_URL }}" virtualMachineName=${{ steps.generate-vm-name.outputs.vm_name }} virtualMachineSize=Standard_D8pls_v5 publicIpAddressName1=${{ steps.generate-vm-name.outputs.vm_name }}-ip adminUsername=${{ secrets.AZURE_VM_USERNAME }} adminPassword=${{ secrets.AZURE_VM_PASSWORD }} stopService={{ env.DEALLOCATE_IMMEDIATELY }} githubActionsRunnerPath="${{ env.ACTIONS_RUNNER_PATH }}"
156+
parameters: ./azure-self-hosted-runners/azure-arm-template-example-parameters.json githubActionsRunnerRegistrationUrl="${{ env.ACTIONS_RUNNER_REGISTRATION_URL }}" githubActionsRunnerToken="${{ env.ACTIONS_RUNNER_TOKEN }}" postDeploymentPsScriptUrl="${{ env.POST_DEPLOYMENT_SCRIPT_URL }}" virtualMachineName=${{ steps.generate-vm-name.outputs.vm_name }} virtualMachineSize=${{ env.AZURE_VM_TYPE }} publicIpAddressName1=${{ steps.generate-vm-name.outputs.vm_name }}-ip adminUsername=${{ secrets.AZURE_VM_USERNAME }} adminPassword=${{ secrets.AZURE_VM_PASSWORD }} stopService={{ env.DEALLOCATE_IMMEDIATELY }} githubActionsRunnerPath="${{ env.ACTIONS_RUNNER_PATH }}"
154157

155158
- name: Deallocate the VM for later use
156159
if: env.DEALLOCATE_IMMEDIATELY == 'true'

0 commit comments

Comments
 (0)