Skip to content

Instantly share code, notes, and snippets.

View luxas's full-sized avatar
🎓
Studying at Aalto University; I'm not working at the moment

Lucas Käldström luxas

🎓
Studying at Aalto University; I'm not working at the moment
View GitHub Profile
@luxas
luxas / BuildArchLinuxARM.sh
Last active July 12, 2016 05:31
Raspberry Pi Arch Linux ARM builder from source to SD Card. One command install.
#!/bin/bash
#
# This is a script for writing the latest Arch Linux ARM files to a SD Card
#
# Based on this tutorial
# http://archlinuxarm.org/platforms/armv7/broadcom/raspberry-pi-2
#
# Usage:
# sudo sh BuildArchLinuxARM.sh [your sd card here]
#
@luxas
luxas / Dockerfile
Last active November 29, 2017 16:10
Build Kubernetes binaries for ARM on amd64
FROM golang:1.5.2
MAINTAINER Lucas Käldström <lucas.kaldstrom@hotmail.co.uk>
# Enable cgo cross-compilation for armel
RUN echo "deb http://emdebian.org/tools/debian/ jessie main" > /etc/apt/sources.list.d/crosstools.list \
&& curl -s http://emdebian.org/tools/debian/emdebian-toolchain-archive.key | apt-key add - \
&& dpkg --add-architecture armel \
&& apt-get update \
&& apt-get install -y build-essential crossbuild-essential-armel rsync upx
@luxas
luxas / k8s-on-swarm.yaml
Created December 27, 2015 14:52
Run Kubernetes on top of Swarm on a Raspberry Pi (experimental)
etcd:
image: kubernetesonarm/etcd
container_name: etcd
command: ['']
environment:
- "constraint:role==*master*"
flannel:
image: kubernetesonarm/flannel
container_name: flannel
@luxas
luxas / monokube.sh
Last active February 23, 2016 12:52
docker run -it golang:1.5.3 /bin/bash
git clone https://github.com/polvi/monokube
cd monokube/cmd/hyperkube
GOARCH=arm go get github.com/coreos/etcd/etcdmain \
github.com/jpillora/backoff \
github.com/spf13/pflag \
github.com/vulcand/oxy/forward \
github.com/vulcand/oxy/testutils \
golang.org/x/crypto/ssh \
Summarizing 68 Failures:
[Fail] [k8s.io] Kubectl client [k8s.io] Kubectl label [BeforeEach] should update the label on a resource [Conformance]
/home/lucas/luxas/lux_kubernetes/_output/local/go/src/k8s.io/kubernetes/test/e2e/framework/util.go:1844
[Fail] [k8s.io] EmptyDir volumes [It] should support (root,0644,tmpfs) [Conformance]
/home/lucas/luxas/lux_kubernetes/_output/local/go/src/k8s.io/kubernetes/test/e2e/framework/util.go:1937
[Fail] [k8s.io] Pods [It] should *not* be restarted with a /healthz http liveness probe [Conformance]
/home/lucas/luxas/lux_kubernetes/_output/local/go/src/k8s.io/kubernetes/test/e2e/pods.go:109
@luxas
luxas / ingress-arm.log
Created December 30, 2016 09:50
ingress-arm.log
# Copy the whole directory to a temporary dir and set the base image
cp -r ./* /tmp/tmp.Wr0YMHGbex
cd /tmp/tmp.Wr0YMHGbex && sed -i "s|BASEIMAGE|gcr.io/google_containers/ubuntu-slim-arm:0.6|g" Dockerfile
cd /tmp/tmp.Wr0YMHGbex && sed -i "s|ARCH|arm|g" Dockerfile
# When cross-building, only the placeholder "CROSS_BUILD_" should be removed
# Register /usr/bin/qemu-ARCH-static as the handler for ARM binaries in the kernel
docker run --rm --privileged multiarch/qemu-user-static:register --reset
curl -sSL https://github.com/multiarch/qemu-user-static/releases/download/v2.7.0/x86_64_qemu-arm-static.tar.gz | tar -xz -C /tmp/tmp.Wr0YMHGbex
cd /tmp/tmp.Wr0YMHGbex && sed -i "s/CROSS_BUILD_//g" Dockerfile
docker build -t gcr.io/google_containers/nginx-slim-arm:0.12 /tmp/tmp.Wr0YMHGbex
@luxas
luxas / kubernetes-go1.8.log
Created February 19, 2017 11:55
Output of "make release" when using go1.8 as in PR https://github.com/kubernetes/kubernetes/pull/41636
root@test-go18-k8s:~/kubernetes# time make release
+++ [0219 10:51:34] Verifying Prerequisites....
+++ [0219 10:51:34] Building Docker image kube-build:build-97f2054073-5-v1.8.0-1
+++ [0219 10:51:46] Creating data container kube-build-data-97f2054073-5-v1.8.0-1
+++ [0219 10:51:47] Syncing sources to container
+++ [0219 10:51:49] Running build command...
+++ [0219 10:52:02] Multiple platforms requested and available 28G >= threshold 11G, building platforms in parallel
+++ [0219 10:52:02] Building the toolchain targets:
k8s.io/kubernetes/hack/cmd/teststale
k8s.io/kubernetes/vendor/github.com/jteeuwen/go-bindata/go-bindata
@luxas
luxas / fetch-k8s-ci-images.sh
Created June 17, 2017 12:36
A script that is able to fetch the latest docker images from the Kubernetes CI uploads
#!/bin/bash
CI_COMMIT=${CI_COMMIT:-latest}
ARCH=${ARCH:-amd64}
REGISTRY=${REGISTRY:-gcr.io/google_containers}
if [[ ${CI_COMMIT} == "latest" ]]; then
CI_COMMIT=$(curl -sSL https://dl.k8s.io/ci-cross/latest.txt)
fi
ARCH_EXT="-${ARCH}"
@luxas
luxas / arm64.txt
Created September 3, 2017 18:41
e2e Conformance Results
Summarizing 10 Failures:
[Fail] [k8s.io] Pods [It] should allow activeDeadlineSeconds to be updated [Conformance]
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/framework/pods.go:83
[Fail] [k8s.io] Pods [It] should be submitted and removed [Conformance]
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/common/pods.go:205
[Fail] [sig-cli] Kubectl client [k8s.io] Kubectl replace [It] should update a single-container pod's image [Conformance]
/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/kubectl/kubectl.go:1429
@luxas
luxas / Makefile
Created March 6, 2019 15:11
Firecracker in containerd and Docker
all: build-docker
build:
go build -o fcd -mod=vendor .
shell:
docker run -it -v $(shell pwd):/build -w /build golang:1.11
build-docker:
docker run -it -v $(shell pwd):/build -w /build golang:1.11 make build