install ovs2.5 in devstack images
[releng/builder.git] / packer / provision / devstack-pre-pip.sh
1 #!/bin/bash
2
3 echo '---> Installing non-baseline requirements'
4 yum install -y deltarpm nc python{,-{crypto,devel,lxml,setuptools}} \
5     @development {lib{xml2,xslt,ffi},openssl}-devel git wget
6
7 echo '---> Updating net link setup'
8 if [ ! -f /etc/udev/rules.d/80-net-setup-link.rules ]; then
9     ln -s /dev/null /etc/udev/rules.d/80-net-setup-link.rules
10 fi
11
12 echo '---> Pre-installing yum and pip packages'
13 projs="requirements keystone glance cinder neutron nova horizon"
14 branch=${os_branch}
15
16 wget https://bootstrap.pypa.io/get-pip.py
17 python get-pip.py
18
19 mkdir tmp
20 cd tmp
21
22 git clone https://github.com/openstack-dev/devstack.git
23 (cd devstack && git checkout ${branch})
24 sed -e 's/#.*//' devstack/files/rpms/general | xargs yum install -y
25
26 base_url=https://github.com/openstack/
27 for proj in $projs
28 do
29     git clone ${base_url}${proj}
30     (cd ${proj} && git checkout ${branch})
31     pip install -c requirements/upper-constraints.txt -e ${proj}
32     pip install -c requirements/upper-constraints.txt -r ${proj}/test-requirements.txt
33 done
34
35 echo '---> Installing openvswitch from openstack repo'
36 # the newton release has ovs 2.5.0
37 yum install -y http://rdoproject.org/repos/openstack-newton/rdo-release-newton.rpm
38 yum install -y --nogpgcheck openvswitch
39
40 cd $OLDPWD
41 rm -fr tmp
42
43 # vim: sw=4 ts=4 sts=4 et :