diskimage-builder/elements/nova-api/install.d/05-nova-api
Tim Miller 89b245c604 Install nova-api from github.
Change-Id: If3b2818386a58a5effcfb3cc93579dc296536733
2012-12-20 15:04:34 -08:00

40 lines
1.0 KiB
Bash
Executable File

#!/bin/sh
set -eux
useradd -G admin -m nova -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
NOVA_ROOT=$OS_ROOT/nova
git clone https://github.com/openstack/nova.git $NOVA_ROOT
cd $NOVA_ROOT
git checkout master
# pip dependencies
python setup.py egg_info
pip install -r nova.egg-info/requires.txt
cd -
SYS_DIRS="/etc/nova /var/log/nova $NOVA_ROOT/keys"
for d in $SYS_DIRS; do
mkdir -p $d
chown nova:nova $d
done
# config
cp $NOVA_ROOT/etc/nova/nova.conf.sample /etc/nova/nova.conf
cp $NOVA_ROOT/etc/nova/logging_sample.conf /etc/nova/logging.conf
cp $NOVA_ROOT/etc/nova/api-paste.ini /etc/nova
cp $NOVA_ROOT/etc/nova/policy.json /etc/nova
# upstart script
cp -f $(dirname $0)/../upstart/nova-api.conf /etc/init