
The module was written in a way that was not consistent with other Puppet OpenStack modules, the interface was very different. This patch: * add db.pp * update logging.pp with usual parameters * drop useless parameters in keystone/auth.pp * cleanup params.pp * drop services.pp, which is useless * Update unit tests * Add coordination support in init.pp * Some alignment issues * Add more doc in README * Stop including ::mistral in all classes * Include mistral::policy in mistral::api This is a non-backward compatible change, but since the module has no release and no stable branch, also very new, this is not something we need to care at this stage. People using this module at this stage will have to update their manifests otherwise their Puppet catalog will fail. Change-Id: I979e21caa71ee35337dc01b225878701868e966a
77 lines
2.1 KiB
Puppet
77 lines
2.1 KiB
Puppet
# == Class: mistral::api
|
|
#
|
|
# Installs & configure the Mistral API service
|
|
#
|
|
# === Parameters
|
|
# [*package_ensure*]
|
|
# (Optional) Ensure state for package.
|
|
# Defaults to present
|
|
#
|
|
# [*enabled*]
|
|
# (optional) Should the service be enabled.
|
|
# Defaults to 'true'.
|
|
#
|
|
# [*manage_service*]
|
|
# (optional) Whether the service should be managed by Puppet.
|
|
# Defaults to 'true'.
|
|
#
|
|
# [*bind_host*]
|
|
# (Optional) Address to bind the server. Useful when
|
|
# selecting a particular network interface.
|
|
# Defaults to $::os_service_default.
|
|
#
|
|
# [*bind_port*]
|
|
# (Optional) The port on which the server will listen.
|
|
# Defaults to $::os_service_default.
|
|
#
|
|
# [*allow_action_execution_deletion*]
|
|
# (Optional) Enables the ability to delete action_execution which has no
|
|
# relationship with workflows. (boolean value).
|
|
# Defaults to $::os_service_default.
|
|
#
|
|
class mistral::api (
|
|
$package_ensure = present,
|
|
$manage_service = true,
|
|
$enabled = true,
|
|
$bind_host = $::os_service_default,
|
|
$bind_port = $::os_service_default,
|
|
$allow_action_execution_deletion = $::os_service_default,
|
|
) {
|
|
|
|
include ::mistral::params
|
|
include ::mistral::policy
|
|
|
|
Package['mistral-api'] -> Class['mistral::policy']
|
|
Class['mistral::policy'] ~> Service['mistral-api']
|
|
|
|
package { 'mistral-api':
|
|
ensure => $package_ensure,
|
|
name => $::mistral::params::api_package_name,
|
|
tag => ['openstack', 'mistral-package'],
|
|
}
|
|
|
|
if $manage_service {
|
|
if $enabled {
|
|
$service_ensure = 'running'
|
|
} else {
|
|
$service_ensure = 'stopped'
|
|
}
|
|
}
|
|
|
|
service { 'mistral-api':
|
|
ensure => $service_ensure,
|
|
name => $::mistral::params::api_service_name,
|
|
enable => $enabled,
|
|
hasstatus => true,
|
|
hasrestart => true,
|
|
tag => 'mistral-service',
|
|
}
|
|
|
|
mistral_config {
|
|
'api/host' : value => $bind_host;
|
|
'api/port' : value => $bind_port;
|
|
'api/allow_action_execution_deletion' : value => $allow_action_execution_deletion;
|
|
}
|
|
|
|
}
|