Merge "Add glance-api element."

This commit is contained in:
Jenkins 2012-12-18 16:14:57 +00:00 committed by Gerrit Code Review
commit 804e94b5eb
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