Skip to content

Instantly share code, notes, and snippets.

View raphink's full-sized avatar
🐝
eBPF everything!

Raphaël Pinson raphink

🐝
eBPF everything!
View GitHub Profile
data "template_file" "infra" {
template = "1234"
}
resource "rancher_environment" "environment" {
name = "foo"
description = "foo"
orchestration = "cattle"
member = ["${map("external_id", data.template_file.infra.rendered, "external_id_type", "github_team", "role", "owner")}"],
}
#!/bin/bash
CATTLE_CONFIG_URL_V2=${CATTLE_CONFIG_URL/v1/v2-beta}
CERT_NAME="$1"
function get_cert_val() {
local name="$1" k="$2"
curl -s -H "Authorization: ${CATTLE_AGENT_INSTANCE_AUTH}" "${CATTLE_CONFIG_URL_V2}"/certificates | \
jq -r ".data[] | select(.name == \"${name}\").${k}"
}
#!/bin/bash
trap "echo term; umount /home/shared/s3" SIGTERM
mount --make-shared /home/shared/s3
mkdir -p /home/shared/s3
mkdir -p /tmp
s3fs $BUCKETNAME /home/shared/s3 -o use_cache=/tmp -o allow_other -o umask=0002 -o use_rrs -f
package main
import (
"fmt"
"github.com/docker/libcompose/config"
)
func main() {
composev2 := `
@raphink
raphink / rancher.tf
Last active March 28, 2017 08:41
C2C Blog Post: Orchestrate Rancher with Terraform
provider "rancher" {
api_url = "http://rancher.my-domain.com:8080" # or set RANCHER_URL
access_key = "${var.rancher_access_key}" # or set RANCHER_ACCESS_KEY
secret_key = "${var.rancher_secret_key}" # or set RANCHER_SECRET_KEY
}
resource "rancher_environment" "myenv" {
name = "myenv"
description = "The myenv environment"
orchestration = "cattle"
FROM scratch
ADD puppetdb-prometheus /
ENTRYPOINT ["/puppetdb-prometheus"]
CMD [""]
[user]
name = Raphaël Pinson
email = [email protected]
signingkey = 74BF771E
[alias]
today = log --since=midnight --author='Raphaël Pinson' --oneline
since = !git log $(git merge-base --fork-point master)..HEAD
t = tag -s
[color]
ui = auto
runtime bundle/vim-pathogen/autoload/pathogen.vim
call pathogen#infect()
call pathogen#helptags()
syntax on
set bg=dark
filetype plugin indent on
au BufNewFile,BufRead *.pp setlocal kp=pi
set tabstop=2 shiftwidth=2 expandtab
"syntastic
$ pdfinfo B372615206_18229.pdf
Producer: PDFlib 3.02 (Win32)
CreationDate: Fri Jan 8 11:55:25 2010
Tagged: no
UserProperties: no
Suspects: no
Form: none
JavaScript: no
Pages: 1592
Encrypted: no
---
Puppetfile:
modules:
foo:
version: "1.2.3"