move some install steps into puppet
[mirror/dsa-wiki.git] / input / howto / new-machine.creole
index e03d1a2..241fd5e 100644 (file)
@@ -6,8 +6,6 @@ Note: this has recently been changed to rely more on [[puppet|howto/puppet-setup
 * some initial stuff:
 {{{
     apt-get install --no-install-recommends ssh vim &&
-    echo -n > /etc/environment &&
-    echo -n > /etc/default/locale &&
     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
@@ -22,7 +20,7 @@ Note: this has recently been changed to rely more on [[puppet|howto/puppet-setup
 
 * run generate, or wait until cron runs it for you.  Update DNS.
 {{{
-    : :: draghi :: && sudo -u sshdist ud-generate && sudo -H ud-replicate && sudo -H puppetd -t
+    : :: draghi :: && sudo -u sshdist ud-generate && sudo -H ud-replicate && sudo -H puppet agent -t
     : :: denis :: && sudo -H ud-replicate
 }}}
 
@@ -30,18 +28,10 @@ Note: this has recently been changed to rely more on [[puppet|howto/puppet-setup
 
 * on the host, run ud-replicate and check if it worked
 {{{
-    ud-replicate &&
-    id weasel
-}}}
-
-* install debian.org which brings you shells and much other fun
-{{{
-    apt-get install -y debian.org debian.org-recommended
-}}}
-
-* run puppet a couple times
-{{{
-    puppet agent -t; puppet agent -t; puppet agent -t; puppet agent -t
+    apt-get update;
+    puppet agent -t; puppet agent -t; puppet agent -t
+    ud-replicate
+    puppet agent -t; puppet agent -t; puppet agent -t
 }}}
 
 * install security updates etc.
@@ -49,40 +39,19 @@ Note: this has recently been changed to rely more on [[puppet|howto/puppet-setup
     apt-get update && apt-get dist-upgrade && apt-get clean
 }}}
 
-* try to login using your user and ssh key.  you should get a homedir.
-
-* try to become root using sudo.
-
-* make ca-certificates sane:  (choose to *not* trust new certs, and we only want the spi cert activated)
-{{{
-    echo "ca-certificates ca-certificates/trust_new_crts  select no" | debconf-set-selections
-    sed -i -e 's/^[^#!].*/!&/; s#^!spi-inc.org/spi-cacert-2008.crt#spi-inc.org/spi-cacert-2008.crt#' /etc/ca-certificates.conf
-    dpkg-reconfigure ca-certificates
-}}}
-
-* Add debian-admin@debian.org to root in /etc/aliases
-{{{
-  if ! egrep '^root:' /etc/aliases > /dev/null; then
-    echo "root: debian-admin@debian.org" >> /etc/aliases
-  elif ! egrep '^root:.*debian-admin@debian.org' /etc/aliases > /dev/null; then
-    sed -i -e 's/^root: .*/&, debian-admin@debian.org/' /etc/aliases
-  fi
-  newaliases
-}}}
-
 * install samhain and get puppet to configure it
 {{{
   apt-get install -y samhain &&
   ( puppet agent -t || true ) &&
   service samhain stop &&
-  rm /var/state/samhain/samhain_file &&
+  rm -f /var/state/samhain/samhain_file /var/lib/samhain/samhain_file &&
   samhain --foreground -t init -p none -s none -l none -m none &&
   service samhain start
 }}}
 
 * 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
+* edit dedication into in $DSA-PUPPET/modules/debian_org/files/misc/local.yaml
 
 * add to nagios