Skip to content

Instantly share code, notes, and snippets.

@till
till / ignition.json
Created May 27, 2020 17:28 — forked from thetechnick/ignition.json
Hetzner Cloud terraform coreos install
{
"ignition": {
"version": "2.0.0",
"config": {}
},
"storage": {
},
"systemd": {},
"networkd": {},
"passwd": {
@till
till / testinfra.py
Created November 10, 2019 12:35
Debuggable TestInfra
import os
import testinfra.utils.ansible_runner
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
os.environ['MOLECULE_INVENTORY_FILE']
).get_hosts('all')
def get_docker_services(host):
@till
till / Dockerfile.molecule
Created November 10, 2019 12:32
Dockerfile for Molecule
FROM quay.io/ansible/molecule:2.22
RUN apk add --update build-base
RUN pip install --upgrade pip
RUN pip install dnspython requests==2.20.1 docker docker-compose hcloud molecule[hetznercloud]
@till
till / docker-compose.yaml
Created April 2, 2019 12:51
Drone.io's server and agent, with supporting Minio. All with Docker-Compose/Swarm.
version: '2'
services:
db:
image: mariadb:10.4
environment:
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
- MYSQL_DATABASE=${MYSQL_DATABASE}
- MYSQL_USER=${MYSQL_USER}
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
---
# assume this is preceeded by the docker_container module above
- name: Get container IP
set_fact:
container_ip: "{{ my_service_status.ansible_facts.docker_container.NetworkSettings.IPAddress }}"
- name: Check container
wait_for:
host: "{{ container_ip }}"
---
- name: Start a service without a port
docker_container:
name: service_without_port
image: whatever
...
register: my_service_status
- name: Save status
set_fact:
apiVersion: v1
kind: ConfigMap
metadata:
namespace: metallb-system
name: config
data:
config: |
address-pools:
- name: private-network
protocol: layer2
@till
till / backup-rancher2.x-etcd.md
Created November 2, 2018 12:09
Backup Single-Node (non-HA) Rancher Server 2.x

Rancher 2.x uses etcd to store everything. If you don't know how to backup that, you loose all info on clusters, etc. as you upgrade Rancher Server.

Here's how to get passed that!

Get container ID:

$ docker ps|grep rancher/rancher
@till
till / WIP.md
Last active August 22, 2017 19:57
OpsWorks + DigitalOcean = ❤️

Register a droplet in AWS OpsWorks

AWS Requirements

  • create a new IAM user and attach the AWS OpsWorks Register Policy
  • for testing: create a new stack on AWS OpsWorks and fetch its ID
  • customize all variables prefixed with YOUR_ from the cloud-config.yml

DigitalOcean

@till
till / keybase.md
Created February 12, 2017 17:02
keybase.md

Keybase proof

I hereby claim:

  • I am till on github.
  • I am tillk (https://keybase.io/tillk) on keybase.
  • I have a public key whose fingerprint is C1C7 6BE3 C15D 9324 984D 1D82 A6C3 90D3 1482 E46F

To claim this, I am signing this object: