Skip to content

Instantly share code, notes, and snippets.

@mendeni
mendeni / gist:9083464
Created February 19, 2014 00:14
lxc.sh
apt-get -y install curl
curl http://pkg.ohthree.com/signing.gpg.key | apt-key add -
echo "deb http://pkg.ohthree.com/ onion-unstable main" >> /etc/apt/sources.list
apt-get update
apt-get -y install git automake pkg-config libseccomp-dev rubygems
gem install fpm
git clone https://github.com/lxc/lxc.git
@mendeni
mendeni / config passed
Created February 19, 2014 16:15
lxc-execute
lxc-execute 1392826314.850 DEBUG lxc_start - sigchild handler set
lxc-execute 1392826314.850 INFO lxc_console - no console for lxc-execute.
lxc-execute 1392826314.850 INFO lxc_start - 'echotest' is initialized
lxc-execute 1392826314.860 DEBUG lxc_start - Not dropping cap_sys_boot or watching utmp
lxc-execute 1392826314.860 INFO lxc_cgroup - cgroup driver cgroupfs initing for echotest
lxc-execute 1392826314.862 DEBUG lxc_conf - Set exec command to cat
lxc-execute 1392826314.862 DEBUG lxc_conf - capabilities have been setup
lxc-execute 1392826314.862 NOTICE lxc_conf - 'echotest' is setup.
lxc-execute 1392826314.862 WARN lxc_start - inherited fd 4
lxc-execute 1392826314.862 WARN lxc_start - inherited fd 6
@mendeni
mendeni / seccomp.sew.sh
Created February 19, 2014 20:04
more seccomp testing with lxc-execute
#! /usr/bin/env bash
cat << EOF > /tmp/config-deny
lxc.seccomp = /tmp/whitelist-deny
EOF
cat << EOF > /tmp/config-allow
lxc.seccomp = /tmp/whitelist-allow
EOF
@mendeni
mendeni / lxc.sh
Created February 19, 2014 20:14
build lxc .deb's from github.com/lxc/lxc master branch
#!/bin/bash -ex
DATETIME=`date +%Y%m%d%H%M`
apt-get -y install curl
curl http://pkg.ohthree.com/signing.gpg.key | apt-key add -
grep "deb http://pkg.ohthree.com/ onion-unstable main" /etc/apt/sources.list || (echo "deb http://pkg.ohthree.com/ onion-unstable main" >> /etc/apt/sources.list)
apt-get update
apt-get -y install git automake pkg-config libseccomp-dev rubygems
@mendeni
mendeni / gist:9198981
Created February 24, 2014 22:50
lxc-1.0.0-rackos.sh
#!/bin/bash -ex
apt-get -y install curl
curl http://pkg.ohthree.com/signing.gpg.key | apt-key add -
grep "deb http://pkg.ohthree.com/ onion-unstable main" /etc/apt/sources.list || (echo "deb http://pkg.ohthree.com/ onion-unstable main" >> /etc/apt/sources.list)
apt-get update
apt-get -y install git automake pkg-config libseccomp-dev libselinux1-dev rubygems libcap-dev
gem install fpm
@mendeni
mendeni / gist:9624123
Created March 18, 2014 16:48
ERROR: 'module' object has no attribute 'add_arg'
swilson@racker:~$ pip show os-diskconfig-python-novaclient-ext
---
Name: os-diskconfig-python-novaclient-ext
Version: 0.1.2
Location: /usr/local/lib/python2.7/dist-packages
Requires: python-novaclient
swilson@racker:~$ python
Python 2.7.3 (default, Sep 26 2013, 20:03:06)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
@mendeni
mendeni / gist:9764596
Last active August 29, 2015 13:57
lxc.se_context = unconfined_u:unconfined_r:lxc_t:s0-s0:c0.c1023
root@debian:~# sh -x eg
+
+
+ echo
+ cat /var/lib/lxc/sew100/config
# Template used to create this container: /usr/share/lxc/templates/lxc-rackos-debian-secure
# Parameters passed to the template:
# For additional config options, please look at lxc.conf(5)
@mendeni
mendeni / gist:9809432
Created March 27, 2014 14:58
make[2]: Entering directory `/usr/src/linux-3.13.7'
make[2]: Entering directory `/usr/src/linux-3.13.7'
CC [M] /usr/src/openvswitch/datapath/linux/datapath.o
In file included from /usr/src/openvswitch/datapath/linux/datapath.c:52:0:
/usr/src/openvswitch/datapath/linux/compat/include/net/genetlink.h:20:13: error: conflicting types for ‘genl_notify’
In file included from /usr/src/openvswitch/datapath/linux/compat/include/net/genetlink.h:7:0,
from /usr/src/openvswitch/datapath/linux/datapath.c:52:
include/net/genetlink.h:176:6: note: previous declaration of ‘genl_notify’ was here
/usr/src/openvswitch/datapath/linux/datapath.c: In function ‘ovs_notify’:
/usr/src/openvswitch/datapath/linux/datapath.c:73:10: error: ‘struct genl_multicast_group’ has no member named ‘id’
/usr/src/openvswitch/datapath/linux/datapath.c: In function ‘ovs_flow_cmd_new_or_set’:
@mendeni
mendeni / gist:10742889
Created April 15, 2014 15:45
dpkg -c redis_2.8.8-1-rackos_amd64.deb
# dpkg -c redis_2.8.8-1-rackos_amd64.deb
drwxr-xr-x 0/0 0 2014-04-15 13:43 ./
drwxr-xr-x 0/0 0 2014-04-15 13:43 ./etc/
drwxr-xr-x 0/0 0 2014-04-15 13:43 ./etc/redis/
-rw-r--r-- 0/0 30544 2014-04-15 13:39 ./etc/redis/redis.conf
-rw-r--r-- 0/0 5660 2014-04-15 13:39 ./etc/redis/sentinel.conf
drwxr-xr-x 0/0 0 2014-04-15 13:43 ./etc/logrotate.d/
-rw-r--r-- 0/0 133 2014-04-15 13:39 ./etc/logrotate.d/redis-server
drwxr-xr-x 0/0 0 2014-04-15 13:43 ./etc/init.d/
-rwxr-xr-x 0/0 1600 2014-04-15 13:39 ./etc/init.d/redis-server
@mendeni
mendeni / gist:304dc3f34c41b7516c95
Created April 30, 2014 19:30
libvirt.idmap.xml
<domain type='lxc'>
<name>sew02</name>
<uuid>2f4d4d57-2a9a-4e7c-9668-bbe5406cb4a9</uuid>
<memory unit='KiB'>65536</memory>
<currentMemory unit='KiB'>65536</currentMemory>
<vcpu placement='static'>1</vcpu>
<resource>
<partition>/machine</partition>
</resource>
<os>