Skip to content

Instantly share code, notes, and snippets.

View AdamIsrael's full-sized avatar

Adam Israel AdamIsrael

View GitHub Profile
@AdamIsrael
AdamIsrael / gist:7ead3157593f87b98de9
Created March 25, 2015 00:49
Generate yaml for haproxy charm
#!/usr/bin/env python
import json
service = [
{
'service_name': 'demo',
'service_options': ['mode http', 'balance leastconn', 'option httpchk GET / HTTP/1.0'],
'server_options': ['maxconn 100'],
'servers': [
[
# Notes
I removed my previously-installed charm-tools but didn't clean up so I had to run `brew link` afterwards.
@AdamIsrael
AdamIsrael / README.md
Last active August 29, 2015 14:11
Vagrantfile to route network traffic w/o sshuttle

Juju Vagrant without sshuttle.

sshuttle allows traffic to be routed to the internal network (10.0.3.0) used for the lxc containers inside a Juju Vagrant image. sshuttle does not work with OS X 10.10 (Yosemite). This alternate solution alters your local network routing rules in order to communicate directly with the virtual machine over its vboxnet0 bridge. It's also faster than using sshuttle, because it doesn't need to proxy over an SSH tunnel or teardown/reassemble the TCP packets.

This approach adds and removes the route when a virtual machine is brought up and taken down, and requires sudo at each step. Alternatively, you could add this route at boot or via login script.

Installation

You'll need to have the triggers plugin installed for this to work.

Keybase proof

I hereby claim:

  • I am adamisrael on github.
  • I am adamisrael (https://keybase.io/adamisrael) on keybase.
  • I have a public key whose fingerprint is 349E 77EC BFC2 2615 EB55 ACD5 5E30 ADF7 9AA5 6F13

To claim this, I am signing this object: