Skip to content

Instantly share code, notes, and snippets.

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
# The "crio" table contains all of the server options.
[crio]
# root is a path to the "root directory". CRIO stores all of its data,
# including container images, in this directory.
root = "/var/lib/containers/storage"
# run is a path to the "run directory". CRIO stores all of its state
# in this directory.
runroot = "/var/run/containers/storage"
# Install a specific runc version
$ go get -u github.com/opencontainers/runc
$ cd $GOPATH/src/github.com/opencontainers/runc
$ git reset --hard 429a5387123625040bacfbb60d96b1cbd02293ab
$ make && make install

# Install containerd HEAD
$ go get -u github.com/containerd/containerd
$cd $GOPATH/src/github.com/containerd/containerd
@sameo
sameo / hyper.md
Last active September 6, 2017 18:39

Install

# Tested on Ubuntu 16.04
# Install hyperd, hyperctl, Hyper's kernel and guest image, and their QEMU binary
wget https://hypercontainer-download.s3-us-west-1.amazonaws.com/qemu-hyper/qemu-hyper_2.4.1-1_amd64.deb 
wget https://hypercontainer-download.s3-us-west-1.amazonaws.com/0.8/ubuntu/hypercontainer_0.8.1-1_amd64.deb                   
wget https://hypercontainer-download.s3-us-west-1.amazonaws.com/0.8/ubuntu/hyperstart_0.8.1-1_amd64.deb 

dpkg -i qemu-hyper_2.4.1-1_amd64.deb

Create a QCOW2 file

qemu-img create -f qcow2 .ciao-down/instance/docker-graph.img 1G

Pass it to qemu as a drive

-drive file=/home/samuel/.ciao-down/instance/docker-graph.img,if=virtio,aio=threads,format=qcow2

Release 3.0.0

Changes

  • Code coverage bumped to 97%
  • Based on [virtcontainers][virtcontainers] 1.0.0
  • Extensive Clear Containers 3.0 [architecture documentation][architecture]
  • Support for fine-grain control of memory management
  • New guest debug option in configuration.toml
  • Support for stateless operating systems (e.g. Clear Linux)
  • Documented [upgrade path from Clear Containers 2.x][upgrade]
@sameo
sameo / crio-todo.md
Last active September 26, 2017 10:32
  • Simplify sandbox_run.go
  • critools

Let's say our device plugin (The daemon set running on a node) sends a Register() call to the kubelet with RegisterRequest being:

{
        version: "1"
        endpont: "/var/run/gpu/intel.sock"
        resource_name: "intel.com/gpu"
}
#!/bin/bash
set -e -v
losetup /dev/loop2 /usr/share/clear-containers/clear-containers.img -o $((2048*512))
mount /dev/loop2 $2
cp $1 $2/usr/bin/cc-agent
umount $2
losetup -d /dev/loop2
syntax = "proto3";
package grpc;
//import "hyperstart.proto";
//option go_package = "github.com/hyperhq/runv/hyperstart/api/grpc/oci";
message Spec {
string Version = 1;
OCIProcess Process = 2;