Warning Livedoc is no longer being updated and will be deprecated shortly. Please refer to https://documentation.tjhsst.edu.

Debian container node setup

From Livedoc - The Documentation Repository
Jump to: navigation, search

This page is here to document what I'm doing on Sirius. This will eventually become a Salt state/Puppet manifest/Ansible playbook/whatever it is that we use now.

  • Debian can be installed by using the "debian" boot option from PXE, make sure you first remove eth0 from any port groups on the switch
apt-get install ifenslave

In /etc/network/interfaces:

auto lo
iface lo inet loopback

auto bond0
iface bond0 inet static
	slaves eth0 eth1
	bond-mode 802.3ad
	bond-miimon 100
	bond-downdelay 200
	bond-updelay 200
	dns-search csl.tjhsst.edu

Reboot, or:

ifdown eth0
ifdown eth1
ifup bond0
service networking restart

On the switch (for Sirius specifically, pick the correct things):

conf t
inter Po4
switchport mode access
switchport access vlan 1600
no shutdown
inter Gi1/0/12
switchport mode access
switchport access vlan 1600
port-channel 4
inter Gi1/0/13
switchport mode access
switchport access vlan 1600
port-channel 4
wr mem

switchport mode trunk is not something we want, because I'm too lazy to set it up.

Next you'll want to set up storage. Storage is currently exported with NFS from Bottom at /storage/export. You may need to edit /etc/exports on bottom to allow a new host to connect. Once you've done that, add a line like bottom:/storage/export /lxc/containers nfs rsize=8192,wsize=8192,timeo=14 to /etc/fstab. Then make an appropriate symlink: ln -s /lxc/containers/ /var/lib/lxc.

Each container server has a private IPv4 network for the containers on it, which is NATted to the server's external IP. Every container has an IPv6 address which is used to access it from off of the server. An instance proxy listening on i.e. *.container.csl.tjhsst.edu can be configured to proxy HTTP(s) requests to IPv6 container addresses.