Skip to content

Commit e81eaa7

Browse files
committed
Upgrade the win 2022 image. Add disk space and paging file.
1 parent 8bab7c2 commit e81eaa7

File tree

5 files changed

+40
-20
lines changed

5 files changed

+40
-20
lines changed

examples/multi-runner-cppal/templates/runner-configs/windows-2022.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ runner_config:
2424
scale_down_schedule_expression: cron(* * * * ? *)
2525
runner_boot_time_in_minutes: 20
2626
ami_owners: [ "047402373783" ]
27-
ami_filter: { 'name': ['github-runner-windows-2022-amd64-202312181755'] }
27+
ami_filter: { 'name': ['github-runner-windows-2022-amd64-202409162028'] }
2828
block_device_mappings:
2929
- device_name: /dev/sda1
3030
delete_on_termination: true
3131
volume_type: gp3
32-
volume_size: 70
32+
volume_size: 90
3333
encrypted: true
3434
iops: null
3535
throughput: null

images/windows-2022-cppal/manifest.json

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,25 @@
107107
"artifact_id": "us-west-2:ami-01fb6887bb9bcf622",
108108
"packer_run_uuid": "c9a6bdbc-1801-c4be-5c2c-6e3093a92e9c",
109109
"custom_data": null
110+
},
111+
{
112+
"name": "githubrunner",
113+
"builder_type": "amazon-ebs",
114+
"build_time": 1726514242,
115+
"files": null,
116+
"artifact_id": "us-west-2:ami-0a1bdeb7c56066cb3",
117+
"packer_run_uuid": "55f93965-438d-f4ee-ce6e-f12c1fffdce5",
118+
"custom_data": null
119+
},
120+
{
121+
"name": "githubrunner",
122+
"builder_type": "amazon-ebs",
123+
"build_time": 1726522099,
124+
"files": null,
125+
"artifact_id": "us-west-2:ami-0c64e333fe0ccbb5c",
126+
"packer_run_uuid": "90256e1c-f243-7777-f5e2-d4856b601201",
127+
"custom_data": null
110128
}
111129
],
112-
"last_run_uuid": "c9a6bdbc-1801-c4be-5c2c-6e3093a92e9c"
130+
"last_run_uuid": "90256e1c-f243-7777-f5e2-d4856b601201"
113131
}

images/windows-2022-cppal/variables.auto.pkrvars.hcl

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
# packer build . | tee output.out 2>&1
77
region = "us-west-2"
88
instance_type = "t2.xlarge"
9-
root_volume_size_gb = 70
9+
# 2024-09 size was 70. Add 10 for the jobs, and 10 for the pagefile.
10+
root_volume_size_gb = 90
1011
ssh_keypair_name = "cppalliance-us-west-2-kp"
1112
ssh_private_key_file = "/root/.ssh/cppalliance-us-west-2-kp.pem"
1213

