= how to add a new machine = Note: this has recently been changed to rely more on [[puppet|howto/puppet-setup]]. If stuff breaks fix it. * 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 }}} * unless we want to keep it: {{{ dpkg -l postfix | grep '^ii postfix' && (dpkg --purge postfix && rm /etc/aliases) }}} * on draghi, add the host to the ldap using ud-host. Set the ssh key and the IP Address attributes. * run generate, or wait until cron runs it for you. Update DNS. {{{ : :: draghi :: && sudo -u sshdist ud-generate && sudo -H ud-replicate && sudo -H puppet agent --no-daemonize --onetime : :: denis :: && sudo -H ud-replicate }}} * setup [[puppet|howto/puppet-setup]] (run the puppet client two or three times until things converge.) * on the host, run ud-replicate and check if it worked {{{ apt-get update && apt-get install -y --no-install-recommends userdir-ldap && 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 --no-daemonize --onetime; puppet agent --no-daemonize --onetime; puppet agent --no-daemonize --onetime; puppet agent --no-daemonize --onetime }}} * install security updates etc. {{{ 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. * 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 --no-daemonize --onetime || true ) && service samhain stop && 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/files/misc/local.yaml * add to nagios -- weasel, Wed, 04 Jun 2008 20:52:56 +0200