Skip to content

Commit 2c046ae

Browse files
mnasiadkaAlex-Welsh
authored andcommitted
repos: Deduplicate repos.yaml
Introduce rpm/deb entry in repos.yaml, create a structure [base_package_type]: [base_distro]: [base_distro-$arch] Allow any of these to be undefined, defaulting to empty dict This allows to deduplicate entries between distros of the same base_package_type (rpm/deb) Sort repos.yaml Change-Id: Ifc351d5d612e6c6cc82be282aed179c656ae252c Signed-off-by: Michal Nasiadka <[email protected]>
1 parent 9179f15 commit 2c046ae

File tree

2 files changed

+74
-169
lines changed

2 files changed

+74
-169
lines changed

kolla/template/methods.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,9 @@ def handle_repos(context, reponames, mode):
126126
commands = ''
127127

128128
try:
129-
repo_list = repo_data[base_distro] | \
130-
repo_data['%s-%s' % (base_distro, base_arch)]
129+
repo_list = repo_data.get(base_package_type, dict()) | \
130+
repo_data.get(base_distro, dict()) | \
131+
repo_data.get('%s-%s' % (base_distro, base_arch), dict())
131132
except KeyError:
132133
# NOTE(hrw): Fallback to distro list
133134
repo_list = repo_data[base_distro]

kolla/template/repos.yaml

