Skip to content

Instantly share code, notes, and snippets.

Introducing Conduit

In progress thoughts about introducing Conduit into our clusters.

CD pipelines

All our Kubernetes manifests are defined in Git and applied to the cluster via automated deployment pipelines. The standard procedure to deploy is to introduce a change to this git repo (these changes are themselves automated), which is then applied to the k8s cluster.

Conduit is a departure from this because it encourages an injection process which relies on an out of repo dependency (other than kubernetes itself). The objects that end up in Kubernetes are NOT defined in Git, and are a function of our own manifests plus the version of Conduit that happens to be installed locally (in the CD environment). This makes people nervous.

@JakeSidSmith
JakeSidSmith / brighton-and-hove-meetups.md
Last active March 29, 2018 16:36
List of Brighton & Hove Design, Development, and Various Other Tech / Nerdy Meetups

ANNOUNCEMENT: We've moved all of these meetups to a better maintained website called Brighton Brains - add it to your bookmarks, share it on your social media, etc. :D

Brighton & Hove Design, Development, and Related Meetups

Development

A JavaScript meetup for Brighton & Hove

@hobochili
hobochili / nomad-auto-revert-test.sh
Last active January 16, 2018 14:04
Nomad auto-revert test
#/bin/bash
# Creates a stable test job with auto_revert=true in Nomad,
# updates it a bunch of times to force the job version to 256,
# then creates an unstable job. Nomad will roll back to 255
# instead of 256.
sudo tee /tmp/pass.nomad << EOF > /dev/null
job "test" {
datacenters = ["dc1"]
@pi0
pi0 / .dockerignore
Last active August 29, 2018 21:04
Multi Stage Docker Builds for Node.js
node_modules
@csawyerYumaed
csawyerYumaed / nomad-check.py
Created October 17, 2016 16:22
after running a nomad job, check, verify and if failed, roll-back to previous build.
#!/usr/bin/env python
"""
As part of my jenkins build-pipeline, I'm having jenkins build and then deploy my services directly into nomad.
my build and deploy in jenkins looks like this:
docker build -t pdfservice:$BUILD_NUMBER .
docker tag pdfservice:$BUILD_NUMBER registry.service.consul:5000/pdfservice:$BUILD_NUMBER
docker push registry.service.consul:5000/pdfservice:$BUILD_NUMBER
docker build -t pdfservice:latest .
docker tag pdfservice:latest registry.service.consul:5000/pdfservice:latest
docker push registry.service.consul:5000/pdfservice:latest
@kwilczynski
kwilczynski / vpn.sh
Last active February 12, 2018 19:54
OpenVPN for TCP and UDP for use with EC2 user data.
#!/bin/bash
set -e
set -u
set -o pipefail
# Return netmask for a given network and CIDR.
cidr_to_netmask() {
value=$(( 0xffffffff ^ ((1 << (32 - $1)) - 1) ))
echo "$(( (value >> 24) & 0xff )).$(( (value >> 16) & 0xff )).$(( (value >> 8) & 0xff )).$(( value & 0xff ))"
# file name terraform/modules/aws_vpc/vpc.tf
# first create the VPC.
# Prefix resources with var.name so we can have many environments trivially
resource "aws_vpc" "mod" {
cidr_block = "${var.cidr}"
enable_dns_hostnames = "${var.enable_dns_hostnames}"
enable_dns_support = "${var.enable_dns_support}"
tags {
Name = "${var.env}_vpc"
@bastman
bastman / docker-cleanup-resources.md
Created March 31, 2016 05:55
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

import Options.Applicative
import Control.Monad
parser :: Parser (IO ())
parser = subparser $
command "add" (info (helper <*> addMode) mempty)
<> command "test" (info (pure $ putStrLn "testing") mempty)
where
addMode :: Parser (IO ())
addMode = subparser $