puppet-magnum/manifests/deps.pp
Thomas Goirand 1d7cfa3005 Add support for magnum_api_uwsgi_config in Debian
This patch is adding the configuration of the number of workers,
threads, and the size of the listen queue in Debian, which uses
uwsgi to run Magnum API. Therefore, this patch adds a new
magnum_api_uwsgi_config provider as well as a new
magnum::wsgi::uwsgi class.

Change-Id: Ibd80cee59c3a2b501e8dae1b5da4f651b6ac779d
2021-04-12 21:15:26 +02:00

45 lines
1.8 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']
# On any uwsgi config change, we must restart Magnum API.
Anchor['magnum::config::begin']
-> Magnum_api_uwsgi_config<||>
~> 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']
}