b89ef6eeb943d3ac73c39e101a4e6591fb89114d
[mirror/dsa-wiki.git] / input / howto / decomission.mdwn
1 # Decomissioning hosts
2
3  * Get rid of any services running on the host.
4  * Optional, shut down the machine, then wait a month
5  * Zero disks
6
7     badblocks -v -s -p 5 -w -f DEVICE_GOES_HERE
8
9  * Revoke puppet certificate
10
11    * on handel: puppet node clean $HOST
12    * also, clean up any entries in puppet's database (see /etc/puppet/puppet.conf for password):
13
14      mysql -p -u puppet puppet
15      select * from resources where title like '%XXXX.debian.org%';
16      followed by: delete from resources where title like '%XXXX.debian.org%';
17
18    * reinit samhain on handel
19
20  * Remove from LDAP
21    * rerun puppet on backuphost / the backup host
22    * reinit samhain on backuphost
23  * Remove from Nagios
24  * Remove any references from puppet configuration
25  * Remove references to the host from DNS files, including reverse DNS
26  * Get rid of the HW (tell the hoster to get rid of it or other as appropriate)
27  * Remove MQ queues related to machine (see [[doc/mq]] for details)
28
29     for queue in $(rabbitmqadmin -N rainier list queues name | \
30     grep unger.debian.org | \
31     awk '{print $2}') ; do
32     rabbitmqadmin -N rainier -V dsa delete queue name=$queue
33     done
34
35 Three months after decomissioning:
36
37  * Remove backups