Remove mistral
Mistral has been deprecated since Wallaby and is being removed from tripleo-heat-templates Depends-On: https://review.opendev.org/c/openstack/tripleo-heat-templates/+/809462/ Change-Id: I55bb229f3c488f6fd943e99178f85a9c6dc47030
This commit is contained in:
parent
4e89b1cc7a
commit
b59135d972
@ -245,10 +245,6 @@
|
|||||||
# (optional) Enable or not Gnocchi API binding
|
# (optional) Enable or not Gnocchi API binding
|
||||||
# Defaults to hiera('gnocchi_api_enabled', false)
|
# Defaults to hiera('gnocchi_api_enabled', false)
|
||||||
#
|
#
|
||||||
# [*mistral*]
|
|
||||||
# (optional) Enable or not Mistral API binding
|
|
||||||
# Defaults to hiera('mistral_api_enabled', false)
|
|
||||||
#
|
|
||||||
# [*swift_proxy_server*]
|
# [*swift_proxy_server*]
|
||||||
# (optional) Enable or not Swift API binding
|
# (optional) Enable or not Swift API binding
|
||||||
# Defaults to hiera('swift_proxy_enabled', false)
|
# Defaults to hiera('swift_proxy_enabled', false)
|
||||||
@ -444,10 +440,6 @@
|
|||||||
# (optional) Specify the network manila is running on.
|
# (optional) Specify the network manila is running on.
|
||||||
# Defaults to hiera('manila_api_network', undef)
|
# Defaults to hiera('manila_api_network', undef)
|
||||||
#
|
#
|
||||||
# [*mistral_network*]
|
|
||||||
# (optional) Specify the network mistral is running on.
|
|
||||||
# Defaults to hiera('mistral_api_network', undef)
|
|
||||||
#
|
|
||||||
# [*neutron_network*]
|
# [*neutron_network*]
|
||||||
# (optional) Specify the network neutron is running on.
|
# (optional) Specify the network neutron is running on.
|
||||||
# Defaults to hiera('neutron_api_network', undef)
|
# Defaults to hiera('neutron_api_network', undef)
|
||||||
@ -507,8 +499,6 @@
|
|||||||
# 'glance_api_ssl_port' (Defaults to 13292)
|
# 'glance_api_ssl_port' (Defaults to 13292)
|
||||||
# 'gnocchi_api_port' (Defaults to 8041)
|
# 'gnocchi_api_port' (Defaults to 8041)
|
||||||
# 'gnocchi_api_ssl_port' (Defaults to 13041)
|
# 'gnocchi_api_ssl_port' (Defaults to 13041)
|
||||||
# 'mistral_api_port' (Defaults to 8989)
|
|
||||||
# 'mistral_api_ssl_port' (Defaults to 13989)
|
|
||||||
# 'heat_api_port' (Defaults to 8004)
|
# 'heat_api_port' (Defaults to 8004)
|
||||||
# 'heat_api_ssl_port' (Defaults to 13004)
|
# 'heat_api_ssl_port' (Defaults to 13004)
|
||||||
# 'heat_cfn_port' (Defaults to 8000)
|
# 'heat_cfn_port' (Defaults to 8000)
|
||||||
@ -603,7 +593,6 @@ class tripleo::haproxy (
|
|||||||
$ceph_grafana = hiera('ceph_grafana_enabled', false),
|
$ceph_grafana = hiera('ceph_grafana_enabled', false),
|
||||||
$ceph_dashboard = hiera('ceph_grafana_enabled', false),
|
$ceph_dashboard = hiera('ceph_grafana_enabled', false),
|
||||||
$gnocchi = hiera('gnocchi_api_enabled', false),
|
$gnocchi = hiera('gnocchi_api_enabled', false),
|
||||||
$mistral = hiera('mistral_api_enabled', false),
|
|
||||||
$swift_proxy_server = hiera('swift_proxy_enabled', false),
|
$swift_proxy_server = hiera('swift_proxy_enabled', false),
|
||||||
$heat_api = hiera('heat_api_enabled', false),
|
$heat_api = hiera('heat_api_enabled', false),
|
||||||
$heat_cfn = hiera('heat_api_cfn_enabled', false),
|
$heat_cfn = hiera('heat_api_cfn_enabled', false),
|
||||||
@ -651,7 +640,6 @@ class tripleo::haproxy (
|
|||||||
$keystone_sticky_sessions = hiera('keystone_sticky_sessions', false),
|
$keystone_sticky_sessions = hiera('keystone_sticky_sessions', false),
|
||||||
$keystone_session_cookie = hiera('keystone_session_cookie,', 'KEYSTONESESSION'),
|
$keystone_session_cookie = hiera('keystone_session_cookie,', 'KEYSTONESESSION'),
|
||||||
$manila_network = hiera('manila_api_network', undef),
|
$manila_network = hiera('manila_api_network', undef),
|
||||||
$mistral_network = hiera('mistral_api_network', undef),
|
|
||||||
$neutron_network = hiera('neutron_api_network', undef),
|
$neutron_network = hiera('neutron_api_network', undef),
|
||||||
$nova_metadata_network = hiera('nova_metadata_network', undef),
|
$nova_metadata_network = hiera('nova_metadata_network', undef),
|
||||||
$nova_novncproxy_network = hiera('nova_vnc_proxy_network', hiera('nova_libvirt_network', undef)),
|
$nova_novncproxy_network = hiera('nova_vnc_proxy_network', hiera('nova_libvirt_network', undef)),
|
||||||
@ -681,8 +669,6 @@ class tripleo::haproxy (
|
|||||||
glance_api_ssl_port => 13292,
|
glance_api_ssl_port => 13292,
|
||||||
gnocchi_api_port => 8041,
|
gnocchi_api_port => 8041,
|
||||||
gnocchi_api_ssl_port => 13041,
|
gnocchi_api_ssl_port => 13041,
|
||||||
mistral_api_port => 8989,
|
|
||||||
mistral_api_ssl_port => 13989,
|
|
||||||
heat_api_port => 8004,
|
heat_api_port => 8004,
|
||||||
heat_api_ssl_port => 13004,
|
heat_api_ssl_port => 13004,
|
||||||
heat_cfn_port => 8000,
|
heat_cfn_port => 8000,
|
||||||
@ -1258,20 +1244,6 @@ class tripleo::haproxy (
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if $mistral {
|
|
||||||
# NOTE(tkajinam): Mistral doesn't provide healthcheck API
|
|
||||||
::tripleo::haproxy::endpoint { 'mistral':
|
|
||||||
public_virtual_ip => $public_virtual_ip,
|
|
||||||
internal_ip => hiera('mistral_api_vip', $controller_virtual_ip),
|
|
||||||
service_port => $ports[mistral_api_port],
|
|
||||||
ip_addresses => hiera('mistral_api_node_ips', $controller_hosts_real),
|
|
||||||
server_names => hiera('mistral_api_node_names', $controller_hosts_names_real),
|
|
||||||
mode => 'http',
|
|
||||||
public_ssl_port => $ports[mistral_api_ssl_port],
|
|
||||||
service_network => $mistral_network,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if $swift_proxy_server {
|
if $swift_proxy_server {
|
||||||
$swift_proxy_server_frontend_options = {
|
$swift_proxy_server_frontend_options = {
|
||||||
'option' => [ 'httplog' ],
|
'option' => [ 'httplog' ],
|
||||||
|
@ -277,9 +277,6 @@ class tripleo::profile::base::database::mysql (
|
|||||||
if hiera('manila_api_enabled', false) {
|
if hiera('manila_api_enabled', false) {
|
||||||
tripleo::profile::base::database::mysql::include_and_check_auth{'manila::db::mysql':}
|
tripleo::profile::base::database::mysql::include_and_check_auth{'manila::db::mysql':}
|
||||||
}
|
}
|
||||||
if hiera('mistral_api_enabled', false) {
|
|
||||||
tripleo::profile::base::database::mysql::include_and_check_auth{'mistral::db::mysql':}
|
|
||||||
}
|
|
||||||
if hiera('neutron_api_enabled', false) {
|
if hiera('neutron_api_enabled', false) {
|
||||||
tripleo::profile::base::database::mysql::include_and_check_auth{'neutron::db::mysql':}
|
tripleo::profile::base::database::mysql::include_and_check_auth{'neutron::db::mysql':}
|
||||||
}
|
}
|
||||||
|
@ -1,127 +0,0 @@
|
|||||||
# Copyright 2016 Red Hat, Inc.
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
||||||
# not use this file except in compliance with the License. You may obtain
|
|
||||||
# a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
||||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
||||||
# License for the specific language governing permissions and limitations
|
|
||||||
# under the License.
|
|
||||||
#
|
|
||||||
# == Class: tripleo::profile::base::mistral
|
|
||||||
#
|
|
||||||
# Mistral profile for tripleo
|
|
||||||
#
|
|
||||||
# === Parameters
|
|
||||||
#
|
|
||||||
# [*bootstrap_node*]
|
|
||||||
# (Optional) The hostname of the node responsible for bootstrapping tasks
|
|
||||||
# Defaults to hiera('mistral_engine_short_bootstrap_node_name')
|
|
||||||
#
|
|
||||||
# [*step*]
|
|
||||||
# (Optional) The current step in deployment. See tripleo-heat-templates
|
|
||||||
# for more details.
|
|
||||||
# Defaults to hiera('step')
|
|
||||||
#
|
|
||||||
# [*oslomsg_rpc_proto*]
|
|
||||||
# Protocol driver for the oslo messaging rpc service
|
|
||||||
# Defaults to hiera('oslo_messaging_rpc_scheme', rabbit)
|
|
||||||
#
|
|
||||||
# [*oslomsg_rpc_hosts*]
|
|
||||||
# list of the oslo messaging rpc host fqdns
|
|
||||||
# Defaults to hiera('oslo_messaging_rpc_short_node_names')
|
|
||||||
#
|
|
||||||
# [*oslomsg_rpc_port*]
|
|
||||||
# IP port for oslo messaging rpc service
|
|
||||||
# Defaults to hiera('oslo_messaging_rpc_port', 5672)
|
|
||||||
#
|
|
||||||
# [*oslomsg_rpc_username*]
|
|
||||||
# Username for oslo messaging rpc service
|
|
||||||
# Defaults to hiera('oslo_messaging_rpc_user_name', 'guest')
|
|
||||||
#
|
|
||||||
# [*oslomsg_rpc_password*]
|
|
||||||
# Password for oslo messaging rpc service
|
|
||||||
# Defaults to hiera('oslo_messaging_rpc_password')
|
|
||||||
#
|
|
||||||
# [*oslomsg_rpc_use_ssl*]
|
|
||||||
# Enable ssl oslo messaging services
|
|
||||||
# Defaults to hiera('oslo_messaging_rpc_use_ssl', '0')
|
|
||||||
#
|
|
||||||
# [*oslomsg_notify_proto*]
|
|
||||||
# Protocol driver for the oslo messaging notify service
|
|
||||||
# Defaults to hiera('oslo_messaging_notify_scheme', rabbit)
|
|
||||||
#
|
|
||||||
# [*oslomsg_notify_hosts*]
|
|
||||||
# list of the oslo messaging notify host fqdns
|
|
||||||
# Defaults to hiera('oslo_messaging_notify_node_names')
|
|
||||||
#
|
|
||||||
# [*oslomsg_notify_port*]
|
|
||||||
# IP port for oslo messaging notify service
|
|
||||||
# Defaults to hiera('oslo_messaging_notify_port', 5672)
|
|
||||||
#
|
|
||||||
# [*oslomsg_notify_username*]
|
|
||||||
# Username for oslo messaging notify service
|
|
||||||
# Defaults to hiera('oslo_messaging_notify_user_name', 'guest')
|
|
||||||
#
|
|
||||||
# [*oslomsg_notify_password*]
|
|
||||||
# Password for oslo messaging notify service
|
|
||||||
# Defaults to hiera('oslo_messaging_notify_password')
|
|
||||||
#
|
|
||||||
# [*oslomsg_notify_use_ssl*]
|
|
||||||
# Enable ssl oslo messaging services
|
|
||||||
# Defaults to hiera('oslo_messaging_notify_use_ssl', '0')
|
|
||||||
|
|
||||||
class tripleo::profile::base::mistral (
|
|
||||||
$bootstrap_node = hiera('mistral_engine_short_bootstrap_node_name', undef),
|
|
||||||
$step = Integer(hiera('step')),
|
|
||||||
$oslomsg_rpc_proto = hiera('oslo_messaging_rpc_scheme', 'rabbit'),
|
|
||||||
$oslomsg_rpc_hosts = any2array(hiera('oslo_messaging_rpc_node_names', undef)),
|
|
||||||
$oslomsg_rpc_password = hiera('oslo_messaging_rpc_password'),
|
|
||||||
$oslomsg_rpc_port = hiera('oslo_messaging_rpc_port', '5672'),
|
|
||||||
$oslomsg_rpc_username = hiera('oslo_messaging_rpc_user_name', 'guest'),
|
|
||||||
$oslomsg_rpc_use_ssl = hiera('oslo_messaging_rpc_use_ssl', '0'),
|
|
||||||
$oslomsg_notify_proto = hiera('oslo_messaging_notify_scheme', 'rabbit'),
|
|
||||||
$oslomsg_notify_hosts = any2array(hiera('oslo_messaging_notify_node_names', undef)),
|
|
||||||
$oslomsg_notify_password = hiera('oslo_messaging_notify_password'),
|
|
||||||
$oslomsg_notify_port = hiera('oslo_messaging_notify_port', '5672'),
|
|
||||||
$oslomsg_notify_username = hiera('oslo_messaging_notify_user_name', 'guest'),
|
|
||||||
$oslomsg_notify_use_ssl = hiera('oslo_messaging_notify_use_ssl', '0'),
|
|
||||||
) {
|
|
||||||
if $bootstrap_node and $::hostname == downcase($bootstrap_node) {
|
|
||||||
$sync_db = true
|
|
||||||
} else {
|
|
||||||
$sync_db = false
|
|
||||||
}
|
|
||||||
|
|
||||||
if $step >= 4 or ($step >= 3 and $sync_db) {
|
|
||||||
$oslomsg_rpc_use_ssl_real = sprintf('%s', bool2num(str2bool($oslomsg_rpc_use_ssl)))
|
|
||||||
$oslomsg_notify_use_ssl_real = sprintf('%s', bool2num(str2bool($oslomsg_notify_use_ssl)))
|
|
||||||
class { 'mistral':
|
|
||||||
default_transport_url => os_transport_url({
|
|
||||||
'transport' => $oslomsg_rpc_proto,
|
|
||||||
'hosts' => $oslomsg_rpc_hosts,
|
|
||||||
'port' => $oslomsg_rpc_port,
|
|
||||||
'username' => $oslomsg_rpc_username,
|
|
||||||
'password' => $oslomsg_rpc_password,
|
|
||||||
'ssl' => $oslomsg_rpc_use_ssl_real,
|
|
||||||
}),
|
|
||||||
notification_transport_url => os_transport_url({
|
|
||||||
'transport' => $oslomsg_notify_proto,
|
|
||||||
'hosts' => $oslomsg_notify_hosts,
|
|
||||||
'port' => $oslomsg_notify_port,
|
|
||||||
'username' => $oslomsg_notify_username,
|
|
||||||
'password' => $oslomsg_notify_password,
|
|
||||||
'ssl' => $oslomsg_notify_use_ssl_real,
|
|
||||||
}),
|
|
||||||
}
|
|
||||||
include mistral::config
|
|
||||||
include mistral::cors
|
|
||||||
include mistral::db
|
|
||||||
include mistral::db::sync
|
|
||||||
include mistral::logging
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,97 +0,0 @@
|
|||||||
# Copyright 2016 Red Hat, Inc.
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
||||||
# not use this file except in compliance with the License. You may obtain
|
|
||||||
# a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
||||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
||||||
# License for the specific language governing permissions and limitations
|
|
||||||
# under the License.
|
|
||||||
#
|
|
||||||
# == Class: tripleo::profile::base::mistral::api
|
|
||||||
#
|
|
||||||
# Mistral API profile for tripleo
|
|
||||||
#
|
|
||||||
# === Parameters
|
|
||||||
#
|
|
||||||
# [*certificates_specs*]
|
|
||||||
# (Optional) The specifications to give to certmonger for the certificate(s)
|
|
||||||
# it will create.
|
|
||||||
# Example with hiera:
|
|
||||||
# apache_certificates_specs:
|
|
||||||
# httpd-internal_api:
|
|
||||||
# hostname: <overcloud controller fqdn>
|
|
||||||
# service_certificate: <service certificate path>
|
|
||||||
# service_key: <service key path>
|
|
||||||
# principal: "haproxy/<overcloud controller fqdn>"
|
|
||||||
# Defaults to hiera('apache_certificate_specs', {}).
|
|
||||||
#
|
|
||||||
# [*enable_internal_tls*]
|
|
||||||
# (Optional) Whether TLS in the internal network is enabled or not.
|
|
||||||
# Defaults to hiera('enable_internal_tls', false)
|
|
||||||
#
|
|
||||||
# [*mistral_api_network*]
|
|
||||||
# (Optional) The network name where the mistral API endpoint is listening on.
|
|
||||||
# This is set by t-h-t.
|
|
||||||
# Defaults to hiera('mistral_api_network', undef)
|
|
||||||
#
|
|
||||||
# [*mistral_api_wsgi_enabled*]
|
|
||||||
# (Optional) Whether or not deploy Mistral API in WSGI with Apache.
|
|
||||||
# Defaults to hiera('mistral_wsgi_enabled', true)
|
|
||||||
#
|
|
||||||
# [*bootstrap_node*]
|
|
||||||
# (Optional) The hostname of the node responsible for bootstrapping tasks
|
|
||||||
# Defaults to hiera('mistral_api_short_bootstrap_node_name')
|
|
||||||
#
|
|
||||||
# [*step*]
|
|
||||||
# (Optional) The current step in deployment. See tripleo-heat-templates
|
|
||||||
# for more details.
|
|
||||||
# Defaults to hiera('step')
|
|
||||||
#
|
|
||||||
class tripleo::profile::base::mistral::api (
|
|
||||||
$bootstrap_node = hiera('mistral_api_short_bootstrap_node_name', undef),
|
|
||||||
$certificates_specs = hiera('apache_certificates_specs', {}),
|
|
||||||
$enable_internal_tls = hiera('enable_internal_tls', false),
|
|
||||||
$mistral_api_network = hiera('mistral_api_network', undef),
|
|
||||||
$mistral_api_wsgi_enabled = hiera('mistral_wsgi_enabled', true),
|
|
||||||
$step = Integer(hiera('step')),
|
|
||||||
) {
|
|
||||||
if $bootstrap_node and $::hostname == downcase($bootstrap_node) {
|
|
||||||
$is_bootstrap = true
|
|
||||||
} else {
|
|
||||||
$is_bootstrap = false
|
|
||||||
}
|
|
||||||
|
|
||||||
include tripleo::profile::base::mistral
|
|
||||||
include tripleo::profile::base::mistral::authtoken
|
|
||||||
|
|
||||||
if $enable_internal_tls {
|
|
||||||
if !$mistral_api_network {
|
|
||||||
fail('mistral_api_network is not set in the hieradata.')
|
|
||||||
}
|
|
||||||
$tls_certfile = $certificates_specs["httpd-${mistral_api_network}"]['service_certificate']
|
|
||||||
$tls_keyfile = $certificates_specs["httpd-${mistral_api_network}"]['service_key']
|
|
||||||
} else {
|
|
||||||
$tls_certfile = undef
|
|
||||||
$tls_keyfile = undef
|
|
||||||
}
|
|
||||||
|
|
||||||
if $step >= 4 or ( $step >= 3 and $is_bootstrap ) {
|
|
||||||
include mistral::api
|
|
||||||
include mistral::cron_trigger
|
|
||||||
# Temporarily disable Mistral API deployed in WSGI
|
|
||||||
# https://bugs.launchpad.net/tripleo/+bug/1724607
|
|
||||||
if $mistral_api_wsgi_enabled {
|
|
||||||
include tripleo::profile::base::apache
|
|
||||||
class { 'mistral::wsgi::apache':
|
|
||||||
ssl_cert => $tls_certfile,
|
|
||||||
ssl_key => $tls_keyfile,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,79 +0,0 @@
|
|||||||
# Copyright 2020 Red Hat, Inc.
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
||||||
# not use this file except in compliance with the License. You may obtain
|
|
||||||
# a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
||||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
||||||
# License for the specific language governing permissions and limitations
|
|
||||||
# under the License.
|
|
||||||
#
|
|
||||||
# == Class: tripleo::profile::base::mistral::authtoken
|
|
||||||
#
|
|
||||||
# Mistral authtoken profile for TripleO
|
|
||||||
#
|
|
||||||
# === Parameters
|
|
||||||
#
|
|
||||||
# [*step*]
|
|
||||||
# (Optional) The current step in deployment. See tripleo-heat-templates
|
|
||||||
# for more details.
|
|
||||||
# Defaults to hiera('step')
|
|
||||||
#
|
|
||||||
# [*memcached_hosts*]
|
|
||||||
# (Optional) Array of hostnames, ipv4 or ipv6 addresses for memcache.
|
|
||||||
# Defaults to hiera('memcached_node_names', [])
|
|
||||||
#
|
|
||||||
# [*memcached_port*]
|
|
||||||
# (Optional) Memcached port to use.
|
|
||||||
# Defaults to hiera('memcached_authtoken_port', 11211)
|
|
||||||
#
|
|
||||||
# [*security_strategy*]
|
|
||||||
# (Optional) Memcached (authtoken) security strategy.
|
|
||||||
# Defaults to hiera('memcached_authtoken_security_strategy', undef)
|
|
||||||
#
|
|
||||||
# [*secret_key*]
|
|
||||||
# (Optional) Memcached (authtoken) secret key, used with security_strategy.
|
|
||||||
# The key is hashed with a salt, to isolate services.
|
|
||||||
# Defaults to hiera('memcached_authtoken_secret_key', undef)
|
|
||||||
#
|
|
||||||
# DEPRECATED PARAMETERS
|
|
||||||
#
|
|
||||||
# [*memcached_ips*]
|
|
||||||
# (Optional) Array of ipv4 or ipv6 addresses for memcache.
|
|
||||||
# Defaults to undef
|
|
||||||
#
|
|
||||||
class tripleo::profile::base::mistral::authtoken (
|
|
||||||
$step = Integer(hiera('step')),
|
|
||||||
$memcached_hosts = hiera('memcached_node_names', []),
|
|
||||||
$memcached_port = hiera('memcached_authtoken_port', 11211),
|
|
||||||
$security_strategy = hiera('memcached_authtoken_security_strategy', undef),
|
|
||||||
$secret_key = hiera('memcached_authtoken_secret_key', undef),
|
|
||||||
# DEPRECATED PARAMETERS
|
|
||||||
$memcached_ips = undef
|
|
||||||
) {
|
|
||||||
$memcached_hosts_real = pick($memcached_ips, $memcached_hosts)
|
|
||||||
|
|
||||||
if $step >= 3 {
|
|
||||||
if $memcached_hosts_real[0] =~ Stdlib::Compat::Ipv6 {
|
|
||||||
$memcache_servers = prefix(suffix(any2array(normalize_ip_for_uri($memcached_hosts_real)), ":${memcached_port}"), 'inet6:')
|
|
||||||
} else {
|
|
||||||
$memcache_servers = suffix(any2array(normalize_ip_for_uri($memcached_hosts_real)), ":${memcached_port}")
|
|
||||||
}
|
|
||||||
|
|
||||||
if $secret_key {
|
|
||||||
$hashed_secret_key = sha256("${secret_key}+mistral")
|
|
||||||
} else {
|
|
||||||
$hashed_secret_key = undef
|
|
||||||
}
|
|
||||||
|
|
||||||
class { 'mistral::keystone::authtoken':
|
|
||||||
memcached_servers => $memcache_servers,
|
|
||||||
memcache_security_strategy => $security_strategy,
|
|
||||||
memcache_secret_key => $hashed_secret_key,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,46 +0,0 @@
|
|||||||
# Copyright 2016 Red Hat, Inc.
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
||||||
# not use this file except in compliance with the License. You may obtain
|
|
||||||
# a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
||||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
||||||
# License for the specific language governing permissions and limitations
|
|
||||||
# under the License.
|
|
||||||
#
|
|
||||||
# == Class: tripleo::profile::base::mistral::engine
|
|
||||||
#
|
|
||||||
# Mistral Engine profile for tripleo
|
|
||||||
#
|
|
||||||
# === Parameters
|
|
||||||
#
|
|
||||||
# [*bootstrap_node*]
|
|
||||||
# (Optional) The hostname of the node responsible for bootstrapping tasks
|
|
||||||
# Defaults to hiera('mistral_engine_short_bootstrap_node_name')
|
|
||||||
#
|
|
||||||
# [*step*]
|
|
||||||
# (Optional) The current step in deployment. See tripleo-heat-templates
|
|
||||||
# for more details.
|
|
||||||
# Defaults to hiera('step')
|
|
||||||
#
|
|
||||||
class tripleo::profile::base::mistral::engine (
|
|
||||||
$bootstrap_node = hiera('mistral_engine_short_bootstrap_node_name', undef),
|
|
||||||
$step = Integer(hiera('step')),
|
|
||||||
) {
|
|
||||||
if $bootstrap_node and $::hostname == downcase($bootstrap_node) {
|
|
||||||
$sync_db = true
|
|
||||||
} else {
|
|
||||||
$sync_db = false
|
|
||||||
}
|
|
||||||
|
|
||||||
include tripleo::profile::base::mistral
|
|
||||||
|
|
||||||
if $step >= 4 or ($step >= 3 and $sync_db) {
|
|
||||||
include mistral::engine
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,46 +0,0 @@
|
|||||||
# Copyright 2017 Red Hat, Inc.
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
||||||
# not use this file except in compliance with the License. You may obtain
|
|
||||||
# a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
||||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
||||||
# License for the specific language governing permissions and limitations
|
|
||||||
# under the License.
|
|
||||||
#
|
|
||||||
# == Class: tripleo::profile::base::mistral::event_engine
|
|
||||||
#
|
|
||||||
# Mistral Event Engine profile for tripleo
|
|
||||||
#
|
|
||||||
# === Parameters
|
|
||||||
#
|
|
||||||
# [*bootstrap_node*]
|
|
||||||
# (Optional) The hostname of the node responsible for bootstrapping tasks
|
|
||||||
# Defaults to hiera('mistral_event_engine_short_bootstrap_node_name')
|
|
||||||
#
|
|
||||||
# [*step*]
|
|
||||||
# (Optional) The current step in deployment. See tripleo-heat-templates
|
|
||||||
# for more details.
|
|
||||||
# Defaults to hiera('step')
|
|
||||||
#
|
|
||||||
class tripleo::profile::base::mistral::event_engine (
|
|
||||||
$bootstrap_node = hiera('mistral_event_engine_short_bootstrap_node_name', undef),
|
|
||||||
$step = Integer(hiera('step')),
|
|
||||||
) {
|
|
||||||
if $bootstrap_node and $::hostname == downcase($bootstrap_node) {
|
|
||||||
$sync_db = true
|
|
||||||
} else {
|
|
||||||
$sync_db = false
|
|
||||||
}
|
|
||||||
|
|
||||||
include tripleo::profile::base::mistral
|
|
||||||
|
|
||||||
if $step >= 4 or ($step >= 3 and $sync_db) {
|
|
||||||
include mistral::event_engine
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,63 +0,0 @@
|
|||||||
# Copyright 2016 Red Hat, Inc.
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
||||||
# not use this file except in compliance with the License. You may obtain
|
|
||||||
# a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
||||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
||||||
# License for the specific language governing permissions and limitations
|
|
||||||
# under the License.
|
|
||||||
#
|
|
||||||
# == Class: tripleo::profile::base::mistral::executor
|
|
||||||
#
|
|
||||||
# Mistral Executor profile for tripleo
|
|
||||||
#
|
|
||||||
# === Parameters
|
|
||||||
#
|
|
||||||
# [*bootstrap_node*]
|
|
||||||
# (Optional) The hostname of the node responsible for bootstrapping tasks
|
|
||||||
# Defaults to hiera('mistral_executor_short_bootstrap_node_name')
|
|
||||||
#
|
|
||||||
# [*step*]
|
|
||||||
# (Optional) The current step in deployment. See tripleo-heat-templates
|
|
||||||
# for more details.
|
|
||||||
# Defaults to hiera('step')
|
|
||||||
#
|
|
||||||
# [*docker_group*]
|
|
||||||
# (Optional) Add the mistral user to the docker group to allow actions to
|
|
||||||
# perform docker operations
|
|
||||||
# Defaults to false
|
|
||||||
#
|
|
||||||
class tripleo::profile::base::mistral::executor (
|
|
||||||
$bootstrap_node = hiera('mistral_executor_short_bootstrap_node_name', undef),
|
|
||||||
$step = Integer(hiera('step')),
|
|
||||||
$docker_group = false,
|
|
||||||
) {
|
|
||||||
if $bootstrap_node and $::hostname == downcase($bootstrap_node) {
|
|
||||||
$sync_db = true
|
|
||||||
} else {
|
|
||||||
$sync_db = false
|
|
||||||
}
|
|
||||||
|
|
||||||
include tripleo::profile::base::mistral
|
|
||||||
|
|
||||||
if $step >= 4 or ($step >= 3 and $sync_db) {
|
|
||||||
include mistral::executor
|
|
||||||
if $docker_group {
|
|
||||||
ensure_resource('group', 'docker', {
|
|
||||||
'ensure' => 'present',
|
|
||||||
'tag' => 'group',
|
|
||||||
'gid' => $::docker_group_gid,
|
|
||||||
})
|
|
||||||
ensure_resource('user', 'mistral', {
|
|
||||||
'name' => 'mistral',
|
|
||||||
'tag' => 'user',
|
|
||||||
'groups' => 'docker',
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,103 +0,0 @@
|
|||||||
#
|
|
||||||
# Copyright (C) 2020 Red Hat, Inc.
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
||||||
# not use this file except in compliance with the License. You may obtain
|
|
||||||
# a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
||||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
||||||
# License for the specific language governing permissions and limitations
|
|
||||||
# under the License.
|
|
||||||
#
|
|
||||||
|
|
||||||
require 'spec_helper'
|
|
||||||
|
|
||||||
describe 'tripleo::profile::base::mistral::api' do
|
|
||||||
shared_examples_for 'tripleo::profile::base::mistral::api' do
|
|
||||||
let(:pre_condition) do
|
|
||||||
<<-eos
|
|
||||||
class { 'tripleo::profile::base::mistral':
|
|
||||||
step => #{params[:step]},
|
|
||||||
}
|
|
||||||
class { 'tripleo::profile::base::mistral::authtoken':
|
|
||||||
step => #{params[:step]},
|
|
||||||
}
|
|
||||||
eos
|
|
||||||
end
|
|
||||||
|
|
||||||
context 'with step less than 3' do
|
|
||||||
let(:params) { { :step => 1 } }
|
|
||||||
it 'should do nothing' do
|
|
||||||
is_expected.to contain_class('tripleo::profile::base::mistral::api')
|
|
||||||
is_expected.to contain_class('tripleo::profile::base::mistral')
|
|
||||||
is_expected.to contain_class('tripleo::profile::base::mistral::authtoken')
|
|
||||||
is_expected.to_not contain_class('mistral::api')
|
|
||||||
is_expected.to_not contain_class('tripleo::profile::base::apache')
|
|
||||||
is_expected.to_not contain_class('mistral::wsgi::apache')
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
context 'with step 3 on bootstrap node' do
|
|
||||||
let(:params) { {
|
|
||||||
:step => 3,
|
|
||||||
:bootstrap_node => 'node.example.com',
|
|
||||||
} }
|
|
||||||
|
|
||||||
it 'should trigger complete configuration' do
|
|
||||||
is_expected.to contain_class('tripleo::profile::base::mistral::api')
|
|
||||||
is_expected.to contain_class('tripleo::profile::base::mistral')
|
|
||||||
is_expected.to contain_class('tripleo::profile::base::mistral::authtoken')
|
|
||||||
is_expected.to contain_class('mistral::api')
|
|
||||||
is_expected.to contain_class('tripleo::profile::base::apache')
|
|
||||||
is_expected.to contain_class('mistral::wsgi::apache')
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
context 'with step 3 not on bootstrap node' do
|
|
||||||
let(:params) { {
|
|
||||||
:step => 3,
|
|
||||||
:bootstrap_node => 'other.example.com'
|
|
||||||
} }
|
|
||||||
|
|
||||||
it 'should not trigger any configuration' do
|
|
||||||
is_expected.to contain_class('tripleo::profile::base::mistral::api')
|
|
||||||
is_expected.to contain_class('tripleo::profile::base::mistral')
|
|
||||||
is_expected.to contain_class('tripleo::profile::base::mistral::authtoken')
|
|
||||||
is_expected.to_not contain_class('mistral::api')
|
|
||||||
is_expected.to_not contain_class('tripleo::profile::base::apache')
|
|
||||||
is_expected.to_not contain_class('mistral::wsgi::apache')
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
context 'with step 4 on other node' do
|
|
||||||
let(:params) { {
|
|
||||||
:step => 4,
|
|
||||||
:bootstrap_node => 'other.example.com',
|
|
||||||
} }
|
|
||||||
|
|
||||||
it 'should trigger complete configuration' do
|
|
||||||
is_expected.to contain_class('tripleo::profile::base::mistral::api')
|
|
||||||
is_expected.to contain_class('tripleo::profile::base::mistral')
|
|
||||||
is_expected.to contain_class('tripleo::profile::base::mistral::authtoken')
|
|
||||||
is_expected.to contain_class('mistral::api')
|
|
||||||
is_expected.to contain_class('tripleo::profile::base::apache')
|
|
||||||
is_expected.to contain_class('mistral::wsgi::apache')
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
|
||||||
|
|
||||||
on_supported_os.each do |os, facts|
|
|
||||||
context "on #{os}" do
|
|
||||||
let(:facts) do
|
|
||||||
facts.merge({ :hostname => 'node.example.com' })
|
|
||||||
end
|
|
||||||
|
|
||||||
it_behaves_like 'tripleo::profile::base::mistral::api'
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
@ -1,70 +0,0 @@
|
|||||||
#
|
|
||||||
# Copyright (C) 2020 Red Hat, Inc.
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
||||||
# not use this file except in compliance with the License. You may obtain
|
|
||||||
# a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
||||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
||||||
# License for the specific language governing permissions and limitations
|
|
||||||
# under the License.
|
|
||||||
#
|
|
||||||
|
|
||||||
require 'spec_helper'
|
|
||||||
|
|
||||||
describe 'tripleo::profile::base::mistral::authtoken' do
|
|
||||||
shared_examples_for 'tripleo::profile::base::mistral::authtoken' do
|
|
||||||
context 'with step less than 3' do
|
|
||||||
let(:params) { {
|
|
||||||
:step => 1,
|
|
||||||
} }
|
|
||||||
|
|
||||||
it {
|
|
||||||
is_expected.to contain_class('tripleo::profile::base::mistral::authtoken')
|
|
||||||
is_expected.to_not contain_class('mistral::keystone::authtoken')
|
|
||||||
}
|
|
||||||
end
|
|
||||||
|
|
||||||
context 'with step 3' do
|
|
||||||
let(:params) { {
|
|
||||||
:step => 3,
|
|
||||||
:memcached_hosts => '127.0.0.1',
|
|
||||||
} }
|
|
||||||
|
|
||||||
it {
|
|
||||||
is_expected.to contain_class('tripleo::profile::base::mistral::authtoken')
|
|
||||||
is_expected.to contain_class('mistral::keystone::authtoken').with(
|
|
||||||
:memcached_servers => ['127.0.0.1:11211'])
|
|
||||||
}
|
|
||||||
end
|
|
||||||
|
|
||||||
context 'with step 3 with ipv6' do
|
|
||||||
let(:params) { {
|
|
||||||
:step => 3,
|
|
||||||
:memcached_hosts => '::1',
|
|
||||||
} }
|
|
||||||
|
|
||||||
it {
|
|
||||||
is_expected.to contain_class('tripleo::profile::base::mistral::authtoken')
|
|
||||||
is_expected.to contain_class('mistral::keystone::authtoken').with(
|
|
||||||
:memcached_servers => ['[::1]:11211'])
|
|
||||||
}
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
on_supported_os.each do |os, facts|
|
|
||||||
context "on #{os}" do
|
|
||||||
let(:facts) do
|
|
||||||
facts.merge({ :hostname => 'node.example.com' })
|
|
||||||
end
|
|
||||||
|
|
||||||
it_behaves_like 'tripleo::profile::base::mistral::authtoken'
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
@ -1,88 +0,0 @@
|
|||||||
#
|
|
||||||
# Copyright (C) 2020 Red Hat, Inc.
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
||||||
# not use this file except in compliance with the License. You may obtain
|
|
||||||
# a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
||||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
||||||
# License for the specific language governing permissions and limitations
|
|
||||||
# under the License.
|
|
||||||
#
|
|
||||||
|
|
||||||
require 'spec_helper'
|
|
||||||
|
|
||||||
describe 'tripleo::profile::base::mistral::engine' do
|
|
||||||
shared_examples_for 'tripleo::profile::base::mistral::engine' do
|
|
||||||
let(:pre_condition) do
|
|
||||||
<<-eos
|
|
||||||
class { 'tripleo::profile::base::mistral':
|
|
||||||
step => #{params[:step]},
|
|
||||||
}
|
|
||||||
eos
|
|
||||||
end
|
|
||||||
|
|
||||||
context 'with step less than 3' do
|
|
||||||
let(:params) { { :step => 1 } }
|
|
||||||
it 'should do nothing' do
|
|
||||||
is_expected.to contain_class('tripleo::profile::base::mistral::engine')
|
|
||||||
is_expected.to contain_class('tripleo::profile::base::mistral')
|
|
||||||
is_expected.to_not contain_class('mistral::engine')
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
context 'with step 3 on bootstrap node' do
|
|
||||||
let(:params) { {
|
|
||||||
:step => 3,
|
|
||||||
:bootstrap_node => 'node.example.com',
|
|
||||||
} }
|
|
||||||
|
|
||||||
it 'should trigger complete configuration' do
|
|
||||||
is_expected.to contain_class('tripleo::profile::base::mistral::engine')
|
|
||||||
is_expected.to contain_class('tripleo::profile::base::mistral')
|
|
||||||
is_expected.to contain_class('mistral::engine')
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
context 'with step 3 not on bootstrap node' do
|
|
||||||
let(:params) { {
|
|
||||||
:step => 3,
|
|
||||||
:bootstrap_node => 'other.example.com'
|
|
||||||
} }
|
|
||||||
|
|
||||||
it 'should not trigger any configuration' do
|
|
||||||
is_expected.to contain_class('tripleo::profile::base::mistral::engine')
|
|
||||||
is_expected.to contain_class('tripleo::profile::base::mistral')
|
|
||||||
is_expected.to_not contain_class('mistral::engine')
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
context 'with step 4 on other node' do
|
|
||||||
let(:params) { {
|
|
||||||
:step => 4,
|
|
||||||
:bootstrap_node => 'other.example.com',
|
|
||||||
} }
|
|
||||||
|
|
||||||
it 'should trigger complete configuration' do
|
|
||||||
is_expected.to contain_class('tripleo::profile::base::mistral::engine')
|
|
||||||
is_expected.to contain_class('tripleo::profile::base::mistral')
|
|
||||||
is_expected.to contain_class('mistral::engine')
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
|
||||||
|
|
||||||
on_supported_os.each do |os, facts|
|
|
||||||
context "on #{os}" do
|
|
||||||
let(:facts) do
|
|
||||||
facts.merge({ :hostname => 'node.example.com' })
|
|
||||||
end
|
|
||||||
|
|
||||||
it_behaves_like 'tripleo::profile::base::mistral::engine'
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
@ -1,88 +0,0 @@
|
|||||||
#
|
|
||||||
# Copyright (C) 2020 Red Hat, Inc.
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
||||||
# not use this file except in compliance with the License. You may obtain
|
|
||||||
# a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
||||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
||||||
# License for the specific language governing permissions and limitations
|
|
||||||
# under the License.
|
|
||||||
#
|
|
||||||
|
|
||||||
require 'spec_helper'
|
|
||||||
|
|
||||||
describe 'tripleo::profile::base::mistral::event_engine' do
|
|
||||||
shared_examples_for 'tripleo::profile::base::mistral::event_engine' do
|
|
||||||
let(:pre_condition) do
|
|
||||||
<<-eos
|
|
||||||
class { 'tripleo::profile::base::mistral':
|
|
||||||
step => #{params[:step]},
|
|
||||||
}
|
|
||||||
eos
|
|
||||||
end
|
|
||||||
|
|
||||||
context 'with step less than 3' do
|
|
||||||
let(:params) { { :step => 1 } }
|
|
||||||
it 'should do nothing' do
|
|
||||||
is_expected.to contain_class('tripleo::profile::base::mistral::event_engine')
|
|
||||||
is_expected.to contain_class('tripleo::profile::base::mistral')
|
|
||||||
is_expected.to_not contain_class('mistral::event_engine')
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
context 'with step 3 on bootstrap node' do
|
|
||||||
let(:params) { {
|
|
||||||
:step => 3,
|
|
||||||
:bootstrap_node => 'node.example.com',
|
|
||||||
} }
|
|
||||||
|
|
||||||
it 'should trigger complete configuration' do
|
|
||||||
is_expected.to contain_class('tripleo::profile::base::mistral::event_engine')
|
|
||||||
is_expected.to contain_class('tripleo::profile::base::mistral')
|
|
||||||
is_expected.to contain_class('mistral::event_engine')
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
context 'with step 3 not on bootstrap node' do
|
|
||||||
let(:params) { {
|
|
||||||
:step => 3,
|
|
||||||
:bootstrap_node => 'other.example.com'
|
|
||||||
} }
|
|
||||||
|
|
||||||
it 'should not trigger any configuration' do
|
|
||||||
is_expected.to contain_class('tripleo::profile::base::mistral::event_engine')
|
|
||||||
is_expected.to contain_class('tripleo::profile::base::mistral')
|
|
||||||
is_expected.to_not contain_class('mistral::event_engine')
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
context 'with step 4 on other node' do
|
|
||||||
let(:params) { {
|
|
||||||
:step => 4,
|
|
||||||
:bootstrap_node => 'other.example.com',
|
|
||||||
} }
|
|
||||||
|
|
||||||
it 'should trigger complete configuration' do
|
|
||||||
is_expected.to contain_class('tripleo::profile::base::mistral::event_engine')
|
|
||||||
is_expected.to contain_class('tripleo::profile::base::mistral')
|
|
||||||
is_expected.to contain_class('mistral::event_engine')
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
|
||||||
|
|
||||||
on_supported_os.each do |os, facts|
|
|
||||||
context "on #{os}" do
|
|
||||||
let(:facts) do
|
|
||||||
facts.merge({ :hostname => 'node.example.com' })
|
|
||||||
end
|
|
||||||
|
|
||||||
it_behaves_like 'tripleo::profile::base::mistral::event_engine'
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
@ -1,92 +0,0 @@
|
|||||||
#
|
|
||||||
# Copyright (C) 2020 Red Hat, Inc.
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
||||||
# not use this file except in compliance with the License. You may obtain
|
|
||||||
# a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
||||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
||||||
# License for the specific language governing permissions and limitations
|
|
||||||
# under the License.
|
|
||||||
#
|
|
||||||
|
|
||||||
require 'spec_helper'
|
|
||||||
|
|
||||||
describe 'tripleo::profile::base::mistral::executor' do
|
|
||||||
shared_examples_for 'tripleo::profile::base::mistral::executor' do
|
|
||||||
let(:pre_condition) do
|
|
||||||
<<-eos
|
|
||||||
class { 'tripleo::profile::base::mistral':
|
|
||||||
step => #{params[:step]},
|
|
||||||
}
|
|
||||||
eos
|
|
||||||
end
|
|
||||||
|
|
||||||
let(:pre_condition) do
|
|
||||||
"class { 'tripleo::profile::base::mistral': step => #{params[:step]} }"
|
|
||||||
end
|
|
||||||
|
|
||||||
context 'with step less than 3' do
|
|
||||||
let(:params) { { :step => 1 } }
|
|
||||||
it 'should do nothing' do
|
|
||||||
is_expected.to contain_class('tripleo::profile::base::mistral::executor')
|
|
||||||
is_expected.to contain_class('tripleo::profile::base::mistral')
|
|
||||||
is_expected.to_not contain_class('mistral::executor')
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
context 'with step 3 on bootstrap node' do
|
|
||||||
let(:params) { {
|
|
||||||
:step => 3,
|
|
||||||
:bootstrap_node => 'node.example.com',
|
|
||||||
} }
|
|
||||||
|
|
||||||
it 'should trigger complete configuration' do
|
|
||||||
is_expected.to contain_class('tripleo::profile::base::mistral::executor')
|
|
||||||
is_expected.to contain_class('tripleo::profile::base::mistral')
|
|
||||||
is_expected.to contain_class('mistral::executor')
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
context 'with step 3 not on bootstrap node' do
|
|
||||||
let(:params) { {
|
|
||||||
:step => 3,
|
|
||||||
:bootstrap_node => 'other.example.com'
|
|
||||||
} }
|
|
||||||
|
|
||||||
it 'should not trigger any configuration' do
|
|
||||||
is_expected.to contain_class('tripleo::profile::base::mistral::executor')
|
|
||||||
is_expected.to contain_class('tripleo::profile::base::mistral')
|
|
||||||
is_expected.to_not contain_class('mistral::executor')
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
context 'with step 4 on other node' do
|
|
||||||
let(:params) { {
|
|
||||||
:step => 4,
|
|
||||||
:bootstrap_node => 'other.example.com',
|
|
||||||
} }
|
|
||||||
|
|
||||||
it 'should trigger complete configuration' do
|
|
||||||
is_expected.to contain_class('tripleo::profile::base::mistral::executor')
|
|
||||||
is_expected.to contain_class('tripleo::profile::base::mistral')
|
|
||||||
is_expected.to contain_class('mistral::executor')
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
|
||||||
|
|
||||||
on_supported_os.each do |os, facts|
|
|
||||||
context "on #{os}" do
|
|
||||||
let(:facts) do
|
|
||||||
facts.merge({ :hostname => 'node.example.com' })
|
|
||||||
end
|
|
||||||
|
|
||||||
it_behaves_like 'tripleo::profile::base::mistral::executor'
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
@ -1,118 +0,0 @@
|
|||||||
#
|
|
||||||
# Copyright (C) 2020 Red Hat, Inc.
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
||||||
# not use this file except in compliance with the License. You may obtain
|
|
||||||
# a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
||||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
||||||
# License for the specific language governing permissions and limitations
|
|
||||||
# under the License.
|
|
||||||
#
|
|
||||||
|
|
||||||
require 'spec_helper'
|
|
||||||
|
|
||||||
describe 'tripleo::profile::base::mistral' do
|
|
||||||
shared_examples_for 'tripleo::profile::base::mistral' do
|
|
||||||
context 'with step less than 3' do
|
|
||||||
let(:params) { { :step => 1 } }
|
|
||||||
it 'should do nothing' do
|
|
||||||
is_expected.to contain_class('tripleo::profile::base::mistral')
|
|
||||||
is_expected.to_not contain_class('mistral')
|
|
||||||
is_expected.to_not contain_class('mistral::config')
|
|
||||||
is_expected.to_not contain_class('mistral::cors')
|
|
||||||
is_expected.to_not contain_class('mistral::db')
|
|
||||||
is_expected.to_not contain_class('mistral::db::sync')
|
|
||||||
is_expected.to_not contain_class('mistral::logging')
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
context 'with step 3 on bootstrap node' do
|
|
||||||
let(:params) { {
|
|
||||||
:step => 3,
|
|
||||||
:bootstrap_node => 'node.example.com',
|
|
||||||
:oslomsg_rpc_hosts => [ '192.168.0.1' ],
|
|
||||||
:oslomsg_rpc_username => 'mistral1',
|
|
||||||
:oslomsg_rpc_password => 'foo',
|
|
||||||
:oslomsg_rpc_port => '1234',
|
|
||||||
:oslomsg_notify_hosts => [ '192.168.0.2' ],
|
|
||||||
:oslomsg_notify_username => 'mistral2',
|
|
||||||
:oslomsg_notify_password => 'baa',
|
|
||||||
:oslomsg_notify_port => '5678'
|
|
||||||
} }
|
|
||||||
|
|
||||||
it 'should trigger complete configuration' do
|
|
||||||
is_expected.to contain_class('tripleo::profile::base::mistral')
|
|
||||||
is_expected.to contain_class('mistral').with(
|
|
||||||
:default_transport_url => 'rabbit://mistral1:foo@192.168.0.1:1234/?ssl=0',
|
|
||||||
:notification_transport_url => 'rabbit://mistral2:baa@192.168.0.2:5678/?ssl=0'
|
|
||||||
)
|
|
||||||
is_expected.to contain_class('mistral::config')
|
|
||||||
is_expected.to contain_class('mistral::cors')
|
|
||||||
is_expected.to contain_class('mistral::db')
|
|
||||||
is_expected.to contain_class('mistral::db::sync')
|
|
||||||
is_expected.to contain_class('mistral::logging')
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
context 'with step 3 not on bootstrap node' do
|
|
||||||
let(:params) { {
|
|
||||||
:step => 3,
|
|
||||||
:bootstrap_node => 'other.example.com'
|
|
||||||
} }
|
|
||||||
|
|
||||||
it 'should not trigger any configuration' do
|
|
||||||
is_expected.to contain_class('tripleo::profile::base::mistral')
|
|
||||||
is_expected.to_not contain_class('mistral')
|
|
||||||
is_expected.to_not contain_class('mistral::config')
|
|
||||||
is_expected.to_not contain_class('mistral::cors')
|
|
||||||
is_expected.to_not contain_class('mistral::db')
|
|
||||||
is_expected.to_not contain_class('mistral::db::sync')
|
|
||||||
is_expected.to_not contain_class('mistral::logging')
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
context 'with step 4 on other node' do
|
|
||||||
let(:params) { {
|
|
||||||
:step => 4,
|
|
||||||
:bootstrap_node => 'other.example.com',
|
|
||||||
:oslomsg_rpc_hosts => [ '192.168.0.1' ],
|
|
||||||
:oslomsg_rpc_username => 'mistral1',
|
|
||||||
:oslomsg_rpc_password => 'foo',
|
|
||||||
:oslomsg_rpc_port => '1234',
|
|
||||||
:oslomsg_notify_hosts => [ '192.168.0.2' ],
|
|
||||||
:oslomsg_notify_username => 'mistral2',
|
|
||||||
:oslomsg_notify_password => 'baa',
|
|
||||||
:oslomsg_notify_port => '5678'
|
|
||||||
} }
|
|
||||||
|
|
||||||
it 'should trigger complete configuration' do
|
|
||||||
is_expected.to contain_class('tripleo::profile::base::mistral')
|
|
||||||
is_expected.to contain_class('mistral').with(
|
|
||||||
:default_transport_url => 'rabbit://mistral1:foo@192.168.0.1:1234/?ssl=0',
|
|
||||||
:notification_transport_url => 'rabbit://mistral2:baa@192.168.0.2:5678/?ssl=0'
|
|
||||||
)
|
|
||||||
is_expected.to contain_class('mistral::config')
|
|
||||||
is_expected.to contain_class('mistral::cors')
|
|
||||||
is_expected.to contain_class('mistral::db')
|
|
||||||
is_expected.to contain_class('mistral::db::sync')
|
|
||||||
is_expected.to contain_class('mistral::logging')
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
|
||||||
|
|
||||||
on_supported_os.each do |os, facts|
|
|
||||||
context "on #{os}" do
|
|
||||||
let(:facts) do
|
|
||||||
facts.merge({ :hostname => 'node.example.com' })
|
|
||||||
end
|
|
||||||
|
|
||||||
it_behaves_like 'tripleo::profile::base::mistral'
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
Loading…
Reference in New Issue
Block a user