Browse Source

Vendor the RDO repository configuration for installing OVS

Installing OVS on CentOS requires one RDO repository and the
centos-release-openstack packages sets up two additional repos which
aren't required.

In addition, we removed the centos-release-openstack package but this
did not remove the two extra repositories, causing them to "leak" into
the jobs.

This sets up the one repository we need and ensures it is removed after
OVS is installed.

Change-Id: Ida2299a4356282d23b79fac6753b6171211a7651
changes/17/624817/4
David Moreau Simard 6 months ago
parent
commit
68375810ee
No account linked to committer's email address

+ 20
- 0
roles/multi-node-bridge/files/RPM-GPG-KEY-CentOS-SIG-Cloud View File

@@ -0,0 +1,20 @@
1
+-----BEGIN PGP PUBLIC KEY BLOCK-----
2
+Version: GnuPG v2.0.22 (GNU/Linux)
3
+
4
+mQENBFVWcCcBCACfm3eQ0526/I0/p7HpR0NjK7K307XHhnbcbZv1sDUjQABDaqh0
5
+N4gnZcovf+3fj6pcdOmeOpGI0cKE7Fh68RbEIqyjB7l7+j1grjewR0oCFFZ38KGm
6
+j+DWQrj1IJW7JU5fH/G0Cu66ix+dJPcuTB3PJTqXN3ce+4TuG09D+epgwfbHlqaT
7
+pH2qHCu2uiGj/AaRSM/ZZzcInMaeleHSB+NChvaQ0W/m+kK5d/20d7sfkaTfI/pY
8
+SrodCfVTYxfKAd0TLW03kimHs5/Rdz+iZWecVKv6aFxzaywbrOjmOsy2q0kEWIwX
9
+MTZrq6cBRRuWyiXsI2zT2YHQ4UK44IxINiaJABEBAAG0WkNlbnRPUyBDbG91ZCBT
10
+SUcgKGh0dHA6Ly93aWtpLmNlbnRvcy5vcmcvU3BlY2lhbEludGVyZXN0R3JvdXAv
11
+Q2xvdWQpIDxzZWN1cml0eUBjZW50b3Mub3JnPokBOQQTAQIAIwUCVVZwJwIbAwcL
12
+CQgHAwIBBhUIAgkKCwQWAgMBAh4BAheAAAoJEPm5/ud2RCnmATUH/3HDtWxpFkmy
13
+FiA3VGkMt5dp3bgCRSd84X6Orfx1LARowpI4LomCGglGBGXVJePBacwcclorbLaz
14
+uWrW/wU0efz0aDB5c4NPg/yXfNvujvlda8ADJwZXVBQphzvaIKwl4PqBsEnxC10I
15
+93T/0iyphAhfMRJ5R8AbEHMj7uF+TWTX/JoyQagllMqWTwoP4DFRutPdOmmjwvSV
16
+kWItH7hq6z9+M4dhlqeoOvPbL5oCxX7TVmLck02Q5gI4syULOa7sqntzUQKFkhWp
17
+9U0+5KrBQBKezrurrrkq/WZR3WNE1KQfNQ77f7S2JcXJdOaKgJ7xe7Y2flPq98Aq
18
+wKXK7l1c3dc=
19
+=W6yF
20
+-----END PGP PUBLIC KEY BLOCK-----

+ 24
- 14
roles/multi-node-bridge/tasks/common.yaml View File

@@ -5,17 +5,23 @@
5 5
     - "{{ ansible_os_family }}.yaml"
6 6
     - "default.yaml"
7 7
 
8
-# CentOS requires repositories provided by centos in order to install
9
-# openvswitch, set them up.
10
-- name: Enable centos-release-openstack-queens
11
-  become: yes
12
-  package:
13
-    name: centos-release-openstack-queens
14
-    state: installed
15
-  when:
8
+# openvswitch for CentOS is available from the RDO repositories.
9
+# We're setting it up manually to prevent centos-release-openstack or rdo-release
10
+# from installing repositories we don't need.
11
+- when:
16 12
     - ansible_os_family == "RedHat"
17 13
     - ansible_distribution != "Fedora"
18
-  register: centos_ovs
14
+  become: yes
15
+  block:
16
+    - name: Set up RDO GPG key
17
+      copy:
18
+        src: RPM-GPG-KEY-CentOS-SIG-Cloud
19
+        dest: /tmp/RPM-GPG-KEY-CentOS-SIG-Cloud
20
+
21
+    - name: Set up RDO repository
22
+      template:
23
+        src: zuul-multi-node-bridge-ovs.repo.j2
24
+        dest: /etc/yum.repos.d/zuul-multi-node-bridge-ovs.repo
19 25
 
20 26
 - name: Set package.use values for OVS on Gentoo
21 27
   become: yes
@@ -42,13 +48,17 @@
42 48
     state: started
43 49
     enabled: yes
44 50
 
45
-# If we've installed repositories for openvswitch earlier, remove them
46
-- name: Ensure centos-release-openstack-queens is removed
51
+- name: Remove RDO repository files
47 52
   become: yes
48
-  package:
49
-    name: "centos-release-openstack-queens"
53
+  file:
54
+    path: "{{ item }}"
50 55
     state: absent
51
-  when: centos_ovs | changed
56
+  with_items:
57
+    - /tmp/RPM-GPG-KEY-CentOS-SIG-Cloud
58
+    - /etc/yum.repos.d/zuul-multi-node-bridge-ovs.repo
59
+  when:
60
+    - ansible_os_family == "RedHat"
61
+    - ansible_distribution != "Fedora"
52 62
 
53 63
 - name: Authorize the multi-node-bridge network
54 64
   become: yes

+ 11
- 0
roles/multi-node-bridge/templates/zuul-multi-node-bridge-ovs.repo.j2 View File

@@ -0,0 +1,11 @@
1
+# Vendored from rdo-release: https://github.com/rdo-infra/rdo-release
2
+[centos-openstack-queens]
3
+name=CentOS OpenStack Queens Repository
4
+{% if zuul_site_mirror_fqdn is defined %}
5
+baseurl=http://{{ zuul_site_mirror_fqdn }}/centos/7/cloud/$basearch/openstack-queens/
6
+{% else %}
7
+baseurl=http://mirror.centos.org/centos/7/cloud/$basearch/openstack-queens/
8
+{% endif %}
9
+gpgcheck=1
10
+enabled=1
11
+gpgkey=file:///tmp/RPM-GPG-KEY-CentOS-SIG-Cloud

Loading…
Cancel
Save