Deploys FreeBSD on a Hetzner cloud server
Prerequisites:
- A Hetzner Cloud API Token (Pass in via APIKEY)
- jq
- sshpass
Usage
Replace server_id variable with your hetzner server Id
Deploys FreeBSD on a Hetzner cloud server
Replace server_id variable with your hetzner server Id
These snippets provide a foundation for starting and stopping supervision trees at runtime using feature flags (e.g. Launch Darkly).
Some things to note when adapting these snippets:
ld_key
) specified.FeatureFlags
module to be available that implements is_on?/2
. Adjust as needed to accomodate your own feature flag setup.Ideas are cheap. Make a prototype, sketch a CLI session, draw a wireframe. Discuss around concrete examples, not hand-waving abstractions. Don't say you did something, provide a URL that proves it.
Nothing is real until it's being used by a real user. This doesn't mean you make a prototype in the morning and blog about it in the evening. It means you find one person you believe your product will help and try to get them to use it.
defmodule K8s.Client do | |
@moduledoc """ | |
This is a very naive k8s client. | |
""" | |
alias K8s.Conf.RequestOptions | |
require Logger | |
def post(body, conf) do | |
path = body_to_path(body, false) | |
url = Path.join(conf.url, path) |
FROM postgres:9.6-alpine | |
LABEL version="9.6" | |
LABEL author="jpfuentes2@gmail.com" | |
RUN apk update && apk upgrade --available | |
RUN apk add build-base git postgresql-dev | |
ENV POSTGRES_VERSION=9.6 |
#!/bin/bash | |
set -e | |
set -o pipefail | |
# Add user to k8s using service account, no RBAC (must create RBAC after this script) | |
if [[ -z "$1" ]] || [[ -z "$2" ]]; then | |
echo "usage: $0 <service_account_name> <namespace>" | |
exit 1 | |
fi |
# Run me with: | |
# | |
# $ nginx -p /path/to/this/file/ -c nginx.conf | |
# | |
# All requests are then routed to authenticated user's index, so | |
# | |
# GET http://user:password@localhost/_search?q=* | |
# | |
# is rewritten to: | |
# |
# file name terraform/modules/aws_vpc/vpc.tf | |
# first create the VPC. | |
# Prefix resources with var.name so we can have many environments trivially | |
resource "aws_vpc" "mod" { | |
cidr_block = "${var.cidr}" | |
enable_dns_hostnames = "${var.enable_dns_hostnames}" | |
enable_dns_support = "${var.enable_dns_support}" | |
tags { | |
Name = "${var.env}_vpc" |
In order of first appearance in The Morning Paper.
I hereby claim:
To claim this, I am signing this object: