Skip to content

Commit

Permalink
fixup: increase Windows VMs disk size
Browse files Browse the repository at this point in the history
Signed-off-by: Damien Duportal <[email protected]>
  • Loading branch information
dduportal committed May 5, 2022
1 parent c30cfe4 commit 17c527f
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions jenkins-agent.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ locals {
"staging_packer_images" = ["East US", "East US 2"] # Only the "main" branch, should map the production as much as possible
"dev_packer_images" = ["East US"] # Faster builds for branches, pull requests or local development
}
os_disk_size_gb = 90 # less than 100 Gb to allow more instance sizes that have a temp cache < 100 Gb such as DS4_v3
windows_disk_size_gb = 128 # Must be greater than 127 Gb to allow Azure template to work with
provisionning_env_vars = [for key, value in yamldecode(file(var.provision_env_file)) : "${upper(key)}=${value}"]
}

Expand Down Expand Up @@ -121,7 +121,7 @@ source "amazon-ebs" "base" {
launch_block_device_mappings {
delete_on_termination = true
device_name = "/dev/sda1"
volume_size = local.os_disk_size_gb
volume_size = local.windows_disk_size_gb
volume_type = "gp2"
}
# Where to build the VM
Expand Down Expand Up @@ -241,18 +241,18 @@ build {
}

source "azure-arm.base" {
name = "windows-2022"
communicator = "winrm"
image_offer = "WindowsServer"
image_publisher = "MicrosoftWindowsServer"
image_sku = "2022-Datacenter"
vm_size = local.azure_vm_size
os_type = "Windows"
os_disk_size_gb = local.os_disk_size_gb
winrm_insecure = true
winrm_timeout = "20m"
winrm_use_ssl = true
winrm_username = local.windows_winrm_user[var.image_type]
name = "windows-2022"
communicator = "winrm"
image_offer = "WindowsServer"
image_publisher = "MicrosoftWindowsServer"
image_sku = "2022-Datacenter"
vm_size = local.azure_vm_size
os_type = "Windows"
windows_disk_size_gb = local.windows_disk_size_gb
winrm_insecure = true
winrm_timeout = "20m"
winrm_use_ssl = true
winrm_username = local.windows_winrm_user[var.image_type]
}

## Why repeating? https://github.com/rgl/packer-plugin-windows-update/issues/90#issuecomment-842569865
Expand Down

0 comments on commit 17c527f

Please sign in to comment.