This repository has been archived by the owner on Jun 11, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathparams.pp
247 lines (221 loc) · 7.48 KB
/
params.pp
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
# File:: <tt>params.pp</tt>
# Author:: S. Varrette, H. Cartiaux, V. Plugaru, S. Diehl aka. UL HPC Management Team (hpc-sysadmins@uni.lu)
# Copyright:: Copyright (c) 2016 S. Varrette, H. Cartiaux, V. Plugaru, S. Diehl aka. UL HPC Management Team
# License:: Gpl-3.0
#
# ------------------------------------------------------------------------------
# = Class: fai::params
#
# In this class are defined as variables values that are used in other
# fai classes.
# This class should be included, where necessary, and eventually be enhanced
# with support for more OS
#
# == Warnings
#
# /!\ Always respect the style guide available
# here[http://docs.puppetlabs.com/guides/style_guide]
#
# The usage of a dedicated param classe is advised to better deal with
# parametrized classes, see
# http://docs.puppetlabs.com/guides/parameterized_classes.html
#
# [Remember: No empty lines between comments and class definition]
#
class fai::params {
######## DEFAULTS FOR VARIABLES USERS CAN SET ##########################
# (Here are set the defaults, provide your custom variables externally)
# (The default used is in the line with '')
###########################################
# ensure the presence (or absence) of fai
$ensure = $::fai_ensure ? {
'' => 'present',
default => $::fai_ensure
}
# Specification of the hosts which can mount this FAI config space directory
# via NFS.
$allowed_clients = $::fai_allowed_clients ? {
'' => '*',
default => $::fai_allowed_clients
}
# Account on the install server which saves all log-files and which can
# change the kernel that is booted via network.
# Define it, to enable it.
$loguser = $::fai_loguser ? {
'' => '',
default => $::fai_loguser
}
# set protocol type for saving logs. Values: ssh, rsh, ftp
$logproto = $::fai_logproto ? {
'' => 'ssh',
default => $::fai_logproto
}
# How to access the fai config space. For the moment, only svn is supported.
$configspace_provider = $::fai_configspace_provider ? {
'' => 'svn',
default => $::fai_configspace_provider
}
# URL to access the config space
$configspace_url = $::fai_configspace_provider ? {
'' => 'svn.gforge.uni.lu/svn/ulclusters/',
default => $::fai_configspace_url
}
# Hostname (or IP) of the server that provides the Debian mirror via NFS
$debmirror = $::fai_debmirror ? {
'' => 'debmirror',
default => $::fai_debmirror
}
# Export directory *on* the debmirror server that host the Debian mirror
$debmirror_exportdir = $::fai_debmirror_exportdir ? {
'' => '/export/debmirror',
default => $::fai_debmirror_exportdir
}
# Local mount point where the mirror will be mounted
$debmirror_mountdir = $::fai_debmirror_mountdir ? {
'' => '/mnt/debmirror',
default => $::fai_debmirror_mountdir
}
# Suite (i.e.) distribution to be used to generate the FAI NFSroot directory
# cf make-fai-nfsroot(8)
$debootstrap_suite = $::fai_debootstrap_suite ? {
'' => 'wheezy',
default => $::fai_debootstrap_suite
}
# Options to be passed to debootstrap -- see make-fai-nfsroot(8).
$debootstrap_opts = $::fai_debootstrap_opts ? {
'' => '--include=gnupg --exclude=dhcp-client,info --arch amd64',
default => $::fai_debootstrap_opts
}
# The encrypted (with md5 or crypt) root password on all install clients
# during installation process; used when log in via ssh.
# Default password is: fai
$rootpw_hash = $::fai_rootpw_hash ? {
'' => '$1$kBnWcO.E$djxB128U7dMkrltJHPf6d1',
default => $::fai_rootpw_hash
}
# SSH identity file: this user can log to the install clients in as root
# without a password;
$ssh_identity = $::fai_ssh_identity ? {
'' => '/root/.ssh/id_dsa.pub',
default => $::fai_ssh_identity
}
# The IPMI user set to access the BMC cards on the deployed nodes.
$ipmiuser = $::fai_ipmiuser ? {
'' => 'administrator',
default => $::fai_ipmiuser
}
# Whether or not the backports package should be used
$use_backports = $::fai_use_backports ? {
'' => false,
default => $::fai_use_backports
}
# List of the kernel modules to include in the NFSROOT initrd
$initramfs_modules = $::fai_initramfs_modules ? {
'' => [ 'bnx2' ],
default => $::fai_initramfs_modules
}
#### MODULE INTERNAL VARIABLES #########
# (Modify to adapt to unsupported OSes)
#######################################
# fai packages
$packagename = $::operatingsystem ? {
default => 'fai-server',
}
$extra_packages = $::operatingsystem ? {
default => [ 'fai-doc' ]
}
$admingroup = $::operatingsystem ? {
default => 'faiadmin'
}
# Log directory
$logdir = $::operatingsystem ? {
default => '/var/log/fai'
}
$logdir_mode = $::operatingsystem ? {
default => '750',
}
$logdir_owner = $::operatingsystem ? {
default => 'root',
}
$logdir_group = $::operatingsystem ? {
default => 'adm',
}
# PID for daemons
$piddir = $::operatingsystem ? {
default => '/var/run/fai',
}
$piddir_mode = $::operatingsystem ? {
default => '750',
}
$piddir_owner = $::operatingsystem ? {
default => 'root',
}
$piddir_group = $::operatingsystem ? {
default => $admingroup,
}
# Configuration directory & file
$configdir = $::operatingsystem ? {
default => '/etc/fai',
}
# APT directory
$aptdir = $::operatingsystem ? {
default => "${fai::params::configdir}/apt",
}
$aptkeysdir = $::operatingsystem ? {
default => "${fai::params::aptdir}/keys",
}
$configspacedir = $::operatingsystem ? {
default => '/srv/fai/config'
}
# Directory on the install server where the nfsroot for FAI is created,
# approx size: 390MB
$nfsrootdir = $::operatingsystem ? {
default => '/srv/fai/nfsroot'
}
# TFTP directory for FAI files
$tftpdir = $::operatingsystem ? {
default => '/srv/tftp/fai'
}
$configdir_mode = $::operatingsystem ? {
default => '0755',
}
$configdir_owner = $::operatingsystem ? {
default => 'root',
}
$configdir_group = $::operatingsystem ? {
default => $admingroup,
}
# Config fles
$configfile = $::operatingsystem ? {
default => '/etc/fai/fai.conf',
}
$make_nfsroot_configfile = $::lsbdistcodename ? {
'squeeze' => '/etc/fai/make-fai-nfsroot.conf',
'wheezy' => '/etc/fai/nfsroot.conf',
default => '/etc/fai/nfsroot.conf'
}
$nfsroot_configfile = $::operatingsystem ? {
default => '/etc/fai/NFSROOT',
}
$nfsroot_hookdir = $::operatingsystem ? {
default => '/etc/fai/nfsroot-hooks',
}
$nfsroot_kernelversion = $::operatingsystem ? {
default => $::kernelversion
}
$apt_sources = $::operatingsystem ? {
default => '/etc/fai/apt/sources.list',
}
$configfile_mode = $::operatingsystem ? {
default => '0600',
}
$configfile_owner = $::operatingsystem ? {
default => 'root',
}
$configfile_group = $::operatingsystem ? {
default => $admingroup,
}
$hookfile_mode = $::operatingsystem ? {
default => '0755',
}
}