aboutsummaryrefslogtreecommitdiffstats
path: root/modules/buildsystem/manifests/mainnode.pp
blob: 26755d96800a4f052ef37dc16ad3dd6eb9e968df (plain)
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
class buildsystem::mainnode {
    include buildsystem::base
    include buildsystem::iurt::user
    include buildsystem::scheduler
    include buildsystem::gatherer
    include buildsystem::mgarepo
    include buildsystem::signbot
    include buildsystem::youri_submit

    $sched_login = $buildsystem::base::sched_login
    $sched_home_dir = $buildsystem::base::sched_home_dir
    $build_login = $buildsystem::iurt::user::login
    $repository_root = $buildsystem::base::repository_root

    sshuser { $sched_login:
        homedir => $sched_home_dir,
        comment => 'System user used to schedule builds',
    }

    ssh::auth::client { $sched_login: }

    ssh::auth::server { [$sched_login, $build_login]: }

    $mirror_root = '/distrib/mirror'
    apache::vhost_other_app { "repository.$::domain":
        vhost_file => 'buildsystem/vhost_repository.conf',
    }

    $location = '/var/www/bs'
    file { [$location,"$location/data"]:
        ensure => directory,
    }

    apache::vhost_base { "pkgsubmit.$::domain":
        aliases  => { '/uploads' => "$sched_home_dir/uploads" },
        location => $location,
        content  => template('buildsystem/vhost_pkgsubmit.conf'),
    }

    subversion::snapshot { $location:
        source => "svn://svn.$::domain/soft/buildsystem/web/",
    }

    file { $repository_root:
        ensure => directory,
    }

    buildsystem::media_cfg { ['i586','x86_64']: }

    cron { 'dispatch jobs':
        user    => $sched_login,
        command => 'ulri; emi',
        minute  => '*',
    }
}