Skip to content

Instantly share code, notes, and snippets.

View langerma's full-sized avatar
🔥
Working from home

DataPoints langerma

🔥
Working from home
View GitHub Profile

Keybase proof

I hereby claim:

  • I am langerma on github.
  • I am langerma (https://keybase.io/langerma) on keybase.
  • I have a public key whose fingerprint is 4521 3324 64EA E917 15AD 775E 1468 0C5B FA78 9C2C

To claim this, I am signing this object:

@langerma
langerma / .tmux.conf
Last active August 27, 2018 18:20
.tmux.conf with battery and cpu / tpm plugins solarized
# tmux options
set-option -g default-terminal "screen-256color"
set-option -g mouse on
#set -g status-justify "centre"
set -g status "on"
set -g status-attr "none"
set -g status-left-attr "none"
set -g status-right-attr "none"
setw -g window-status-attr "none"
job "homeassistant" {
datacenters = ["morsegasse"]
type = "service"
update {
max_parallel = 1
min_healthy_time = "10s"
healthy_deadline = "6m"
progress_deadline = "10m"
auto_revert = false
canary = 0
langerma@macbookpro:~/repos/ansible/langerma.tsdb|master⚡ ⇒ cat nomad.yml
- hosts: nomad_instances
become: true
vars:
nomad_version: 0.12.1
tasks:
- name: import nomad
import_role:
name: ansible-nomad
- name: Start nomad
@langerma
langerma / cluster-elasticsearch.hcl
Created February 3, 2021 14:34 — forked from leowmjw/cluster-elasticsearch.hcl
cluster-elasticsearch.hcl
job "search" {
datacenters = [
"dc1"
]
type = "service"
update {
stagger = "10s"
max_parallel = 1
}
@langerma
langerma / homeassistant.nomad
Created May 13, 2021 20:20
homeassistant nomad job
# Hashicorp At Home - A series of blog posts by Mockingbird Consulting
# Read the original at https://www.mockingbirdconsulting.co.uk/blog/2019-01-05-hashicorp-at-home/
#
# This code is licensed under the MIT License, and remains the copyright of Mockingbird Consulting Ltd.
# This configuration will launch homeassistant.io and have it hosted at homeassistant.service.consul
# (assuming the default domain of .consul has been retained from the original articles).
#
# Configuration for HomeAssistant will be saved to the host machine in /srv/home_assistant/config,
# so if you have an existing HomeAssistant configuration you should be able to drop the files in to
@langerma
langerma / traefik.nomad
Last active November 28, 2021 17:14
traefik reverse proxy
job "traefik" {
datacenters = ["morsegasse"]
type = "system"
group "loadbalancers" {
#constraint {
# attribute = "${meta.worker}"
# value = "pine"
# }
count = 1
@langerma
langerma / dhcp2mqtt.sh
Last active December 28, 2021 14:23
homeassistant device tracking via dnsmasq dhcp
#!/bin/sh
op="${1:-op}"
mac="${2:-mac}"
ip="${3:-ip}"
hostname="${4}"
discovery="dhcp-$(echo ${mac} | sed -e s/://g)-tracker"
macvendor="$(echo ${mac} | tr -d ':' | head -c 6 | tr '[:lower:]' '[:upper:]')"
#vendor="$(grep '${macvendor}' /usr/local/bin/oui.txt | cut -d')' -f2 | tr -d '\t')"
#vendor="$(grep '${macvendor}' /usr/local/bin/oui.txt)"
@langerma
langerma / letsencrypt2consul.nomad.hcl
Created March 23, 2022 10:17
job file to create and deploy certs from letsencrypt
job "update-certs" {
datacenters = ["hetzner"]
type = "batch"
constraint {
attribute = "${attr.kernel.name}"
value = "linux"
}
@langerma
langerma / loki.nomad.hcl
Created April 26, 2022 13:21
loki distributed
job "loki" {
datacenters = ["hetzner"]
type = "service"
group "loki-distributor" {
count = 2
network {
dns {
servers = ["169.254.1.1"]