gyan/devstack/plugin.sh
bharath a40f556027 [WIP] Add hosts APIs and compute rpc APIs
Change-Id: I5893bf066fc876e795f020214080fb92b79a00a5
2018-10-11 08:50:24 +05:30

48 lines
1013 B
Bash
Executable File

# gyan - Devstack extras script to install gyan
# Save trace setting
XTRACE=$(set +o | grep xtrace)
set -o xtrace
echo_summary "gyan's plugin.sh was called..."
source $DEST/gyan/devstack/lib/gyan
(set -o posix; set)
if is_service_enabled gyan-api gyan-compute; then
if [[ "$1" == "stack" && "$2" == "install" ]]; then
echo_summary "Installing gyan"
install_gyan
install_gyanclient
cleanup_gyan
elif [[ "$1" == "stack" && "$2" == "post-config" ]]; then
echo_summary "Configuring gyan"
configure_gyan
if is_service_enabled key; then
create_gyan_accounts
fi
elif [[ "$1" == "stack" && "$2" == "extra" ]]; then
# Initialize gyan
init_gyan
# Start the gyan API and gyan compute
echo_summary "Starting gyan"
start_gyan
fi
if [[ "$1" == "unstack" ]]; then
stop_gyan
fi
if [[ "$1" == "clean" ]]; then
cleanup_gyan
fi
fi
# Restore xtrace
$XTRACE