Skip to content

Instantly share code, notes, and snippets.

View phrawzty's full-sized avatar
🕺
probably karaoke

Daniel Maher phrawzty

🕺
probably karaoke
View GitHub Profile
@phrawzty
phrawzty / extant_infra_terraform.md
Last active June 16, 2017 00:40
Dealing with extant AWS resources in Terraform

What it is

Problem: Terraform doesn't play nicely with pre-existing infrastructure.

Solution: Officially there isn't one - but here's a work-around that does the trick.

Summary

  • Declare a new, temporary resource in your Terraform plan that is nearly identical to the extant resource.
  • Apply the plan, thus instantiating the temporary "twinned" resource and building a state file.
@phrawzty
phrawzty / info.txt
Last active September 14, 2016 09:24
python27 in CentOS via SCL on Socorro Vagrant
(socorro-virtualenv)[vagrant@localhost ~]$ cat /etc/centos-release
CentOS release 6.4 (Final)
(socorro-virtualenv)[vagrant@localhost ~]$ sudo yum install centos-release-SCL
[...]
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
@phrawzty
phrawzty / bootstrap.sh
Last active August 29, 2015 14:13
packer json and bootstrap script
#!/usr/bin/env bash
function techo {
STAMP=`date '+%b %d %H:%M:%S'`
echo "${STAMP} BOOTSTRAP: ${@}"
}
techo "start"
techo "install puppet yum repo"
rpm -ivh http://yum.puppetlabs.com/puppetlabs-release-el-6.noarch.rpm
@phrawzty
phrawzty / compare_base_s3.py
Last active August 29, 2015 14:11 — forked from rhelmer/gist:7d3507bd0921fd9939f4
crash reports hbase / s3 comparison test
#!/usr/bin/env python
import hashlib
import logging
import boto
import config
import happybase
logger = logging.getLogger(__name__)
@phrawzty
phrawzty / backup
Created August 4, 2014 12:31
Duplicati from the CLI
Duplicati.CommandLine.exe backup \
--passphrase=$PASSPHRASE \
--aws_access_key_id=$AWS_KEY \
--aws_secret_access_key=$AWS_SECRET \
--s3-location-constraint=$LOC \
--aes-encryption-dont-allow-fallback=true \
$DIR \
s3://$S3_BUCKET/$DIR
# Obviously the S3 DIR target can be tweaked; this is just a simple example.
@phrawzty
phrawzty / fstest.md
Created July 31, 2014 12:48
TEST: Mount disparate remote storage devices as if they were a single directory

Keybase proof

I hereby claim:

  • I am phrawzty on github.
  • I am phrawzty (https://keybase.io/phrawzty) on keybase.
  • I have a public key whose fingerprint is 1204 786B D9B7 7FA0 618B 82A1 016F 9A65 192B FE03

To claim this, I am signing this object:

@phrawzty
phrawzty / gist:8832281
Last active August 29, 2015 13:56
still EOF :(
$ md5 boot2docker.iso
MD5 (boot2docker.iso) = e58b30593a2db15afc98f9a12293567d
$ md5 boot2docker
MD5 (boot2docker) = a73b6e6dec322393983ed34f640c31e5
$ ./docker version
Client version: 0.8.0
Go version (client): go1.2
Git commit (client): cc3a8c8
@phrawzty
phrawzty / def_pushbot.pp
Created June 7, 2013 14:36
pushbot puppet stuff. WARNING: This is totally off the top of my dome. Has not been tested, nor placed anywhere near a parser. :)
define pushbot (
$irc_channel,
$pubsub,
$log_url,
$rev_url,
$repo_url,
$site_name,
$order = 500,
$redis_port = '9388',
$redis_host = 'localhost'
class desktop_disk_encrypter (
$dde_site_url,
$dde_db_name,
$dde_db_user,
$dde_db_pass,
$dde_secret,
$dde_binduser,
$dde_bindpass,
$gpg_key_ids,
$gpg_pubring,