caribou.marmotte.net

From Glee
Jump to: navigation, search

Overview

The host is an OVH server from the US Alpha Test from March 2012.

It was delivered with Debian Squeeze, but immediately reinstalled with CentOS 6.2 x86_64 english.

Server details :

  • Hostname : caribou.marmotte.net aka ks397136.kimsufi.com
  • Hardware : Atom D425 (1 x 2(HT) x 1.80GHz), 4GB DDR3 800MHz, 2TB SATA Seagate ST2000DM001-9YN1
  • Network : 100Mbps switch port, illimited monthly traffic
  • Main IPv4 address : 8.20.110.160/24 gw 8.20.110.254
  • IPv6 network : n/a

(Re)Installation

Post-Install Manual Steps

vi /etc/sysconfig/network
# HOSTNAME=caribou.marmotte.net
vi /etc/sysconfig/i18n
# LANG="en_US.UTF-8"
vi /etc/fstab
# remove /home
umount /home
swapoff -a
fdisk /dev/sda
# u c
# delete 3 & 2
# n p 2 : first 20484096 last default (3907029167)
# t 2 8e
# w
partprobe
pvcreate /dev/sda2 
vgcreate vg0 /dev/sda2
lvcreate -L 2G -n swap vg0
mkswap -f /dev/vg0/swap
vi /etc/fstab # replace : /dev/vg0/swap   swap    swap    defaults        0       0
swapon -a
free

Switch to RHEL

rm -rf /var/cache/yum/*
rpm -e --nodeps centos-release
rpm -ivh redhat-release-*.rpm
cp -a custom-marmotte.repo el.repo /etc/yum.repos.d/
cp -a RPM-GPG-KEY-matthias /etc/pki/rpm-gpg/
vi /etc/yum.conf # remove bugtracker_url= and distroverpkg= lines
yum update
yum list extras # fix anything that needs to be, usually with yum downgrade because of the "centos" release string
yum install kernel
vi /boot/grub/grub.conf # see example below
yum install rhn-setup
rhn_register # this system will obviously be unsupported!
touch /.autorelabel
shutdown -r now

Example grub.conf :

# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /boot/, eg.
#          root (hd0,0)
#          kernel /vmlinuz-version ro root=/dev/mapper/vg0-root
#          initrd /initrd-[generic-]version.img
#boot=/dev/sda
default=0
timeout=5
#splashimage=(hd0,0)/boot/grub/splash.xpm.gz
#hiddenmenu
title Red Hat Enterprise Linux Server (2.6.32-220.7.1.el6.x86_64)
	root (hd0,0)
	kernel /boot/vmlinuz-2.6.32-220.7.1.el6.x86_64 ro root=/dev/sda1 rd_NO_LUKS rd_LVM_LV=vg0/swap rd_NO_MD rd_NO_DM
	initrd /boot/initramfs-2.6.32-220.7.1.el6.x86_64.img

Tweaks

yum remove bind bind-chroot
vi /etc/resolv.conf # remove 127.0.0.1
yum install ntp
chkconfig --level 345 ntpd on
service ntpd start

Puppet

Client bootstrap :

yum install puppet
grep -q puppet.marmotte.ici /etc/hosts || echo "94.23.230.197 puppet.marmotte.ici" >> /etc/hosts
puppet agent --onetime --no-daemonize --logdest=/var/log/puppet/puppet.log --logdest=console --server=puppet.marmotte.ici

...and off we go!