diskimage-builder/elements/quantum-api/install.d/05-quantum-api
Tim Miller d25f89ad12 Install quantum-api from github.
Change-Id: If7ae61bce1ee263077ecd3e49beab4e5c8f97cf2
2012-12-18 12:33:48 -08:00

35 lines
1.0 KiB
Bash
Executable File

#!/bin/sh
set -e
set -o xtrace
useradd -G admin -m quantum -s /bin/false
DEBIAN_FRONTEND=noninteractive apt-get -y install \
python-pip git-core python-setuptools python-dev python-lxml python-netaddr \
python-pastescript python-pastedeploy python-paste python-sqlalchemy \
python-greenlet python-routes python-simplejson python-webob rabbitmq-server
OS_ROOT=/opt/stack
mkdir -p $OS_ROOT
# clone source
QUANTUM_ROOT=$OS_ROOT/quantum
git clone https://github.com/openstack/quantum.git $QUANTUM_ROOT
cd $QUANTUM_ROOT
git checkout master
# pip dependencies
python setup.py egg_info
pip install -r quantum.egg-info/requires.txt
python setup.py install
cd -
# config
mkdir -p /etc/quantum
cp $QUANTUM_ROOT/etc/quantum.conf /etc/quantum
cp $QUANTUM_ROOT/etc/policy.json /etc/quantum
cp $QUANTUM_ROOT/etc/api-paste.ini /etc/quantum
# default is 'fake plugin', with which service won't start
sed -i 's/core_plugin =.*/core_plugin = quantum.plugins.openvswitch.ovs_quantum_plugin.OVSQuantumPluginV2/' /etc/quantum/quantum.conf