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/sh | |
| # | |
| # stop manually started cassandra service, remove dtest cruft, | |
| # and wipe data and logs | |
| # | |
| # set user or leave commented out for current user from env | |
| #USER=cassandra | |
| # set REPODIR to the git checkout, so we can clean 2.1+ data/logs | |
| REPODIR=$HOME/git/cassandra |
| #! /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: |
| #!/usr/bin/env python | |
| # vim: ai ts=4 sw=4 sts=4 et | |
| # | |
| # http://www.star.bnl.gov/ | |
| # http://crd-legacy.lbl.gov/~kewu/fastbit/data/samples.html | |
| # | |
| # star2000 etime column date format examples: | |
| # 20000625.0617250018 | |
| # 20000625.061728999 | |
| # 20000625.062128 |
| #!/bin/bash | |
| # | |
| # Template script for generating ubuntu container for LXC with the same | |
| # ubuntu relase as the host | |
| # | |
| # This script is based on lxc-debian for EC2 (Daniil Kulchenko <daniil@kulchenko.com>) | |
| # wich itself is based on lxc-debian (Daniel Lezcano <daniel.lezcano@free.fr>) | |
| # |
| #!/bin/sh | |
| yesno() | |
| { | |
| while true; do | |
| read -p "=====> Would you like to $message [Y/n]? " yn | |
| case $yn in | |
| ''|[Yy]* ) answer="yes"; break;; | |
| * ) answer="no"; exit;; | |
| esac |
| #!/bin/sh | |
| # | |
| # stop manually started cassandra service, remove dtest cruft, | |
| # and wipe data and logs | |
| # | |
| # set user or leave commented out for current user from env | |
| #USER=cassandra | |
| # kill all CassandraDaemons | |
| while pgrep -f CassandraDaemon; do |
| #!/bin/sh | |
| # | |
| # Update all the git repositories under a directory. | |
| # | |
| ################ | |
| # ToDo: handle multiple remotes? | |
| ################ | |
| # | |
| # If script is placed in your $PATH, then hardcode REPODIR, |
| #!/bin/sh | |
| if [ $(id -ru) -ne 0 ]; then | |
| echo "$0 must be run as root or with sudo" | |
| exit 1 | |
| fi | |
| RELEASE=$( lsb_release --short --codename ) | |
| CHECK="true" | |
| if [ "$CHECK" = "true" ]; then |
| #!/bin/sh | |
| CREPO=~/git/cassandra | |
| BRANCH=$1 | |
| if [ "x$BRANCH" = "x" ]; then | |
| echo "Gimme a branch/tag to build.." | |
| exit 1 | |
| fi | |
| cd $CREPO |