Adds Grian-UI Devstack plugin

Easy enable deploying Grian-UI on demand by enabling
it as a plugin for Devstack as follows:

enable_plugin grian-ui https://opendev.org/openstack/grian-ui

Having ceilomter and sg-core enabled is required, since
Grian UI relies on those services to retrieve the metrics.

Change-Id: Id90dc6d41be76de105dbb58abad84b974277379c
This commit is contained in:
Victoria Martinez de la Cruz
2025-05-20 15:52:29 +00:00
parent 8346769c9b
commit af606c85a8
2 changed files with 44 additions and 0 deletions

39
devstack/plugin.sh Normal file
View File

@@ -0,0 +1,39 @@
# plugin.sh - DevStack plugin.sh dispatch script grian-ui
function install_grian_ui {
setup_develop ${GRIAN_UI_DIR}
}
# check for services enabled
if is_service_enabled horizon && \
is_service_enabled grian-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
echo_summary "Installing Grian UI"
install_grian_ui
elif [[ "$1" == "stack" && "$2" == "post-config" ]]; then
# Configure after the other layer 1 and 2 services have been configured
echo_summary "Configuring Grian UI"
cp -a ${GRIAN_UI_DIR}/src/grian_ui/local/enabled/* ${DEST}/horizon/openstack_dashboard/local/enabled/
cp -a ${GRIAN_UI_DIR}/src/grian_ui/local/local_settings.d/* ${DEST}/horizon/openstack_dashboard/local/local_settings.d/
elif [[ "$1" == "stack" && "$2" == "extra" ]]; then
# no-op
:
fi
if [[ "$1" == "unstack" ]]; then
# no-op
:
fi
if [[ "$1" == "clean" ]]; then
# Remove state and transient data
# Remember clean.sh first calls unstack.sh
# no-op
:
fi
fi

5
devstack/settings Normal file
View File

@@ -0,0 +1,5 @@
# settings file for grian-ui plugin
enable_service grian-ui
# set up default directories
GRIAN_UI_DIR=${GRIAN_UI_DIR:=$DEST/grian-ui}