Lines changed: 71 additions & 167 deletions
Original file line numberDiff line numberDiff line change
@@ -1,107 +1,8 @@
11
---
2-
centos:
3-
ceph:
4-
gpgkey: "https://www.centos.org/keys/RPM-GPG-KEY-CentOS-SIG-Storage"
5-
metalink: "https://mirrors.centos.org/metalink?repo=centos-storage-sig-ceph-squid-9-stream&arch=$basearch"
6-
name: "centos-ceph-squid"
7-
crb:
8-
distro: True
9-
name: "crb"
10-
docker-ce:
11-
gpgkey: "https://download.docker.com/linux/centos/gpg"
12-
baseurl: "https://download.docker.com/linux/centos/$releasever/$basearch/stable"
13-
name: "docker-ce"
14-
epel:
15-
gpgkey: "https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-$releasever"
16-
metalink: "https://mirrors.fedoraproject.org/metalink?repo=epel-$releasever&arch=$basearch&infra=$infra&content=$contentdir"
17-
name: "epel"
18-
erlang:
19-
baseurl: |
20-
https://yum1.rabbitmq.com/erlang/el/9/$basearch
21-
https://yum2.rabbitmq.com/erlang/el/9/$basearch
22-
gpgkey: "https://github.com/rabbitmq/signing-keys/releases/download/3.0/cloudsmith.rabbitmq-erlang.E495BB49CC4BBE5B.key"
23-
name: "rabbitmq_rabbitmq-erlang"
24-
extras:
25-
distro: True
26-
name: "extras"
27-
fluentd:
28-
baseurl: "https://fluentd.cdn.cncf.io/lts/6/redhat/$releasever/$basearch"
29-
gpgkey: "https://fluentd.cdn.cncf.io/GPG-KEY-fluent-package"
30-
name: "fluent-package-lts"
31-
grafana:
32-
baseurl: "https://rpm.grafana.com"
33-
gpgkey: "https://rpm.grafana.com/gpg.key"
34-
name: "grafana"
35-
hacluster:
36-
name: "highavailability"
37-
distro: true
38-
influxdb:
39-
baseurl: "https://repos.influxdata.com/rhel/9/$basearch/stable"
40-
gpgkey: "https://repos.influxdata.com/influxdata-archive_compat.key"
41-
name: "influxdb"
42-
kolla_el10:
43-
baseurl: "https://download.copr.fedorainfracloud.org/results/@openstack-kolla/el10-missing/epel-10-$basearch/"
44-
gpgkey: "https://download.copr.fedorainfracloud.org/results/@openstack-kolla/el10-missing/pubkey.gpg"
45-
name: "kolla_el10"
46-
mariadb:
47-
baseurl: "https://dlm.mariadb.com/repo/mariadb-server/10.11/yum/rhel/$releasever/$basearch"
48-
gpgkey: "https://downloads.mariadb.com/MariaDB/RPM-GPG-KEY-MariaDB"
49-
name: "mariadb"
50-
opensearch:
51-
baseurl: "https://artifacts.opensearch.org/releases/bundle/opensearch/3.x/yum"
52-
gpgkey: "https://artifacts.opensearch.org/publickeys/opensearch-release.pgp"
53-
repo_gpgcheck: 1
54-
name: "opensearch32.x"
55-
opensearch-dashboards:
56-
baseurl: "https://artifacts.opensearch.org/releases/bundle/opensearch-dashboards/3.x/yum"
57-
gpgkey: "https://artifacts.opensearch.org/publickeys/opensearch-release.pgp"
58-
repo_gpgcheck: 1
59-
name: "opensearch-dashboards-3.x"
60-
openvswitch:
61-
gpgkey: "https://www.centos.org/keys/RPM-GPG-KEY-CentOS-SIG-NFV"
62-
metalink: "https://mirrors.centos.org/metalink?repo=centos-nfv-sig-openvswitch-2-$stream&arch=$basearch&protocol=https,http"
63-
name: "centos-nfv-openvswitch"
64-
opstools:
65-
distro: True
66-
name: "opstools"
67-
proxysql:
68-
baseurl: "https://repo.proxysql.com/ProxySQL/proxysql-3.0.x/almalinux/9"
69-
gpgkey: "https://repo.proxysql.com/ProxySQL/proxysql-3.0.x/repo_pub_key"
70-
name: "proxysql"
71-
rabbitmq:
72-
baseurl: |
73-
https://yum1.rabbitmq.com/rabbitmq/el/9/noarch
74-
https://yum2.rabbitmq.com/rabbitmq/el/9/noarch
75-
gpgkey: |
76-
https://github.com/rabbitmq/signing-keys/releases/download/3.0/cloudsmith.rabbitmq-server.9F4587F226208342.key
77-
https://github.com/rabbitmq/signing-keys/releases/download/3.0/rabbitmq-release-signing-key.asc
78-
name: "rabbitmq_rabbitmq-server"
79-
80-
centos-aarch64:
81-
erlang:
82-
baseurl: "https://download.copr.fedorainfracloud.org/results/@openstack-kolla/rabbitmq-erlang-27/rhel-$releasever-aarch64/"
83-
gpgkey: "https://download.copr.fedorainfracloud.org/results/@openstack-kolla/rabbitmq-erlang-27/pubkey.gpg"
84-
name: "copr-rabbitmq-erlang"
85-
862
# NOTE(mnasiadka): For RabbitMQ Debuntu suite names is following:
873
# https://www.rabbitmq.com/install-debian.html#apt-cloudsmith
884

