Skip to content

Instantly share code, notes, and snippets.

View HighwayofLife's full-sized avatar
🥷
Jedi

David Lewis HighwayofLife

🥷
Jedi
View GitHub Profile
@HighwayofLife
HighwayofLife / ceph-before-reboot-script.yaml
Created February 4, 2021 23:05
Ceph Before Reboot Maintenance Script
apiVersion: v1
kind: ConfigMap
metadata:
name: ceph-before-reboot-script
namespace: rook-ceph
data:
status-check.sh: |-
#!/bin/bash
# preflightCheck checks for existence of "dependencies"
preflightCheck() {
@HighwayofLife
HighwayofLife / cloud_init.yaml
Last active March 23, 2024 12:52
Install Docker via Cloud Init on Ubuntu VM
#cloud-config
packages:
- apt-transport-https
- ca-certificates
- curl
- gnupg-agent
- software-properties-common
# Enable ipv4 forwarding, required on CIS hardened machines
@HighwayofLife
HighwayofLife / drone-kube-runner.yaml
Last active February 18, 2020 08:28
Drone kube runner examples
---
# Source: drone/templates/deployment-runner.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: drone-kube-runner
namespace: pipeline
labels:
app: drone
chart: "drone-2.2.0"
@HighwayofLife
HighwayofLife / configmap.yaml
Created August 19, 2019 16:42
datadog/configmap.yaml
---
kind: ConfigMap
apiVersion: v1
metadata:
name: dd-agent-config
namespace: datadog-monitor
data:
kube_apiserver_metrics.yaml: |
init_config:
@HighwayofLife
HighwayofLife / daemonset.yaml
Created August 19, 2019 16:20
datadog/daemonset.yaml
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: datadog-agent
namespace: datadog-monitor
spec:
selector:
matchLabels:
app: datadog-agent
updateStrategy:
@HighwayofLife
HighwayofLife / Makefile
Created July 2, 2018 16:35 — forked from mpneuried/Makefile
Simple Makefile to build, run, tag and publish a docker containier to AWS-ECR
# import config.
# You can change the default config with `make cnf="config_special.env" build`
cnf ?= config.env
include $(cnf)
export $(shell sed 's/=.*//' $(cnf))
# import deploy config
# You can change the default deploy config with `make cnf="deploy_special.env" release`
dpl ?= deploy.env
include $(dpl)
@HighwayofLife
HighwayofLife / README.md
Created March 22, 2018 08:42 — forked from qoomon/TravisGitHub.md
Setup GitHub Deploy Keys For Travis

Setup Travis Deploy

gem install travis

ssh-keygen -t rsa -b 4096 -f 'github_deploy_key' -N ''

cat github_deploy_key.pub | pbcopy

set public key as deploy key on github e.g https://github.com/USER/REPO/settings/keys

rm 'github_deploy_key.pub'

@HighwayofLife
HighwayofLife / git_clone_all_org_repos.sh
Created March 17, 2018 06:39
Git Clone all Github Organization Repositories in a single command
#!/bin/sh
ORG="deck15"
curl -s https://api.github.com/orgs/$ORG/repos?per_page=200 | jq -r '.[].ssh_url' | xargs -I {} git clone {}
@HighwayofLife
HighwayofLife / docker-cleanup-resources.md
Created March 13, 2018 20:12 — forked from bastman/docker-cleanup-resources.md
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

@HighwayofLife
HighwayofLife / service_fabric.tf
Created June 9, 2017 04:32
Passing Storage Account Endpoints to ARM Templates
variable "resourceGroupName" {
default = "myResourceGroup"
}
variable "location" {
default = "West US"
}
variable "clusterName" {
default = "servicefabcluster"
}
variable "nodeCount" {