Skip to content

Instantly share code, notes, and snippets.

# Install latest k8s packages
cat <<EOF > /etc/apt/sources.list.d/kubernetes.list
deb http://apt.kubernetes.io/ kubernetes-xenial-unstable main
EOF
# Install ocid
apt-get install libseccomp2 libseccomp-dev seccomp libdevmapper-dev libdevmapper1.02.1 libgpgme11 libgpgme11-dev libglib2.0-dev
# Install ocid systemd service file
@mcastelino
mcastelino / sriov-with-cnm-plugin.md
Created May 10, 2017 19:56 — forked from egernst/sriov-with-cnm-plugin.md
SRIO-V with Docker CNM plugin

Using a Docker CNM plugin to play with SRIO-V

This gist describes the setup necessary for testing SRIO-V based connectivity between two physical boxes which are each setup as described here, and directly connected via their respective SRIO-V enabled NICs.

Setup host system's packages

For this scenario, I'm setting up two Ubuntu 16.04 systems which have a SRIO-V enabled interface as well as a second port for accessing the SUT. To setup:

@mcastelino
mcastelino / Kubernetes with Clear Containers 3.0 using CRI-O.md
Last active July 28, 2017 17:16 — forked from egernst/k8s-play.md
Kubernetes with Clear Containers 3.0 using CRI-O

Overview

This documents how to get Kubernetes running with Clear Containers using CRIO.

Base OS

Ubuntu 16.04 4.10.0-27-generic

Known working commits

apiVersion: v1
kind: Pod
metadata:
annotations:
io.kubernetes.cri-o.trusted: "false"
name: nginx-untrusted
spec:
containers:
- name: nginx
image: sameo/nginx-kubecon:1.0

Experimental Docker Libnetwork DHCP Driver

The DHCP driver is intended for users to be able to integrate Docker IP address management with their existing IPAM strategies that use DHCP for dynamic address assignment. DHCP enables users to allocate addresses in an organized fashion that will prevent overlapping IP address assignment by associating a unique MAC address from the container eth0 Ethernet interface to an IP address as determined by the DHCP pools defined in the DHCP configuration.

This driver only provides the DHCP client functionality. It does not include a DHCP server. The default driver offers single-host IPAM or for distributed multi-host orchestrated IPAM see the libnetwork overlay driver.

Getting Started

@mcastelino
mcastelino / gist:005db8df4e63de12af37ad9d4bb5edf7
Created September 22, 2017 16:50 — forked from devimc/hotplug.md
Q35 + Hotplug devices (no ACPI)
# Get qemu
git clone https://github.com/qemu/qemu
# Apply configure patch
curl https://raw.githubusercontent.com/clearcontainers/packaging/master/qemu-lite/configure.patch | patch -p1
# Configure qemu line
./configure --disable-static --disable-bluez --disable-brlapi --disable-bzip2 --disable-curl --disable-curses --disable-debug-tcg --disable-fdt --disable-glusterfs --disable-gtk --disable-libiscsi --disable-libnfs --disable-libssh2 --disable-libusb --disable-linux-aio --disable-lzo --disable-opengl --disable-qom-cast-debug --disable-rbd --disable-rdma --disable-sdl --disable-seccomp --disable-slirp --disable-snappy --disable-spice --disable-strip --disable-tcg-interpreter --disable-tcmalloc --disable-tools --disable-tpm --disable-usb-redir --disable-uuid --disable-vnc --disable-vnc-jpeg --disable-vnc-png --disable-vnc-sasl --disable-vte --disable-xen --enable-attr --enable-cap-ng --enable-kvm --enable-virtfs --target-list=x86_64-softmmu --extra-cflags="-fno-semantic-interposition -O3 -falign-functions=32" -
@mcastelino
mcastelino / cor-sriov-with-cnm-plugin.md
Created September 28, 2017 23:01 — forked from egernst/cor-sriov-with-cnm-plugin.md
COR edition: SRIO-V with Docker CNM plugin

Using a Docker CNM plugin to play with SRIO-V

This gist describes the setup necessary for testing SRIO-V based connectivity between two physical boxes which are each setup as described here, and directly connected via their respective SRIO-V enabled NICs.

Setup host system's packages

For this scenario, I'm setting up two Ubuntu 16.04 systems which have a SRIO-V enabled interface as well as a second port for accessing the SUT. To setup:

Basic VPP Setup for vhost-user interfaces and VMs

There are many examples of using VPP with tap interfaces/namespaces. After reviewing these, and details at https://wiki.fd.io/view/VPP/Tutorial_Routing_and_Switching, we came up with the following setup for testing inter-VM connectivity using VPP's vhost-user.

First time setup

Grab VPP packages, per directions from FD.io at https://wiki.fd.io/view/VPP/Installing_VPP_binaries_from_packages

$ sudo rm /etc/apt/sources.list.d/99fd.io.list
$ echo "deb [trusted=yes] https://nexus.fd.io/content/repositories/fd.io.ubuntu.xenial.main/ ./" | sudo tee -a /etc/apt/sources.list.d/99fd.io.list
@mcastelino
mcastelino / installing-openwhisk-on-ubuntu.md
Created January 5, 2018 02:07 — forked from epiphone/installing-openwhisk-on-ubuntu.md
Installing OpenWhisk on Ubuntu Server 16.04

Configuring the OpenWhisk server

This guide contains instructions on manually setting up Openwhisk and CouchDB on a fresh Ubuntu 16.04 server.

The guide is based on the OpenWhisk Ansible README, which at the time of writing is missing some key steps and gotchas - hence this new guide.

1. Dependencies

sudo apt-get update

Containerd runtimes

A runtime in containerd does not stand at the runc level, but at the platform one. There are separate Linux and Windows runtimes, and they register as plugins:

const (
	runtimeName    = "linux"
	configFilename = "config.json"