Skip to content

Instantly share code, notes, and snippets.

---
##################################################################################################
# Ratings service
##################################################################################################
apiVersion: v1
kind: Service
metadata:
name: ratings
labels:
app: ratings
@anonymuse
anonymuse / FreeNAS.md
Created July 4, 2017 19:27 — forked from jacobblock/FreeNAS.md
Ultimate FreeNAS Setup

FreeNAS

I started using FreeNAS in August 2013. It is fantastic piece of software and I have been really impressed by the upgrades just in the few months I've been using it. It looks like they recently went to a plugin system as of version 9 to make installing software easier for end users. I've ran into several issues related to plugins and user + group permissions so I decided to just use the available FreeBSD port system. After fiddling for a few days (now turned into months) I believe I have created something helpful for the community and anyone interested in picking up the port system. The sandbox nature of FreeNAS's jail system is especially helpful for playing around without having any consequence on your core system.

Here are straight-forward instructions to setting up a bunch of different software on FreeNAS. If you make a terrible error, just throw up another plugin sandbox and repeat.

ToC

moby-025000000004:/# kubeadm-init.sh
[kubeadm] WARNING: kubeadm is in beta, please do not use it for production clusters.
[init] Using Kubernetes version: v1.6.1
[init] Using Authorization mode: RBAC
[preflight] Skipping pre-flight checks
[preflight] No supported init system detected, won't ensure kubelet is running.
[certificates] Generated CA certificate and key.
[certificates] Generated API server certificate and key.
[certificates] API Server serving cert is signed for DNS names [moby-025000000004 kubernetes kubernetes.default kubernetes.default.svc kubernetes.default.svc.cluster.local] and IPs [10.96.0.1 192.168.65.5]
[certificates] Generated API server kubelet client certificate and key.
$ make build-vm-images
../../bin/moby build -name kube-master kube-master.yml
Extract kernel image: linuxkit/kernel:4.9.x
Add init containers:
Process init image: linuxkit/init:63eed9ca7a09d2ce4c0c5e7238ac005fa44f564b
Process init image: linuxkit/runc:b0fb122e10dbb7e4e45115177a61a3f8d68c19a9
Process init image: linuxkit/containerd:18eaf72f3f4f9a9f29ca1951f66df701f873060b
Process init image: linuxkit/ca-certificates:e091a05fbf7c5e16f18b23602febd45dd690ba2f
Add onboot containers:
Create OCI config for linuxkit/sysctl:1f5ec5d5e6f7a7a1b3d2ff9dd9e36fd6fb14756a
$ make
mkdir -p bin
tar cf - vendor src/initrd src/pad4 -C src/cmd/moby . | docker run --rm --net=none --log-driver=none -i -e GOOS=darwin -e GOARCH=amd64 linuxkit/go-compile:4513068d9a7e919e4ec42e2d7ee879ff5b95b7f5@sha256:bdfadbe3e4ec699ca45b67453662321ec270f2d1a1dbdbf09625776d3ebd68c5 --package github.com/linuxkit/linuxkit --ldflags "-X main.GitCommit=d35878c9e8c428d9b47eca16787d8267a2a9297c -X main.Version="0.0" " -o bin/moby > tmp_moby_bin.tar
Unable to find image 'linuxkit/go-compile:4513068d9a7e919e4ec42e2d7ee879ff5b95b7f5@sha256:bdfadbe3e4ec699ca45b67453662321ec270f2d1a1dbdbf09625776d3ebd68c5' locally
sha256:bdfadbe3e4ec699ca45b67453662321ec270f2d1a1dbdbf09625776d3ebd68c5: Pulling from linuxkit/go-compile
627beaf3eaaf: Pulling fs layer
1b3a1005911c: Pulling fs layer
d58e6f1740ab: Pulling fs layer
49418cbb2668: Pulling fs layer
49418cbb2668: Waiting
@anonymuse
anonymuse / create_swarm_cluster.sh
Created February 6, 2017 16:48 — forked from alexei-led/create_swarm_cluster.sh
Deploy Docker Compose (v3) to Swarm (mode) Cluster
#!/bin/bash
# vars
[ -z "$NUM_WORKERS" ] && NUM_WORKERS=3
# init swarm (need for service command); if not created
docker node ls 2> /dev/null | grep "Leader"
if [ $? -ne 0 ]; then
docker swarm init > /dev/null 2>&1
fi
WOPR:~ jesse$ minikube start --kubernetes-version="v1.5.1" --vm-driver="virtualbox" --show-libmachine-logs --alsologtostderr
W1224 10:30:26.467829 2747 root.go:139] Error reading config file at /Users/jesse/.minikube/config/config.json: open /Users/jesse/.minikube/config/config.json: no such file or directory
Starting local Kubernetes cluster...
Running pre-create checks...
Creating machine...
(minikube) Downloading /Users/jesse/.minikube/cache/boot2docker.iso from file:///Users/jesse/.minikube/cache/iso/minikube-0.7.iso...
(minikube) Creating VirtualBox VM...
(minikube) Creating SSH key...
(minikube) Starting the VM...
(minikube) Check network to re-create if needed...
@anonymuse
anonymuse / maps_search.md
Last active October 26, 2016 19:42
Add Google Maps search to the Chrome omnibar

Add Google Maps search to the Chrome omnibar

Open up the default search engines by navigating to:

chrome://settings/searchengines

Scroll to the bottom of the search engines

Should look like so: http://imgur.com/a/M7wpk

Hi all,

My name is Jesse, and I'm one of the organizers of ContainerDays NYC, a community (un)conference coming up on Nov 3-4 with talks, workshops and Open Spaces on everything to do with containers, serverless and dynamic infrastructure. Tickets are only $55 for two days worth of great content.

If you're curious, more details are at http://dynamicinfradays.org/events/2016-nyc/; we've also include a discount registration link for the first 20 signups here: http://containerdaysnyc2016.eventbrite.com?discount=

We hope you'll join us.

INFO[0007] time="2016-10-05T18:36:17-04:00" level=error msg="unknown command \"apply\" for \"terraform\""
terraform=apply
INFO[0007] Acquired lock. Applying
INFO[0007] Can't acquire lock. Wait.
INFO[0007] Error: unknown command "apply" for "terraform"
terraform=apply
INFO[0007] Run 'terraform --help' for usage.
terraform=apply
INFO[0007] time="2016-10-05T18:36:17-04:00" level=error msg="unknown command \"apply\" for \"terraform\""
terraform=apply