Browse code

Install Juno RDO repos for RHEL7

RHEL7 does not include Open vSwitch in the default repos, but it
is available via the RDO repo. This patch automatically
configures the RDO repo for RHEL7.

Move this into the existing rhel6/rhel7 section. We update RHEl6 to
the latest icehouse release, but it is not supported with Juno

Closes-Bug: #1402390
Change-Id: I4707cf68e39d9e900ec6c01331d7e124c8c4f6c4

Zhang Jinnan authored on 2014/12/15 09:19:53
Showing 1 changed files
... ...
@@ -212,17 +212,6 @@ fi
212 212
 # Some distros need to add repos beyond the defaults provided by the vendor
213 213
 # to pick up required packages.
214 214
 
215
-if is_fedora && [ $DISTRO == "rhel6" ]; then
216
-    # Installing Open vSwitch on RHEL requires enabling the RDO repo.
217
-    RHEL6_RDO_REPO_RPM=${RHEL6_RDO_REPO_RPM:-"http://rdo.fedorapeople.org/openstack-icehouse/rdo-release-icehouse.rpm"}
218
-    RHEL6_RDO_REPO_ID=${RHEL6_RDO_REPO_ID:-"openstack-icehouse"}
219
-    if ! sudo yum repolist enabled $RHEL6_RDO_REPO_ID | grep -q $RHEL6_RDO_REPO_ID; then
220
-        echo "RDO repo not detected; installing"
221
-        yum_install $RHEL6_RDO_REPO_RPM || \
222
-            die $LINENO "Error installing RDO repo, cannot continue"
223
-    fi
224
-fi
225
-
226 215
 if is_fedora && [[ $DISTRO == "rhel6" || $DISTRO == "rhel7" ]]; then
227 216
     # RHEL requires EPEL for many Open Stack dependencies
228 217
 
... ...
@@ -269,6 +258,23 @@ EOF
269 269
         OPTIONAL_REPO=rhel-6-server-optional-rpms
270 270
     fi
271 271
     sudo yum-config-manager --enable ${OPTIONAL_REPO}
272
+
273
+    # Installing Open vSwitch on RHEL requires enabling the RDO repo.
274
+    # Note no juno packages for rhel6
275
+    if [[ $DISTRO == "rhel6" ]]; then
276
+        RHEL_RDO_REPO_RPM=${RHEL6_RDO_REPO_RPM:-"https://repos.fedorapeople.org/repos/openstack/openstack-icehouse/rdo-release-icehouse-4.noarch.rpm"}
277
+        RHEL_RDO_REPO_ID=${RHEL6_RDO_REPO_ID:-"openstack-icehouse"}
278
+    elif [[ $DISTRO == "rhel7" ]]; then
279
+        RHEL_RDO_REPO_RPM=${RHEL7_RDO_REPO_RPM:-"https://repos.fedorapeople.org/repos/openstack/openstack-juno/rdo-release-juno-1.noarch.rpm"}
280
+        RHEL_RDO_REPO_ID=${RHEL7_RDO_REPO_ID:-"openstack-juno"}
281
+    fi
282
+
283
+    if ! sudo yum repolist enabled $RHEL_RDO_REPO_ID | grep -q $RHEL_RDO_REPO_ID; then
284
+        echo "RDO repo not detected; installing"
285
+        yum_install $RHEL_RDO_REPO_RPM || \
286
+            die $LINENO "Error installing RDO repo, cannot continue"
287
+    fi
288
+
272 289
 fi
273 290
 
274 291