c54428f524
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: If4f585264f5f5a15549855d97b532866d91f5215
36 lines
1.4 KiB
Puppet
36 lines
1.4 KiB
Puppet
# == Class: zaqar::deps
|
|
#
|
|
# Zaqar anchors and dependency management
|
|
#
|
|
class zaqar::deps {
|
|
# Setup anchors for install, config and service phases of the module. These
|
|
# anchors allow external modules to hook the begin and end of any of these
|
|
# phases. Package or service management can also be replaced by ensuring the
|
|
# package is absent or turning off service management and having the
|
|
# replacement depend on the appropriate anchors. When applicable, end tags
|
|
# should be notified so that subscribers can determine if installation,
|
|
# config or service state changed and act on that if needed.
|
|
anchor { 'zaqar::install::begin': }
|
|
-> Package<| tag == 'zaqar-package'|>
|
|
~> anchor { 'zaqar::install::end': }
|
|
-> anchor { 'zaqar::config::begin': }
|
|
-> Zaqar_config<||>
|
|
~> anchor { 'zaqar::config::end': }
|
|
-> anchor { 'zaqar::db::begin': }
|
|
-> anchor { 'zaqar::db::end': }
|
|
~> anchor { 'zaqar::dbsync::begin': }
|
|
-> anchor { 'zaqar::dbsync::end': }
|
|
~> anchor { 'zaqar::service::begin': }
|
|
~> Service<| tag == 'zaqar-service' |>
|
|
~> anchor { 'zaqar::service::end': }
|
|
|
|
# policy config should occur in the config block also.
|
|
Anchor['zaqar::config::begin']
|
|
-> Openstacklib::Policy::Base<||>
|
|
~> Anchor['zaqar::config::end']
|
|
|
|
# Installation or config changes will always restart services.
|
|
Anchor['zaqar::install::end'] ~> Anchor['zaqar::service::begin']
|
|
Anchor['zaqar::config::end'] ~> Anchor['zaqar::service::begin']
|
|
}
|