Fuel role and tasks with Puppet manifests
The commit includes: - Fuel role 'Mistral' - Fuel deployment tasks - Puppet manifests for the tasks - Puppet module mistral (as git submodule) Change-Id: I6b89855d0556f2742184224b00e693768beda83a
This commit is contained in:
parent
f0b13a6f4d
commit
5ee42da796
|
@ -0,0 +1,4 @@
|
|||
[submodule "deployment_scripts/puppet/modules/mistral"]
|
||||
path = deployment_scripts/puppet/modules/mistral
|
||||
url = https://github.com/openstack/puppet-mistral.git
|
||||
branch = stable/mitaka
|
|
@ -1,4 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
# It's a script which deploys your plugin
|
||||
echo fuel-plugin-mistral > /tmp/fuel-plugin-mistral
|
|
@ -0,0 +1,19 @@
|
|||
# Copyright 2016 Mirantis, 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.
|
||||
|
||||
notice('MODULAR: fuel-plugin-mistral/api.pp')
|
||||
|
||||
include plugin_tasks
|
||||
|
||||
class {'plugin_tasks::api':}
|
|
@ -0,0 +1,19 @@
|
|||
# Copyright 2016 Mirantis, 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.
|
||||
|
||||
notice('MODULAR: fuel-plugin-mistral/conf.pp')
|
||||
|
||||
include plugin_tasks
|
||||
|
||||
class {'plugin_tasks::conf':}
|
|
@ -0,0 +1,19 @@
|
|||
# Copyright 2016 Mirantis, 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.
|
||||
|
||||
notice ('MODULAR: fuel-plugin-mistral/dashboard.pp')
|
||||
|
||||
include plugin_tasks
|
||||
|
||||
class { 'plugin_tasks::dashboard': }
|
|
@ -0,0 +1,24 @@
|
|||
# Copyright 2016 Mirantis, 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.
|
||||
|
||||
notice('MODULAR: fuel-plugin-mistral/db.pp')
|
||||
|
||||
include plugin_tasks
|
||||
|
||||
class {'plugin_tasks::db':}
|
||||
|
||||
class mysql::config {}
|
||||
include mysql::config
|
||||
class mysql::server {}
|
||||
include mysql::server
|
|
@ -0,0 +1,20 @@
|
|||
# Copyright 2016 Mirantis, 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.
|
||||
|
||||
|
||||
notice('MODULAR: fuel-plugin-mistral/engine.pp')
|
||||
|
||||
include plugin_tasks
|
||||
|
||||
class {'plugin_tasks::engine':}
|
|
@ -0,0 +1,20 @@
|
|||
# Copyright 2016 Mirantis, 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.
|
||||
|
||||
|
||||
notice('MODULAR: fuel-plugin-mistral/executor.pp')
|
||||
|
||||
include plugin_tasks
|
||||
|
||||
class {'plugin_tasks::executor':}
|
|
@ -0,0 +1,19 @@
|
|||
# Copyright 2016 Mirantis, 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.
|
||||
|
||||
notice('MODULAR: fuel-plugin-mistral/keystone.pp')
|
||||
|
||||
include plugin_tasks
|
||||
|
||||
class {'plugin_tasks::keystone':}
|
|
@ -0,0 +1,17 @@
|
|||
# Copyright 2016 Mirantis, 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.
|
||||
|
||||
notice('MODULAR: fuel-plugin-mistral/repo.pp')
|
||||
|
||||
class {'plugin_tasks::repo':}
|
|
@ -0,0 +1,19 @@
|
|||
# Copyright 2016 Mirantis, 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.
|
||||
|
||||
notice('MODULAR: fuel-plugin-mistral/sync.pp')
|
||||
|
||||
include plugin_tasks
|
||||
|
||||
class {'plugin_tasks::db::sync':}
|
|
@ -0,0 +1,20 @@
|
|||
# Copyright 2016 Mirantis, 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.
|
||||
|
||||
|
||||
notice('MODULAR: fuel-plugin-mistral/vip.pp')
|
||||
|
||||
include plugin_tasks
|
||||
|
||||
class {'plugin_tasks::vip':}
|
|
@ -0,0 +1 @@
|
|||
Subproject commit 15dfc011f0bad1836e37f9944b87c22264740a86
|
|
@ -0,0 +1,21 @@
|
|||
# Copyright 2016 Mirantis, 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 plugin_tasks::api {
|
||||
|
||||
class { '::mistral::api':
|
||||
bind_host => $plugin_tasks::bind_host,
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,46 @@
|
|||
# Copyright 2016 Mirantis, 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 plugin_tasks::conf {
|
||||
|
||||
$roles = hiera(roles)
|
||||
|
||||
Package <| title == 'mistral-common' |> {
|
||||
name => 'mistral-common',
|
||||
}
|
||||
class { '::mistral':
|
||||
keystone_password => $plugin_tasks::password,
|
||||
keystone_user => $plugin_tasks::auth_name,
|
||||
keystone_tenant => $plugin_tasks::tenant,
|
||||
auth_uri => $plugin_tasks::auth_uri,
|
||||
identity_uri => $plugin_tasks::identity_uri,
|
||||
database_connection => $plugin_tasks::db_connection,
|
||||
rpc_backend => $plugin_tasks::rpc_backend,
|
||||
rabbit_hosts => $plugin_tasks::rabbit_hosts,
|
||||
rabbit_userid => $plugin_tasks::rabbit_hash['user'],
|
||||
rabbit_password => $plugin_tasks::rabbit_hash['password'],
|
||||
control_exchange => $plugin_tasks::control_exchange,
|
||||
rabbit_ha_queues => $plugin_tasks::rabbit_ha_queues,
|
||||
use_syslog => $plugin_tasks::use_syslog,
|
||||
use_stderr => $plugin_tasks::use_stderr,
|
||||
log_facility => $plugin_tasks::log_facility,
|
||||
verbose => $plugin_tasks::verbose,
|
||||
debug => $plugin_tasks::debug,
|
||||
}
|
||||
|
||||
mistral_config {
|
||||
'keystone_authtoken/auth_version': value => $plugin_tasks::auth_version;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,41 @@
|
|||
# Copyright 2016 Mirantis, 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 plugin_tasks::dashboard {
|
||||
|
||||
include ::horizon::params
|
||||
|
||||
package { 'python-pip':
|
||||
ensure => installed,
|
||||
} ->
|
||||
package { 'python-dev':
|
||||
ensure => installed,
|
||||
} ->
|
||||
package { 'mistral-dashboard':
|
||||
ensure => $plugin_tasks::dashboard_version,
|
||||
name => $plugin_tasks::dashboard_name,
|
||||
provider => pip,
|
||||
} ->
|
||||
file { $plugin_tasks::horizon_ext_file:
|
||||
ensure => file,
|
||||
content => template('plugin_tasks/_50_mistral.py.erb'),
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0644',
|
||||
} ~>
|
||||
service { $horizon::params::http_service:
|
||||
ensure => running,
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,42 @@
|
|||
# Copyright 2016 Mirantis, 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 plugin_tasks::db {
|
||||
|
||||
if $plugin_tasks::db_create {
|
||||
|
||||
class { '::openstack::galera::client':
|
||||
custom_setup_class => hiera('mysql_custom_setup_class', 'galera'),
|
||||
}
|
||||
|
||||
class { '::mistral::db::mysql':
|
||||
user => $plugin_tasks::db_user,
|
||||
password => $plugin_tasks::db_password,
|
||||
dbname => $plugin_tasks::db_name,
|
||||
allowed_hosts => $plugin_tasks::allowed_hosts,
|
||||
}
|
||||
|
||||
class { '::osnailyfacter::mysql_access':
|
||||
db_host => $plugin_tasks::db_host,
|
||||
db_user => $plugin_tasks::db_root_user,
|
||||
db_password => $plugin_tasks::db_root_password,
|
||||
}
|
||||
|
||||
Class['::openstack::galera::client'] ->
|
||||
Class['::osnailyfacter::mysql_access'] ->
|
||||
Class['::mistral::db::mysql']
|
||||
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
# Copyright 2016 Mirantis, 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 plugin_tasks::db::sync {
|
||||
|
||||
Exec <| title == 'mistral-db-sync' |> {
|
||||
refreshonly => false,
|
||||
}
|
||||
|
||||
Exec <| title == 'mistral-db-populate' |> {
|
||||
refreshonly => false,
|
||||
}
|
||||
|
||||
include mistral::db::sync
|
||||
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
# Copyright 2016 Mirantis, 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 plugin_tasks::engine {
|
||||
|
||||
class { '::mistral::engine': }
|
||||
|
||||
Mistral_config <||> ~> Service[$::mistral::params::engine_service_name]
|
||||
Package['mistral-engine'] -> Service[$::mistral::params::engine_service_name]
|
||||
Package['mistral-engine'] -> Service['mistral-engine']
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
# Copyright 2016 Mirantis, 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 plugin_tasks::executor {
|
||||
|
||||
class { '::mistral::executor': }
|
||||
Mistral_config <||> ~> Service[$::mistral::params::executor_service_name]
|
||||
Package['mistral-executor'] -> Service[$::mistral::params::executor_service_name]
|
||||
Package['mistral-executor'] -> Service['mistral-executor']
|
||||
|
||||
}
|
|
@ -0,0 +1,150 @@
|
|||
# Copyright 2016 Mirantis, 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 plugin_tasks {
|
||||
|
||||
$network_scheme = hiera_hash('network_scheme', {})
|
||||
$network_metadata = hiera_hash('network_metadata', {})
|
||||
prepare_network_config($network_scheme)
|
||||
|
||||
# General
|
||||
|
||||
$mistral_hash = hiera_hash('fuel-plugin-mistral', {})
|
||||
|
||||
$public_vip = hiera('public_vip', undef)
|
||||
$management_vip = hiera('management_vip', undef)
|
||||
$database_vip = hiera('database_vip', undef)
|
||||
$service_endpoint = hiera('service_endpoint')
|
||||
|
||||
$public_ssl_hash = hiera_hash('public_ssl')
|
||||
$ssl_hash = hiera_hash('use_ssl', {})
|
||||
$public_ssl = get_ssl_property($ssl_hash, $public_ssl_hash, 'mistral', 'public', 'usage', false)
|
||||
$public_ssl_path = get_ssl_property($ssl_hash, $public_ssl_hash, 'mistral', 'public', 'path', [''])
|
||||
|
||||
$port = '8989'
|
||||
|
||||
# Database
|
||||
|
||||
$mysql_hash = hiera_hash('mysql', {})
|
||||
|
||||
$mysql_root_user = pick($mysql_hash['root_user'], 'root')
|
||||
validate_string($mysql_root_user)
|
||||
$mysql_root_password = $mysql_hash['root_password']
|
||||
|
||||
$db_create = pick($mysql_hash['db_create'], true)
|
||||
|
||||
$db_user = 'mistral'
|
||||
$db_password = pick($mistral_hash['db_password'], $mysql_root_password)
|
||||
$db_name = 'mistral'
|
||||
$allowed_hosts = [ 'localhost', '127.0.0.1', '%' ]
|
||||
|
||||
$db_host = $database_vip
|
||||
$db_root_user = $mysql_root_user
|
||||
$db_root_password = $mysql_root_password
|
||||
|
||||
$db_type = 'mysql'
|
||||
|
||||
# LP#1526938 - python-mysqldb supports this, python-pymysql does not
|
||||
if $::os_package_type == 'debian' {
|
||||
$extra_params = { 'charset' => 'utf8', 'read_timeout' => 60 }
|
||||
} else {
|
||||
$extra_params = { 'charset' => 'utf8' }
|
||||
}
|
||||
$db_connection = os_database_connection({
|
||||
'dialect' => $db_type,
|
||||
'host' => $db_host,
|
||||
'database' => $db_name,
|
||||
'username' => $db_user,
|
||||
'password' => $db_password,
|
||||
'extra' => $extra_params
|
||||
})
|
||||
|
||||
# RabbitMQ
|
||||
|
||||
$rabbit_hash = hiera_hash('rabbit', {})
|
||||
|
||||
$rabbit_hosts = split(hiera('amqp_hosts',''), ',')
|
||||
$control_exchange = 'mistral'
|
||||
$rabbit_ha_queues = true
|
||||
|
||||
$queue_provider = hiera('queue_provider', 'rabbit')
|
||||
if $queue_provider == 'rabbitmq'{
|
||||
$rpc_backend = 'rabbit'
|
||||
} else {
|
||||
$rpc_backend = $queue_provider
|
||||
}
|
||||
|
||||
# Keystone
|
||||
|
||||
$public_protocol = get_ssl_property($ssl_hash, $public_ssl_hash, 'mistral', 'public', 'protocol', 'http')
|
||||
$public_address = get_ssl_property($ssl_hash, $public_ssl_hash, 'mistral', 'public', 'hostname', [$public_vip])
|
||||
validate_string($public_address)
|
||||
|
||||
$internal_protocol = get_ssl_property($ssl_hash, {}, 'mistral', 'internal', 'protocol', 'http')
|
||||
$internal_address = get_ssl_property($ssl_hash, {}, 'mistral', 'internal', 'hostname', [$management_vip])
|
||||
validate_string($internal_address)
|
||||
|
||||
$admin_protocol = get_ssl_property($ssl_hash, {}, 'mistral', 'admin', 'protocol', 'http')
|
||||
$admin_address = get_ssl_property($ssl_hash, {}, 'mistral', 'admin', 'hostname', [$management_vip])
|
||||
validate_string($admin_address)
|
||||
|
||||
$public_base_url = "${public_protocol}://${public_address}:${port}"
|
||||
$internal_base_url = "${internal_protocol}://${internal_address}:${port}"
|
||||
$admin_base_url = "${admin_protocol}://${admin_address}:${port}"
|
||||
|
||||
$password = $mistral_hash['keystone_password']
|
||||
validate_string($password)
|
||||
$auth_name = 'mistral'
|
||||
$configure_endpoint = true
|
||||
$configure_user = true
|
||||
$configure_user_role = true
|
||||
$service_name = 'mistral'
|
||||
$service_type = 'workflowv2'
|
||||
$public_url = "${public_base_url}/v2"
|
||||
$internal_url = "${internal_base_url}/v2"
|
||||
$admin_url = "${admin_base_url}/v2"
|
||||
$region = hiera('region', 'RegionOne')
|
||||
$tenant = 'services'
|
||||
|
||||
|
||||
$keystone_auth_protocol = get_ssl_property($ssl_hash, {}, 'keystone', 'internal', 'protocol', 'http')
|
||||
$keystone_auth_host = get_ssl_property($ssl_hash, {}, 'keystone', 'internal', 'hostname', [hiera('keystone_endpoint', ''), $service_endpoint, $management_vip])
|
||||
|
||||
$service_port = '5000'
|
||||
|
||||
$auth_version = 'v3'
|
||||
$auth_uri = "${keystone_auth_protocol}://${keystone_auth_host}:${service_port}/${$auth_version}"
|
||||
$identity_uri = "${keystone_auth_protocol}://${keystone_auth_host}:${service_port}/"
|
||||
|
||||
# API and VIP
|
||||
|
||||
## Mistral API runs on Controllers
|
||||
$mistral_api_nodes_hash = get_nodes_hash_by_roles($network_metadata, ['primary-controller','controller'])
|
||||
$mistral_api_nodes_ips = ipsort(values(get_node_to_ipaddr_map_by_network_role($mistral_api_nodes_hash, 'management')))
|
||||
$bind_host = get_network_role_property('management', 'ipaddr')
|
||||
|
||||
# Dashboard
|
||||
|
||||
$horizon_ext_file = '/usr/share/openstack-dashboard/openstack_dashboard/local/enabled/_50_mistral.py'
|
||||
$dashboard_version = '2.0.0'
|
||||
$dashboard_name = 'mistral-dashboard'
|
||||
# Logging
|
||||
|
||||
$use_syslog = hiera('use_syslog', true)
|
||||
$use_stderr = hiera('use_stderr', false)
|
||||
$log_facility = 'LOG_LOCAL0'
|
||||
$verbose = hiera('verbose', true)
|
||||
$debug = hiera('debug', true)
|
||||
|
||||
}
|
|
@ -0,0 +1,35 @@
|
|||
# Copyright 2016 Mirantis, 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 plugin_tasks::keystone {
|
||||
|
||||
Class['::osnailyfacter::wait_for_keystone_backends'] -> Class['::mistral::keystone::auth']
|
||||
|
||||
class { '::osnailyfacter::wait_for_keystone_backends':}
|
||||
class { '::mistral::keystone::auth':
|
||||
password => $plugin_tasks::password,
|
||||
auth_name => $plugin_tasks::auth_name,
|
||||
configure_endpoint => $plugin_tasks::configure_endpoint,
|
||||
configure_user => $plugin_tasks::configure_user,
|
||||
configure_user_role => $plugin_tasks::configure_user_role,
|
||||
service_name => $plugin_tasks::service_name,
|
||||
service_type => $plugin_tasks::service_type,
|
||||
public_url => $plugin_tasks::public_url,
|
||||
internal_url => $plugin_tasks::internal_url,
|
||||
admin_url => $plugin_tasks::admin_url,
|
||||
region => $plugin_tasks::region,
|
||||
tenant => $plugin_tasks::tenant,
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,40 @@
|
|||
# Copyright 2016 Mirantis, 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 plugin_tasks::repo {
|
||||
|
||||
include apt
|
||||
|
||||
apt::key {'fuel-infra':
|
||||
id => '3E5CBCC6DF05CD6558A75DB1BCE5CC461FA22B08',
|
||||
source => 'http://perestroika-repo-tst.infra.mirantis.net/mos-repos/ubuntu/9.0/archive-mos9.0.key',
|
||||
|
||||
}
|
||||
|
||||
# Temp repo
|
||||
apt::source {'mos-proposed':
|
||||
location => 'http://perestroika-repo-tst.infra.mirantis.net/mos-repos/ubuntu/9.0',
|
||||
release => 'mos9.0-proposed',
|
||||
repos => 'main',
|
||||
}
|
||||
|
||||
apt::pin { 'mos-proposed':
|
||||
priority => 1200,
|
||||
release => 'mos9.0-proposed',
|
||||
codename => 'mos9.0',
|
||||
originator => 'Mirantis',
|
||||
label => 'mos9.0',
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,42 @@
|
|||
# Copyright 2016 Mirantis, 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 plugin_tasks::vip {
|
||||
|
||||
openstack::ha::haproxy_service { 'mistral-api':
|
||||
internal_virtual_ip => $plugin_tasks::management_vip,
|
||||
listen_port => $plugin_tasks::port,
|
||||
order => '300',
|
||||
public_virtual_ip => $plugin_tasks::public_vip,
|
||||
internal => true,
|
||||
public => true,
|
||||
ipaddresses => $plugin_tasks::mistral_api_nodes_ips,
|
||||
server_names => $plugin_tasks::mistral_api_nodes_ips,
|
||||
public_ssl => $plugin_tasks::public_ssl,
|
||||
public_ssl_path => $plugin_tasks::public_ssl_path,
|
||||
haproxy_config_options => {
|
||||
option => ['httpchk', 'httplog', 'httpclose'],
|
||||
'http-request' => 'set-header X-Forwarded-Proto https if { ssl_fc }',
|
||||
},
|
||||
balancermember_options => 'check inter 10s fastinter 2s downinter 3s rise 3 fall 3',
|
||||
}
|
||||
|
||||
firewall { '300 mistral':
|
||||
chain => 'INPUT',
|
||||
dport => $plugin_tasks::port,
|
||||
proto => 'tcp',
|
||||
action => 'accept',
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
from mistraldashboard import exceptions
|
||||
|
||||
DASHBOARD = 'mistral'
|
||||
ADD_INSTALLED_APPS = ['mistraldashboard']
|
||||
DEFAULT = True
|
||||
|
||||
ADD_EXCEPTIONS = {
|
||||
'recoverable': exceptions.RECOVERABLE,
|
||||
'not_found': exceptions.NOT_FOUND,
|
||||
'unauthorized': exceptions.UNAUTHORIZED,
|
||||
}
|
|
@ -1,62 +1,154 @@
|
|||
# These tasks will be merged into deployment graph. Here you
|
||||
# can specify new tasks for any roles, even built-in ones.
|
||||
# Groups
|
||||
|
||||
- id: fuel-plugin-mistral_role
|
||||
- id: mistral
|
||||
type: group
|
||||
role: [fuel-plugin-mistral_role]
|
||||
role: [mistral]
|
||||
tasks: [globals, logging, hiera, hosts, firewall, connectivity_tests, dns-client, fuel_pkgs, netconfig, tools, ntp-client, reserved_ports, ssl-add-trust-chain, ssl-keys-saving]
|
||||
cross-depends:
|
||||
- name: primary-controller
|
||||
- name: controller
|
||||
parameters:
|
||||
strategy:
|
||||
type: parallel
|
||||
|
||||
- id: fuel-plugin-mistral-deployment-puppet
|
||||
# Tasks
|
||||
|
||||
- id: mistral-db
|
||||
version: 2.1.0
|
||||
type: puppet
|
||||
role: [fuel-plugin-mistral_role]
|
||||
|
||||
# If you do not want to use task-based deployment that is introduced as experimental
|
||||
# in fuel v8.0 comment code section below this comment, uncomment two lines below it
|
||||
# and do the same for tasks below.
|
||||
|
||||
version: 2.0.0
|
||||
groups: [primary-controller]
|
||||
cross-depends:
|
||||
- name: deploy_start
|
||||
cross-depended-by:
|
||||
- name: deploy_end
|
||||
# requires: [deploy_start] # version 1.0.0
|
||||
# required_for: [deploy_end]
|
||||
|
||||
- name: /^(primary-)?database$/
|
||||
# condition:
|
||||
# yaql_exp: >
|
||||
# changedAny($.fuel-plugin-mistral, $.mysql, $.network_metadata.vips,
|
||||
# $.get('mysql_custom_setup_class'))
|
||||
parameters:
|
||||
puppet_manifest: "deploy.pp"
|
||||
puppet_modules: "."
|
||||
timeout: 3600
|
||||
puppet_manifest: puppet/manifests/db.pp
|
||||
puppet_modules: puppet/modules:/etc/puppet/modules
|
||||
timeout: 1800
|
||||
|
||||
#- id: fuel-plugin-mistral-post-deployment-sh
|
||||
# type: shell
|
||||
# role: [fuel-plugin-mistral_role]
|
||||
# version: 2.0.0
|
||||
# cross-depends:
|
||||
# - name: post_deployment_start
|
||||
# cross-depended-by:
|
||||
# - name: post_deployment_end
|
||||
# # requires: [post_deployment_start]
|
||||
# # required_for: [post_deployment_end]
|
||||
# parameters:
|
||||
# cmd: echo post_deployment_task_executed > /tmp/post_deployment
|
||||
# retries: 3
|
||||
# interval: 20
|
||||
# timeout: 180
|
||||
- id: mistral-keystone
|
||||
version: 2.1.0
|
||||
type: puppet
|
||||
groups: [primary-controller]
|
||||
cross-depends:
|
||||
- name: primary-keystone
|
||||
role: self
|
||||
# condition:
|
||||
# yaql_exp: >
|
||||
# changedAny($.fuel-plugin-mistral, $.network_metadata.vips, $.public_ssl,
|
||||
# $.get('use_ssl'), $.get('region', 'RegionOne'))
|
||||
parameters:
|
||||
puppet_manifest: puppet/manifests/keystone.pp
|
||||
puppet_modules: puppet/modules:/etc/puppet/modules
|
||||
timeout: 1800
|
||||
|
||||
- id: mistral-repo
|
||||
version: 2.1.0
|
||||
type: puppet
|
||||
groups: [primary-controller, controller, mistral]
|
||||
cross-depends:
|
||||
- name: setup_repositories
|
||||
role: self
|
||||
parameters:
|
||||
puppet_manifest: puppet/manifests/repo.pp
|
||||
puppet_modules: puppet/modules:/etc/puppet/modules
|
||||
timeout: 360
|
||||
|
||||
- id: mistral-conf
|
||||
version: 2.1.0
|
||||
type: puppet
|
||||
groups: [primary-controller, controller, mistral]
|
||||
cross-depends:
|
||||
- name: mistral-repo
|
||||
role: self
|
||||
parameters:
|
||||
puppet_manifest: puppet/manifests/conf.pp
|
||||
puppet_modules: puppet/modules:/etc/puppet/modules
|
||||
timeout: 360
|
||||
|
||||
- id: mistral-db-sync
|
||||
version: 2.1.0
|
||||
type: puppet
|
||||
groups: [primary-controller]
|
||||
cross-depends:
|
||||
- name: mistral-db
|
||||
role: self
|
||||
- name: mistral-conf
|
||||
role: self
|
||||
parameters:
|
||||
puppet_manifest: puppet/manifests/sync.pp
|
||||
puppet_modules: puppet/modules:/etc/puppet/modules
|
||||
timeout: 360
|
||||
|
||||
- id: mistral-api
|
||||
version: 2.1.0
|
||||
type: puppet
|
||||
groups: [primary-controller, controller]
|
||||
cross-depends:
|
||||
- name: mistral-conf
|
||||
role: self
|
||||
- name: mistral-keystone
|
||||
- name: mistral-db
|
||||
role: primary-controller
|
||||
- name: mistral-db-sync
|
||||
parameters:
|
||||
puppet_manifest: puppet/manifests/api.pp
|
||||
puppet_modules: puppet/modules:/etc/puppet/modules
|
||||
timeout: 360
|
||||
|
||||
- id: mistral-vip
|
||||
version: 2.1.0
|
||||
type: puppet
|
||||
groups: [primary-controller, controller]
|
||||
cross-depends:
|
||||
- name: primary-cluster-haproxy
|
||||
role: self
|
||||
- name: mistral-api
|
||||
role: self
|
||||
- name: cluster-haproxy
|
||||
role: self
|
||||
parameters:
|
||||
puppet_manifest: puppet/manifests/vip.pp
|
||||
puppet_modules: puppet/modules:/etc/puppet/modules
|
||||
timeout: 360
|
||||
|
||||
- id: mistral-dashboard
|
||||
version: 2.1.0
|
||||
type: puppet
|
||||
groups: [primary-controller, controller]
|
||||
cross-depends:
|
||||
- name: /.*horizon.*/
|
||||
role: self
|
||||
parameters:
|
||||
puppet_manifest: puppet/manifests/dashboard.pp
|
||||
puppet_modules: puppet/modules:/etc/puppet/modules
|
||||
timeout: 360
|
||||
|
||||
- id: mistral-engine
|
||||
version: 2.1.0
|
||||
type: puppet
|
||||
groups: [mistral]
|
||||
cross-depends:
|
||||
- name: mistral-conf
|
||||
role: self
|
||||
- name: mistral-db-sync
|
||||
parameters:
|
||||
puppet_manifest: puppet/manifests/engine.pp
|
||||
puppet_modules: puppet/modules:/etc/puppet/modules
|
||||
timeout: 360
|
||||
|
||||
- id: mistral-executor
|
||||
version: 2.1.0
|
||||
type: puppet
|
||||
groups: [mistral]
|
||||
cross-depends:
|
||||
- name: mistral-conf
|
||||
role: self
|
||||
- name: mistral-db-sync
|
||||
parameters:
|
||||
puppet_manifest: puppet/manifests/executor.pp
|
||||
puppet_modules: puppet/modules:/etc/puppet/modules
|
||||
timeout: 360
|
||||
|
||||
#- id: fuel-plugin-mistral-pre-deployment-sh
|
||||
# type: shell
|
||||
# role: [fuel-plugin-mistral_role]
|
||||
# version: 2.0.0
|
||||
# cross-depends:
|
||||
# - name: pre_deployment_start
|
||||
# cross-depended-by:
|
||||
# - name: pre_deployment_end
|
||||
# # requires: [pre_deployment_start]
|
||||
# # required_for: [pre_deployment_end]
|
||||
# parameters:
|
||||
# cmd: echo pre_deployment_task_executed > /tmp/pre_deployment
|
||||
# retries: 3
|
||||
# interval: 20
|
||||
# timeout: 180
|
||||
|
|
|
@ -1,15 +1,11 @@
|
|||
mistral:
|
||||
# Role name
|
||||
name: "Mistral"
|
||||
# Role description
|
||||
description: "Mistral role. Hosts Mistral engine and executor components"
|
||||
# If primary then during orchestration this role will be
|
||||
# separated into primary-role and role
|
||||
description: >
|
||||
Mistral is the OpenStack workflow service. It provides a mechanism to define
|
||||
tasks and workflows without writing code, manage and execute them
|
||||
in the cloud environment.
|
||||
has_primary: false
|
||||
# Assign public IP to node if true
|
||||
public_ip_required: false
|
||||
# Weight that will be used to sort out the
|
||||
# roles on the Fuel web UI
|
||||
public_ip_required: true
|
||||
weight: 1000
|
||||
conflicts:
|
||||
- compute
|
||||
limits:
|
||||
min: 1
|
||||
|
|
Loading…
Reference in New Issue