Use service foo rather than calling init scripts directly
[mirror/dsa-wiki.git] / input / howto / new-machine.creole
index 71e93a8..054ef19 100644 (file)
@@ -5,12 +5,12 @@ Note: this has recently been changed to rely more on [[puppet|howto/puppet-setup
 
 * install ssh if it isn't there already
 {{{
-    apt-get install ssh
+    apt-get install --no-install-recommends ssh
 }}}
 
 * sane editor
 {{{
-    apt-get install vim
+    apt-get install --no-install-recommends vim
 }}}
 
 * sane locales: (make sure there is _no_ locale defined in /etc/environment and /etc/default/locale)
@@ -21,7 +21,7 @@ Note: this has recently been changed to rely more on [[puppet|howto/puppet-setup
 
 * make debconf the same on every host: - dialog, - high
 {{{
-    apt-get install dialog &&
+    apt-get install --no-install-recommends dialog &&
     echo "debconf debconf/priority        select high" | debconf-set-selections &&
     echo "debconf debconf/frontend        select Dialog" | debconf-set-selections
 }}}
@@ -48,12 +48,7 @@ Note: this has recently been changed to rely more on [[puppet|howto/puppet-setup
               s/^group:\[[:space:]]\+compat$/group:          db compat/;
               s/^shadow:\[[:space:]]\+compat$/shadow:         compat db/' \
         /etc/nsswitch.conf
-    (cd / && env -i /etc/init.d/ssh restart)
-}}}
-
-* install userdir-ldap
-{{{
-    apt-get update && apt-get install userdir-ldap
+    (service ssh restart)
 }}}
 
 * on the host, run ud-replicate
@@ -69,7 +64,17 @@ Note: this has recently been changed to rely more on [[puppet|howto/puppet-setup
 
 * install debian.org which brings you shells and much other fun
 {{{
-    apt-get install debian.org debian.org-recommended
+    apt-get install -y debian.org debian.org-recommended
+}}}
+
+* On handel, make sure the certs exist for the new host
+{{{
+  : :: handel :: : && sudo -u puppet make -C /srv/puppet.debian.org/ca/ install
+}}}
+
+* run puppet a couple times
+{{{
+    puppet agent -t; puppet agent -t; puppet agent -t; puppet agent -t
 }}}
 
 * try to login using your user and ssh key.  you should get a homedir.
@@ -93,17 +98,18 @@ Note: this has recently been changed to rely more on [[puppet|howto/puppet-setup
   newaliases
 }}}
 
+* install samhain and get puppet to configure it
+{{{
+  apt-get install samhain
+  puppet agent -t
+}}}
+
 * if it is a HP Proliant, or has other management fu, read [[howto/ilo-https]]
 
 * edit dedication into in $DSA-PUPPET/modules/debian-org/misc/local.yaml
 
 * Add host to smarthost machines in $DSA-PUPPET/modules/debian-org/misc/local.yaml (if so desired).  Set MX in ud-ldap.
 
-* If you need mail now instead of in a day, on handel:
-{{{
-  : :: handel :: : && sudo -u puppet make -C /srv/puppet.debian.org/ca/ install
-}}}
-
 * add to nagios
 
 -- weasel, Wed, 04 Jun 2008 20:52:56 +0200