Skip to content

Instantly share code, notes, and snippets.

Elton Stoneman sixeyed

View GitHub Profile
sixeyed /
Created Nov 30, 2018 — forked from wsong/
Kube on Windows demo for DCEU

Windows on Kube

NOTE: This is based on the gist 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)

sixeyed / profile.ps1
Created Nov 1, 2018
PowerShell profile with a Linux-style prompt and aliases for common Docker commands
View profile.ps1
function Prompt(){
$W = Split-Path -leaf -path (Get-Location)
$prompt = Write-Prompt "$($env:UserName)@$($env:ComputerName):" -ForegroundColor Green
$prompt += Write-Prompt $W -ForegroundColor DarkCyan
$prompt += Write-Prompt '>'
return ' '
function Remove-StoppedContainers {
docker container rm $(docker container ls -q)
sixeyed / install-ide.ps1
Last active Jun 21, 2018
Install .NET & Java IDEs
View install-ide.ps1
choco install -y visualstudio2017enterprise
choco install -y intellijidea-ultimate
choco install -y dotnetcore-sdk
choco install -y jdk8
sixeyed / simple-windows-stack.yml
Created Mar 14, 2018
The simplest Windows stack to run in a Docker swarm
View simple-windows-stack.yml
version: '3.3'
image: microsoft/iis:nanoserver
- app-net
- mode: host
sixeyed / 01-run-on-azure.ps1
Last active May 31, 2017
Secure Docker engine on Azure VM and copy certs to local
View 01-run-on-azure.ps1
$serverName = ''
$externalIP = ''
$internalIP = ''
mkdir -p C:\certs\vm\client
docker run --rm `
-e SERVER_NAME= $serverName `
-e IP_ADDRESSES=,$externalIP,$internalIP `
-v 'C:\ProgramData\docker:C:\ProgramData\docker' `
sixeyed / overlay-test.ps1
Created May 5, 2017
Overlay test for Windows containers
View overlay-test.ps1
$ip = ''
docker swarm init --listen-addr $ip --advertise-addr $ip
docker network create --driver overlay test
docker service create `
--network test `
--endpoint-mode dnsrr `
--publish mode=host,target=80,published=80 `
sixeyed / Set-ProfileForDocker.ps1
Last active Dec 23, 2018
PowerShell aliases for working with Docker on Windows - save to $profile
View Set-ProfileForDocker.ps1
#docker rm $(docker ps -a -q)
function Remove-StoppedContainers {
foreach ($id in & docker ps -a -q) {
& docker rm $id }
#docker rmi $(docker images -f "dangling=true" -q)
function Remove-DanglingImages {
foreach ($id in & docker images -q -f 'dangling=true') {
& docker rmi $id }
sixeyed / update-docker.ps1
Created Sep 28, 2016
Update Docker for Windows Server 2016
View update-docker.ps1
# Upgrades an existing Docker installation on Windows Server 2016
# Assumes you have Docker already installed by following the steps in
Stop-Service docker
dockerd.exe --unregister-service
Invoke-WebRequest "" -OutFile "$env:TEMP\" -UseBasicParsing
sixeyed / StubEventHubSpout.cs
Last active Sep 7, 2015
Simple stub for emitting Event Hub-style tuples to Storm context, for testing .NET Storm applications. Usage here:
View StubEventHubSpout.cs
using Microsoft.SCP;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
namespace My.Storm.App.Tests
/// <summary>
/// Simple stub for emitting Event Hub-style tuples to Storm context.
/// </summary>
sixeyed / Program.cs
Created Feb 19, 2015
Submitting HDInsight Storm Applications from Visual Studio - Gotcha!
View Program.cs
TopologyBuilder topologyBuilder = new TopologyBuilder("MyEventProcessorRealTimeStorm");
You can’t perform that action at this time.