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