This is a mini-HOWTO for setting up Linux Containers (LXC) on Ubuntu. This guide focuses on the creation of a web server with good process isolation and firewalling.
apt-get install lxc
#! /bin/bash | |
# Kill processes orphaned by Jenkins | |
# Work around Java's use of SIGTERM rather than SIGKILL and | |
# Jenkins's lack of any workaroud in the box. | |
# here is the relevant bug: | |
# https://issues.jenkins-ci.org/browse/JENKINS-17116 | |
# Suggested usage: |
local hostname = os.getenv("HOSTNAME") | |
local package = os.getenv("PACKAGE") | |
assert(hostname, "HOSTNAME env variable is not set") | |
assert(package, "PACKAGE env variable is not set") | |
local privateKey = "/usr/share/" .. package .. "/etc/id_rsa" | |
settings { | |
statusFile = "/var/run/" .. package .. "/lsyncd.stat", | |
statusInterval = 60, |