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
| # Source http://stackoverflow.com/a/15741856/1301753 | |
| import copy | |
| import sys | |
| import math | |
| import pyPdf | |
| def split_pages(src, dst): | |
| src_f = file(src, 'r+b') | |
| dst_f = file(dst, 'w+b') |
| 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, |
| #! /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: |