7b4cbda930
Move vitragedashboard to vitrage-dashboard/dashboard vitragealarms to vitrage-dashboard/alarms vitragetemplates to vitrage-dashboard/templates etc. Enable to use this as horizon plugin without the need of copying over API files, simply place files from enabled directory in horizons openstack_dashboard/local/enabled folder. Change-Id: I38ea4e32abbad75e5432b8c1dfe64511162a7248
48 lines
1.3 KiB
Bash
48 lines
1.3 KiB
Bash
#!/usr/bin/env bash
|
|
# plugin.sh - DevStack plugin.sh dispatch script vitrage-dashboard
|
|
|
|
VITRAGE_DASHBOARD_DIR=$(cd $(dirname $BASH_SOURCE)/.. && pwd)
|
|
|
|
function install_vitrage_dashboard {
|
|
sudo pip install --upgrade ${VITRAGE_DASHBOARD_DIR}
|
|
cp -a ${VITRAGE_DASHBOARD_DIR}/enabled/* ${DEST}/horizon/openstack_dashboard/enabled/
|
|
python ${DEST}/horizon/manage.py compress --force
|
|
}
|
|
|
|
# check for service enabled
|
|
if is_service_enabled vitrage-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 Vitrage Dashboard"
|
|
install_vitrage_dashboard
|
|
|
|
elif [[ "$1" == "stack" && "$2" == "extra" ]]; then
|
|
# Initialize and start the vitrage-dashboard service
|
|
# no-op
|
|
:
|
|
fi
|
|
|
|
if [[ "$1" == "unstack" ]]; then
|
|
# Shut down vitrage-dashboard services
|
|
# no-op
|
|
:
|
|
fi
|
|
|
|
if [[ "$1" == "clean" ]]; then
|
|
# Remove state and transient data
|
|
# Remember clean.sh first calls unstack.sh
|
|
# no-op
|
|
:
|
|
fi
|
|
fi
|