Skip to content

Instantly share code, notes, and snippets.

View JonJam's full-sized avatar

Jonathan Harrison JonJam

View GitHub Profile
@JonJam
JonJam / themeparks-bot-deployment.yaml
Created March 6, 2018 09:09
k8s helm - deployment
apiVersion: apps/v1beta2
kind: Deployment
metadata:
name: {{ include "themeparks-bot.fullname" . }}
labels:
app: {{ include "themeparks-bot.name" . }}
chart: {{ include "themeparks-bot.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
annotations:
@JonJam
JonJam / themeparks-bot-ingress.yaml
Created March 6, 2018 09:08
k8s helm - ingress
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: {{ include "themeparks-bot.fullname" . }}
labels:
app: {{ include "themeparks-bot.name" . }}
chart: {{ include "themeparks-bot.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
annotations:
@JonJam
JonJam / themeparks-bot-service.yaml
Created March 6, 2018 09:08
k8s helm - service
apiVersion: v1
kind: Service
metadata:
name: {{ include "themeparks-bot.fullname" . }}
labels:
app: {{ include "themeparks-bot.name" . }}
chart: {{ include "themeparks-bot.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
annotations:
@JonJam
JonJam / themeparks-bot-secret.yaml
Created March 6, 2018 09:07
k8s helm - secret
apiVersion: v1
kind: Secret
metadata:
name: {{ include "themeparks-bot.fullname" . }}
labels:
app: {{ include "themeparks-bot.name" . }}
chart: {{ include "themeparks-bot.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
annotations:
@JonJam
JonJam / deploy.sh
Created February 27, 2018 08:22
k8s infrastructure - deploy.sh
#!/bin/bash
# Setting -e and -v as pert https://docs.travis-ci.com/user/customizing-the-build/#Implementing-Complex-Build-Steps
# -e: immediately exit if any command has a non-zero exit status
# -v: print all lines in the script before executing them
# -o: prevents errors in a pipeline from being masked
set -euo pipefail
# IFS new value is less likely to cause confusing bugs when looping arrays or arguments (e.g. $@)
IFS=$'\n\t'
@JonJam
JonJam / validate-rg.sh
Created February 27, 2018 08:17
k8s infrastructure - validate-rg.sh
#!/bin/bash
# Setting -e and -v as pert https://docs.travis-ci.com/user/customizing-the-build/#Implementing-Complex-Build-Steps
# -e: immediately exit if any command has a non-zero exit status
# -v: print all lines in the script before executing them
# -o: prevents errors in a pipeline from being masked
set -euo pipefail
# IFS new value is less likely to cause confusing bugs when looping arrays or arguments (e.g. $@)
IFS=$'\n\t'
@JonJam
JonJam / .travis.yml
Created February 27, 2018 08:06
k8s infrastructure - travis
before_install:
- echo "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ wheezy main" | sudo tee /etc/apt/sources.list.d/azure-cli.list
- sudo apt-key adv --keyserver packages.microsoft.com --recv-keys 52E16F86FEE04B979B07E28DB02C46DF417A0893
- sudo apt-get -qq update
- sudo apt-get install -qq apt-transport-https
- sudo apt-get install -qq azure-cli
- curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl
- chmod +x ./kubectl
- sudo mv ./kubectl /usr/local/bin/kubectl
- curl https://raw.githubusercontent.com/kubernetes/helm/master/scripts/get > get_helm.sh
@JonJam
JonJam / install-helm.sh
Created February 27, 2018 08:01
k8s infrastructure - install helm
#!/bin/bash
# Setting -e and -v as pert https://docs.travis-ci.com/user/customizing-the-build/#Implementing-Complex-Build-Steps
# -e: immediately exit if any command has a non-zero exit status
# -v: print all lines in the script before executing them
# -o: prevents errors in a pipeline from being masked
set -euo pipefail
# IFS new value is less likely to cause confusing bugs when looping arrays or arguments (e.g. $@)
IFS=$'\n\t'
@JonJam
JonJam / deploy-rg.sh
Created February 27, 2018 07:50
k8s infrastructure - deploy-rg.sh
#!/bin/bash
# Setting -e and -v as pert https://docs.travis-ci.com/user/customizing-the-build/#Implementing-Complex-Build-Steps
# -e: immediately exit if any command has a non-zero exit status
# -v: print all lines in the script before executing them
# -o: prevents errors in a pipeline from being masked
set -euo pipefail
# IFS new value is less likely to cause confusing bugs when looping arrays or arguments (e.g. $@)
IFS=$'\n\t'
@JonJam
JonJam / azuredeploy.json
Last active February 27, 2018 07:49
k8s infastructure - ARM Template
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"environmentName": {
"type": "string",
"defaultValue": "dev",
"allowedValues": [
"dev",
"prod"