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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 432 - (hide annotations) (download)
Tue Nov 23 22:27:30 2010 UTC (13 years, 5 months ago) by blino
File size: 3880 byte(s)
fix upload.conf name (oops)

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

  ViewVC Help
Powered by ViewVC 1.1.30