Browse code

Ensure Open vSwitch can be installed on RHEL6.

* RHEL6 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 RHEL6.
* The openvswitch package is now listed as an rpm dependency to
ensure it can be cached by a pre-built CI environment.

Change-Id: I8f93f53039cca4ff29bcb91720be7bb047b3ed8a

Maru Newby authored on 2013/05/16 06:28:29
Showing 2 changed files
... ...
@@ -4,6 +4,7 @@ ebtables
4 4
 iptables
5 5
 iputils
6 6
 mysql-server # NOPRIME
7
+openvswitch # NOPRIME
7 8
 python-boto
8 9
 python-eventlet
9 10
 python-greenlet
... ...
@@ -32,6 +32,12 @@ source $TOP_DIR/functions
32 32
 # and ``DISTRO``
33 33
 GetDistro
34 34
 
35
+
36
+# Configure non-default repos
37
+# ===========================
38
+
39
+# Repo configuration needs to occur before package installation.
40
+
35 41
 # Some dependencies are not available in Debian Wheezy official
36 42
 # repositories. However, it's possible to run OpenStack from gplhost
37 43
 # repository.
... ...
@@ -42,6 +48,17 @@ if [[ "$os_VENDOR" =~ (Debian) ]]; then
42 42
     apt_get install --force-yes gplhost-archive-keyring
43 43
 fi
44 44
 
45
+# Installing Open vSwitch on RHEL6 requires enabling the RDO repo.
46
+RHEL6_RDO_REPO_RPM=${RHEL6_RDO_REPO_RPM:-"http://rdo.fedorapeople.org/openstack/openstack-grizzly/rdo-release-grizzly-3.noarch.rpm"}
47
+RHEL6_RDO_REPO_ID=${RHEL6_RDO_REPO_ID:-"openstack-grizzly"}
48
+if [[ is_fedora && $DISTRO =~ (rhel6) ]]; then
49
+    if ! yum repolist enabled $RHEL6_RDO_REPO_ID | grep -q $RHEL6_RDO_REPO_ID; then
50
+        echo "RDO repo not detected; installing"
51
+        yum_install $RHEL6_RDO_REPO_RPM
52
+    fi
53
+fi
54
+
55
+
45 56
 # Global Settings
46 57
 # ===============
47 58