Add devstack plugin bits

This commit adds a devstack directory
and the settings and plugin.sh files
that shold allow easy integration with
devstack. The README file is also updated
to indidcate how users can test the
app-catalog-ui Horizon plugin using
Devstack.

Change-Id: Ib7a79ce789de6882ff4ac2813ca62bab0f42c788
This commit is contained in:
Christopher Aedo 2015-09-09 14:34:58 -07:00
parent a8815695e7
commit 7281bb0756
3 changed files with 60 additions and 0 deletions

View File

@ -15,6 +15,16 @@ apps-catalog-ui is intended to use only on systems running Horizon
How to try this package
=======================
With Devstack
-------------
Add the following to your Devstack local.conf file
::
enable_plugin app-catalog-ui https://git.openstack.org/stackforge/apps-catalog-ui
With Horizon
------------
::
git clone http://github.com/openstack/horizon.git

48
devstack/plugin.sh Executable file
View File

@ -0,0 +1,48 @@
# plugin.sh - DevStack plugin.sh dispatch script app-catalog-ui
APP_CAT_UI_DIR=$(cd $(dirname $BASH_SOURCE)/.. && pwd)
function install_app-catalog-ui {
sudo pip install --upgrade ${APP_CAT_UI_DIR}
cp -a ${APP_CAT_UI_DIR}/app_catalog/static ${DEST}/horizon/
cp -a ${APP_CAT_UI_DIR}/enabled/* ${DEST}/horizon/openstack_dashboard/enabled/
python ${DEST}/horizon/manage.py compress --force
}
# check for service enabled
if is_service_enabled app-catalog-ui; then
if [[ "$1" == "stack" && "$2" == "pre-install" ]]; then
# Set up system services
# no-op
:
elif [[ "$1" == "stack" && "$2" == "install" ]]; then
# Perform installation of service source
# no-op
:
elif [[ "$1" == "stack" && "$2" == "post-config" ]]; then
# Configure after the other layer 1 and 2 services have been configured
echo_summary "Installing App Catalog UI"
install_app-catalog-ui
elif [[ "$1" == "stack" && "$2" == "extra" ]]; then
# Initialize and start the app-catalog-ui service
# no-op
:
fi
if [[ "$1" == "unstack" ]]; then
# Shut down app-catalog-ui services
# no-op
:
fi
if [[ "$1" == "clean" ]]; then
# Remove state and transient data
# Remember clean.sh first calls unstack.sh
# no-op
:
fi
fi

2
devstack/settings Normal file
View File

@ -0,0 +1,2 @@
# settings file for app-catalog-ui plugin
enable_service app-catalog-ui