move some install steps into puppet
[mirror/dsa-wiki.git] / input / howto / new-machine.creole
1 = how to add a new machine =
2
3 Note: this has recently been changed to rely more on [[puppet|howto/puppet-setup]].  If stuff breaks fix it.
4
5
6 * some initial stuff:
7 {{{
8     apt-get install --no-install-recommends ssh vim &&
9     apt-get install --no-install-recommends dialog &&
10     echo "debconf debconf/priority        select high" | debconf-set-selections &&
11     echo "debconf debconf/frontend        select Dialog" | debconf-set-selections
12 }}}
13
14 * unless we want to keep it:
15 {{{
16     dpkg -l postfix | grep '^ii  postfix' && (dpkg --purge postfix && rm /etc/aliases)
17 }}}
18
19 * on draghi, add the host to the ldap using ud-host.  Set the ssh key and the IP Address attributes.
20
21 * run generate, or wait until cron runs it for you.  Update DNS.
22 {{{
23     : :: draghi :: && sudo -u sshdist ud-generate && sudo -H ud-replicate && sudo -H puppet agent -t
24     : :: denis :: && sudo -H ud-replicate
25 }}}
26
27 * setup [[puppet|howto/puppet-setup]]  (run the puppet client two or three times until things converge.)
28
29 * on the host, run ud-replicate and check if it worked
30 {{{
31     apt-get update;
32     puppet agent -t; puppet agent -t; puppet agent -t
33     ud-replicate
34     puppet agent -t; puppet agent -t; puppet agent -t
35 }}}
36
37 * install security updates etc.
38 {{{
39     apt-get update && apt-get dist-upgrade && apt-get clean
40 }}}
41
42 * install samhain and get puppet to configure it
43 {{{
44   apt-get install -y samhain &&
45   ( puppet agent -t || true ) &&
46   service samhain stop &&
47   rm -f /var/state/samhain/samhain_file /var/lib/samhain/samhain_file &&
48   samhain --foreground -t init -p none -s none -l none -m none &&
49   service samhain start
50 }}}
51
52 * if it is a HP Proliant, or has other management fu, read [[howto/ilo-https]]
53
54 * edit dedication into in $DSA-PUPPET/modules/debian_org/files/misc/local.yaml
55
56 * add to nagios
57
58 -- weasel, Wed, 04 Jun 2008 20:52:56 +0200