Puppet Class: profile::microsites::design

Defined in:
modules/profile/manifests/microsites/design.pp

Overview

Parameters:

  • server_name (Any) (defaults to: lookup('profile::microsites::design::server_name'))
  • server_admin (Any) (defaults to: lookup('profile::microsites::design::server_admin'))


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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# File 'modules/profile/manifests/microsites/design.pp', line 2

class profile::microsites::design(
  $server_name = lookup('profile::microsites::design::server_name'),
  $server_admin = lookup('profile::microsites::design::server_admin'),
) {

    httpd::site { 'design.wikimedia.org':
        content => template('profile/design/design.wikimedia.org-httpd.erb'),
    }

    $design_blog_repo_dir = '/srv/org/wikimedia/design-blog'
    $design_blog_docroot  = "${design_blog_repo_dir}/_site"

    ensure_resource('file', '/srv/org', {'ensure' => 'directory' })
    ensure_resource('file', '/srv/org/wikimedia', {'ensure' => 'directory' })
    ensure_resource('file', '/srv/org/wikimedia/design', {'ensure' => 'directory' })
    ensure_resource('file', '/srv/org/wikimedia/design-strategy', {'ensure' => 'directory' })
    ensure_resource('file', $design_blog_repo_dir, {'ensure' => 'directory' })

    git::clone { 'design/landing-page':
        ensure    => 'latest',
        source    => 'gerrit',
        directory => '/srv/org/wikimedia/design',
        branch    => 'master',
    }

    git::clone { 'design/strategy':
        ensure    => 'latest',
        source    => 'gerrit',
        directory => '/srv/org/wikimedia/design-strategy',
        branch    => 'master',
    }

    git::clone { 'design/blog':
        ensure    => 'latest',
        source    => 'gerrit',
        directory => $design_blog_repo_dir,
        branch    => 'master',
    }

    scap::target { 'design/style-guide':
        deploy_user => 'deploy-design',
    }

    file { '/srv/org/wikimedia/design-style-guide':
        ensure  => 'link',
        target  => '/srv/deployment/design/style-guide',
        require => Scap::Target['design/style-guide'],
    }
}