diff --git a/devstack/Vagrantfile b/devstack/Vagrantfile index e588d7bdf..891054908 100644 --- a/devstack/Vagrantfile +++ b/devstack/Vagrantfile @@ -129,6 +129,12 @@ enable_service rabbit key tempest horizon enable_service mysql #enable_service postgresql +# Enable entire storm for the sake of local development mode +enable_service monasca-storm-nimbus +enable_service monasca-storm-supervisor +enable_service monasca-storm-ui +enable_service monasca-storm-logviewer + # Enable/Disable ORM support for mysql/postgresql # HINT: If postgresql service is enabled, ORM is enforced MONASCA_DATABASE_USE_ORM=${MONASCA_DATABASE_USE_ORM:-false} diff --git a/devstack/files/storm.yaml b/devstack/files/storm.yaml index c6805122e..591838395 100644 --- a/devstack/files/storm.yaml +++ b/devstack/files/storm.yaml @@ -42,10 +42,14 @@ nimbus.thrift.port: 6627 nimbus.childopts: -Xmx256m ### ui.* configs are for the master -ui.host: 127.0.0.1 -ui.port: 8088 +ui.host: %STORM_UI_HOST% +ui.port: %STORM_UI_PORT% ui.childopts: -Xmx768m +### logviewer.* configs are for the master +logviewer.port: %STORM_LOGVIEWER_PORT% +logviewer.childopts: -Xmx128m + ### drpc.* configs ### transactional.* configs diff --git a/devstack/lib/storm.sh b/devstack/lib/storm.sh index 34472d9eb..1c899692d 100644 --- a/devstack/lib/storm.sh +++ b/devstack/lib/storm.sh @@ -37,6 +37,8 @@ STORM_TARBALL_DEST="${FILES}/${STORM_TARBALL}" STORM_NIMBUS_CMD="${STORM_BIN} nimbus" STORM_SUPERVISOR_CMD="${STORM_BIN} supervisor" +STORM_UI_CMD="${STORM_BIN} ui" +STORM_LOGVIEWER_CMD="${STORM_BIN} logviewer" function is_storm_enabled { [[ ,${ENABLED_SERVICES} =~ ,"monasca-storm" ]] && return 0 @@ -45,17 +47,23 @@ function is_storm_enabled { function start_storm { if is_storm_enabled; then - echo_summary "Starting storm-{nimbus,supervisor}" + echo_summary "Starting storm" + run_process "monasca-storm-nimbus" "${STORM_NIMBUS_CMD}" "${STORM_GROUP}" "${STORM_USER}" run_process "monasca-storm-supervisor" "${STORM_SUPERVISOR_CMD}" "${STORM_GROUP}" "${STORM_USER}" + run_process "monasca-storm-ui" "${STORM_UI_CMD}" "${STORM_GROUP}" "${STORM_USER}" + run_process "monasca-storm-logviewer" "${STORM_LOGVIEWER_CMD}" "${STORM_GROUP}" "${STORM_USER}" fi } function stop_storm { if is_storm_enabled; then - echo_summary "Stopping storm-{nimbus,supervisor}" + echo_summary "Stopping storm" + stop_process "monasca-storm-nimbus" stop_process "monasca-storm-supervisor" + stop_process "monasca-storm-ui" + stop_process "monasca-storm-logviewer" fi } @@ -84,6 +92,13 @@ function configure_storm { sudo cp -f "${MONASCA_API_DIR}"/devstack/files/storm.yaml "${STORM_CURRENT_DIR}/conf/storm.yaml" sudo chown "${STORM_USER}":"${STORM_GROUP}" "${STORM_CURRENT_DIR}/conf/storm.yaml" sudo chmod 0644 "${STORM_CURRENT_DIR}/conf/storm.yaml" + + sudo sed -e " + s|%STORM_UI_HOST%|${STORM_UI_HOST}|g; + s|%STORM_UI_PORT%|${STORM_UI_PORT}|g; + s|%STORM_LOGVIEWER_PORT%|${STORM_LOGVIEWER_PORT}|g; + " -i "${STORM_CURRENT_DIR}/conf/storm.yaml" + fi } diff --git a/devstack/settings b/devstack/settings index daf0863ec..e42857440 100644 --- a/devstack/settings +++ b/devstack/settings @@ -54,6 +54,8 @@ enable_service monasca-influxdb enable_service monasca-storm enable_service monasca-storm-nimbus enable_service monasca-storm-supervisor +disable_service monasca-storm-ui +disable_service monasca-storm-logviewer # monasca-kafka depends on monasca-zookeeper enable_service monasca-kafka @@ -188,3 +190,8 @@ MONASCA_API_CONF=${MONASCA_API_CONF:-$MONASCA_API_CONF_DIR/api-config.conf} MONASCA_API_PASTE_INI=${MONASCA_API_PASTE_INI:-$MONASCA_API_CONF_DIR/api-config.ini} MONASCA_API_LOGGING_CONF=${MONASCA_API_LOGGING_CONF:-$MONASCA_API_CONF_DIR/api-logging.conf} MONASCA_API_LOG_DIR=${MONASCA_API_LOG_DIR:-/var/log/monasca/api} + +## storm settings +STORM_UI_HOST=${STORM_UI_HOST:-${SERVICE_HOST}} +STORM_UI_PORT=${STORM_UI_PORT:-8089} +STORM_LOGVIEWER_PORT=${STORM_LOGVIEWER_PORT:-8090}