/[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 404 - (show annotations) (download)
Mon Nov 22 23:29:27 2010 UTC (13 years, 5 months ago) by blino
File size: 3141 byte(s)
fix typo

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 include apache
31 apache::vhost_other_app { "repository.$domain":
32 vhost_file => "buildsystem/vhost_repository.conf",
33 }
34
35 }
36
37 class buildnode inherits base {
38 include iurt
39 }
40
41 class scheduler {
42 # ulri
43 }
44
45 class dispatcher {
46 # emi
47 }
48
49 class repsys {
50 package { 'repsys':
51
52 }
53
54
55 }
56
57 define sshuser($homedir, $comment) {
58 group {"$title":
59 ensure => present,
60 }
61
62 user {"$title":
63 ensure => present,
64 comment => $comment,
65 managehome => true,
66 gid => $title,
67 shell => "/bin/bash",
68 notify => Exec["unlock$title"],
69 }
70
71 # set password to * to unlock the account but forbid login through login
72 exec { "unlock$title":
73 command => "usermod -p '*' $title",
74 refreshonly => true,
75 }
76
77 file { $homedir:
78 ensure => "directory",
79 }
80
81 file { "$homedir/.ssh":
82 ensure => "directory",
83 mode => 600,
84 owner => $title,
85 group => $title,
86 }
87 }
88
89 class iurtuser {
90 sshuser { $build_login:
91 homedir => $build_home_dir,
92 comment => "System user used to run build bots",
93 }
94 }
95
96 class iurt {
97 include sudo
98 include iurtuser
99 ssh::auth::client { $build_login: }
100 ssh::auth::server { $sched_login: user => $build_login }
101
102 # build node common settings
103 # we could have the following skip list to use less space:
104 # '/(drakx-installer-binaries|drakx-installer-advertising|gfxboot|drakx-installer-stage2|mandriva-theme)/'
105 $package_list = ['task-bs-cluster-chroot', 'iurt']
106 package { $package_list:
107 ensure => installed;
108 }
109
110 file { "$build_home_dir/.iurt.cauldron.conf":
111 ensure => present,
112 owner => $build_login,
113 group => $build_login,
114 mode => 644,
115 content => template("buildsystem/iurt.cauldron.conf")
116 }
117
118 file { "/etc/sudoers.d/iurt":
119 ensure => present,
120 owner => root,
121 group => root,
122 mode => 440,
123 content => template("buildsystem/sudoers.iurt")
124 }
125 }
126 }

  ViewVC Help
Powered by ViewVC 1.1.30