Files
tripleo-image-elements/elements/boot-stack/install.d/01-boot-stack
Tim Miller c4f4495ac7 Install pip requirements from pypi.openstack.org.
While `setup.py`s were being installed from the openstack
pypi mirror, `pip-requires` were coming from pypi.python.org,
which has been observed to be less stable.

This change installs all pip-requires via pypi.openstack.org.

Change-Id: Id78110232f1f6cbce63fbe02c63f30c0e1953212
2013-04-12 10:54:37 -07:00

70 lines
1.9 KiB
Bash
Executable File

#!/bin/bash
set -eux
install-packages git build-essential python-dev
install-packages tgt busybox # to run diskimage-builder for deploy ramdisk
install -m 0755 -o root -g root -d /opt/stack/boot-stack
echo 'nameserver 8.8.8.8' > /etc/resolvconf/resolv.conf.d/head
# fake heat metadata
mkdir -p /var/lib/cloud/data
install -m 0755 -o root -g root $(dirname $0)/../config.json /var/lib/cloud/data/cfn-init-data
# tools
for f in `ls $(dirname $0)/../bin`; do
install -m 0755 -o root -g root $(dirname $0)/../bin/$f /usr/local/bin/$f
done
# openstack creds
# TODO: generate random creds.
install -m 0755 -o root -g root $(dirname $0)/../stackrc /root/stackrc
echo "source /root/stackrc" >> /root/.bash_profile
# client tools
for client in nova quantum glance; do
repo=python-${client}client
venvs=/opt/stack/venvs
git clone --depth 1 https://github.com/openstack/$repo.git /opt/stack/$repo
# required for a cliff version conflict. this can be removed once cliff will accept prettytable >0.7
pip install cliff
pushd /opt/stack/$repo
if [ -e tools/pip-requires ]; then
PIP_INDEX_URL=http://pypi.openstack.org/openstack/ \
pip install -r tools/pip-requires
fi
python setup.py develop --script-dir /usr/local/bin
popd
done
# image toolchain
git clone https://github.com/stackforge/diskimage-builder.git /opt/stack/diskimage-builder
# rabbit
install-packages rabbitmq-server
# db
install-packages mysql-server python-mysqldb
sed -i 's/127.0.0.1/0.0.0.0/g' /etc/mysql/my.cnf
function deps {
apt-get update
install-packages screen ccze
install-packages git ipmitool python-dev python-pip python-greenlet python-mysqldb libxml2-dev libxslt-dev python-zmq
install-packages openvswitch-common openvswitch-controller openvswitch-switch open-iscsi
install-packages python-numpy python-lxml
}
function ip_forwarding {
cat > /etc/sysctl.conf <<eof
net.ipv4.ip_forward=1
eof
}
deps
ip_forwarding