I hereby claim:
- I am daveadams on github.
- I am daveadams (https://keybase.io/daveadams) on keybase.
- I have a public key whose fingerprint is 137C C203 79F2 E5F8 280F 3194 D93A 7D85 B902 603D
To claim this, I am signing this object:
#!/bin/bash | |
# | |
# vault-ec2-auth.sh | |
# Authenticates an EC2 instance to Hashicorp Vault | |
# | |
# configuration stored in environment variables in /etc/vault/client.conf | |
# expected configuration (defaults are selected below if none is specified): | |
# VAULT_ADDR = url of vault server | |
# VAULT_ROLE = role name to authenticate as |
I hereby claim:
To claim this, I am signing this object:
# consul defaults | |
CONSUL_CONF_DIR=/etc/consul.d | |
node_name=`curl -s 169.254.169.254/latest/meta-data/instance-id` | |
first_mac=`curl -s 169.254.169.254/latest/meta-data/network/interfaces/macs/ |head -n 1` | |
vpc_id=`curl -s 169.254.169.254/latest/meta-data/network/interfaces/macs/${first_mac}vpc-id` | |
case "$vpc_id" in | |
vpc-00000000) |
description "Consul Agent" | |
start on (local-filesystems and net-device-up IFACE!=lo) | |
stop on stopping network-services | |
respawn | |
console none | |
setuid consul |
To restore a filesystem-backed Vault instance: | |
1. Shut down running Vault process (pkill vault) | |
2. Make backup to new location (cp -r /original-storage /new-storage) | |
3. Write a new config file to point to /new-storage | |
4. Start new Vault process (vault server -config=new-config-file.hcl) | |
5. DO NOT run `vault init` | |
6. ONLY RUN `vault unseal <key1>`, etc... |
#!/bin/bash | |
echo -n "Starting vault... " | |
vault server -dev &> vault-server.log & | |
vault_pid=$! | |
echo OK | |
shutdown() { trap "" EXIT; echo -n 'Shutting down... '; kill -9 $vault_pid; echo OK; exit $1; } | |
trap "shutdown 0" EXIT | |
trap "echo; echo 'Got interrupt signal!'; shutdown 255" INT |
#!/bin/bash -e | |
which pyenv &>/dev/null \ | |
|| { echo "ERROR: pyenv not found" >&2; exit 1; } | |
grep -qFx 2.7.6 <(pyenv versions --bare) \ | |
|| { echo "ERROR: python 2.7.6 not installed; run 'pyenv install 2.7.6'" >&2; exit 1; } | |
export PYENV_VERSION=2.7.6 |
#!/usr/bin/env ruby | |
# | |
# binary-resource-report.rb | |
# Reports disk usage broken down by properties in the binary_entity field. | |
# | |
# WARNING: takes a long time to run | |
# (~5 hours for 10,000,000 records) | |
# | |
# Written by David Adams ([email protected]) | |
# |
#!/usr/bin/env ruby | |
# | |
# disk-report.rb | |
# Reports disk usage broken down by category for all sites in a Sakai instance. | |
# | |
# Written by David Adams ([email protected]) | |
# | |
# This software is licensed to the Public Domain; No Rights Reserved | |
# |
-- convert-longs-to-lobs.sql | |
-- Scan for and convert LONG and LONG RAW fields in a Sakai database | |
-- See https://jira.sakaiproject.org/browse/SAK-7977 | |
-- | |
-- Created 2013-03-29 [email protected] | |
-- | |
-- USAGE: | |
-- To scan for LONG and LONG RAW fields, but make no changes: | |
-- $ sqlplus -S dbuser/dbpass@dbsid @convert-longs-to-lobs.sql | |
-- |