Skip to content

Instantly share code, notes, and snippets.

View GuyBarros's full-sized avatar

Guy Barros GuyBarros

View GitHub Profile
@GuyBarros
GuyBarros / gist:c0e7f618ff7c0434b11f8ad3ac627926
Last active December 8, 2022 14:15
Jenkins pipeline config for TFE Demos
pipeline {
agent any
environment {
GIT_REPO = "https://github.com/GuyBarros/terraform-azurerm-demostack"
TFE_NAME = "app.terraform.io"
TFE_URL = "https://app.terraform.io"
TFE_ORGANIZATION = "emea-se-playground-2019"
TFE_API_URL = "${TFE_URL}/api/v2"
@GuyBarros
GuyBarros / PTFETroubleshooting
Created February 12, 2019 12:22
John's PTFE troubleshooting script
#!/bin/bash
for pid in $(docker ps -a --format="{{.Names}}")
do
docker logs -f $pid > /tmp/$pid.log 2> /tmp/$pid.err &
done
tail -f /tmp/*.{log,err}
{
"acl_datacenter": "dc1",
"acl_master_token": "${consul_master_token}",
"acl_token": "${consul_master_token}",
"acl_default_policy": "allow",
"advertise_addr": "$(private_ip)",
"advertise_addr_wan": "$(public_ip)",
"bootstrap_expect": ${consul_servers},
"bind_addr": "$(private_ip)",
"data_dir": "/mnt/consul",
@GuyBarros
GuyBarros / jenkins.txt
Last active December 17, 2018 16:31
Jenkins TFE integration via remote backend example
pipeline {
agent any
environment {
GIT_REPO = "https://github.com/GuyBarros/terraform-aws-demostack/"
TFE_URL = "https://app.terraform.io"
TFE_ORGANIZATION = "emea-se-playground"
TFE_API_URL = "${TFE_URL}/api/v2"
TFE_API_TOKEN = credentials("tfe_api_token")
@GuyBarros
GuyBarros / Vaul DR Cheat Sheet
Created December 5, 2018 09:52
Vault DR Cheat Sheet
What you'll need:
<recovery key of the primary>
<root token of primary>
Step 1 - begin process
vault operator generate-root -dr-token -init -tls-skip-verify
Step 2 - Generate DR Token (repeat one per key shard)
vault operator generate-root -tls-skip-verify -dr-token -nonce=<nonce value from step 1> <recovery key of the primary>