Convert trove to plugin
Also adds an is_trove_enabled() function to match https://review.openstack.org/69497 changes for is_service_enabled(). Change-Id: Ic0408ff6d9816aec8a3506931470470342a5dcd7
This commit is contained in:
parent
b53dbad8ac
commit
fc744f9713
33
extras.d/70-trove
Normal file
33
extras.d/70-trove
Normal file
@ -0,0 +1,33 @@
|
||||
# trove.sh - Devstack extras script to install Trove
|
||||
|
||||
if is_service_enabled trove; then
|
||||
if [[ "$1" == "source" ]]; then
|
||||
# Initial source
|
||||
source $TOP_DIR/lib/trove
|
||||
elif [[ "$1" == "stack" && "$2" == "install" ]]; then
|
||||
echo_summary "Installing Trove"
|
||||
install_trove
|
||||
install_troveclient
|
||||
cleanup_trove
|
||||
elif [[ "$1" == "stack" && "$2" == "post-config" ]]; then
|
||||
echo_summary "Configuring Trove"
|
||||
configure_troveclient
|
||||
configure_trove
|
||||
|
||||
if is_service_enabled key; then
|
||||
create_trove_accounts
|
||||
fi
|
||||
|
||||
elif [[ "$1" == "stack" && "$2" == "extra" ]]; then
|
||||
# Initialize trove
|
||||
init_trove
|
||||
|
||||
# Start the trove API and trove taskmgr components
|
||||
echo_summary "Starting Trove"
|
||||
start_trove
|
||||
fi
|
||||
|
||||
if [[ "$1" == "unstack" ]]; then
|
||||
stop_trove
|
||||
fi
|
||||
fi
|
10
lib/trove
10
lib/trove
@ -38,6 +38,16 @@ else
|
||||
TROVE_BIN_DIR=$(get_python_exec_prefix)
|
||||
fi
|
||||
|
||||
# Functions
|
||||
# ---------
|
||||
|
||||
# Test if any Trove services are enabled
|
||||
# is_trove_enabled
|
||||
function is_trove_enabled {
|
||||
[[ ,${ENABLED_SERVICES} =~ ,"tr-" ]] && return 0
|
||||
return 1
|
||||
}
|
||||
|
||||
# setup_trove_logging() - Adds logging configuration to conf files
|
||||
function setup_trove_logging() {
|
||||
local CONF=$1
|
||||
|
26
stack.sh
26
stack.sh
@ -3,7 +3,7 @@
|
||||
# ``stack.sh`` is an opinionated OpenStack developer installation. It
|
||||
# installs and configures various combinations of **Ceilometer**, **Cinder**,
|
||||
# **Glance**, **Heat**, **Horizon**, **Keystone**, **Nova**, **Neutron**,
|
||||
# **Swift**, and **Trove**
|
||||
# and **Swift**
|
||||
|
||||
# This script allows you to specify configuration options of what git
|
||||
# repositories to use, enabled services, network configuration and various
|
||||
@ -337,7 +337,6 @@ source $TOP_DIR/lib/neutron
|
||||
source $TOP_DIR/lib/baremetal
|
||||
source $TOP_DIR/lib/ldap
|
||||
source $TOP_DIR/lib/ironic
|
||||
source $TOP_DIR/lib/trove
|
||||
|
||||
# Extras Source
|
||||
# --------------
|
||||
@ -739,12 +738,6 @@ if is_service_enabled heat; then
|
||||
configure_heat
|
||||
fi
|
||||
|
||||
if is_service_enabled trove; then
|
||||
install_trove
|
||||
install_troveclient
|
||||
cleanup_trove
|
||||
fi
|
||||
|
||||
if is_service_enabled tls-proxy; then
|
||||
configure_CA
|
||||
init_CA
|
||||
@ -927,10 +920,6 @@ if is_service_enabled key; then
|
||||
create_cinder_accounts
|
||||
create_neutron_accounts
|
||||
|
||||
if is_service_enabled trove; then
|
||||
create_trove_accounts
|
||||
fi
|
||||
|
||||
if is_service_enabled ceilometer; then
|
||||
create_ceilometer_accounts
|
||||
fi
|
||||
@ -1204,19 +1193,6 @@ if is_service_enabled heat; then
|
||||
start_heat
|
||||
fi
|
||||
|
||||
# Configure and launch the trove service api, and taskmanager
|
||||
if is_service_enabled trove; then
|
||||
# Initialize trove
|
||||
echo_summary "Configuring Trove"
|
||||
configure_troveclient
|
||||
configure_trove
|
||||
init_trove
|
||||
|
||||
# Start the trove API and trove taskmgr components
|
||||
echo_summary "Starting Trove"
|
||||
start_trove
|
||||
fi
|
||||
|
||||
|
||||
# Create account rc files
|
||||
# =======================
|
||||
|
@ -56,7 +56,6 @@ source $TOP_DIR/lib/neutron
|
||||
source $TOP_DIR/lib/baremetal
|
||||
source $TOP_DIR/lib/ldap
|
||||
source $TOP_DIR/lib/ironic
|
||||
source $TOP_DIR/lib/trove
|
||||
|
||||
# Extras Source
|
||||
# --------------
|
||||
@ -92,9 +91,6 @@ if [[ "$Q_USE_DEBUG_COMMAND" == "True" ]]; then
|
||||
fi
|
||||
|
||||
# Call service stop
|
||||
if is_service_enabled trove; then
|
||||
stop_trove
|
||||
fi
|
||||
|
||||
if is_service_enabled heat; then
|
||||
stop_heat
|
||||
|
Loading…
Reference in New Issue
Block a user