Add devstack support for senlin dashboard
And record whole functions in devstack/lib/senlin Change-Id: I8b0135eac49b3265e7333748ad3db911ab114022
This commit is contained in:
parent
f0c33eae2c
commit
d8851b35a3
|
@ -11,16 +11,23 @@
|
||||||
# Dependencies:
|
# Dependencies:
|
||||||
#
|
#
|
||||||
# - functions
|
# - functions
|
||||||
|
# - HORIZON_DIR
|
||||||
|
|
||||||
# stack.sh
|
# stack.sh
|
||||||
# ---------
|
# ---------
|
||||||
|
# - config_senlin_dashboard
|
||||||
|
# - configure_senlin
|
||||||
|
# - cleanup_senlin
|
||||||
|
# - cleanup_senlin_dashboard
|
||||||
|
# - create_senlin_cache_dir
|
||||||
|
# - create_senlin_accounts
|
||||||
|
# - init_senlin
|
||||||
# - install_senlinclient
|
# - install_senlinclient
|
||||||
# - install_senlin
|
# - install_senlin
|
||||||
# - configure_senlin
|
# - install_senlin_dashboard
|
||||||
# - init_senlin
|
# - is_senlin_enabled
|
||||||
# - start_senlin
|
# - start_senlin
|
||||||
# - stop_senlin
|
# - stop_senlin
|
||||||
# - cleanup_senlin
|
|
||||||
|
|
||||||
# Save trace setting
|
# Save trace setting
|
||||||
XTRACE=$(set +o | grep xtrace)
|
XTRACE=$(set +o | grep xtrace)
|
||||||
|
@ -46,6 +53,10 @@ SENLINCLIENT_DIR=$DEST/python-senlinclient
|
||||||
SENLINCLIENT_REPO=${SENLINCLIENT_REPO:-${GIT_BASE}/openstack/python-senlinclient.git}
|
SENLINCLIENT_REPO=${SENLINCLIENT_REPO:-${GIT_BASE}/openstack/python-senlinclient.git}
|
||||||
SENLINCLIENT_BRANCH=${SENLINCLIENT_BRANCH:-master}
|
SENLINCLIENT_BRANCH=${SENLINCLIENT_BRANCH:-master}
|
||||||
|
|
||||||
|
SENLIN_DASHBOARD_DIR=$DEST/senlin-dashboard
|
||||||
|
SENLIN_DASHBOARD_REPO=${SENLIN_DASHBOARD_REPO:-${GIT_BASE}/openstack/senlin-dashboard.git}
|
||||||
|
SENLIN_DASHBOARD_BRANCH=${SENLIN_DASHBOARD_BRANCH:-master}
|
||||||
|
|
||||||
|
|
||||||
# Functions
|
# Functions
|
||||||
# ---------
|
# ---------
|
||||||
|
@ -143,6 +154,33 @@ function install_senlinclient {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# install_senlin_dashboard() - Collect source and prepare
|
||||||
|
function install_senlin_dashboard {
|
||||||
|
# NOTE(Liuqing): workaround for devstack bug: 1540328
|
||||||
|
# https://bugs.launchpad.net/devstack/+bug/1540328
|
||||||
|
# where devstack install 'test-requirements' but should not do it
|
||||||
|
# for senlin-dashboard project as it installs Horizon from url.
|
||||||
|
# Remove following two 'mv' commands when mentioned bug is fixed.
|
||||||
|
|
||||||
|
git_clone $SENLIN_DASHBOARD_REPO $SENLIN_DASHBOARD_DIR $SENLIN_DASHBOARD_BRANCH
|
||||||
|
mv $SENLIN_DASHBOARD_DIR/test-requirements.txt $SENLIN_DASHBOARD_DIR/_test-requirements.txt
|
||||||
|
setup_develop $SENLIN_DASHBOARD_DIR
|
||||||
|
|
||||||
|
mv $SENLIN_DASHBOARD_DIR/_test-requirements.txt $SENLIN_DASHBOARD_DIR/test-requirements.txt
|
||||||
|
}
|
||||||
|
|
||||||
|
# configure_senlin_dashboard() - Set config files
|
||||||
|
function config_senlin_dashboard {
|
||||||
|
# Install Senlin Dashboard as plugin for Horizon
|
||||||
|
ln -sf $SENLIN_DASHBOARD_DIR/_50_senlin.py.example $HORIZON_DIR/openstack_dashboard/local/enabled/_50_senlin.py
|
||||||
|
}
|
||||||
|
|
||||||
|
# cleanup_senlin_dashboard() - Remove residual data files, anything left over from previous
|
||||||
|
# runs that a clean run would need to clean up
|
||||||
|
function cleanup_senlin_dashboard {
|
||||||
|
sudo rm -rf $HORIZON_DIR/openstack_dashboard/local/enabled/_50_senlin.py
|
||||||
|
}
|
||||||
|
|
||||||
# install_senlin() - Collect source and prepare
|
# install_senlin() - Collect source and prepare
|
||||||
function install_senlin {
|
function install_senlin {
|
||||||
git_clone $SENLIN_REPO $SENLIN_DIR $SENLIN_BRANCH
|
git_clone $SENLIN_REPO $SENLIN_DIR $SENLIN_BRANCH
|
||||||
|
|
|
@ -14,11 +14,21 @@ if is_service_enabled sl-api sl-eng; then
|
||||||
install_senlin
|
install_senlin
|
||||||
echo_summary "Installing senlinclient"
|
echo_summary "Installing senlinclient"
|
||||||
install_senlinclient
|
install_senlinclient
|
||||||
|
if is_service_enabled horizon; then
|
||||||
|
echo_summary "Installing senlin dashboard"
|
||||||
|
install_senlin_dashboard
|
||||||
|
cleanup_senlin_dashboard
|
||||||
|
fi
|
||||||
cleanup_senlin
|
cleanup_senlin
|
||||||
elif [[ "$1" == "stack" && "$2" == "post-config" ]]; then
|
elif [[ "$1" == "stack" && "$2" == "post-config" ]]; then
|
||||||
echo_summary "Configuring senlin"
|
echo_summary "Configuring senlin"
|
||||||
configure_senlin
|
configure_senlin
|
||||||
|
|
||||||
|
if is_service_enabled horizon; then
|
||||||
|
echo_summary "Configuring senlin dashboard"
|
||||||
|
config_senlin_dashboard
|
||||||
|
fi
|
||||||
|
|
||||||
if is_service_enabled key; then
|
if is_service_enabled key; then
|
||||||
create_senlin_accounts
|
create_senlin_accounts
|
||||||
fi
|
fi
|
||||||
|
@ -38,6 +48,10 @@ if is_service_enabled sl-api sl-eng; then
|
||||||
|
|
||||||
if [[ "$1" == "clean" ]]; then
|
if [[ "$1" == "clean" ]]; then
|
||||||
cleanup_senlin
|
cleanup_senlin
|
||||||
|
|
||||||
|
if is_service_enabled horizon; then
|
||||||
|
cleanup_senlin_dashboard
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue