Skip to content

Instantly share code, notes, and snippets.

func retryLoop() {
var lastError error
for i := 0; i < 10; i++ {
val, lastError := doSomething()
if lastError == nil {
break
}
}
return lastError
}
@wsong
wsong / health.go
Created September 8, 2017 21:38
Health checker for Docker Swarm nodes
package main
import (
"context"
"fmt"
"os"
"time"
"github.com/docker/swarmkit/api"
"github.com/docker/swarmkit/ca"
@wsong
wsong / taskdelete.go
Last active October 4, 2017 21:51
Task cleaner for Swarmkit
package main
import (
"context"
"fmt"
"os"
"time"
"github.com/docker/swarmkit/api"
"github.com/docker/swarmkit/ca"
@wsong
wsong / windows_on_kube_dceu.md
Last active December 4, 2018 19:30
Kube on Windows demo for DCEU

Windows on Kube

NOTE: This is based on the gist https://gist.github.com/wsong/34beb37ebd5d22c1bf1266aaeea085d4. That gist was used to set up the Dockercon SF demo; this one is for Dockercon EU 2018.

The below instructions describe how to set up a cluster with one Linux manager and one Windows worker such that you can schedule Kubernetes pods with Windows images on the Windows worker.

These instructions are for a Windows Server 2019 node. You can create these nodes on Azure (as of November 27, 2018).

On Azure, I recommend VMs of size D4s v3 or larger (4 CPUs, 16GB memory)