diff --git a/elements/keystone/README.md b/elements/keystone/README.md new file mode 100644 index 00000000..bc2053d2 --- /dev/null +++ b/elements/keystone/README.md @@ -0,0 +1,4 @@ +This element installs the Keystone service from git. + +Upon booting the image, the service should be running on port 5000. + diff --git a/elements/keystone/first-boot.d/05-keystone b/elements/keystone/first-boot.d/05-keystone new file mode 100755 index 00000000..67417271 --- /dev/null +++ b/elements/keystone/first-boot.d/05-keystone @@ -0,0 +1,7 @@ +#!/bin/bash +set -e +set -o xtrace + +# upstart script +cp -f $(dirname $0)/etc_init_keystone.conf /etc/init/keystone.conf + diff --git a/elements/keystone/first-boot.d/etc_init_keystone.conf b/elements/keystone/first-boot.d/etc_init_keystone.conf new file mode 100644 index 00000000..188bfdd4 --- /dev/null +++ b/elements/keystone/first-boot.d/etc_init_keystone.conf @@ -0,0 +1,9 @@ +description "OpenStack Keystone 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/keystone/bin/keystone-all" + diff --git a/elements/keystone/install.d/05-keystone b/elements/keystone/install.d/05-keystone new file mode 100755 index 00000000..6bada6fe --- /dev/null +++ b/elements/keystone/install.d/05-keystone @@ -0,0 +1,32 @@ +#!/bin/sh + +# install keystone + +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 + +OS_ROOT=/opt/stack +mkdir -p $OS_ROOT + +# clone source +KEYSTONE_ROOT=$OS_ROOT/keystone +git clone https://github.com/openstack/keystone.git $KEYSTONE_ROOT +cd $KEYSTONE_ROOT +git checkout master + +# pip dependencies +python setup.py egg_info +pip install -r keystone.egg-info/requires.txt +cd - + +# config +mkdir -p /etc/keystone +cp $KEYSTONE_ROOT/etc/keystone.conf.sample /etc/keystone/keystone.conf +cp $KEYSTONE_ROOT/etc/policy.json /etc/keystone +cp $KEYSTONE_ROOT/etc/logging.conf.sample /etc/keystone/logging.conf +