diff --git a/modules/openstack_project/files/nodepool/scripts/prepare_devstack.sh b/modules/openstack_project/files/nodepool/scripts/prepare_devstack.sh index c1331a3698..0e46802e78 100755 --- a/modules/openstack_project/files/nodepool/scripts/prepare_devstack.sh +++ b/modules/openstack_project/files/nodepool/scripts/prepare_devstack.sh @@ -18,10 +18,18 @@ mkdir -p ~/cache/files mkdir -p ~/cache/pip -sudo DEBIAN_FRONTEND=noninteractive apt-get \ - --option "Dpkg::Options::=--force-confold" \ - --assume-yes install build-essential python-dev \ - linux-headers-virtual linux-headers-`uname -r` + +if [ -f /usr/bin/yum ]; then + sudo yum -y install python-devel make automake gcc gcc-c++ kernel-devel redhat-lsb-core +elif [ -f /usr/bin/apt-get ]; then + sudo DEBIAN_FRONTEND=noninteractive apt-get \ + --option "Dpkg::Options::=--force-confold" \ + --assume-yes install build-essential python-dev \ + linux-headers-virtual linux-headers-`uname -r` +else + echo "Unsupported distro." + exit 1 +fi rm -rf ~/workspace-cache mkdir -p ~/workspace-cache @@ -61,7 +69,8 @@ git clone https://review.openstack.org/p/openstack/tempest git clone https://review.openstack.org/p/stackforge/pecan git clone https://review.openstack.org/p/stackforge/wsme -. /etc/lsb-release +DISTRIB_CODENAME=`lsb_release -sc` + cd /opt/nodepool-scripts/ python ./devstack-cache.py $DISTRIB_CODENAME