Merge ~barryprice/launchpad-mojo-specs/+git/private:vbuilder into launchpad-mojo-specs:master
- Git
- lp:~barryprice/launchpad-mojo-specs/+git/private
- vbuilder
- Merge into master
Status: | Superseded |
---|---|
Proposed branch: | ~barryprice/launchpad-mojo-specs/+git/private:vbuilder |
Merge into: | launchpad-mojo-specs:master |
Diff against target: |
943 lines (+876/-0) 11 files modified
vbuilder/bundle.yaml (+631/-0) vbuilder/collect (+4/-0) vbuilder/configs/custom-secgroups-production.yaml (+10/-0) vbuilder/configs/custom-secgroups-staging.yaml (+10/-0) vbuilder/expand-bundle (+36/-0) vbuilder/manifest (+5/-0) vbuilder/manifest-rebuild-images (+1/-0) vbuilder/manifest-secgroups (+1/-0) vbuilder/rebuild-images (+84/-0) vbuilder/upgrade-charms (+93/-0) vbuilder/utils (+1/-0) |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Canonical Launchpad Engineering | Pending | ||
Review via email: mp+463362@code.launchpad.net |
Commit message
Double PS6 riscv64 builders per wgrant for noble rebuild
Description of the change
Unmerged commits
- 4020d1e... by Barry Price
-
Double PS6 riscv64 builders per wgrant for noble rebuild
- bd86c4a... by Colin Watson
-
vbuilder: Bump lxd-channel to latest/candidate on riscv64
This pulls in https:/
/github. com/canonical/ lxd/pull/ 12530. - 4fa0592... by Colin Watson
-
vbuilder: Bump sbuild-
stalled- package- timeout to 1500 on riscv64 Emulated builders are slow enough that the default timeout of 150
minutes can be too short. - ea99990... by Colin Watson
-
vbuilder: Allow launchpad-
bastion- ps5.internal to rsync logs - 2cbd741... by Ines Almeida
-
vbuilder: add 40 arm64 builders to bos03 production
- 591994d... by Ines Almeida
-
vbuilder: add spec for arm64 bos03 builder in production
- 4626e30... by Ines Almeida
-
vbuilder: add missing config to vbuilders_
bos03.arm64 - 2f6a2b1... by Ines Almeida
-
vbuilder: add openstack server IP to the bos03 arm64 modifiers
- 80500c7... by Ines Almeida
-
vbuilder: add missing configuration options and reorder bundle alphabetically
- c31f140... by Ines Almeida
-
vbuilder: add arm64 arch to bos03 region in qastaging
Preview Diff
1 | diff --git a/vbuilder/bundle.yaml b/vbuilder/bundle.yaml | |||
2 | 0 | new file mode 100644 | 0 | new file mode 100644 |
3 | index 0000000..c2d3d6d | |||
4 | --- /dev/null | |||
5 | +++ b/vbuilder/bundle.yaml | |||
6 | @@ -0,0 +1,631 @@ | |||
7 | 1 | {%- set log_hosts_allow = "carob.canonical.com launchpad-bastion-ps5.internal" %} | ||
8 | 2 | |||
9 | 3 | {%- if stage_name == "production" %} | ||
10 | 4 | {%- set clamav_database_url = "http://clamav-database-mirror.lp.internal/" %} | ||
11 | 5 | {%- set content_id_template = "launchpad-buildd:production" %} | ||
12 | 6 | {%- set dns_update_host_bos01 = "10.189.0.2" %} | ||
13 | 7 | {%- set dns_update_host_bos02 = "10.189.128.2" %} | ||
14 | 8 | {%- set dns_update_host_bos03 = "10.189.128.2" %} | ||
15 | 9 | {%- set dns_update_host_lcy02 = "10.131.53.11 10.131.53.12 10.131.53.13" %} | ||
16 | 10 | {%- set dns_update_key_name = "vbuilder-manage" %} | ||
17 | 11 | {%- set domain_bos01 = "vbuilder.bos01.scalingstack" %} | ||
18 | 12 | {%- set domain_bos02 = "vbuilder.bos02.scalingstack" %} | ||
19 | 13 | {%- set domain_bos03 = "vbuilder.bos03.scalingstack" %} | ||
20 | 14 | {%- set domain_lcy02 = "vbuilder.lcy02.scalingstack" %} | ||
21 | 15 | {%- set extra_constraints = "root-disk-source=volume" %} | ||
22 | 16 | {%- set gss_series = "focal|jammy" %} | ||
23 | 17 | {%- set instance_key_name_bos01 = "vbuilder-manage-bos01" %} | ||
24 | 18 | {%- set instance_key_name_bos02 = "vbuilder-manage-bos02" %} | ||
25 | 19 | {%- set instance_key_name_bos03 = "vbuilder-manage-bos03" %} | ||
26 | 20 | {%- set instance_key_name_lcy02 = "vbuilder-manage-lcy02" %} | ||
27 | 21 | {%- set instance_network_bos01 = "10.189.16.0/20" %} | ||
28 | 22 | {%- set instance_network_bos02 = "10.189.144.0/20" %} | ||
29 | 23 | {%- set instance_network_bos03 = "10.143.0.0/20" %} | ||
30 | 24 | {%- set instance_network_lcy02 = "10.133.0.0/16" %} | ||
31 | 25 | {%- set instance_router = "vbuilder_router" %} | ||
32 | 26 | {%- set instance_router_bos03 = "router_launchpad-vbuilder-production" %} | ||
33 | 27 | {%- set instance_router_lcy02 = "router_launchpad-vbuilder-production" %} | ||
34 | 28 | {#- Output of "openstack image show -c id -f value qemu-riscv64-uboot". #} | ||
35 | 29 | {%- set kernel_id_bos03_riscv64 = "c5015509-91c3-4684-80cc-b8a2ef44c8b5" %} | ||
36 | 30 | {%- set launchpad_buildd_repository = "ppa:launchpad/buildd" %} | ||
37 | 31 | {%- set lp_buildd_managers = "10.131.66.156 10.131.215.202" %} | ||
38 | 32 | {%- set lp_environment = "production" %} | ||
39 | 33 | {%- set lp_sshkey = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQD3tBvyEaZFX8H4krfXGhczq9q/GCfcE0kpsjK8WzM/lQOhWQAVSmm8O9gposKvu4mT28hBWI746+NOPLBrf9ax7YRoU+ZuZesyIIK6ztN07G4aK2vt+1W9yNZKgTJZ8FvxHwlbFy6wMjMP3OzuxWyh0yi03z1YiGPJt0riJRZT+QecaoyYhkTuRbcCoWbhmM0veUjCvfR7LA43YbOfmts7STNCtl1IUJErmUY6fSR1LkyF9uJSdwozAVht242vI8Yg+PrOnKCx3X5w546okP2uMDVXKWeY2g/MhUSr+ZyIaS2JxUygZ7FKS4gNLYb3O4Q6tcIwPE++zsr9HueTfjw2LyeQTZQDQjuv0kJ40B3IFF4E9FMzu8MDwArOKUGzISLrX5VtDZBKINDclfDbrFWHUlVBC2CIIjGPKj3afluP9jadWjsOQx0ooBO0tb0Se+7t3oNjKlknwD85AYCPzIlZt7wo/+e/V/Tilw+UUf00JioEceTdxuOHmbuxP5RzCleg8pYLfe5jiHfBJi0DhO61IYlFMgSToh78EShHWYEdSbD+Ve5GWKvPEU9CsSTleSSqBFdhyggfB5fHiup0efAqMnstDn5sxGYFzfFu7SNVHkMuFeiRHZK+9fF/nfzk0UK5EaGs+4IMhWS1ns8m5O5Li609c/nXK5t5fBOkiWa+RQ== lp_buildd@juju-4112d9-prod-launchpad-manual-servers-4" %} | ||
40 | 34 | {%- set modifiers_bos01 = '{"arm64": "10.43.0.29", "ppc64el": "10.43.0.36", "s390x": "10.43.0.39"}' %} | ||
41 | 35 | {%- set modifiers_bos02 = '{"arm64": "10.44.0.22", "ppc64el": "10.44.0.20", "s390x": "10.44.0.18"}' %} | ||
42 | 36 | {%- set modifiers_bos03 = '{"arm64": "10.143.254.129", "riscv64": "10.143.254.223"}' %} | ||
43 | 37 | {%- set name_prefix = "launchpad-buildd" %} | ||
44 | 38 | {%- set openstack_tenant_name = "vbuilder_project" %} | ||
45 | 39 | {%- set openstack_tenant_name_bos03 = "launchpad-vbuilder-production_project" %} | ||
46 | 40 | {%- set openstack_tenant_name_lcy02 = "launchpad-vbuilder-production_project" %} | ||
47 | 41 | {%- set openstack_username = "vbuilder" %} | ||
48 | 42 | {%- set openstack_username_bos03 = "launchpad-vbuilder-production" %} | ||
49 | 43 | {%- set openstack_username_lcy02 = "launchpad-vbuilder-production" %} | ||
50 | 44 | {%- set vbuilders_bos01 = {"amd64": {"series": "focal", "flavor": "vbuilder-gpu", "count": 5}, "arm64": {"series": "focal", "count": 40, "config_drive": false}, "arm64-gpu": {"arch_base": "arm64", "arch_suffix": "-gpu", "series": "focal", "flavor": "vbuilder-nvidia-l4", "count": 2, "config_drive": false}, "ppc64el": {"series": "focal", "count": 20}, "s390x": {"series": "focal", "count": 20}} %} | ||
51 | 45 | {%- set vbuilders_bos02 = {"arm64": {"series": "focal", "count": 80, "config_drive": false}, "ppc64el": {"series": "focal", "count": 30}, "s390x": {"series": "focal", "count": 20}} %} | ||
52 | 46 | {%- set vbuilders_bos03 = {"amd64": {"series": "focal", "count": 60}, "arm64": {"series": "focal", "count": 40, "config_drive": false, "flavor": "vbuilder-arm64"}, "riscv64": {"series": "jammy", "count": 120, "config_drive": false}} %} | ||
53 | 47 | {%- set vbuilders_lcy02 = {"amd64": {"series": "focal", "count": 120}} %} | ||
54 | 48 | {%- set vbuilder_prefix = "" %} | ||
55 | 49 | {%- elif stage_name == "staging" %} | ||
56 | 50 | {#- This environment is confusingly named, and is actually connected to Launchpad dogfood. #} | ||
57 | 51 | {%- set clamav_database_url = "http://clamav-database-mirror.staging.lp.internal/" %} | ||
58 | 52 | {%- set content_id_template = "launchpad-buildd:staging" %} | ||
59 | 53 | {%- set dns_update_host_bos01 = "10.189.0.2" %} | ||
60 | 54 | {%- set dns_update_host_bos02 = "10.189.128.2" %} | ||
61 | 55 | {%- set dns_update_host_bos03 = "10.189.128.2" %} | ||
62 | 56 | {%- set dns_update_host_lcy02 = "10.132.31.11 10.132.31.12 10.132.31.13" %} | ||
63 | 57 | {%- set dns_update_key_name = "vbuilder-staging-manage" %} | ||
64 | 58 | {%- set domain_bos01 = "vbuilder.staging.bos01.scalingstack" %} | ||
65 | 59 | {%- set domain_bos02 = "vbuilder.staging.bos02.scalingstack" %} | ||
66 | 60 | {%- set domain_bos03 = "vbuilder.staging.bos03.scalingstack" %} | ||
67 | 61 | {%- set domain_lcy02 = "vbuilder.staging.lcy02.scalingstack" %} | ||
68 | 62 | {%- set extra_constraints = "" %} | ||
69 | 63 | {%- set gss_series = "focal|jammy" %} | ||
70 | 64 | {%- set instance_key_name_bos01 = "ppa-manage-test" %} | ||
71 | 65 | {%- set instance_key_name_bos02 = "ppa-manage-test" %} | ||
72 | 66 | {%- set instance_key_name_bos03 = "ppa-manage-test" %} | ||
73 | 67 | {%- set instance_key_name_lcy02 = "ppa-manage-test" %} | ||
74 | 68 | {%- set instance_network_bos01 = "10.189.34.0/24" %} | ||
75 | 69 | {%- set instance_network_bos02 = "10.189.162.0/23" %} | ||
76 | 70 | {%- set instance_network_bos03 = "10.144.2.0/23" %} | ||
77 | 71 | {%- set instance_network_lcy02 = "10.134.2.0/23" %} | ||
78 | 72 | {%- set instance_router = "vbuilder_staging_router" %} | ||
79 | 73 | {%- set instance_router_bos03 = "router_launchpad-vbuilder-staging" %} | ||
80 | 74 | {%- set instance_router_lcy02 = "router_launchpad-vbuilder-staging" %} | ||
81 | 75 | {%- set launchpad_buildd_repository = "ppa:launchpad/buildd-staging" %} | ||
82 | 76 | {%- set lp_buildd_managers = "91.189.90.132" %} | ||
83 | 77 | {%- set lp_environment = "dogfood" %} | ||
84 | 78 | {%- set lp_sshkey = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDB3Qw9541hRDiGVLGxZm/afNsCirlM6Wa2/VkdU22KQfVu579+ek8fdgvR/si7UOTDgE4j7DGuJW+pk7z6T08Iy5feaI3JpnZV7PX0Qp8CilrcTNWPL1eBoq5HcYDzl+zyXT341l7GBFhwYQ50sF3hq0RV0XvUwxfheyBtdmzkiVE1LXT7kdFvXtxe0fR9ypw+NuMRqqFyZ9w3tee7zclDw1cCcnDf6vmIXbYLF9yNZOQQhwYQFFgIUepdkUg2onyhYXWKj8mooFVGne0WPVTJ5Sz805soh9SuUGGgpTh70EtgpJ1nxSWGtIWUtNc6mSGdZzGtgVTnbDk04J4FrVX3Bu8yetlQbNPPYuxdqaZP1anoKmgtCIhfe+xCkim5YLc+WZXVRGvk6apCLXMnj9ZhRE7fCKQO/F+aNPCONv0gUVncxuWAyiqdRuilqSA7VTEMYTv7pIYSNOjpD5eMIX2wGkYTjEXopGJouUH2nOXlhsGgssmMepSVJhOJKY1Cfq0ND4ydoDd2Mz1Yj+Us9HToqJU6DD1sAIKOV05fBqVsJEJbctI2vpRY/R1nCBySpM4KpzgkCQWwjkjR8h2/nuwDtyMsJe/BdBuDyRwJGnBLNgBUg+tnWl9yePz/ZXVGrAI7gPuc9DIiuKEvEmiO3o9yfRRjsFMWGIk2y/Hfa01V7w== launchpad@labbu" %} | ||
85 | 79 | {%- set modifiers_bos01 = '{"arm64": "10.43.0.10", "ppc64el": "10.43.0.23", "s390x": "10.43.0.15"}' %} | ||
86 | 80 | {%- set modifiers_bos02 = '{"arm64": "10.44.0.13", "ppc64el": "10.44.0.19", "s390x": "10.44.0.14"}' %} | ||
87 | 81 | {%- set name_prefix = "launchpad-buildd-staging" %} | ||
88 | 82 | {%- set openstack_tenant_name = "vbuilder_staging_project" %} | ||
89 | 83 | {%- set openstack_tenant_name_bos03 = "launchpad-vbuilder-staging_project" %} | ||
90 | 84 | {%- set openstack_tenant_name_lcy02 = "launchpad-vbuilder-staging_project" %} | ||
91 | 85 | {%- set openstack_username = "vbuilder_staging" %} | ||
92 | 86 | {%- set openstack_username_bos03 = "launchpad-vbuilder-staging" %} | ||
93 | 87 | {%- set openstack_username_lcy02 = "launchpad-vbuilder-staging" %} | ||
94 | 88 | {%- set vbuilders_bos01 = {"amd64": {"series": "jammy", "flavor": "vbuilder-gpu", "count": 1}, "arm64": {"series": "jammy", "count": 1, "config_drive": false}, "arm64-gpu": {"arch_base": "arm64", "arch_suffix": "-gpu", "series": "jammy", "flavor": "vbuilder-nvidia-l4", "count": 1, "config_drive": false}, "ppc64el": {"series": "jammy", "count": 1}, "s390x": {"series": "jammy", "count": 1}} %} | ||
95 | 89 | {%- set vbuilders_bos02 = {"arm64": {"series": "jammy", "count": 1, "config_drive": false}, "ppc64el": {"series": "jammy", "count": 1}, "s390x": {"series": "jammy", "count": 1}} %} | ||
96 | 90 | {%- set vbuilders_bos03 = {"amd64": {"series": "jammy", "count": 4}} %} | ||
97 | 91 | {%- set vbuilders_lcy02 = {"amd64": {"series": "jammy", "count": 4}} %} | ||
98 | 92 | {%- set vbuilder_prefix = "dogfood-" %} | ||
99 | 93 | {%- elif stage_name == "qastaging" %} | ||
100 | 94 | {%- set clamav_database_url = "http://clamav-database-mirror.staging.lp.internal/" %} | ||
101 | 95 | {%- set content_id_template = "launchpad-buildd:qastaging" %} | ||
102 | 96 | {%- set dns_update_host_bos01 = "10.189.0.2" %} | ||
103 | 97 | {%- set dns_update_host_bos02 = "10.189.128.2" %} | ||
104 | 98 | {%- set dns_update_host_bos03 = "10.189.128.2" %} | ||
105 | 99 | {%- set dns_update_host_lcy02 = "10.132.31.11 10.132.31.12 10.132.31.13" %} | ||
106 | 100 | {%- set dns_update_key_name = "vbuilder-staging-manage" %} | ||
107 | 101 | {%- set domain_bos01 = "vbuilder.qastaging.bos01.scalingstack" %} | ||
108 | 102 | {%- set domain_bos02 = "vbuilder.qastaging.bos02.scalingstack" %} | ||
109 | 103 | {%- set domain_bos03 = "vbuilder.qastaging.bos03.scalingstack" %} | ||
110 | 104 | {%- set domain_lcy02 = "vbuilder.qastaging.lcy02.scalingstack" %} | ||
111 | 105 | {%- set extra_constraints = "" %} | ||
112 | 106 | {%- set gss_series = "focal|jammy" %} | ||
113 | 107 | {%- set instance_key_name_bos01 = "ppa-manage-test-qastaging" %} | ||
114 | 108 | {%- set instance_key_name_bos02 = "ppa-manage-test-qastaging" %} | ||
115 | 109 | {%- set instance_key_name_bos03 = "ppa-manage-test-qastaging" %} | ||
116 | 110 | {%- set instance_key_name_lcy02 = "ppa-manage-test-qastaging" %} | ||
117 | 111 | {%- set instance_network_bos01 = "10.189.36.0/24" %} | ||
118 | 112 | {%- set instance_network_bos02 = "10.189.164.0/23" %} | ||
119 | 113 | {%- set instance_network_bos03 = "10.144.4.0/23" %} | ||
120 | 114 | {%- set instance_network_lcy02 = "10.134.4.0/23" %} | ||
121 | 115 | {%- set instance_router = "vbuilder_staging_router" %} | ||
122 | 116 | {%- set instance_router_bos03 = "router_launchpad-vbuilder-staging" %} | ||
123 | 117 | {%- set instance_router_lcy02 = "router_launchpad-vbuilder-staging" %} | ||
124 | 118 | {#- Output of "openstack image show -c id -f value qemu-riscv64-uboot". #} | ||
125 | 119 | {%- set kernel_id_bos03_riscv64 = "bcbb013b-9424-4f61-9fda-6374d29d3ee0" %} | ||
126 | 120 | {%- set launchpad_buildd_repository = "ppa:launchpad/buildd-staging" %} | ||
127 | 121 | {%- set lp_buildd_managers = "10.132.54.242" %} | ||
128 | 122 | {%- set lp_environment = "qastaging" %} | ||
129 | 123 | {%- set lp_sshkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFrjt0yytzrK9fQuG+6VgE6QStUbDmunlN7+Lv5XhmoL stg-launchpad@launchpad-bastion-ps5" %} | ||
130 | 124 | {%- set modifiers_bos01 = '{"arm64": "10.43.0.10", "ppc64el": "10.43.0.23", "s390x": "10.43.0.15"}' %} | ||
131 | 125 | {%- set modifiers_bos02 = '{"arm64": "10.44.0.13", "ppc64el": "10.44.0.19", "s390x": "10.44.0.14"}' %} | ||
132 | 126 | {%- set modifiers_bos03 = '{"arm64": "10.144.0.127", "riscv64": "10.144.0.114"}' %} | ||
133 | 127 | {%- set name_prefix = "launchpad-buildd-qastaging" %} | ||
134 | 128 | {%- set openstack_tenant_name = "vbuilder_staging_project" %} | ||
135 | 129 | {%- set openstack_tenant_name_bos03 = "launchpad-vbuilder-staging_project" %} | ||
136 | 130 | {%- set openstack_tenant_name_lcy02 = "launchpad-vbuilder-staging_project" %} | ||
137 | 131 | {%- set openstack_username = "vbuilder_staging" %} | ||
138 | 132 | {%- set openstack_username_bos03 = "launchpad-vbuilder-staging" %} | ||
139 | 133 | {%- set openstack_username_lcy02 = "launchpad-vbuilder-staging" %} | ||
140 | 134 | {%- set vbuilders_bos01 = {"amd64": {"series": "focal", "flavor": "vbuilder-gpu", "count": 1}, "arm64": {"series": "focal", "count": 1, "config_drive": false}, "arm64-gpu": {"arch_base": "arm64", "arch_suffix": "-gpu", "series": "focal", "flavor": "vbuilder-nvidia-l4", "count": 1, "config_drive": false}, "ppc64el": {"series": "focal", "count": 1}, "s390x": {"series": "focal", "count": 1}} %} | ||
141 | 135 | {%- set vbuilders_bos02 = {"arm64": {"series": "focal", "count": 1, "config_drive": false}, "ppc64el": {"series": "focal", "count": 1}, "s390x": {"series": "focal", "count": 1}} %} | ||
142 | 136 | {%- set vbuilders_bos03 = {"amd64": {"series": "focal", "count": 4}, "arm64": {"series": "focal", "count": 1, "config_drive": false, "flavor": "vbuilder-arm64"}, "riscv64": {"series": "jammy", "count": 1, "config_drive": false}} %} | ||
143 | 137 | {%- set vbuilders_lcy02 = {"amd64": {"series": "focal", "count": 4}} %} | ||
144 | 138 | {%- set vbuilder_prefix = "qastaging-" %} | ||
145 | 139 | {%- endif %} | ||
146 | 140 | |||
147 | 141 | {%- macro vbuilder_hostnames(prefix, count) %} | ||
148 | 142 | {%- set hostname_sep = joiner(", ") -%} | ||
149 | 143 | [{% for i in range(1, count + 1) -%} | ||
150 | 144 | {{ hostname_sep() }}"{{ prefix }}-{{ "%03d" % i }}" | ||
151 | 145 | {%- endfor %}] | ||
152 | 146 | {%- endmacro %} | ||
153 | 147 | |||
154 | 148 | {%- macro vbuilders(region, arches) %} | ||
155 | 149 | {%- set arch_sep = joiner(", ") -%} | ||
156 | 150 | [{% for arch, properties in arches|dictsort -%} | ||
157 | 151 | {{ arch_sep() }}{"image_name_prefix": "{{ name_prefix }}{{ properties.get('arch_suffix', '') }}/ubuntu-{{ properties['series'] }}-daily-{{ properties.get('arch_base', arch) }}-", "instance_flavor": "{{ properties.get('flavor', 'vbuilder') }}", "hostnames": {{ vbuilder_hostnames("%s%s-%s" % (vbuilder_prefix, region, arch), properties['count']) }}, "config_drive": {{ properties.get('config_drive', True)|tojson }}} | ||
158 | 152 | {%- endfor %}] | ||
159 | 153 | {%- endmacro -%} | ||
160 | 154 | |||
161 | 155 | series: "{{ series }}" | ||
162 | 156 | applications: | ||
163 | 157 | rabbitmq-server: | ||
164 | 158 | charm: cs:rabbitmq-server | ||
165 | 159 | constraints: "cores=2 mem=8G root-disk=20G {{ extra_constraints }}" | ||
166 | 160 | num_units: 2 | ||
167 | 161 | glance-simplestreams-sync-bos01-amd64: | ||
168 | 162 | charm: {{ charm_dir }}/glance-simplestreams-sync | ||
169 | 163 | constraints: "{{ extra_constraints }}" | ||
170 | 164 | num_units: 1 | ||
171 | 165 | options: | ||
172 | 166 | content_id_template: "{{ content_id_template }}" | ||
173 | 167 | mirror_list: |- | ||
174 | 168 | [{url: "http://cloud-images.ubuntu.com/daily/", name_prefix: "ubuntu:released", path: "streams/v1/index.sjson", max: 3, item_filters: ["release~({{ gss_series }})", "arch~(x86_64|amd64)", "ftype~(disk1.img|disk.img)"]}] | ||
175 | 169 | name_prefix: "{{ name_prefix }}/" | ||
176 | 170 | openstack-auth-url: "http://keystone.infra.bos01.scalingstack:5000/v3" | ||
177 | 171 | openstack-identity-api-version: "3" | ||
178 | 172 | openstack-tenant-name: "{{ openstack_tenant_name }}" | ||
179 | 173 | openstack-username: "{{ openstack_username }}" | ||
180 | 174 | region: scalingstack-bos01 | ||
181 | 175 | use_swift: false | ||
182 | 176 | visibility: private | ||
183 | 177 | glance-simplestreams-sync-bos01-arm64: | ||
184 | 178 | charm: {{ charm_dir }}/glance-simplestreams-sync | ||
185 | 179 | constraints: "{{ extra_constraints }}" | ||
186 | 180 | num_units: 1 | ||
187 | 181 | options: | ||
188 | 182 | content_id_template: "{{ content_id_template }}" | ||
189 | 183 | custom_properties: 'hypervisor_type=kvm hw_firmware_type=uefi' | ||
190 | 184 | mirror_list: |- | ||
191 | 185 | [{url: "http://cloud-images.ubuntu.com/daily/", name_prefix: "ubuntu:released", path: "streams/v1/index.sjson", max: 2, item_filters: ["release~({{ gss_series }})", "arch~(arm64|aarch64)", "ftype~(disk1.img|disk.img)"]}] | ||
192 | 186 | name_prefix: "{{ name_prefix }}/" | ||
193 | 187 | openstack-auth-url: "http://keystone.infra.bos01.scalingstack:5000/v3" | ||
194 | 188 | openstack-identity-api-version: "3" | ||
195 | 189 | openstack-tenant-name: "{{ openstack_tenant_name }}" | ||
196 | 190 | openstack-username: "{{ openstack_username }}" | ||
197 | 191 | region: scalingstack-bos01 | ||
198 | 192 | use_swift: false | ||
199 | 193 | visibility: private | ||
200 | 194 | glance-simplestreams-sync-bos01-arm64-gpu: | ||
201 | 195 | charm: {{ charm_dir }}/glance-simplestreams-sync | ||
202 | 196 | constraints: "{{ extra_constraints }}" | ||
203 | 197 | num_units: 1 | ||
204 | 198 | options: | ||
205 | 199 | content_id_template: "{{ content_id_template }}:gpu" | ||
206 | 200 | custom_properties: 'hypervisor_type=kvm hw_firmware_type=uefi' | ||
207 | 201 | mirror_list: |- | ||
208 | 202 | [{url: "http://cloud-images.ubuntu.com/daily/", name_prefix: "ubuntu:released", path: "streams/v1/index.sjson", max: 2, item_filters: ["release~({{ gss_series }})", "arch~(arm64|aarch64)", "ftype~(disk1.img|disk.img)"]}] | ||
209 | 203 | name_prefix: "{{ name_prefix }}-gpu/" | ||
210 | 204 | openstack-auth-url: "http://keystone.infra.bos01.scalingstack:5000/v3" | ||
211 | 205 | openstack-identity-api-version: "3" | ||
212 | 206 | openstack-tenant-name: "{{ openstack_tenant_name }}" | ||
213 | 207 | openstack-username: "{{ openstack_username }}" | ||
214 | 208 | region: scalingstack-bos01 | ||
215 | 209 | use_swift: false | ||
216 | 210 | visibility: private | ||
217 | 211 | glance-simplestreams-sync-bos01-ppc64el: | ||
218 | 212 | charm: {{ charm_dir }}/glance-simplestreams-sync | ||
219 | 213 | constraints: "{{ extra_constraints }}" | ||
220 | 214 | num_units: 1 | ||
221 | 215 | options: | ||
222 | 216 | content_id_template: "{{ content_id_template }}" | ||
223 | 217 | custom_properties: 'hypervisor_type=kvm' | ||
224 | 218 | mirror_list: |- | ||
225 | 219 | [{url: "http://cloud-images.ubuntu.com/daily/", name_prefix: "ubuntu:released", path: "streams/v1/index.sjson", max: 2, item_filters: ["release~({{ gss_series }})", "arch~(ppc64el)", "ftype~(disk1.img|disk.img)"]}] | ||
226 | 220 | name_prefix: "{{ name_prefix }}/" | ||
227 | 221 | openstack-auth-url: "http://keystone.infra.bos01.scalingstack:5000/v3" | ||
228 | 222 | openstack-identity-api-version: "3" | ||
229 | 223 | openstack-tenant-name: "{{ openstack_tenant_name }}" | ||
230 | 224 | openstack-username: "{{ openstack_username }}" | ||
231 | 225 | region: scalingstack-bos01 | ||
232 | 226 | use_swift: false | ||
233 | 227 | visibility: private | ||
234 | 228 | glance-simplestreams-sync-bos01-s390x: | ||
235 | 229 | charm: {{ charm_dir }}/glance-simplestreams-sync | ||
236 | 230 | constraints: "{{ extra_constraints }}" | ||
237 | 231 | num_units: 1 | ||
238 | 232 | options: | ||
239 | 233 | content_id_template: "{{ content_id_template }}" | ||
240 | 234 | custom_properties: 'hypervisor_type=kvm' | ||
241 | 235 | mirror_list: |- | ||
242 | 236 | [{url: "http://cloud-images.ubuntu.com/daily/", name_prefix: "ubuntu:released", path: "streams/v1/index.sjson", max: 3, item_filters: ["release~({{ gss_series }})", "arch~(s390x)", "ftype~(disk1.img|disk.img)"]}] | ||
243 | 237 | name_prefix: "{{ name_prefix }}/" | ||
244 | 238 | openstack-auth-url: "http://keystone.infra.bos01.scalingstack:5000/v3" | ||
245 | 239 | openstack-identity-api-version: "3" | ||
246 | 240 | openstack-tenant-name: "{{ openstack_tenant_name }}" | ||
247 | 241 | openstack-username: "{{ openstack_username }}" | ||
248 | 242 | region: scalingstack-bos01 | ||
249 | 243 | use_swift: false | ||
250 | 244 | visibility: private | ||
251 | 245 | glance-simplestreams-sync-bos02-arm64: | ||
252 | 246 | charm: {{ charm_dir }}/glance-simplestreams-sync | ||
253 | 247 | constraints: "{{ extra_constraints }}" | ||
254 | 248 | num_units: 1 | ||
255 | 249 | options: | ||
256 | 250 | content_id_template: "{{ content_id_template }}" | ||
257 | 251 | custom_properties: 'hypervisor_type=kvm hw_firmware_type=uefi' | ||
258 | 252 | mirror_list: |- | ||
259 | 253 | [{url: "http://cloud-images.ubuntu.com/daily/", name_prefix: "ubuntu:released", path: "streams/v1/index.sjson", max: 2, item_filters: ["release~({{ gss_series }})", "arch~(arm64|aarch64)", "ftype~(disk1.img|disk.img)"]}] | ||
260 | 254 | name_prefix: "{{ name_prefix }}/" | ||
261 | 255 | openstack-auth-url: "http://keystone.infra.bos02.scalingstack:5000/v2.0" | ||
262 | 256 | openstack-tenant-name: "{{ openstack_tenant_name }}" | ||
263 | 257 | openstack-username: "{{ openstack_username }}" | ||
264 | 258 | region: scalingstack-bos02 | ||
265 | 259 | use_swift: false | ||
266 | 260 | visibility: private | ||
267 | 261 | glance-simplestreams-sync-bos02-ppc64el: | ||
268 | 262 | charm: {{ charm_dir }}/glance-simplestreams-sync | ||
269 | 263 | constraints: "{{ extra_constraints }}" | ||
270 | 264 | num_units: 1 | ||
271 | 265 | options: | ||
272 | 266 | content_id_template: "{{ content_id_template }}" | ||
273 | 267 | custom_properties: 'hypervisor_type=kvm' | ||
274 | 268 | mirror_list: |- | ||
275 | 269 | [{url: "http://cloud-images.ubuntu.com/daily/", name_prefix: "ubuntu:released", path: "streams/v1/index.sjson", max: 2, item_filters: ["release~({{ gss_series }})", "arch~(ppc64el)", "ftype~(disk1.img|disk.img)"]}] | ||
276 | 270 | name_prefix: "{{ name_prefix }}/" | ||
277 | 271 | openstack-auth-url: "http://keystone.infra.bos02.scalingstack:5000/v2.0" | ||
278 | 272 | openstack-tenant-name: "{{ openstack_tenant_name }}" | ||
279 | 273 | openstack-username: "{{ openstack_username }}" | ||
280 | 274 | region: scalingstack-bos02 | ||
281 | 275 | use_swift: false | ||
282 | 276 | visibility: private | ||
283 | 277 | glance-simplestreams-sync-bos02-s390x: | ||
284 | 278 | charm: {{ charm_dir }}/glance-simplestreams-sync | ||
285 | 279 | constraints: "{{ extra_constraints }}" | ||
286 | 280 | num_units: 1 | ||
287 | 281 | options: | ||
288 | 282 | content_id_template: "{{ content_id_template }}" | ||
289 | 283 | custom_properties: 'hypervisor_type=kvm' | ||
290 | 284 | mirror_list: |- | ||
291 | 285 | [{url: "http://cloud-images.ubuntu.com/daily/", name_prefix: "ubuntu:released", path: "streams/v1/index.sjson", max: 3, item_filters: ["release~({{ gss_series }})", "arch~(s390x)", "ftype~(disk1.img|disk.img)"]}] | ||
292 | 286 | name_prefix: "{{ name_prefix }}/" | ||
293 | 287 | openstack-auth-url: "http://keystone.infra.bos02.scalingstack:5000/v2.0" | ||
294 | 288 | openstack-tenant-name: "{{ openstack_tenant_name }}" | ||
295 | 289 | openstack-username: "{{ openstack_username }}" | ||
296 | 290 | region: scalingstack-bos02 | ||
297 | 291 | use_swift: false | ||
298 | 292 | visibility: private | ||
299 | 293 | glance-simplestreams-sync-bos03-amd64: | ||
300 | 294 | charm: {{ charm_dir }}/glance-simplestreams-sync | ||
301 | 295 | constraints: "{{ extra_constraints }}" | ||
302 | 296 | num_units: 1 | ||
303 | 297 | options: | ||
304 | 298 | content_id_template: "{{ content_id_template }}" | ||
305 | 299 | mirror_list: |- | ||
306 | 300 | [{url: "http://cloud-images.ubuntu.com/daily/", name_prefix: "ubuntu:released", path: "streams/v1/index.sjson", max: 3, item_filters: ["release~({{ gss_series }})", "arch~(x86_64|amd64)", "ftype~(disk1.img|disk.img)"]}] | ||
307 | 301 | name_prefix: "{{ name_prefix }}/" | ||
308 | 302 | openstack-auth-url: "https://keystone.ps6.canonical.com:5000/v3" | ||
309 | 303 | openstack-identity-api-version: "3" | ||
310 | 304 | openstack-tenant-name: "{{ openstack_tenant_name_bos03 }}" | ||
311 | 305 | openstack-username: "{{ openstack_username_bos03 }}" | ||
312 | 306 | region: scalingstack-bos03 | ||
313 | 307 | use_swift: false | ||
314 | 308 | visibility: private | ||
315 | 309 | glance-simplestreams-sync-bos03-arm64: | ||
316 | 310 | charm: {{ charm_dir }}/glance-simplestreams-sync | ||
317 | 311 | constraints: "{{ extra_constraints }}" | ||
318 | 312 | num_units: 1 | ||
319 | 313 | options: | ||
320 | 314 | content_id_template: "{{ content_id_template }}" | ||
321 | 315 | custom_properties: "hypervisor_type=kvm hw_firmware_type=uefi" | ||
322 | 316 | mirror_list: |- | ||
323 | 317 | [{url: "http://cloud-images.ubuntu.com/daily/", name_prefix: "ubuntu:released", path: "streams/v1/index.sjson", max: 3, item_filters: ["release~({{ gss_series }})", "arch~(arm64|aarch64)", "ftype~(disk1.img|disk.img)"]}] | ||
324 | 318 | name_prefix: "{{ name_prefix }}/" | ||
325 | 319 | openstack-auth-url: "https://keystone.ps6.canonical.com:5000/v3" | ||
326 | 320 | openstack-identity-api-version: "3" | ||
327 | 321 | openstack-tenant-name: "{{ openstack_tenant_name_bos03 }}" | ||
328 | 322 | openstack-username: "{{ openstack_username_bos03 }}" | ||
329 | 323 | region: scalingstack-bos03 | ||
330 | 324 | use_swift: false | ||
331 | 325 | visibility: private | ||
332 | 326 | {%- if stage_name in ("production", "qastaging") %} | ||
333 | 327 | glance-simplestreams-sync-bos03-riscv64: | ||
334 | 328 | charm: {{ charm_dir }}/glance-simplestreams-sync | ||
335 | 329 | constraints: "{{ extra_constraints }}" | ||
336 | 330 | num_units: 1 | ||
337 | 331 | options: | ||
338 | 332 | content_id_template: "{{ content_id_template }}" | ||
339 | 333 | custom_properties: "hw_emulation_architecture=riscv64 hw_machine_type=virt kernel_id={{ kernel_id_bos03_riscv64 }}" | ||
340 | 334 | mirror_list: |- | ||
341 | 335 | [{url: "http://cloud-images.ubuntu.com/daily/", name_prefix: "ubuntu:released", path: "streams/v1/index.sjson", max: 3, item_filters: ["release~({{ gss_series }})", "arch~(riscv64)", "ftype~(disk1.img|disk.img)"]}] | ||
342 | 336 | name_prefix: "{{ name_prefix }}/" | ||
343 | 337 | openstack-auth-url: "https://keystone.ps6.canonical.com:5000/v3" | ||
344 | 338 | openstack-identity-api-version: "3" | ||
345 | 339 | openstack-tenant-name: "{{ openstack_tenant_name_bos03 }}" | ||
346 | 340 | openstack-username: "{{ openstack_username_bos03 }}" | ||
347 | 341 | region: scalingstack-bos03 | ||
348 | 342 | use_swift: false | ||
349 | 343 | visibility: private | ||
350 | 344 | {%- endif %} | ||
351 | 345 | glance-simplestreams-sync-lcy02-amd64: | ||
352 | 346 | charm: {{ charm_dir }}/glance-simplestreams-sync | ||
353 | 347 | constraints: "{{ extra_constraints }}" | ||
354 | 348 | num_units: 1 | ||
355 | 349 | options: | ||
356 | 350 | content_id_template: "{{ content_id_template }}" | ||
357 | 351 | mirror_list: |- | ||
358 | 352 | [{url: "http://cloud-images.ubuntu.com/daily/", name_prefix: "ubuntu:released", path: "streams/v1/index.sjson", max: 3, item_filters: ["release~({{ gss_series }})", "arch~(x86_64|amd64)", "ftype~(disk1.img|disk.img)"]}] | ||
359 | 353 | name_prefix: "{{ name_prefix }}/" | ||
360 | 354 | openstack-auth-url: "https://keystone.ps5.canonical.com:5000/v3" | ||
361 | 355 | openstack-identity-api-version: "3" | ||
362 | 356 | openstack-tenant-name: "{{ openstack_tenant_name_lcy02 }}" | ||
363 | 357 | openstack-username: "{{ openstack_username_lcy02 }}" | ||
364 | 358 | region: scalingstack-lcy02 | ||
365 | 359 | use_swift: false | ||
366 | 360 | visibility: private | ||
367 | 361 | launchpad-buildd-image-modifier-amd64: | ||
368 | 362 | charm: {{ charm_dir }}/launchpad-buildd-image-modifier | ||
369 | 363 | options: | ||
370 | 364 | clamav-database-url: "{{ clamav_database_url }}" | ||
371 | 365 | launchpad-buildd-repository: "{{ launchpad_buildd_repository }}" | ||
372 | 366 | linux-command-line-extra: "systemd.unified_cgroup_hierarchy=false" | ||
373 | 367 | launchpad-buildd-image-modifier-bos01-amd64: | ||
374 | 368 | charm: {{ charm_dir }}/launchpad-buildd-image-modifier | ||
375 | 369 | options: | ||
376 | 370 | clamav-database-url: "{{ clamav_database_url }}" | ||
377 | 371 | extra-keys: "-----BEGIN PGP PUBLIC KEY BLOCK-----\nVersion: GnuPG v2\n\nmI0ESUm55wEEALrxow0PCnGeCAebH9g5+wtZBfXZdx2vZts+XsTTHxDRsMNgMC9b\n0klCgbydvkmF9WCphCjQ61Wp/Bh0C7DSXVCpA/xs55QB5VCUceIMZCbMTPq1h7Ht\ncA1f+o6+OCPUntErG6eGize6kGhdjBNPOT+q4BSIL69rPuwfM9ZyAYcBABEBAAG0\nJkxhdW5jaHBhZCBQUEEgZm9yIExhdW5jaHBhZCBEZXZlbG9wZXJziLYEEwECACAF\nAklJuecCGwMGCwkIBwMCBBUCCAMEFgIDAQIeAQIXgAAKCRAtH/tsClF0rxsQA/0Q\nw0Yk+xIA1xibyf+UCF9/4fXzdo/tr76qxPRyFiv0uLbFOmW6t26jzpWBHocCHcCU\n57l7rlcEzIHFMcS9Ol6MughP4lhywf9ceeqg2SD6AXjZ0iFarwkueTcHwff5j0lG\nIzzCUVTYJ+m79f/r0dfctL2DwnX7JnT/41mEuR1qbokBHAQQAQIABgUCTB7s7wAK\nCRDFXO8hUqH8T94pCACxl/Gdo82N01H82HvNBa8zQFixNQIwNJN/VxH3WfRvissW\nOMTJnTnNOQErxUhqHrasvZf3djNoHeKRNToTTBaGiEwoySmEK05i4Toq74jWAOs6\nflD2S8natWbobK5V+B2pXZl5g/4Ay21C3H1sZlUxDCcOH9Jh8/0feAZHoSQ/V1Xa\nrEPb+TGdV0hP3Yp7+nIT91sYkj566kA8fjoxJrY/EvXGn98bhYMbMNbtS1Z0WeGp\nzG2hiL6wLSLBxz4Ae9MShOMwNyC1zmr/d1wlF0Efx1N9HaRtRq2s/zqH+ebB7Sr+\nV+SquObb0qr4eAjtslN5BxWROhf+wZM6WJO0Z6nBiQEcBBABAgAGBQJTHvsiAAoJ\nEIngjfAzAr5Z8y4H/jltxz5OwHIDoiXsyWnpjO1SZUV6I6evKpSD7huYtd7MwFZC\n0CgExsPPqLNQCUxITR+9jlqofi/QsTwP7Qq55VmIrKLrZ9KCK1qBnMa/YEXi6TeK\n65lnyN6lNOdzhcsBm3s1/U9ewWp1vsw4UAclmu6tI8GUko+e32K1QjMtIjeVejQl\nJCYDjuxfHhcFWyRo0TWu24F6VD3YxBHpne/M00yd2mLLpHdQrxw/vbvVhZkRDutQ\nemKRA81ZM2WZ1iqYOXtEs5VrD/PtU0nvSAowgeWBmcOwWn3Om+pVsnSoFo46CDvo\nC6YXOWMOMFIxfVhPWqlBkWQsnXFzgk/Xyo4vlTY=\n=Wq6H\n-----END PGP PUBLIC KEY BLOCK-----" | ||
378 | 372 | extra-packages: "nvidia-headless-525-grid nvidia-utils-525-grid" | ||
379 | 373 | # extra-sources must also be set in the secrets file, to add | ||
380 | 374 | # ppa:launchpad/ubuntu/buildd-gpu; that requires an authentication | ||
381 | 375 | # token. | ||
382 | 376 | launchpad-buildd-repository: "{{ launchpad_buildd_repository }}" | ||
383 | 377 | linux-command-line-extra: "systemd.unified_cgroup_hierarchy=false" | ||
384 | 378 | launchpad-buildd-image-modifier-bos01-arm64: | ||
385 | 379 | charm: {{ charm_dir }}/launchpad-buildd-image-modifier | ||
386 | 380 | options: | ||
387 | 381 | clamav-database-url: "{{ clamav_database_url }}" | ||
388 | 382 | launchpad-buildd-repository: "{{ launchpad_buildd_repository }}" | ||
389 | 383 | linux-command-line-extra: "systemd.unified_cgroup_hierarchy=false compat_uts_machine=armv7l" | ||
390 | 384 | remote-modifiers: '{{ modifiers_bos01 }}' | ||
391 | 385 | remote-modifier-private-key: include-base64://{{ local_dir }}/id_rsa.imagebuilder | ||
392 | 386 | remote-modifier-public-key: include-base64://{{ local_dir }}/id_rsa.imagebuilder.pub | ||
393 | 387 | launchpad-buildd-image-modifier-bos01-arm64-gpu: | ||
394 | 388 | charm: {{ charm_dir }}/launchpad-buildd-image-modifier | ||
395 | 389 | options: | ||
396 | 390 | clamav-database-url: "{{ clamav_database_url }}" | ||
397 | 391 | extra-packages: "nvidia-headless-525-server nvidia-utils-525-server" | ||
398 | 392 | launchpad-buildd-repository: "{{ launchpad_buildd_repository }}" | ||
399 | 393 | linux-command-line-extra: "systemd.unified_cgroup_hierarchy=false compat_uts_machine=armv7l" | ||
400 | 394 | remote-modifiers: '{{ modifiers_bos01 }}' | ||
401 | 395 | remote-modifier-private-key: include-base64://{{ local_dir }}/id_rsa.imagebuilder | ||
402 | 396 | remote-modifier-public-key: include-base64://{{ local_dir }}/id_rsa.imagebuilder.pub | ||
403 | 397 | launchpad-buildd-image-modifier-bos01-ppc64el: | ||
404 | 398 | charm: {{ charm_dir }}/launchpad-buildd-image-modifier | ||
405 | 399 | options: | ||
406 | 400 | clamav-database-url: "{{ clamav_database_url }}" | ||
407 | 401 | launchpad-buildd-repository: "{{ launchpad_buildd_repository }}" | ||
408 | 402 | linux-command-line-extra: "systemd.unified_cgroup_hierarchy=false" | ||
409 | 403 | remote-modifiers: '{{ modifiers_bos01 }}' | ||
410 | 404 | remote-modifier-private-key: include-base64://{{ local_dir }}/id_rsa.imagebuilder | ||
411 | 405 | remote-modifier-public-key: include-base64://{{ local_dir }}/id_rsa.imagebuilder.pub | ||
412 | 406 | launchpad-buildd-image-modifier-bos01-s390x: | ||
413 | 407 | charm: {{ charm_dir }}/launchpad-buildd-image-modifier | ||
414 | 408 | options: | ||
415 | 409 | clamav-database-url: "{{ clamav_database_url }}" | ||
416 | 410 | launchpad-buildd-repository: "{{ launchpad_buildd_repository }}" | ||
417 | 411 | linux-command-line-extra: "systemd.unified_cgroup_hierarchy=false" | ||
418 | 412 | remote-modifiers: '{{ modifiers_bos01 }}' | ||
419 | 413 | remote-modifier-private-key: include-base64://{{ local_dir }}/id_rsa.imagebuilder | ||
420 | 414 | remote-modifier-public-key: include-base64://{{ local_dir }}/id_rsa.imagebuilder.pub | ||
421 | 415 | launchpad-buildd-image-modifier-bos02-arm64: | ||
422 | 416 | charm: {{ charm_dir }}/launchpad-buildd-image-modifier | ||
423 | 417 | options: | ||
424 | 418 | clamav-database-url: "{{ clamav_database_url }}" | ||
425 | 419 | launchpad-buildd-repository: "{{ launchpad_buildd_repository }}" | ||
426 | 420 | linux-command-line-extra: "systemd.unified_cgroup_hierarchy=false compat_uts_machine=armv7l" | ||
427 | 421 | remote-modifiers: '{{ modifiers_bos02 }}' | ||
428 | 422 | remote-modifier-private-key: include-base64://{{ local_dir }}/id_rsa.imagebuilder | ||
429 | 423 | remote-modifier-public-key: include-base64://{{ local_dir }}/id_rsa.imagebuilder.pub | ||
430 | 424 | launchpad-buildd-image-modifier-bos02-ppc64el: | ||
431 | 425 | charm: {{ charm_dir }}/launchpad-buildd-image-modifier | ||
432 | 426 | options: | ||
433 | 427 | clamav-database-url: "{{ clamav_database_url }}" | ||
434 | 428 | launchpad-buildd-repository: "{{ launchpad_buildd_repository }}" | ||
435 | 429 | linux-command-line-extra: "systemd.unified_cgroup_hierarchy=false" | ||
436 | 430 | remote-modifiers: '{{ modifiers_bos02 }}' | ||
437 | 431 | remote-modifier-private-key: include-base64://{{ local_dir }}/id_rsa.imagebuilder | ||
438 | 432 | remote-modifier-public-key: include-base64://{{ local_dir }}/id_rsa.imagebuilder.pub | ||
439 | 433 | launchpad-buildd-image-modifier-bos02-s390x: | ||
440 | 434 | charm: {{ charm_dir }}/launchpad-buildd-image-modifier | ||
441 | 435 | options: | ||
442 | 436 | clamav-database-url: "{{ clamav_database_url }}" | ||
443 | 437 | launchpad-buildd-repository: "{{ launchpad_buildd_repository }}" | ||
444 | 438 | linux-command-line-extra: "systemd.unified_cgroup_hierarchy=false" | ||
445 | 439 | remote-modifiers: '{{ modifiers_bos02 }}' | ||
446 | 440 | remote-modifier-private-key: include-base64://{{ local_dir }}/id_rsa.imagebuilder | ||
447 | 441 | remote-modifier-public-key: include-base64://{{ local_dir }}/id_rsa.imagebuilder.pub | ||
448 | 442 | launchpad-buildd-image-modifier-bos03-amd64: | ||
449 | 443 | charm: {{ charm_dir }}/launchpad-buildd-image-modifier | ||
450 | 444 | options: | ||
451 | 445 | clamav-database-url: "{{ clamav_database_url }}" | ||
452 | 446 | launchpad-buildd-repository: "{{ launchpad_buildd_repository }}" | ||
453 | 447 | linux-command-line-extra: "systemd.unified_cgroup_hierarchy=false" | ||
454 | 448 | launchpad-buildd-image-modifier-bos03-arm64: | ||
455 | 449 | charm: {{ charm_dir }}/launchpad-buildd-image-modifier | ||
456 | 450 | options: | ||
457 | 451 | clamav-database-url: "{{ clamav_database_url }}" | ||
458 | 452 | launchpad-buildd-repository: "{{ launchpad_buildd_repository }}" | ||
459 | 453 | linux-command-line-extra: "systemd.unified_cgroup_hierarchy=false compat_uts_machine=armv7l" | ||
460 | 454 | remote-modifiers: '{{ modifiers_bos03 }}' | ||
461 | 455 | remote-modifier-private-key: include-base64://{{ local_dir }}/id_rsa.imagebuilder | ||
462 | 456 | remote-modifier-public-key: include-base64://{{ local_dir }}/id_rsa.imagebuilder.pub | ||
463 | 457 | {%- if stage_name in ("production", "qastaging") %} | ||
464 | 458 | launchpad-buildd-image-modifier-bos03-riscv64: | ||
465 | 459 | charm: {{ charm_dir }}/launchpad-buildd-image-modifier | ||
466 | 460 | options: | ||
467 | 461 | clamav-database-url: "{{ clamav_database_url }}" | ||
468 | 462 | launchpad-buildd-repository: "{{ launchpad_buildd_repository }}" | ||
469 | 463 | linux-command-line-extra: "systemd.unified_cgroup_hierarchy=false" | ||
470 | 464 | # XXX cjwatson 2023-11-15: jammy defaults to 5.0/stable, which has | ||
471 | 465 | # some race conditions affecting Launchpad builds. Change this to a | ||
472 | 466 | # more stable channel (e.g. 5.20/stable) once one exists that contains | ||
473 | 467 | # https://github.com/canonical/lxd/pull/12530. | ||
474 | 468 | lxd-channel: "latest/candidate" | ||
475 | 469 | remote-modifiers: '{{ modifiers_bos03 }}' | ||
476 | 470 | remote-modifier-private-key: include-base64://{{ local_dir }}/id_rsa.imagebuilder | ||
477 | 471 | remote-modifier-public-key: include-base64://{{ local_dir }}/id_rsa.imagebuilder.pub | ||
478 | 472 | sbuild-stalled-package-timeout: 1500 | ||
479 | 473 | {%- endif %} | ||
480 | 474 | vbuilder-manage-bos01: | ||
481 | 475 | charm: {{ charm_dir }}/vbuilder-manage | ||
482 | 476 | constraints: "cores=2 mem=8G root-disk=20G {{ extra_constraints }}" | ||
483 | 477 | expose: true | ||
484 | 478 | num_units: 1 | ||
485 | 479 | options: | ||
486 | 480 | amqp-username: vbuilder-manage-bos01 | ||
487 | 481 | amqp-vhost: vbuilder-manage-bos01 | ||
488 | 482 | celery-worker-count: "32" | ||
489 | 483 | dns-update-host: "{{ dns_update_host_bos01 }}" | ||
490 | 484 | dns-update-key-name: "{{ dns_update_key_name }}" | ||
491 | 485 | domain: "{{ domain_bos01 }}" | ||
492 | 486 | instance-key-name: "{{ instance_key_name_bos01 }}" | ||
493 | 487 | instance-network: "{{ instance_network_bos01 }}" | ||
494 | 488 | instance-router: "{{ instance_router }}" | ||
495 | 489 | log-hosts-allow: "{{ log_hosts_allow }}" | ||
496 | 490 | lp-buildd-managers: "{{ lp_buildd_managers }}" | ||
497 | 491 | lp-environment: "{{ lp_environment }}" | ||
498 | 492 | lp-sshkey: "{{ lp_sshkey }}" | ||
499 | 493 | openstack-auth-url: http://keystone.infra.bos01.scalingstack:5000/v3 | ||
500 | 494 | openstack-identity-api-version: "3" | ||
501 | 495 | openstack-tenant-name: "{{ openstack_tenant_name }}" | ||
502 | 496 | openstack-username: "{{ openstack_username }}" | ||
503 | 497 | vbuilders: '{{ vbuilders("bos01", vbuilders_bos01) }}' | ||
504 | 498 | vbuilder-manage-bos02: | ||
505 | 499 | charm: {{ charm_dir }}/vbuilder-manage | ||
506 | 500 | constraints: "cores=2 mem=8G root-disk=20G {{ extra_constraints }}" | ||
507 | 501 | expose: true | ||
508 | 502 | num_units: 1 | ||
509 | 503 | options: | ||
510 | 504 | amqp-username: vbuilder-manage-bos02 | ||
511 | 505 | amqp-vhost: vbuilder-manage-bos02 | ||
512 | 506 | celery-worker-count: "50" | ||
513 | 507 | dns-update-host: "{{ dns_update_host_bos02 }}" | ||
514 | 508 | dns-update-key-name: "{{ dns_update_key_name }}" | ||
515 | 509 | domain: "{{ domain_bos02 }}" | ||
516 | 510 | instance-key-name: "{{ instance_key_name_bos02 }}" | ||
517 | 511 | instance-network: "{{ instance_network_bos02 }}" | ||
518 | 512 | instance-router: "{{ instance_router }}" | ||
519 | 513 | log-hosts-allow: "{{ log_hosts_allow }}" | ||
520 | 514 | lp-buildd-managers: "{{ lp_buildd_managers }}" | ||
521 | 515 | lp-environment: "{{ lp_environment }}" | ||
522 | 516 | lp-sshkey: "{{ lp_sshkey }}" | ||
523 | 517 | openstack-auth-url: http://keystone.infra.bos02.scalingstack:5000/v2.0 | ||
524 | 518 | openstack-tenant-name: "{{ openstack_tenant_name }}" | ||
525 | 519 | openstack-username: "{{ openstack_username }}" | ||
526 | 520 | vbuilders: '{{ vbuilders("bos02", vbuilders_bos02) }}' | ||
527 | 521 | vbuilder-manage-bos03: | ||
528 | 522 | charm: {{ charm_dir }}/vbuilder-manage | ||
529 | 523 | constraints: "cores=4 mem=8G root-disk=50G {{ extra_constraints }}" | ||
530 | 524 | expose: true | ||
531 | 525 | num_units: 1 | ||
532 | 526 | options: | ||
533 | 527 | amqp-username: vbuilder-manage-bos03 | ||
534 | 528 | amqp-vhost: vbuilder-manage-bos03 | ||
535 | 529 | celery-worker-count: "50" | ||
536 | 530 | dns-update-host: "{{ dns_update_host_bos03 }}" | ||
537 | 531 | dns-update-key-name: "{{ dns_update_key_name }}" | ||
538 | 532 | domain: "{{ domain_bos03 }}" | ||
539 | 533 | instance-key-name: "{{ instance_key_name_bos03 }}" | ||
540 | 534 | instance-network: "{{ instance_network_bos03 }}" | ||
541 | 535 | instance-router: "{{ instance_router_bos03 }}" | ||
542 | 536 | log-hosts-allow: "{{ log_hosts_allow }}" | ||
543 | 537 | lp-buildd-managers: "{{ lp_buildd_managers }}" | ||
544 | 538 | lp-environment: "{{ lp_environment }}" | ||
545 | 539 | lp-sshkey: "{{ lp_sshkey }}" | ||
546 | 540 | openstack-auth-url: "https://keystone.ps6.canonical.com:5000/v3" | ||
547 | 541 | openstack-identity-api-version: "3" | ||
548 | 542 | openstack-tenant-name: "{{ openstack_tenant_name_bos03 }}" | ||
549 | 543 | openstack-username: "{{ openstack_username_bos03 }}" | ||
550 | 544 | vbuilders: '{{ vbuilders("bos03", vbuilders_bos03) }}' | ||
551 | 545 | vbuilder-manage-lcy02: | ||
552 | 546 | charm: {{ charm_dir }}/vbuilder-manage | ||
553 | 547 | constraints: "cores=4 mem=8G root-disk=50G {{ extra_constraints }}" | ||
554 | 548 | expose: true | ||
555 | 549 | num_units: 1 | ||
556 | 550 | options: | ||
557 | 551 | amqp-username: vbuilder-manage-lcy02 | ||
558 | 552 | amqp-vhost: vbuilder-manage-lcy02 | ||
559 | 553 | celery-worker-count: "50" | ||
560 | 554 | dns-update-host: "{{ dns_update_host_lcy02 }}" | ||
561 | 555 | dns-update-key-name: "{{ dns_update_key_name }}" | ||
562 | 556 | domain: "{{ domain_lcy02 }}" | ||
563 | 557 | instance-key-name: "{{ instance_key_name_lcy02 }}" | ||
564 | 558 | instance-network: "{{ instance_network_lcy02 }}" | ||
565 | 559 | instance-router: "{{ instance_router_lcy02 }}" | ||
566 | 560 | log-hosts-allow: "{{ log_hosts_allow }}" | ||
567 | 561 | lp-buildd-managers: "{{ lp_buildd_managers }}" | ||
568 | 562 | lp-environment: "{{ lp_environment }}" | ||
569 | 563 | lp-sshkey: "{{ lp_sshkey }}" | ||
570 | 564 | openstack-auth-url: https://keystone.ps5.canonical.com:5000/v3 | ||
571 | 565 | openstack-identity-api-version: "3" | ||
572 | 566 | openstack-tenant-name: "{{ openstack_tenant_name_lcy02 }}" | ||
573 | 567 | openstack-username: "{{ openstack_username_lcy02 }}" | ||
574 | 568 | vbuilders: '{{ vbuilders("lcy02", vbuilders_lcy02) }}' | ||
575 | 569 | clamav-database-mirror: | ||
576 | 570 | charm: ch:clamav-database-mirror | ||
577 | 571 | series: jammy | ||
578 | 572 | constraints: "{{ extra_constraints }}" | ||
579 | 573 | num_units: 1 | ||
580 | 574 | options: | ||
581 | 575 | http-proxy: "http://squid.internal:3128/" | ||
582 | 576 | ntp: | ||
583 | 577 | charm: cs:ntp | ||
584 | 578 | options: | ||
585 | 579 | source: "ntp1.canonical.com ntp2.canonical.com ntp3.canonical.com ntp4.canonical.com" | ||
586 | 580 | # We need to configure telegraf explicitly here because we use custom | ||
587 | 581 | # plugins. The subordinates spec will set up the relations. | ||
588 | 582 | telegraf: | ||
589 | 583 | charm: ch:telegraf | ||
590 | 584 | channel: candidate | ||
591 | 585 | expose: true | ||
592 | 586 | options: | ||
593 | 587 | extra_plugins: |- | ||
594 | 588 | [[inputs.procstat]] | ||
595 | 589 | pattern = "celery.*--app ppareset" | ||
596 | 590 | [[inputs.procstat]] | ||
597 | 591 | pattern = "/usr/local/sbin/ppa-reset" | ||
598 | 592 | install_method: snap | ||
599 | 593 | relations: | ||
600 | 594 | - ["glance-simplestreams-sync-bos01-amd64:image-modifier", "launchpad-buildd-image-modifier-bos01-amd64:image-modifier"] | ||
601 | 595 | - ["glance-simplestreams-sync-bos01-arm64:image-modifier", "launchpad-buildd-image-modifier-bos01-arm64:image-modifier"] | ||
602 | 596 | - ["glance-simplestreams-sync-bos01-arm64-gpu:image-modifier", "launchpad-buildd-image-modifier-bos01-arm64-gpu:image-modifier"] | ||
603 | 597 | - ["glance-simplestreams-sync-bos01-ppc64el:image-modifier", "launchpad-buildd-image-modifier-bos01-ppc64el:image-modifier"] | ||
604 | 598 | - ["glance-simplestreams-sync-bos01-s390x:image-modifier", "launchpad-buildd-image-modifier-bos01-s390x:image-modifier"] | ||
605 | 599 | - ["glance-simplestreams-sync-bos02-arm64:image-modifier", "launchpad-buildd-image-modifier-bos02-arm64:image-modifier"] | ||
606 | 600 | - ["glance-simplestreams-sync-bos02-ppc64el:image-modifier", "launchpad-buildd-image-modifier-bos02-ppc64el:image-modifier"] | ||
607 | 601 | - ["glance-simplestreams-sync-bos02-s390x:image-modifier", "launchpad-buildd-image-modifier-bos02-s390x:image-modifier"] | ||
608 | 602 | - ["glance-simplestreams-sync-bos03-amd64:image-modifier", "launchpad-buildd-image-modifier-bos03-amd64:image-modifier"] | ||
609 | 603 | - ["glance-simplestreams-sync-bos03-arm64:image-modifier", "launchpad-buildd-image-modifier-bos03-arm64:image-modifier"] | ||
610 | 604 | {%- if stage_name in ("production", "qastaging") %} | ||
611 | 605 | - ["glance-simplestreams-sync-bos03-riscv64:image-modifier", "launchpad-buildd-image-modifier-bos03-riscv64:image-modifier"] | ||
612 | 606 | {%- endif %} | ||
613 | 607 | - ["glance-simplestreams-sync-lcy02-amd64:image-modifier", "launchpad-buildd-image-modifier-amd64:image-modifier"] | ||
614 | 608 | - ["vbuilder-manage-bos01:amqp", "rabbitmq-server:amqp"] | ||
615 | 609 | - ["vbuilder-manage-bos02:amqp", "rabbitmq-server:amqp"] | ||
616 | 610 | - ["vbuilder-manage-bos03:amqp", "rabbitmq-server:amqp"] | ||
617 | 611 | - ["vbuilder-manage-lcy02:amqp", "rabbitmq-server:amqp"] | ||
618 | 612 | - ["rabbitmq-server", "ntp"] | ||
619 | 613 | - ["glance-simplestreams-sync-bos01-amd64", "ntp"] | ||
620 | 614 | - ["glance-simplestreams-sync-bos01-arm64", "ntp"] | ||
621 | 615 | - ["glance-simplestreams-sync-bos01-arm64-gpu", "ntp"] | ||
622 | 616 | - ["glance-simplestreams-sync-bos01-ppc64el", "ntp"] | ||
623 | 617 | - ["glance-simplestreams-sync-bos01-s390x", "ntp"] | ||
624 | 618 | - ["glance-simplestreams-sync-bos02-arm64", "ntp"] | ||
625 | 619 | - ["glance-simplestreams-sync-bos02-ppc64el", "ntp"] | ||
626 | 620 | - ["glance-simplestreams-sync-bos02-s390x", "ntp"] | ||
627 | 621 | - ["glance-simplestreams-sync-bos03-amd64", "ntp"] | ||
628 | 622 | - ["glance-simplestreams-sync-bos03-arm64", "ntp"] | ||
629 | 623 | {%- if stage_name in ("production", "qastaging") %} | ||
630 | 624 | - ["glance-simplestreams-sync-bos03-riscv64", "ntp"] | ||
631 | 625 | {%- endif %} | ||
632 | 626 | - ["glance-simplestreams-sync-lcy02-amd64", "ntp"] | ||
633 | 627 | - ["vbuilder-manage-bos01", "ntp"] | ||
634 | 628 | - ["vbuilder-manage-bos02", "ntp"] | ||
635 | 629 | - ["vbuilder-manage-bos03", "ntp"] | ||
636 | 630 | - ["vbuilder-manage-lcy02", "ntp"] | ||
637 | 631 | - ["clamav-database-mirror", "ntp"] | ||
638 | diff --git a/vbuilder/collect b/vbuilder/collect | |||
639 | 0 | new file mode 100644 | 632 | new file mode 100644 |
640 | index 0000000..2deb9b8 | |||
641 | --- /dev/null | |||
642 | +++ b/vbuilder/collect | |||
643 | @@ -0,0 +1,4 @@ | |||
644 | 1 | rabbitmq-server cs:rabbitmq-server | ||
645 | 2 | glance-simplestreams-sync git+lp:~launchpad/charm-glance-simplestreams-sync;revno=scalingstack | ||
646 | 3 | launchpad-buildd-image-modifier git+lp:charm-launchpad-buildd-image-modifier | ||
647 | 4 | vbuilder-manage git+lp:launchpad-vbuilder-manage | ||
648 | diff --git a/vbuilder/configs/custom-secgroups-production.yaml b/vbuilder/configs/custom-secgroups-production.yaml | |||
649 | 0 | new file mode 100644 | 5 | new file mode 100644 |
650 | index 0000000..95a7565 | |||
651 | --- /dev/null | |||
652 | +++ b/vbuilder/configs/custom-secgroups-production.yaml | |||
653 | @@ -0,0 +1,10 @@ | |||
654 | 1 | applications: | ||
655 | 2 | clamav-database-mirror: | ||
656 | 3 | type: neutron | ||
657 | 4 | rules: | ||
658 | 5 | - clamav-database-mirror | ||
659 | 6 | rules: | ||
660 | 7 | clamav-database-mirror: | ||
661 | 8 | # Public HTTP. (Firewalls restrict this to builders, but there's | ||
662 | 9 | # nothing secret here.) | ||
663 | 10 | - {"protocol": "tcp", "family": "IPv4", "port": 80, "cidr": "0.0.0.0/0"} | ||
664 | diff --git a/vbuilder/configs/custom-secgroups-staging.yaml b/vbuilder/configs/custom-secgroups-staging.yaml | |||
665 | 0 | new file mode 100644 | 11 | new file mode 100644 |
666 | index 0000000..95a7565 | |||
667 | --- /dev/null | |||
668 | +++ b/vbuilder/configs/custom-secgroups-staging.yaml | |||
669 | @@ -0,0 +1,10 @@ | |||
670 | 1 | applications: | ||
671 | 2 | clamav-database-mirror: | ||
672 | 3 | type: neutron | ||
673 | 4 | rules: | ||
674 | 5 | - clamav-database-mirror | ||
675 | 6 | rules: | ||
676 | 7 | clamav-database-mirror: | ||
677 | 8 | # Public HTTP. (Firewalls restrict this to builders, but there's | ||
678 | 9 | # nothing secret here.) | ||
679 | 10 | - {"protocol": "tcp", "family": "IPv4", "port": 80, "cidr": "0.0.0.0/0"} | ||
680 | diff --git a/vbuilder/expand-bundle b/vbuilder/expand-bundle | |||
681 | 0 | new file mode 100755 | 11 | new file mode 100755 |
682 | index 0000000..bbbe52e | |||
683 | --- /dev/null | |||
684 | +++ b/vbuilder/expand-bundle | |||
685 | @@ -0,0 +1,36 @@ | |||
686 | 1 | #! /usr/bin/python3 | ||
687 | 2 | # The vbuilder bundle is heavily parameterized in order to keep its length | ||
688 | 3 | # under control and reduce repetition. This provides an easy way to expand | ||
689 | 4 | # the bundle to see the effect of changes. | ||
690 | 5 | |||
691 | 6 | from argparse import ArgumentParser | ||
692 | 7 | import sys | ||
693 | 8 | |||
694 | 9 | from jinja2 import ( | ||
695 | 10 | Environment, | ||
696 | 11 | FileSystemLoader, | ||
697 | 12 | ) | ||
698 | 13 | import yaml | ||
699 | 14 | |||
700 | 15 | |||
701 | 16 | def main(): | ||
702 | 17 | parser = ArgumentParser() | ||
703 | 18 | parser.add_argument("stage_name", help="Mojo stage name") | ||
704 | 19 | args = parser.parse_args() | ||
705 | 20 | |||
706 | 21 | template_env = Environment(loader=FileSystemLoader(".")) | ||
707 | 22 | template = template_env.get_template("bundle.yaml") | ||
708 | 23 | rendered = template.render({ | ||
709 | 24 | "charm_dir": "fake-charm-dir", | ||
710 | 25 | "stage_name": args.stage_name, | ||
711 | 26 | }) | ||
712 | 27 | try: | ||
713 | 28 | yaml.safe_load(rendered) | ||
714 | 29 | except Exception as e: | ||
715 | 30 | print(f"Cannot parse rendered template: {e}", file=sys.stderr) | ||
716 | 31 | sys.exit(1) | ||
717 | 32 | print(rendered) | ||
718 | 33 | |||
719 | 34 | |||
720 | 35 | if __name__ == "__main__": | ||
721 | 36 | main() | ||
722 | diff --git a/vbuilder/manifest b/vbuilder/manifest | |||
723 | 0 | new file mode 100644 | 37 | new file mode 100644 |
724 | index 0000000..8e13254 | |||
725 | --- /dev/null | |||
726 | +++ b/vbuilder/manifest | |||
727 | @@ -0,0 +1,5 @@ | |||
728 | 1 | collect | ||
729 | 2 | bundle config=bundle.yaml local=secrets | ||
730 | 3 | script config=upgrade-charms | ||
731 | 4 | include config=manifest-secgroups | ||
732 | 5 | juju-check-wait | ||
733 | diff --git a/vbuilder/manifest-rebuild-images b/vbuilder/manifest-rebuild-images | |||
734 | 0 | new file mode 100644 | 6 | new file mode 100644 |
735 | index 0000000..dbb5cb1 | |||
736 | --- /dev/null | |||
737 | +++ b/vbuilder/manifest-rebuild-images | |||
738 | @@ -0,0 +1 @@ | |||
739 | 1 | script config=rebuild-images | ||
740 | diff --git a/vbuilder/manifest-secgroups b/vbuilder/manifest-secgroups | |||
741 | 0 | new file mode 100644 | 2 | new file mode 100644 |
742 | index 0000000..8c438ee | |||
743 | --- /dev/null | |||
744 | +++ b/vbuilder/manifest-secgroups | |||
745 | @@ -0,0 +1 @@ | |||
746 | 1 | script config=utils/custom-secgroups.py SKIP_STAGES=devel | ||
747 | diff --git a/vbuilder/rebuild-images b/vbuilder/rebuild-images | |||
748 | 0 | new file mode 100755 | 2 | new file mode 100755 |
749 | index 0000000..b4f8348 | |||
750 | --- /dev/null | |||
751 | +++ b/vbuilder/rebuild-images | |||
752 | @@ -0,0 +1,84 @@ | |||
753 | 1 | #! /usr/bin/python3 | ||
754 | 2 | |||
755 | 3 | import os | ||
756 | 4 | |||
757 | 5 | from utils import utils | ||
758 | 6 | |||
759 | 7 | |||
760 | 8 | name_prefix_by_stage = { | ||
761 | 9 | "qastaging": "launchpad-buildd-qastaging", | ||
762 | 10 | "staging": "launchpad-buildd-staging", | ||
763 | 11 | "production": "launchpad-buildd", | ||
764 | 12 | } | ||
765 | 13 | |||
766 | 14 | targets_by_stage = { | ||
767 | 15 | "qastaging": [ | ||
768 | 16 | ("bos01", "amd64", "focal"), | ||
769 | 17 | ("bos01", "arm64", "focal"), | ||
770 | 18 | ("bos01", "arm64-gpu", "focal"), | ||
771 | 19 | ("bos01", "ppc64el", "focal"), | ||
772 | 20 | ("bos01", "s390x", "focal"), | ||
773 | 21 | ("bos02", "arm64", "focal"), | ||
774 | 22 | ("bos02", "ppc64el", "focal"), | ||
775 | 23 | ("bos02", "s390x", "focal"), | ||
776 | 24 | ("bos03", "amd64", "focal"), | ||
777 | 25 | ("bos03", "arm64", "focal"), | ||
778 | 26 | ("bos03", "riscv64", "jammy"), | ||
779 | 27 | ("lcy02", "amd64", "focal"), | ||
780 | 28 | ], | ||
781 | 29 | "staging": [ | ||
782 | 30 | ("bos01", "amd64", "jammy"), | ||
783 | 31 | ("bos01", "arm64", "jammy"), | ||
784 | 32 | ("bos01", "arm64-gpu", "jammy"), | ||
785 | 33 | ("bos01", "ppc64el", "jammy"), | ||
786 | 34 | ("bos01", "s390x", "jammy"), | ||
787 | 35 | ("bos02", "arm64", "jammy"), | ||
788 | 36 | ("bos02", "ppc64el", "jammy"), | ||
789 | 37 | ("bos02", "s390x", "jammy"), | ||
790 | 38 | ("bos03", "amd64", "jammy"), | ||
791 | 39 | ("lcy02", "amd64", "jammy"), | ||
792 | 40 | ], | ||
793 | 41 | "production": [ | ||
794 | 42 | ("bos01", "amd64", "focal"), | ||
795 | 43 | ("bos01", "arm64", "focal"), | ||
796 | 44 | ("bos01", "ppc64el", "focal"), | ||
797 | 45 | ("bos01", "s390x", "focal"), | ||
798 | 46 | ("bos02", "arm64", "focal"), | ||
799 | 47 | ("bos02", "ppc64el", "focal"), | ||
800 | 48 | ("bos02", "s390x", "focal"), | ||
801 | 49 | ("bos03", "amd64", "focal"), | ||
802 | 50 | ("bos03", "arm64", "focal"), | ||
803 | 51 | ("bos03", "riscv64", "jammy"), | ||
804 | 52 | ("lcy02", "amd64", "focal"), | ||
805 | 53 | ], | ||
806 | 54 | } | ||
807 | 55 | |||
808 | 56 | |||
809 | 57 | def get_leader_unit(juju_services, application): | ||
810 | 58 | """Get the current leader unit for an application. | ||
811 | 59 | |||
812 | 60 | "juju run-action application/leader" sometimes reports "ERROR could not | ||
813 | 61 | determine leader for ..." even though a leader exists. Work around this. | ||
814 | 62 | """ | ||
815 | 63 | return next( | ||
816 | 64 | name for name, status in juju_services[application]["units"].items() | ||
817 | 65 | if status.get("leader", False)) | ||
818 | 66 | |||
819 | 67 | |||
820 | 68 | def main(): | ||
821 | 69 | stage = os.path.basename(os.environ["MOJO_STAGE"]) | ||
822 | 70 | name_prefix = name_prefix_by_stage[stage] | ||
823 | 71 | targets = targets_by_stage[stage] | ||
824 | 72 | juju_services = utils.juju_services() | ||
825 | 73 | for region, arch, series in targets: | ||
826 | 74 | application = f"glance-simplestreams-sync-{region}-{arch}" | ||
827 | 75 | unit = get_leader_unit(juju_services, application) | ||
828 | 76 | rebuild_cmd = [ | ||
829 | 77 | "juju", "ssh", unit, "sudo", "/usr/local/bin/rebuild-latest-image", | ||
830 | 78 | f"{name_prefix}/ubuntu-{series}-daily-{arch}-", | ||
831 | 79 | ] | ||
832 | 80 | utils.run(None, rebuild_cmd) | ||
833 | 81 | |||
834 | 82 | |||
835 | 83 | if __name__ == "__main__": | ||
836 | 84 | main() | ||
837 | diff --git a/vbuilder/upgrade-charms b/vbuilder/upgrade-charms | |||
838 | 0 | new file mode 100755 | 85 | new file mode 100755 |
839 | index 0000000..dcf96c6 | |||
840 | --- /dev/null | |||
841 | +++ b/vbuilder/upgrade-charms | |||
842 | @@ -0,0 +1,93 @@ | |||
843 | 1 | #! /usr/bin/python3 | ||
844 | 2 | |||
845 | 3 | import utils.check_version # noqa: F401 | ||
846 | 4 | |||
847 | 5 | import os.path | ||
848 | 6 | import subprocess | ||
849 | 7 | |||
850 | 8 | |||
851 | 9 | targets_by_stage = { | ||
852 | 10 | "qastaging": [ | ||
853 | 11 | ("bos01", "amd64"), | ||
854 | 12 | ("bos01", "arm64"), | ||
855 | 13 | ("bos01", "arm64-gpu"), | ||
856 | 14 | ("bos01", "ppc64el"), | ||
857 | 15 | ("bos01", "s390x"), | ||
858 | 16 | ("bos02", "arm64"), | ||
859 | 17 | ("bos02", "ppc64el"), | ||
860 | 18 | ("bos02", "s390x"), | ||
861 | 19 | ("bos03", "amd64"), | ||
862 | 20 | ("bos03", "arm64"), | ||
863 | 21 | ("bos03", "riscv64"), | ||
864 | 22 | ("lcy02", "amd64"), | ||
865 | 23 | ], | ||
866 | 24 | "staging": [ | ||
867 | 25 | ("bos01", "amd64"), | ||
868 | 26 | ("bos01", "arm64"), | ||
869 | 27 | ("bos01", "arm64-gpu"), | ||
870 | 28 | ("bos01", "ppc64el"), | ||
871 | 29 | ("bos01", "s390x"), | ||
872 | 30 | ("bos02", "arm64"), | ||
873 | 31 | ("bos02", "ppc64el"), | ||
874 | 32 | ("bos02", "s390x"), | ||
875 | 33 | ("bos03", "amd64"), | ||
876 | 34 | ("lcy02", "amd64"), | ||
877 | 35 | ], | ||
878 | 36 | "production": [ | ||
879 | 37 | ("bos01", "amd64"), | ||
880 | 38 | ("bos01", "arm64"), | ||
881 | 39 | ("bos01", "ppc64el"), | ||
882 | 40 | ("bos01", "s390x"), | ||
883 | 41 | ("bos02", "arm64"), | ||
884 | 42 | ("bos02", "ppc64el"), | ||
885 | 43 | ("bos02", "s390x"), | ||
886 | 44 | ("bos03", "amd64"), | ||
887 | 45 | ("bos03", "arm64"), | ||
888 | 46 | ("bos03", "riscv64"), | ||
889 | 47 | ("lcy02", "amd64"), | ||
890 | 48 | ], | ||
891 | 49 | } | ||
892 | 50 | |||
893 | 51 | |||
894 | 52 | upgraded = set() | ||
895 | 53 | |||
896 | 54 | |||
897 | 55 | def upgrade_charm(app_name, charm_name): | ||
898 | 56 | if app_name in upgraded: | ||
899 | 57 | return | ||
900 | 58 | subprocess.check_call( | ||
901 | 59 | [ | ||
902 | 60 | "juju", | ||
903 | 61 | "upgrade-charm", | ||
904 | 62 | app_name, | ||
905 | 63 | "--path=%s" | ||
906 | 64 | % os.path.join( | ||
907 | 65 | os.environ["MOJO_REPO_DIR"], | ||
908 | 66 | os.environ["MOJO_SERIES"], | ||
909 | 67 | charm_name, | ||
910 | 68 | ), | ||
911 | 69 | ] | ||
912 | 70 | ) | ||
913 | 71 | upgraded.add(app_name) | ||
914 | 72 | |||
915 | 73 | |||
916 | 74 | def main(): | ||
917 | 75 | stage = os.path.basename(os.environ["MOJO_STAGE"]) | ||
918 | 76 | targets = targets_by_stage[stage] | ||
919 | 77 | for region, arch in targets: | ||
920 | 78 | upgrade_charm( | ||
921 | 79 | f"glance-simplestreams-sync-{region}-{arch}", | ||
922 | 80 | "glance-simplestreams-sync", | ||
923 | 81 | ) | ||
924 | 82 | # lcy02-amd64 uses an anomalous name for this charm; we won't follow | ||
925 | 83 | # this pattern for future regions on amd64. | ||
926 | 84 | if (region, arch) == ("lcy02", "amd64"): | ||
927 | 85 | lbim_app_name = "launchpad-buildd-image-modifier-amd64" | ||
928 | 86 | else: | ||
929 | 87 | lbim_app_name = f"launchpad-buildd-image-modifier-{region}-{arch}" | ||
930 | 88 | upgrade_charm(lbim_app_name, "launchpad-buildd-image-modifier") | ||
931 | 89 | upgrade_charm(f"vbuilder-manage-{region}", "vbuilder-manage") | ||
932 | 90 | |||
933 | 91 | |||
934 | 92 | if __name__ == "__main__": | ||
935 | 93 | main() | ||
936 | diff --git a/vbuilder/utils b/vbuilder/utils | |||
937 | 0 | new file mode 120000 | 94 | new file mode 120000 |
938 | index 0000000..468ba70 | |||
939 | --- /dev/null | |||
940 | +++ b/vbuilder/utils | |||
941 | @@ -0,0 +1 @@ | |||
942 | 1 | ../utils | ||
943 | 0 | \ No newline at end of file | 2 | \ No newline at end of file |