Adding devstack plugin support
sahara-dashboard can now be installed as a devstack plugin by following the instructions added to the README.rst Change-Id: I45e0353da99feb908fcd96fe4dac4d6b820f1705
This commit is contained in:
parent
6c5898813c
commit
b091955db7
12
README.rst
12
README.rst
@ -1,14 +1,22 @@
|
||||
OpenStack Dashboard plugin for Sahara project
|
||||
=============================================
|
||||
|
||||
How to use:
|
||||
-----------
|
||||
How to use with Horizon on server:
|
||||
----------------------------------
|
||||
|
||||
Use pip to install the package on the server running Horizon. Then either copy
|
||||
or link the files in sahara_dashboard/enabled to
|
||||
openstack_dashboard/local/enabled. This step will cause the Horizon service to
|
||||
pick up the Sahara plugin when it starts.
|
||||
|
||||
How to use with devstack:
|
||||
-------------------------
|
||||
|
||||
Add the following to your devstack ``local.conf`` file::
|
||||
|
||||
enable_plugin sahara-dashboard git://git.openstack.org/openstack/sahara-dashboard
|
||||
|
||||
|
||||
To run unit tests:
|
||||
------------------
|
||||
|
||||
|
49
devstack/plugin.sh
Normal file
49
devstack/plugin.sh
Normal file
@ -0,0 +1,49 @@
|
||||
# plugin.sh - DevStack plugin.sh dispatch script sahara-dashboard
|
||||
|
||||
SAHARA_DASH_DIR=$(cd $(dirname $BASH_SOURCE)/.. && pwd)
|
||||
|
||||
function install_sahara_dashboard {
|
||||
sudo pip install --upgrade ${SAHARA_DASH_DIR}
|
||||
|
||||
cp -a ${SAHARA_DASH_DIR}/sahara_dashboard/enabled/* ${DEST}/horizon/openstack_dashboard/enabled/
|
||||
python ${DEST}/horizon/manage.py collectstatic --noinput
|
||||
python ${DEST}/horizon/manage.py compress --force
|
||||
}
|
||||
|
||||
# check for service enabled
|
||||
if is_service_enabled sahara-dashboard; 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 Sahara Dashboard"
|
||||
install_sahara_dashboard
|
||||
|
||||
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
2
devstack/settings
Normal file
@ -0,0 +1,2 @@
|
||||
# settings file for sahara-dashboard plugin
|
||||
enable_service sahara-dashboard
|
Loading…
Reference in New Issue
Block a user