I hereby claim:
- I am denniswebb on github.
- I am dhwebb (https://keybase.io/dhwebb) on keybase.
- I have a public key ASDGWe1yawPF5lcPtJjxamPO7euHSiJiQo2_thZrakxEuQo
To claim this, I am signing this object:
variable "region" {default = "us-west-2"} | |
variable "website_dns" {default = "swagger-ui.webblab.info"} | |
variable "r53_zone_id" {default = "Z1S59LUERGUH56"} | |
variable "swagger_ui_version" {default = "v2.2.5"} | |
provider "aws" { | |
region = "${var.region}" | |
} | |
resource "aws_s3_bucket" "main" { |
#!/usr/bin/env bash | |
mkdir -p /data | |
mdadm --create --verbose --level=0 /dev/md0 --name=DATA --raid-devices=4 /dev/nvme0n1 /dev/nvme1n1 /dev/nvme2n1 /dev/nvme3n1 | |
mdadm --wait /dev/md0 | |
mkfs.ext4 /dev/md0 | |
mdadm --detail --scan >> /etc/mdadm.conf | |
dracut -H -f /boot/initramfs-$(uname -r).img $(uname -r) | |
echo /dev/md0 /data ext4 defaults,nofail,noatime,discard 0 2 >> /etc/fstab | |
mount -a |
I hereby claim:
To claim this, I am signing this object:
data "template_file" "main" { | |
template = <<EOF | |
set -e | |
WORKDIR=/tmp/${uuid()} | |
mkdir -p "$WORKDIR" | |
cd "$WORKDIR" | |
curl -f "https://s3.amazonaws.com/aws-cli/awscli-bundle.zip" -o "awscli-bundle.zip" | |
unzip awscli-bundle.zip | |
./awscli-bundle/install -i "$WORKDIR"/aws |
data "aws_region" "current" { | |
current = true | |
} | |
module "aws_cli_install" { | |
source = "../aws_cli_install" | |
} | |
data "template_file" "main" { | |
template = <<EOF |
variable "repository_name" {} | |
variable "auto_init" { | |
default = true | |
} | |
variable "description" { | |
default = "" | |
} |
variable "github_token" {} | |
provider "github" { | |
organization = "denniswebb" | |
token = "${var.github_token}" | |
} | |
module "datadog-openvpn" { | |
source = "modules/github" |
package main | |
import "reflect" | |
func FieldValueByTag(s interface{}, tag, tagValue string) interface{} { | |
t := reflect.TypeOf(s) | |
for i := 0; i < t.NumField(); i++ { | |
if tagValue == t.Field(i).Tag.Get(tag) { | |
return reflect.ValueOf(s).FieldByName(t.Field(i).Name) |
func StringSplitAfterNSize(s, sep string, size int) (resp []string) { | |
rl := "" | |
for _, line := range strings.SplitAfter(s, sep) { | |
if len(rl+line) > size { | |
resp = append(resp, rl) | |
rl = "" | |
} | |
rl += line | |
} | |
if len(resp) > 0 && len(rl) == 0 { |
#cloud-config | |
hostname: rancher-ergon | |
rancher: | |
console: debian | |
services: | |
rancher-server: | |
image: rancher/server | |
command: --db-host mysql.denniswebb.info | |
restart: always | |
ports: |