Container ID conventions
Container IDs must be unique within the Bioinformatics Core
Creating a New Container
Blank Debain 4.0 or 5.0 container
1. On Owl, Space1, and Backup understand the current list of CTs
sudo vzlist -a
2. On Owl decide what CTID, IP address, and HOSTNAME the new container will be occupying
export CTID=259
Make sure this is unique. See step 1.
`ruby -e "puts 'export CTID_SHORT=%s' % ('${CTID}'.to_i - 200)"` export IP_LOC=192.168.3.${CTID_SHORT} export IP_PUB=192.168.16.${CTID_SHORT}
Here 192.168.16.X will provide NAT'ed Internet. Instead you can put a Public IP
ping -w 3 $IP_LOC ping -w 3 $IP_PUB
Make sure, the IPs are NOT pingable (You should see a 100% packet loss in 3 seconds)
export CTHOSTNAME=alevchuk-mem3g export CTNAME=${CTHOSTNAME}
Here a Good name is Important!
The convention is two parts separated by a dash ("-"), first part is either a username or "system"
To see how NAT was done see http://wiki.openvz.org/Using_NAT_for_VE_with_private_IPs#How_to_provide_access_for_container_to_Internet
and run iptables -t nat -L
3. On Owl see the list of available templates and decide which template you are going to be using
sudo ls /srv/vz/template/cache export TEMPLATE=debian-5.0-clean-x86_64 # Chomp the .tar.gz ending
4. On Owl create the container and give it an ip and hostname
sudo vzctl create ${CTID} --ostemplate ${TEMPLATE} sudo vzctl set ${CTID} --hostname ${CTHOSTNAME} --name ${CTNAME} --save sudo vzctl set ${CTID} --ipdel all --ipadd ${IP_PUB} --ipadd ${IP_LOC} --save
5. From Owl start the new container
sudo vzctl start ${CTID}
6. Educate yourself about the new convenience link to the config file
ls -ltr /etc/vz/names
7. On Owl increase the resources of the new container
sudo vz-double-resources-of-ct ${CTID} sudo vz-double-resources-of-ct ${CTID} sudo vz-double-resources-of-ct ${CTID}
Usually you will want to run vz-double-resources-of-ct three times, because the initial guaranteed memory is 256 MiB, so doubling 3 times will make it into 2 GiB. 8. Increase Disk Quota
sudo ruby -e 'cmd = "vzctl set #{ARGV[0]} --diskspace %d --diskinodes %d --save" % `vzlist #{ARGV[0]} -Ho diskspace,diskinodes`.split(" ").collect{|i| i.to_i * 100}; puts `#{cmd}`' ${CTNAME}
Usually the container will come-up with quota of 50MB, so running this command (x100) will make it 5GB. Essential Configuration
1. From Owl enter into the new container
sudo vzctl enter ${CTID}
2. Adjust hosts
vi /etc/hosts
3. Adjust Debian sources
echo " deb http://ftp.us.debian.org/debian lenny main contrib non-free deb http://security.debian.org/ lenny/updates main deb-src http://security.debian.org/ lenny/updates main deb http://volatile.debian.org/debian-volatile lenny/volatile main deb-src http://volatile.debian.org/debian-volatile lenny/volatile main " > /etc/apt/sources.list
4. Upgrade
apt-get update apt-get install aptitude aptitude upgrade
Kerberos
Web Configuration
1. On Biocluster configure HTTP traffic forwarding
sudo vi /etc/lighttpd/front.conf && sudo /etc/init.d/lighttpd-front restart sudo vi /etc/lighttpd/front8080.conf && sudo /etc/init.d/lighttpd-front8080 restart sudo vi /etc/lighttpd/front3000.conf && sudo /etc/init.d/lighttpd-front3000 restart sudo vi /etc/lighttpd/front443.conf && sudo /etc/init.d/lighttpd-front443 restart
NFS Server
OpenVZ kernels DO NOT provide kernel support for NFS servers
NFS Client
VEID Range
IP Convention
Purpuse
200-219
192.168.3.$VEID
Systems
220-259
192.168.3.$VEID
Database/Web Environments