puppet-magnum/manifests/deps.pp
ZhongShengping f8801e28fb Add oslo::db to dependency chain
All db settings should be applied and all releated packages should be
installed before dbsync starts.

Change-Id: Id9a20462b3b3c648e3d740df318a305c3fce08f4
2017-01-22 21:45:48 +08:00

40 lines
1.6 KiB
Puppet

# == Class: magnum::deps
#
# Magnum anchors and dependency management
#
class magnum::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 { 'magnum::install::begin': }
-> Package<| tag == 'magnum-package'|>
~> anchor { 'magnum::install::end': }
-> anchor { 'magnum::config::begin': }
-> Magnum_config<||>
~> anchor { 'magnum::config::end': }
-> anchor { 'magnum::db::begin': }
-> anchor { 'magnum::db::end': }
~> anchor { 'magnum::dbsync::begin': }
-> anchor { 'magnum::dbsync::end': }
~> anchor { 'magnum::service::begin': }
~> Service<| tag == 'magnum-service' |>
~> anchor { 'magnum::service::end': }
# all db settings should be applied and all packages should be installed
# before dbsync starts
Oslo::Db<||> -> Anchor['magnum::dbsync::begin']
# policy config should occur in the config block also.
Anchor['magnum::config::begin']
-> Openstacklib::Policy::Base<||>
~> Anchor['magnum::config::end']
# Installation or config changes will always restart services.
Anchor['magnum::install::end'] ~> Anchor['magnum::service::begin']
Anchor['magnum::config::end'] ~> Anchor['magnum::service::begin']
}