89-
debian:
90-
docker-ce:
91-
url: "https://download.docker.com/linux/debian"
92-
suite: "bookworm"
93-
component: "stable"
94-
gpg_key: "docker-ce.asc"
95-
erlang:
96-
url: "https://ppa.launchpadcontent.net/rabbitmq/rabbitmq-erlang/ubuntu"
97-
suite: "jammy"
98-
component: "main"
99-
gpg_key: "erlang-ppa.gpg"
100-
fluentd:
101-
url: "https://fluentd.cdn.cncf.io/lts/6/debian/bookworm"
102-
suite: "bookworm"
103-
component: "contrib"
104-
gpg_key: "fluentd.asc"
5+
deb:
1056
grafana:
1067
url: "https://apt.grafana.com"
1078
suite: "stable"
@@ -112,11 +13,6 @@ debian:
11213
suite: "jammy"
11314
component: "stable"
11415
gpg_key: "influxdb.asc"
115-
mariadb:
116-
url: "https://dlm.mariadb.com/repo/mariadb-server/10.11.13/repo/debian"
117-
suite: "bookworm"
118-
component: "main"
119-
gpg_key: "mariadb.gpg"
12016
opensearch:
12117
url: "https://artifacts.opensearch.org/releases/bundle/opensearch/3.x/apt/"
12218
suite: "stable"
@@ -127,6 +23,28 @@ debian:
12723
suite: "stable"
12824
component: "main"
12925
gpg_key: "opensearch.asc"
26+
27+
debian:
28+
erlang:
29+
url: "https://ppa.launchpadcontent.net/rabbitmq/rabbitmq-erlang/ubuntu"
30+
suite: "jammy"
31+
component: "main"
32+
gpg_key: "erlang-ppa.gpg"
33+
docker-ce:
34+
url: "https://download.docker.com/linux/debian"
35+
suite: "bookworm"
36+
component: "stable"
37+
gpg_key: "docker-ce.asc"
38+
fluentd:
39+
url: "https://fluentd.cdn.cncf.io/lts/6/debian/bookworm"
40+
suite: "bookworm"
41+
component: "contrib"
42+
gpg_key: "fluentd.asc"
43+
mariadb:
44+
url: "https://dlm.mariadb.com/repo/mariadb-server/10.11/repo/debian"
45+
suite: "bookworm"
46+
component: "main"
47+
gpg_key: "mariadb.gpg"
13048
proxysql:
13149
url: "https://repo.proxysql.com/ProxySQL/proxysql-3.0.x/bookworm/"
13250
suite: "./"
@@ -148,7 +66,49 @@ debian-aarch64:
14866
arch: "amd64"
14967
gpg_key: "rabbitmq.gpg"
15068

151-
rocky:
69+
ubuntu:
70+
erlang:
71+
url: "https://ppa.launchpadcontent.net/rabbitmq/rabbitmq-erlang/ubuntu"
72+
suite: "noble"
73+
component: "main"
74+
gpg_key: "erlang-ppa.gpg"
75+
docker-ce:
76+
url: "https://download.docker.com/linux/ubuntu"
77+
suite: "noble"
78+
component: "stable"
79+
gpg_key: "docker-ce.asc"
80+
fluentd:
81+
url: "https://fluentd.cdn.cncf.io/lts/6/ubuntu/noble"
82+
suite: "noble"
83+
component: "contrib"
84+
gpg_key: "fluentd.asc"
85+
mariadb:
86+
url: "https://dlm.mariadb.com/repo/mariadb-server/10.11/repo/ubuntu"
87+
suite: "noble"
88+
component: "main"
89+
gpg_key: "mariadb.gpg"
90+
proxysql:
91+
url: "https://repo.proxysql.com/ProxySQL/proxysql-3.0.x/noble/"
92+
suite: "./"
93+
component: ""
94+
gpg_key: "proxysql.asc"
95+
rabbitmq:
96+
url: "https://ppa1.rabbitmq.com/rabbitmq/rabbitmq-server/deb/ubuntu"
97+
suite: "noble"
98+
component: "main"
99+
gpg_key: "rabbitmq.gpg"
100+
101+
ubuntu-aarch64:
102+
rabbitmq:
103+
url: "https://ppa1.rabbitmq.com/rabbitmq/rabbitmq-server/deb/ubuntu"
104+
suite: "noble"
105+
component: "main"
106+
# NOTE(mnasiadka): Since rabbitmq is really noarch and community mirror is not
107+
# syncing binary-aarch64 - we're using amd64 here.
108+
arch: "amd64"
109+
gpg_key: "rabbitmq.gpg"
110+
111+
rpm:
152112
ceph:
153113
gpgkey: "https://www.centos.org/keys/RPM-GPG-KEY-CentOS-SIG-Storage"
154114
metalink: "https://mirrors.centos.org/metalink?repo=centos-storage-sig-ceph-squid-9-stream&arch=$basearch"
@@ -226,71 +186,15 @@ rocky:
226186
https://github.com/rabbitmq/signing-keys/releases/download/3.0/rabbitmq-release-signing-key.asc
227187
name: "rabbitmq_rabbitmq-server"
228188