@@ -49,7 +50,7 @@ custom_shell_commands = [
4950
"# choco install -y KB2999226 --version 1.0.20181019",
5051
"# choco install -y KB3033929 --version 1.0.5",
5152
"# choco install -y KB3035131 --version 1.0.3",
52-
"choco install -y llvm --version 16.0.3",
53+
"choco install -y llvm --version 18.1.8",
5354
"choco install -y microsoft-build-tools --version 15.0.26320.2",
5455
"choco install -y mingw --version 12.2.0.03042023",
5556
"# no:",
@@ -81,7 +82,9 @@ custom_shell_commands = [
8182
"# visualstudio2022-workload-vctools failed last time. Add a sleep command.",
8283
"Start-Sleep -Seconds 10",
8384
" # This should be rewritten with fewer quotes, group all together.",
84-
"choco upgrade visualstudio2022-workload-vctools --package-parameters \"--add Microsoft.VisualStudio.Component.VC.14.34.17.4.x86.x64\" \"--add Microsoft.VisualStudio.Component.VC.14.29.16.11.x86.x64\" \"--add Microsoft.VisualStudio.Component.VC.v141.x86.x64\" \"--add Microsoft.VisualStudio.Component.VC.140\" -y ",
85+
"# one previous version",
86+
"# choco upgrade visualstudio2022-workload-vctools --package-parameters \"--add Microsoft.VisualStudio.Component.VC.14.34.17.4.x86.x64\" \"--add Microsoft.VisualStudio.Component.VC.14.29.16.11.x86.x64\" \"--add Microsoft.VisualStudio.Component.VC.v141.x86.x64\" \"--add Microsoft.VisualStudio.Component.VC.140\" -y ",
87+
"choco upgrade visualstudio2022-workload-vctools --package-parameters \"--add Microsoft.VisualStudio.Component.VC.14.41.17.11.x86.x64\" \"--add Microsoft.VisualStudio.Component.VC.14.29.16.11.x86.x64\" \"--add Microsoft.VisualStudio.Component.VC.v141.x86.x64\" \"--add Microsoft.VisualStudio.Component.VC.140\" -y ",
8588
"$${oldpath} = (Get-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\\System\\CurrentControlSet\\Control\\Session Manager\\Environment' -Name PATH).path",
8689
"$${newpath} = \"C:\\Git\\usr\\bin;$${oldpath}\"",
8790
"Set-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\\System\\CurrentControlSet\\Control\\Session Manager\\Environment' -Name PATH -Value $${newPath}",
@@ -92,5 +95,15 @@ custom_shell_commands = [
9295
"net user /add Administrator2 Testwin1234!",
9396
"net localgroup administrators Administrator2 /add",
9497
"Set-LocalUser -Name 'Administrator2' -PasswordNeverExpires 1",
98+
99+
" # Set page file",
100+
"$ComputerSystem = Get-WmiObject -ClassName Win32_ComputerSystem",
101+
"$ComputerSystem.AutomaticManagedPagefile = $false",
102+
"$ComputerSystem.Put()",
103+
"$PageFileSetting = Get-WmiObject -ClassName Win32_PageFileSetting",
104+
"$PageFileSetting.InitialSize = 10000",
105+
"$PageFileSetting.MaximumSize = 10000",
106+
"$PageFileSetting.Put()",
107+
95108
"echo __done__"
96109
]

scripts/prod_amis.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ all_amis[ubuntu-jammy.yaml]=github-runner-ubuntu-jammy-amd64-202308031506
1717
all_amis[ubuntu-noble-arm64.yaml]=github-runner-ubuntu-noble-arm64-202404261611
1818
all_amis[ubuntu-noble.yaml]=github-runner-ubuntu-noble-amd64-202404261624
1919
all_amis[windows-2019.yaml]=github-runner-windows-2019-amd64-202308172004
20-
all_amis[windows-2022.yaml]=github-runner-windows-2022-amd64-202312181755
20+
all_amis[windows-2022.yaml]=github-runner-windows-2022-amd64-202409161453
2121

2222
# Update the templates with the above values
2323

scripts/removeamis_part2.sh

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,8 @@ test="
1010
"
1111

1212
amis="
13-
ami-0634124047903c1ed
14-
ami-0841a945303463903
15-
ami-09944338a248c5b89
16-
ami-0c7a489e7f048f53e
17-
ami-0668a7bad2329a87c
18-
ami-0426bd562cd051f30
19-
ami-00ec5f9bb8f5a19fa
20-
ami-0d3905ec987855806
21-
ami-029863b793a310918
22-
ami-0c09b40136606c789
23-
ami-07cb842ccc3adaecf
24-
ami-0927ba164cbc67862
25-
ami-01fa5982bda798944
13+
ami-0684483d95ae2455d
14+
ami-0a1bdeb7c56066cb3
2615
"
2716

2817
region=us-west-2

0 commit comments

Comments
 (0)