aboutsummaryrefslogtreecommitdiffstats
path: root/modules/buildsystem/manifests/mainnode.pp
blob: 800b2a486598dbfa572bcdf072d77837c7b23168 (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
56
57
58
59
60
class buildsystem::mainnode {
    include buildsystem::base
    include buildsystem::iurt::user
    $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]: }

    # FIXME Add again task-bs-cluster-main when it will require
    # mgarepo instead of repsys
    $package_list = ['iurt']
    package { $package_list: }

    $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']: }

    include buildsystem::scheduler
    include buildsystem::gatherer
    include buildsystem::mgarepo
    include buildsystem::signbot
    include buildsystem::youri_submit

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