9412a6f45a
This adds defined anchor points for external modules to hook into the software install, config and service dependency chain. This allows external modules to manage software installation (virtualenv, containers, etc) and service management (pacemaker) without needing rely on resources that may change or be renamed. Change-Id: If27e91cee37d816bfc7b577a154c71a9e5a48324
60 lines
1.2 KiB
Puppet
60 lines
1.2 KiB
Puppet
# == Class: murano::engine
|
|
#
|
|
# murano engine package & service
|
|
#
|
|
# === Parameters
|
|
#
|
|
# [*manage_service*]
|
|
# (Optional) Should the service be enabled
|
|
# Defaults to true
|
|
#
|
|
# [*enabled*]
|
|
# (Optional) Whether the service should be managed by Puppet
|
|
# Defaults to true
|
|
#
|
|
# [*package_ensure*]
|
|
# (Optional) Ensure state for package
|
|
# Defaults to 'present'
|
|
#
|
|
# [*workers*]
|
|
# (Optional) Number of workers for Murano Engine
|
|
# Defaults to $::os_service_default
|
|
#
|
|
class murano::engine(
|
|
$manage_service = true,
|
|
$enabled = true,
|
|
$package_ensure = 'present',
|
|
$workers = $::os_service_default,
|
|
) {
|
|
|
|
include ::murano::deps
|
|
include ::murano::params
|
|
include ::murano::policy
|
|
|
|
if $manage_service {
|
|
if $enabled {
|
|
$service_ensure = 'running'
|
|
} else {
|
|
$service_ensure = 'stopped'
|
|
}
|
|
}
|
|
|
|
murano_config {
|
|
'engine/workers': value => $workers;
|
|
}
|
|
|
|
package { 'murano-engine':
|
|
ensure => $package_ensure,
|
|
name => $::murano::params::engine_package_name,
|
|
tag => ['openstack', 'murano-package'],
|
|
}
|
|
|
|
service { 'murano-engine':
|
|
ensure => $service_ensure,
|
|
name => $::murano::params::engine_service_name,
|
|
enable => $enabled,
|
|
tag => 'murano-service',
|
|
}
|
|
|
|
}
|