Skip to content

Instantly share code, notes, and snippets.

View JonJam's full-sized avatar

Jonathan Harrison JonJam

View GitHub Profile
@JonJam
JonJam / azuredeploy.json
Last active March 26, 2019 13:01
App Insights - ARM with extension
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"hostingPlanName": {
"type": "string",
"minLength": 1
},
"skuName": {
"type": "string",
@JonJam
JonJam / extension.json
Last active May 16, 2018 19:04
App Insights - Site Extension
{
"apiVersion": "2015-08-01",
"name": "Microsoft.ApplicationInsights.AzureWebSites",
"type": "siteextensions",
"dependsOn": [
"[resourceId('Microsoft.Web/Sites', variables('webSiteName'))]"
],
"properties": {}
}
@JonJam
JonJam / azuredeploy.json
Last active May 15, 2018 22:02
App Insights - ARM
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"hostingPlanName": {
"type": "string",
"minLength": 1
},
"skuName": {
"type": "string",
@JonJam
JonJam / .editorconfig
Created May 1, 2018 21:36
C# EditorConfig
# editorconfig.org
root = true
[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = false
@JonJam
JonJam / deploy.sh
Created March 7, 2018 09:40
k8s helm - deploy script
#!/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 March 7, 2018 09:09
k8s helm - .travis.yml
language: node_js
node_js: "lts/*"
cache: yarn
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
@JonJam
JonJam / Chart.yaml
Created March 7, 2018 09:04
k8s helm - chart
name: themeparks-bot
version: 0.0.1
description: "Chat bot for theme park information."
tillerVersion: ">=2.4.0"
@JonJam
JonJam / requirements.yaml
Created March 7, 2018 09:02
k8s helm - requirements
dependencies:
- name: redis-ha
version: 2.0.0
repository: https://kubernetes-charts.storage.googleapis.com/
- name: nginx-ingress
version: 0.9.4
repository: https://kubernetes-charts.storage.googleapis.com/
@JonJam
JonJam / _helpers.tpl
Created March 7, 2018 08:33
k8s helm - _helpers
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "themeparks-bot.name" -}}
{{- .Chart.Name -}}
{{- end -}}
{{/*
Create a default fully qualified app name.
@JonJam
JonJam / values.yaml
Created March 6, 2018 09:20
k8s helm - values
# replicaCount is the number of replicas for the themeparks-bot container.
replicaCount: 3
image:
# repository is the repository for the themeparks-bot container image.
repository: jonjam/themeparks-bot
# tag is the tag for the themeparks-bot container image.
tag: 0.0.1
# resources is the requests and limits for the themeparks-bot container.