Add glance-api element.
Change-Id: I277b353fbbed59823335c8b27e875c4417e2643d
This commit is contained in:
parent
012116cad6
commit
2fcb64ee77
2
elements/glance-api/README.md
Normal file
2
elements/glance-api/README.md
Normal file
@ -0,0 +1,2 @@
|
||||
Installs the Glance API Service from github.
|
||||
|
7
elements/glance-api/first-boot.d/05-glance-api
Executable file
7
elements/glance-api/first-boot.d/05-glance-api
Executable 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
|
||||
|
@ -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"
|
||||
|
33
elements/glance-api/install.d/05-glance-api
Executable file
33
elements/glance-api/install.d/05-glance-api
Executable 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
|
||||
|
Loading…
Reference in New Issue
Block a user