Puppet Class: profile::kubernetes::deployment_server::mediawiki::release

Defined in:
modules/profile/manifests/kubernetes/deployment_server/mediawiki/release.pp

Overview

Parameters:

  • mw_releases (Hash[String, Profile::Mediawiki_deployment]) (defaults to: lookup('profile::kubernetes::deployment_server::mediawiki::release::mw_releases'))
  • general_dir (Stdlib::Unixpath) (defaults to: lookup('profile::kubernetes::deployment_server::global_config::general_dir', {default_value => '/etc/helmfile-defaults'}))


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'modules/profile/manifests/kubernetes/deployment_server/mediawiki/release.pp', line 1

class profile::kubernetes::deployment_server::mediawiki::release (
    Hash[String, Profile::Mediawiki_deployment] $mw_releases = lookup('profile::kubernetes::deployment_server::mediawiki::release::mw_releases'),
    Stdlib::Unixpath $general_dir = lookup('profile::kubernetes::deployment_server::global_config::general_dir', {default_value => '/etc/helmfile-defaults'}),
) {
    $kubernetes_release_dir = "${general_dir}/mediawiki/release"
    file { $kubernetes_release_dir:
        ensure => directory,
        owner  => 'mwbuilder',
        group  => 'mwdeploy',
        mode   => '0775',
    }

    # Initialize the git repository if not present.
    # The repositories should be kept in sync via scap sync-masters.
    exec { '/usr/bin/git init':
        cwd     => $kubernetes_release_dir,
        creates => "${kubernetes_release_dir}/.git",
        user    => 'mwbuilder',
        group   => 'mwdeploy'
    }

    # Although it can be recreated somehow by scap, we don't want
    # to lose history.
    backup::set { 'mediawiki-k8s-releases-repository': }

    # Mediawiki deployment configuration
    file { "${general_dir}/mediawiki-deployments.yaml":
        ensure  => present,
        content => to_yaml($mw_releases),
        owner   => 'root',
        group   => 'root',
    }
}