/[adm]/puppet/modules/buildsystem/manifests/init.pp
ViewVC logotype

Contents of /puppet/modules/buildsystem/manifests/init.pp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 466 - (show annotations) (download)
Thu Nov 25 11:46:30 2010 UTC (13 years, 5 months ago) by blino
File size: 4008 byte(s)
add pkgsubmit vhost
1 class buildsystem {
2
3 class base {
4 $build_login = "iurt"
5 $build_home_dir = "/home/$build_login"
6 $sched_login = "schedbot"
7 $sched_home_dir = "/home/$sched_login"
8
9 include ssh::auth
10 ssh::auth::key { $build_login: } # declare a key for build bot: RSA, 2048 bits
11 ssh::auth::key { $sched_login: } # declare a key for sched bot: RSA, 2048 bits
12 }
13
14 class mainnode inherits base {
15 include iurtuser
16
17 sshuser { $sched_login:
18 homedir => $sched_home_dir,
19 comment => "System user used to schedule builds",
20 }
21
22 ssh::auth::client { $sched_login: }
23 ssh::auth::server { $build_login: }
24
25 $package_list = ['task-bs-cluster-main', 'iurt']
26 package { $package_list:
27 ensure => "installed"
28 }
29
30 apache::vhost_other_app { "repository.$domain":
31 vhost_file => "buildsystem/vhost_repository.conf",
32 }
33
34 apache::vhost_other_app { "pkgsubmit.$domain":
35 vhost_file => "buildsystem/vhost_pkgsubmit.conf",
36 }
37
38 include scheduler
39 include gatherer
40 }
41
42 class buildnode inherits base {
43 include iurt
44 }
45
46 class scheduler {
47 # ulri
48 include iurtupload
49 }
50
51 class gatherer {
52 # emi
53 include iurtupload
54 }
55
56 class iurtupload {
57 file { "/etc/iurt/upload.conf":
58 ensure => present,
59 owner => $build_login,
60 group => $build_login,
61 mode => 644,
62 require => File["/etc/iurt"],
63 content => template("buildsystem/upload.conf")
64 }
65 }
66
67 class repsys {
68 package { 'repsys':
69
70 }
71
72
73 }
74
75 define sshuser($homedir, $comment) {
76 group {"$title":
77 ensure => present,
78 }
79
80 user {"$title":
81 ensure => present,
82 comment => $comment,
83 managehome => true,
84 gid => $title,
85 shell => "/bin/bash",
86 notify => Exec["unlock$title"],
87 require => Group[$title],
88 }
89
90 # set password to * to unlock the account but forbid login through login
91 exec { "unlock$title":
92 command => "usermod -p '*' $title",
93 refreshonly => true,
94 }
95
96 file { $homedir:
97 ensure => "directory",
98 require => User[$title],
99 }
100
101 file { "$homedir/.ssh":
102 ensure => "directory",
103 mode => 600,
104 owner => $title,
105 group => $title,
106 require => File[$homedir],
107 }
108 }
109
110 class iurtuser {
111 sshuser { $build_login:
112 homedir => $build_home_dir,
113 comment => "System user used to run build bots",
114 }
115
116 file { "/etc/iurt":
117 ensure => "directory",
118 }
119 }
120
121 class iurt {
122 include sudo
123 include iurtuser
124 ssh::auth::client { $build_login: }
125 ssh::auth::server { $sched_login: user => $build_login }
126
127 # build node common settings
128 # we could have the following skip list to use less space:
129 # '/(drakx-installer-binaries|drakx-installer-advertising|gfxboot|drakx-installer-stage2|mandriva-theme)/'
130 $package_list = ['task-bs-cluster-chroot', 'iurt']
131 package { $package_list:
132 ensure => installed;
133 }
134
135 file { "/etc/iurt/build":
136 ensure => "directory",
137 require => File["/etc/iurt"],
138 }
139
140 file { "/etc/iurt/build/cauldron.conf":
141 ensure => present,
142 owner => $build_login,
143 group => $build_login,
144 mode => 644,
145 require => File["/etc/iurt/build"],
146 content => template("buildsystem/iurt.cauldron.conf")
147 }
148
149 file { "/etc/sudoers.d/iurt":
150 ensure => present,
151 owner => root,
152 group => root,
153 mode => 440,
154 content => template("buildsystem/sudoers.iurt")
155 }
156 }
157 }

  ViewVC Help
Powered by ViewVC 1.1.30