229-
rocky-aarch64:
189+
centos-aarch64:
230190
erlang:
231191
baseurl: "https://download.copr.fedorainfracloud.org/results/@openstack-kolla/rabbitmq-erlang-27/rhel-$releasever-aarch64/"
232192
gpgkey: "https://download.copr.fedorainfracloud.org/results/@openstack-kolla/rabbitmq-erlang-27/pubkey.gpg"
233193
name: "copr-rabbitmq-erlang"
234194

235-
ubuntu:
236-
docker-ce:
237-
url: "https://download.docker.com/linux/ubuntu"
238-
suite: "noble"
239-
component: "stable"
240-
gpg_key: "docker-ce.asc"
195+
rocky-aarch64:
241196
erlang:
242-
url: "https://ppa.launchpadcontent.net/rabbitmq/rabbitmq-erlang/ubuntu"
243-
suite: "noble"
244-
component: "main"
245-
gpg_key: "erlang-ppa.gpg"
246-
fluentd:
247-
url: "https://fluentd.cdn.cncf.io/lts/6/ubuntu/noble"
248-
suite: "noble"
249-
component: "contrib"
250-
gpg_key: "fluentd.asc"
251-
grafana:
252-
url: "https://apt.grafana.com"
253-
suite: "stable"
254-
component: "main"
255-
gpg_key: "grafana.asc"
256-
influxdb:
257-
url: "https://repos.influxdata.com/ubuntu"
258-
# TODO(mnasiadka): Switch to noble when available
259-
suite: "jammy"
260-
component: "stable"
261-
gpg_key: "influxdb.asc"
262-
mariadb:
263-
url: "https://dlm.mariadb.com/repo/mariadb-server/10.11.13/repo/ubuntu"
264-
suite: "noble"
265-
component: "main"
266-
gpg_key: "mariadb.gpg"
267-
opensearch:
268-
url: "https://artifacts.opensearch.org/releases/bundle/opensearch/3.x/apt/"
269-
suite: "stable"
270-
component: "main"
271-
gpg_key: "opensearch.asc"
272-
opensearch-dashboards:
273-
url: "https://artifacts.opensearch.org/releases/bundle/opensearch-dashboards/3.x/apt/"
274-
suite: "stable"
275-
component: "main"
276-
gpg_key: "opensearch.asc"
277-
proxysql:
278-
url: "https://repo.proxysql.com/ProxySQL/proxysql-3.0.x/noble/"
279-
suite: "./"
280-
component: ""
281-
gpg_key: "proxysql.asc"
282-
rabbitmq:
283-
url: "https://ppa1.rabbitmq.com/rabbitmq/rabbitmq-server/deb/ubuntu"
284-
suite: "noble"
285-
component: "main"
286-
gpg_key: "rabbitmq.gpg"
197+
baseurl: "https://download.copr.fedorainfracloud.org/results/@openstack-kolla/rabbitmq-erlang-27/rhel-$releasever-aarch64/"
198+
gpgkey: "https://download.copr.fedorainfracloud.org/results/@openstack-kolla/rabbitmq-erlang-27/pubkey.gpg"
199+
name: "copr-rabbitmq-erlang"
287200

288-
ubuntu-aarch64:
289-
rabbitmq:
290-
url: "https://ppa1.rabbitmq.com/rabbitmq/rabbitmq-server/deb/debian"
291-
suite: "noble"
292-
component: "main"
293-
# NOTE(mnasiadka): Since rabbitmq is really noarch and community mirror is not
294-
# syncing binary-aarch64 - we're using amd64 here.
295-
arch: "amd64"
296-
gpg_key: "rabbitmq.gpg"

0 commit comments

Comments
 (0)