Add venusclient install process

Install venusclient when deploying venus-dashboard in devstack.

Closes-Bug: #1973584

Change-Id: Iba5d969063427a7099f6cfeccc123cd7bc022854
This commit is contained in:
baiziyu 2022-05-16 16:59:46 +08:00
parent 67e481809a
commit 8c53ac83ea
1 changed files with 20 additions and 3 deletions

View File

@ -10,6 +10,23 @@ function configure_venus_dashboard {
cp -a ${VENUS_DASHBOARD_DIR}/venus_dashboard/enabled/* ${HORIZON_DIR}/openstack_dashboard/local/enabled/
}
function install_venus_client {
VENUSCLINET_REPO="https://review.opendev.org/openstack/python-venusclient"
VENUSCLIENT_BRANCH="master"
VENUSCLIENT_DIR="${VENUS_DASHBOARD_DIR}/python-venusclient"
if [[ ! -d $VENUSCLIENT_DIR ]]; then
git_clone $VENUSCLINET_REPO $VENUSCLIENT_DIR $VENUSCLIENT_BRANCH
mv ${VENUSCLIENT_DIR}/venusclient ${VENUS_DASHBOARD_DIR}/venusclient
rm -rf ${VENUSCLIENT_DIR}
fi
}
function remove_venus_client {
rm -rf ${VENUS_DASHBOARD_DIR}/venusclient
}
function init_venus_dashboard {
$PYTHON ${DEST}/horizon/manage.py collectstatic --noinput
$PYTHON ${DEST}/horizon/manage.py compress --force
@ -27,8 +44,9 @@ if is_service_enabled venus-dashboard; then
# Perform installation of service source
echo_summary "Installing Venus Dashboard"
install_venus_dashboard
install_venus_client
elif [[ "$1" == "stack" && "$2" == "post-config" ]]; then
elif [[ "$1" == "stack" && "$2" == "post-config" ]]; then
# Configure after the other layer 1 and 2 services have been configured
echo_summary "Configuring Venus Dashboard"
configure_venus_dashboard
@ -42,8 +60,7 @@ if is_service_enabled venus-dashboard; then
if [[ "$1" == "unstack" ]]; then
# Shut down venus-dashboard services
# no-op
:
remove_venus_client
fi
if [[ "$1" == "clean" ]]; then