== setup/integrate a new machine ==
-Note: this is partially obsolete now that we have [[puppet|howto/puppet-setup]]. We should probably update/rework some parts.
+Note: this has recently been changed to rely more on [[puppet|howto/puppet-setup]]. If stuff breaks fix it.
+
* install ssh if it isn't there already
{{{
apt-get install ssh
}}}
-* make apt sane
-{{{
- echo 'Acquire::PDiffs "false";' > /etc/apt/apt.conf.d/local-pdiff
- echo 'APT::Install-Recommends 0;' > /etc/apt/apt.conf.d/local-recommends
-}}}
-
* sane locales: (make sure there is _no_ locale defined in /etc/environment and /etc/default/locale)
{{{
echo -n > /etc/environment
* unless we want to keep it:
{{{
- dpkg -l postfix | grep '^ii' && (dpkg --purge postfix && rm /etc/aliases)
+ dpkg -l postfix | grep '^ii postfix' && (dpkg --purge postfix && rm /etc/aliases)
}}}
-* setup [[puppet|howto/puppet-setup]]
+* setup [[puppet|howto/puppet-setup]] (run the puppet client two or three times until things converge.)
-* on draghi, add the host to /home/sshdist/.ssh/authorized_keys and generate.conf
+* on draghi, add the host to /home/sshdist/.ssh/authorized_keys
(you want the host's rsa host key there: {{{cat /etc/ssh/ssh_host_rsa_key.pub}}})
{{{
: :: draghi :: && sudo vi /home/sshdist/.ssh/authorized_keys
- : :: draghi :: && sudo vi /etc/userdir-ldap/generate.conf
}}}
+* use ud-host to add the new host to LDAP
* run generate, or wait until cron runs it for you
{{{
: :: draghi :: && sudo -u sshdist ud-generate
* install debian.org which brings you shells and much other fun
{{{
- apt-get install debian.org
+ apt-get install debian.org debian.org-recommended
}}}
* in /etc/ssh/sshd_config:
* 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
+ 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
}}}
* sane default editor
* add to nagios
-* add host to ldap: ud-host -a $USER -h ....
-
-- weasel, Wed, 04 Jun 2008 20:52:56 +0200