
Currently Murano runs db sync from 3 classes: api, engine and main init. That's wrong. Change-Id: Ia34fef731f7dfe9609b65f50138b645406bd13d5
67 lines
1.4 KiB
Puppet
67 lines
1.4 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'
|
|
#
|
|
# DEPRECATED PARAMETERS
|
|
#
|
|
# [*sync_db*]
|
|
# (Optional) Whether to sync database
|
|
# Defaults to undef
|
|
#
|
|
class murano::engine(
|
|
$manage_service = true,
|
|
$enabled = true,
|
|
$package_ensure = 'present',
|
|
$sync_db = undef,
|
|
) {
|
|
|
|
include ::murano::params
|
|
include ::murano::policy
|
|
|
|
if $sync_db {
|
|
warning('The sync_db parameter has no effect.')
|
|
}
|
|
|
|
Murano_config<||> ~> Service['murano-engine']
|
|
Class['murano::policy'] -> Service['murano-engine']
|
|
|
|
if $manage_service {
|
|
if $enabled {
|
|
$service_ensure = 'running'
|
|
} else {
|
|
$service_ensure = 'stopped'
|
|
}
|
|
}
|
|
|
|
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,
|
|
require => Package['murano-engine'],
|
|
tag => 'murano-service',
|
|
}
|
|
|
|
Package['murano-engine'] ~> Service['murano-engine']
|
|
|
|
}
|