From e465ca4e7089951ec8e879cd3a4954d0c9b4ee0b Mon Sep 17 00:00:00 2001 From: Ben Nemec Date: Thu, 19 Jan 2017 18:34:59 +0000 Subject: [PATCH] Remove enable_(mistral|zaqar) options Disabling either of these features is going to result in a useless undercloud now, so there's no point exposing them as options. Change-Id: I2c54ec066fcc321fefe473038631efe9ced61936 --- .../puppet-stack-config.pp | 80 +++++++++---------- .../puppet-stack-config.yaml.template | 8 +- .../post-configure.d/98-undercloud-setup | 22 +++-- instack_undercloud/undercloud.py | 25 ++---- undercloud.conf.sample | 9 +-- 5 files changed, 60 insertions(+), 84 deletions(-) diff --git a/elements/puppet-stack-config/puppet-stack-config.pp b/elements/puppet-stack-config/puppet-stack-config.pp index acc39e507..8bd809f7c 100644 --- a/elements/puppet-stack-config/puppet-stack-config.pp +++ b/elements/puppet-stack-config/puppet-stack-config.pp @@ -527,34 +527,32 @@ if str2bool(hiera('enable_docker_registry', true)) { } } -if str2bool(hiera('enable_mistral', true)) { - include ::mistral - $mistral_dsn = split(hiera('mistral::database_connection'), '[@:/?]') - class { '::mistral::db::mysql': - user => $mistral_dsn[3], - password => $mistral_dsn[4], - host => $mistral_dsn[5], - dbname => $mistral_dsn[6], - allowed_hosts => $allowed_hosts, - } - include ::mistral::keystone::auth - include ::mistral::db::sync - include ::mistral::api - include ::mistral::engine - include ::mistral::executor - include ::mistral::cors - - # ensure TripleO common entrypoints for custom Mistral actions - # are installed before performing the Mistral action population - package {'openstack-tripleo-common': } - Package['openstack-tripleo-common'] ~> Exec['mistral-db-populate'] - # If ironic inspector is not running, mistral-db-populate will have invalid - # actions for it. - Class['::ironic::inspector'] ~> Exec['mistral-db-populate'] - # db-populate calls inspectorclient, which will use the keystone endpoint to - # check inspector's version. So that's needed before db-populate is executed. - Class['::ironic::keystone::auth_inspector'] ~> Exec['mistral-db-populate'] +include ::mistral +$mistral_dsn = split(hiera('mistral::database_connection'), '[@:/?]') +class { '::mistral::db::mysql': + user => $mistral_dsn[3], + password => $mistral_dsn[4], + host => $mistral_dsn[5], + dbname => $mistral_dsn[6], + allowed_hosts => $allowed_hosts, } +include ::mistral::keystone::auth +include ::mistral::db::sync +include ::mistral::api +include ::mistral::engine +include ::mistral::executor +include ::mistral::cors + +# ensure TripleO common entrypoints for custom Mistral actions +# are installed before performing the Mistral action population +package {'openstack-tripleo-common': } +Package['openstack-tripleo-common'] ~> Exec['mistral-db-populate'] +# If ironic inspector is not running, mistral-db-populate will have invalid +# actions for it. +Class['::ironic::inspector'] ~> Exec['mistral-db-populate'] +# db-populate calls inspectorclient, which will use the keystone endpoint to +# check inspector's version. So that's needed before db-populate is executed. +Class['::ironic::keystone::auth_inspector'] ~> Exec['mistral-db-populate'] if str2bool(hiera('enable_ui', true)) { include ::tripleo::profile::base::ui @@ -564,23 +562,21 @@ if str2bool(hiera('enable_validations', true)) { include ::tripleo::profile::base::validations } -if str2bool(hiera('enable_zaqar', true)) { - include ::mongodb::globals - include ::mongodb::server - include ::mongodb::client +include ::mongodb::globals +include ::mongodb::server +include ::mongodb::client - include ::zaqar - include ::zaqar::management::mongodb - include ::zaqar::messaging::mongodb - include ::zaqar::keystone::auth - include ::zaqar::keystone::auth_websocket - include ::zaqar::transport::websocket - include ::zaqar::transport::wsgi +include ::zaqar +include ::zaqar::management::mongodb +include ::zaqar::messaging::mongodb +include ::zaqar::keystone::auth +include ::zaqar::keystone::auth_websocket +include ::zaqar::transport::websocket +include ::zaqar::transport::wsgi - include ::zaqar::server - zaqar::server_instance{ '1': - transport => 'websocket' - } +include ::zaqar::server +zaqar::server_instance{ '1': + transport => 'websocket' } if str2bool(hiera('enable_cinder', true)) { diff --git a/elements/puppet-stack-config/puppet-stack-config.yaml.template b/elements/puppet-stack-config/puppet-stack-config.yaml.template index d18eca806..0abab2ab6 100644 --- a/elements/puppet-stack-config/puppet-stack-config.yaml.template +++ b/elements/puppet-stack-config/puppet-stack-config.yaml.template @@ -666,9 +666,9 @@ tripleo::haproxy::panko: "%{hiera('enable_telemetry')}" tripleo::haproxy::ironic: true tripleo::haproxy::ironic_inspector: true tripleo::haproxy::rabbitmq: true -tripleo::haproxy::mistral: {{ENABLE_MISTRAL}} -tripleo::haproxy::zaqar_api: {{ENABLE_ZAQAR}} -tripleo::haproxy::zaqar_ws: {{ENABLE_ZAQAR}} +tripleo::haproxy::mistral: true +tripleo::haproxy::zaqar_api: true +tripleo::haproxy::zaqar_ws: true tripleo::haproxy::docker_registry: true # Keepalived @@ -709,8 +709,6 @@ mistral::keystone_tenant: 'service' swift::proxy::workers: "%{::os_workers}" # Options enable_tempest: {{ENABLE_TEMPEST}} -enable_mistral: {{ENABLE_MISTRAL}} -enable_zaqar: {{ENABLE_ZAQAR}} enable_validations: {{ENABLE_VALIDATIONS}} enable_telemetry: {{ENABLE_TELEMETRY}} enable_legacy_ceilometer_api: {{ENABLE_LEGACY_CEILOMETER_API}} diff --git a/elements/undercloud-install/os-refresh-config/post-configure.d/98-undercloud-setup b/elements/undercloud-install/os-refresh-config/post-configure.d/98-undercloud-setup index 61dca78e3..c58b1eb93 100755 --- a/elements/undercloud-install/os-refresh-config/post-configure.d/98-undercloud-setup +++ b/elements/undercloud-install/os-refresh-config/post-configure.d/98-undercloud-setup @@ -99,18 +99,16 @@ openstack quota set --cores -1 --instances -1 --ram -1 $(openstack project show # instack-prepare-for-overcloud rm -rf $HOME/.novaclient -if [ "$(hiera enable_mistral)" = "true" ]; then - # load workflows - for workbook in $(mistral workbook-list | grep tripleo | cut -f 2 -d ' '); do - mistral workbook-delete $workbook - done - for workflow in $(mistral workflow-list | grep tripleo | cut -f 2 -d ' '); do - mistral workflow-delete $workflow - done - for workbook in $(ls /usr/share/openstack-tripleo-common/workbooks/*); do - mistral workbook-create $workbook - done -fi +# load workflows +for workbook in $(mistral workbook-list | grep tripleo | cut -f 2 -d ' '); do + mistral workbook-delete $workbook +done +for workflow in $(mistral workflow-list | grep tripleo | cut -f 2 -d ' '); do + mistral workflow-delete $workflow +done +for workbook in $(ls /usr/share/openstack-tripleo-common/workbooks/*); do + mistral workbook-create $workbook +done # IP forwarding is needed to allow the overcloud nodes access to the outside # internet in cases where they are on an isolated network. diff --git a/instack_undercloud/undercloud.py b/instack_undercloud/undercloud.py index d1981f22c..0cbc0becc 100644 --- a/instack_undercloud/undercloud.py +++ b/instack_undercloud/undercloud.py @@ -279,14 +279,6 @@ _opts = [ default=True, help=('Whether to install Tempest in the Undercloud.') ), - cfg.BoolOpt('enable_mistral', - default=True, - help=('Whether to install Mistral services in the Undercloud.') - ), - cfg.BoolOpt('enable_zaqar', - default=True, - help=('Whether to install Zaqar services in the Undercloud.') - ), cfg.BoolOpt('enable_telemetry', default=True, help=('Whether to install Telemetry services ' @@ -1225,15 +1217,14 @@ def _post_config(instack_env): _ensure_flavor(nova, 'block-storage', 'block-storage') _ensure_flavor(nova, 'swift-storage', 'swift-storage') - if CONF.enable_mistral: - mistral_url = instack_env['UNDERCLOUD_ENDPOINT_MISTRAL_PUBLIC'] - mistral = mistralclient.client( - mistral_url=mistral_url, - username=user, - api_key=password, - project_name=tenant, - auth_url=auth_url) - _post_config_mistral(instack_env, mistral) + mistral_url = instack_env['UNDERCLOUD_ENDPOINT_MISTRAL_PUBLIC'] + mistral = mistralclient.client( + mistral_url=mistral_url, + username=user, + api_key=password, + project_name=tenant, + auth_url=auth_url) + _post_config_mistral(instack_env, mistral) def _handle_upgrade_fact(upgrade=False): diff --git a/undercloud.conf.sample b/undercloud.conf.sample index 50796083a..e4717fbdc 100644 --- a/undercloud.conf.sample +++ b/undercloud.conf.sample @@ -139,14 +139,7 @@ # Whether to install Tempest in the Undercloud. (boolean value) #enable_tempest = true -# Whether to install Mistral services in the Undercloud. (boolean -# value) -#enable_mistral = true - -# Whether to install Zaqar services in the Undercloud. (boolean value) -#enable_zaqar = true - -# Whether to install Telemetry services (ceilometer, aodh, gnocchi, panko) in the +# Whether to install Telemetry services (ceilometer, aodh) in the # Undercloud. (boolean value) #enable_telemetry = true