Skip to content

Instantly share code, notes, and snippets.

View hutchic's full-sized avatar
💭
Open for work

Colin Hutchinson hutchic

💭
Open for work
View GitHub Profile
In 2014, my family had had enough of the typical 9 to 5. I tried the startup thing, I tried the corporate thing, I tried the non-profit thing. None of it was fulfilling. And the repetition of it all was driving me crazy. So we sold everything we had, bought an RV, and hit the road. I'll talk through what led us to do this, how it's been going, and provide a few different ways for people to dip their toes into this lifestyle: from weekend warriors, short-term trips, international travel, and full-time travel. If you're a programmer, you have a TON of options to work from the road. I'd love to let people know they're not stuck and give them ideas on how to see the world -- not just a dark cubicle
2016/07/25 20:42:36 [INFO] serf: EventMemberJoin: 10.10.10.63 10.10.10.63
2016/07/25 20:42:36 [INFO] serf: EventMemberJoin: 10.10.10.62 10.10.10.62
2016/07/25 20:42:36 [INFO] consul: adding LAN server 10.10.10.63 (Addr: 10.10.10.63:8300) (DC: us-east-1)
2016/07/25 20:42:36 [INFO] consul: adding LAN server 10.10.10.62 (Addr: 10.10.10.62:8300) (DC: us-east-1)
Broadcast message from root@ip-10-10-10-156
(unknown) at 20:43 ...
The system is going down for power off NOW!
@hutchic
hutchic / gist:8a13b2115a0795bb2e0fb59e56f26dee
Created July 25, 2016 20:43
consul starting the rolling upgrade
ubuntu@ip-10-10-10-31:~$ consul info
agent:
check_monitors = 0
check_ttls = 0
checks = 0
services = 1
build:
prerelease =
revision = 46499d6e
version = 0.6.0
@hutchic
hutchic / gist:a178b0401b407f14ac8bdc4f5e892959
Created July 18, 2016 14:31
consul route to dead host??
```
sudo -u consul -g consul GOMAXPROCS=1 /opt/consul/bin/consul agent -config-file=/etc/consul.conf
```
consul.conf
```
{
"start_join": ["10.10.10.10"],
"disable_remote_exec": true,
"domain": "consul",
@hutchic
hutchic / gist:84a4a2b121fac807b3bf3943a6cf64fe
Created July 15, 2016 17:04
Creating a consul cluster using docker-machine on AWS
docker-machine create \
--driver amazonec2 \
--amazonec2-access-key ${AWS_ACCESS_KEY_ID} \
--amazonec2-secret-key ${AWS_SECRET_ACCESS_KEY} \
--amazonec2-region ${AWS_REGION} \
--amazonec2-vpc-id ${AWS_VPC_ID} \
--amazonec2-subnet-id ${AWS_SUBNET_ID} \
--amazonec2-zone ${AWS_ZONE} \
consul1
  1. Run the CloudFormation to create the VPC and subnets (cloud_formation/VPCLockDown.json)
  2. Get AWS Access credentials for the user the cloudformation created
  3. Locate the control node AMI (ami-2fa35242) Finding Shared AMIs
  4. Launch an instance from the AMI. Launching Your Instance
  5. Configure the security group to allow SSH from your IP. Security Group Rules
  6. Include an Amazon EC2 Keypair that you have access to
  7. Once the instance has launched, scp your private key to the instance scp -i yourkey.pem yourkey.pem ubuntu@ec2-instance-ip:~/on-premise/ansible/yourkey.pem
  8. ssh to the instance ssh -i yourkey.pem ubuntu@ec2-instance-ip
  9. export the following variables
#!/bin/bash -xe
set -e
sudo apt-get update
sudo apt-get install -yf python-virtualenv python-dev python-apt make git
git clone git@github.com:Mashape/on-premise.git /home/ubuntu/on-premise
cd /home/ubuntu/on-premise/ansible/galileo-api
make install
{
"variables": {
},
"builders": [
{
"type": "amazon-ebs",
"ssh_pty": "true",
"communicator": "ssh",
"region": "us-east-1",
"source_ami": "ami-fce3c696",
@hutchic
hutchic / gist:5b165413b69acf9ba9af
Created March 19, 2016 21:21
yantis/docker-thunderbird won't build
docker build -t yantis/thunderbird .
Sending build context to Docker daemon 195.1 kB
Step 1 : FROM yantis/ssh-hpn-x
latest: Pulling from yantis/ssh-hpn-x
a3ed95caeb02: Already exists
2073d8161837: Already exists
bae9a9c5e678: Already exists
650e457b334b: Already exists
d03340e9c052: Already exists
315facafbf3e: Already exists
#!/bin/sh
# Make sure you replace the API and/or APP key below
# with the ones for your account
api_key=nope
app_key=nope
alert_id=512
curl -X POST -H "Content-type: application/json" \
-d '{