Add glance-api element.

Change-Id: I277b353fbbed59823335c8b27e875c4417e2643d
This commit is contained in:
Tim Miller 2012-12-13 15:48:18 -08:00
parent 012116cad6
commit 2fcb64ee77
4 changed files with 51 additions and 0 deletions

View File

@ -0,0 +1,2 @@
Installs the Glance API Service from github.

View File

@ -0,0 +1,7 @@
#!/bin/bash
set -e
set -o xtrace
# upstart script
cp -f $(dirname $0)/etc_init_glance-api.conf /etc/init/glance-api.conf

View File

@ -0,0 +1,9 @@
description "OpenStack Glance API service"
start on (local-filesystems and net-device-up IFACE!=lo)
stop on runlevel [016]
respawn
exec su -s /bin/sh -c "exec /opt/stack/glance/bin/glance-api --config-file /etc/glance/glance-api.conf --log-config /etc/glance/logging.conf"

View File

@ -0,0 +1,33 @@
#!/bin/sh
# install glance-api
set -e
set -o xtrace
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
GLANCE_ROOT=$OS_ROOT/glance
git clone https://github.com/openstack/glance.git $GLANCE_ROOT
cd $GLANCE_ROOT
git checkout master
# pip dependencies
python setup.py egg_info
pip install -r glance.egg-info/requires.txt
cd -
# config
mkdir -p /etc/glance
cp $GLANCE_ROOT/etc/glance-api.conf /etc/glance
cp $GLANCE_ROOT/etc/policy.json /etc/glance
cp $GLANCE_ROOT/etc/glance-api-paste.ini /etc/glance
cp $GLANCE_ROOT/etc/logging.cnf.sample /etc/glance/logging.conf