diff --git a/devstack/plugin.sh b/devstack/plugin.sh new file mode 100644 index 000000000..aba238900 --- /dev/null +++ b/devstack/plugin.sh @@ -0,0 +1,73 @@ +# Monasca DevStack plugin +# +# Install and start Monasca service in devstack +# +# To enable Monasca in devstack add an entry to local.conf that +# looks like +# +# [[local|localrc]] +# enable_plugin monasca git://git.openstack.org/stackforge/monasca-api +# +# By default all Monasca services are started (see +# devstack/settings). To disable a specific service use the +# disable_service function. For example to turn off notification: +# +# disable_service monasca-notification +# +# Several variables set in the localrc section adjust common behaviors +# of Ceilometer (see within for additional settings): +# +# EXAMPLE VARS HERE + +# Save trace setting +XTRACE=$(set +o | grep xtrace) +set -o xtrace + +function install_monasca { +: +} + +function init_monasca { +: +} + +function configure_monasca { +: +} + +# check for service enabled +if is_service_enabled monasca; then + + if [[ "$1" == "stack" && "$2" == "pre-install" ]]; then + # Set up system services + echo_summary "Configuring Monasca system services" + + elif [[ "$1" == "stack" && "$2" == "install" ]]; then + # Perform installation of service source + echo_summary "Installing Monasca" + + elif [[ "$1" == "stack" && "$2" == "post-config" ]]; then + # Configure after the other layer 1 and 2 services have been configured + echo_summary "Configuring Monasca" + + elif [[ "$1" == "stack" && "$2" == "extra" ]]; then + # Initialize and start the Monasca service + echo_summary "Initializing Monasca" + fi + + if [[ "$1" == "unstack" ]]; then + # Shut down Monasca services + # no-op + : + fi + + if [[ "$1" == "clean" ]]; then + # Remove state and transient data + # Remember clean.sh first calls unstack.sh + # no-op + : + fi +fi + +# Restore xtrace +$XTRACE \ No newline at end of file diff --git a/devstack/settings b/devstack/settings new file mode 100644 index 000000000..4539b28df --- /dev/null +++ b/devstack/settings @@ -0,0 +1,35 @@ +# Turn on all the Monasca services by default + +# Databases +# mySQL already enabled in devstack +enable_service influxdb + +# Storm +enable_service storm + +# Core Monasca services +enable_service monasca-api +enable_service monasca-persister +enable_service monasca-notification +enable_service monasca-thresh +enable_service monasca-agent + +OS_USERNAME=monasca +OS_PASSWORD=password +OS_PROJECT_NAME=monasca +OS_AUTH_URL= + +INFLUXDB_API_USER=mon_api +INFLUXDB_API_PASSWORD=password + +INFLUXDB_PERSISTER_USER=mon_persister +INFLUXDB_PERSISTER_PASSWORD=password + +MYSQL_API_USER=monapi +MYSQL_API_PASSWORD=password + +MYSQL_NOTIFICATION_USER=notification +MYSQL_NOTIFICATION_PASSWORD=password + +MYSQL_THRESH_USER=thresh +MYSQL_THRESH_PASSWORD=password