Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
set -ax
sudo ifconfig lo0 alias 127.0.0.2
pkill -9 consul || true
pkill -9 vault || true
sleep 2s
rm -rf /tmp/consuldata
#!/bin/bash
set -aex
pkill -9 vault || true
sleep 2s
cat > /tmp/vaultconfig.hcl -<<EOF
storage "raft" {
path = "/tmp/raft1"
#!/bin/bash
set -aex
pkill -9 vault || true
sleep 2s
tee /tmp/config.hcl <<EOF
storage "inmem" {}
listener "tcp" {
#!/bin/bash
set -aex
pkill -9 vault || true
sleep 2s
tee /tmp/config.hcl <<EOF
storage "inmem" {}
listener "tcp" {
#!/bin/bash
set -aex
pkill -9 vault || true
pkill -9 consul || true
sleep 2s
rm -rf consuldata
#!/bin/bash
set -aex
pkill -9 vault || true
sleep 2s
tee /tmp/config.hcl <<EOF
storage "inmem" {}
listener "tcp" {
address = "127.0.0.1:8200"
@vishalnayak
vishalnayak / identity_templating.sh
Last active March 25, 2020 13:37
Exemplifies enabling a token to read its own entity details.
#!/bin/bash
set -aex
pkill -9 vault || vault
# Set up transit node
tee /tmp/config.hcl <<EOF
storage "inmem" {}
listener "tcp" {
#!/bin/bash
set -aex
# Kill any Vault process that is running
for process in $(lsof -Pn | grep ':8200' | awk '{print $1}')
do
pkill -9 $process || true
done
#!/bin/bash
set -aex
cd dev
pkill -9 vault || true
sleep 5s
vault11() {
#!/bin/bash
set -aex
cd dev
pkill -9 vault || true
pkill -9 v103 || true
pkill -9 v0113 || true
sleep 5s