Skip to content

Instantly share code, notes, and snippets.

@joekir
Last active June 14, 2017 03:00
Show Gist options
  • Save joekir/dd264af5910d5d6be54fd21b84a0e13f to your computer and use it in GitHub Desktop.
Save joekir/dd264af5910d5d6be54fd21b84a0e13f to your computer and use it in GitHub Desktop.
BOSH setup on GCP
  • You'll need to setup a GCP network/subnetwork and obtain some access creds in the json format. All boxes on there should be internal only
  • You'll then need to create a jumpbox/bastion (as per this design) with a static ip that has public access. Exposing a firewall rule to allow ssh (port 22, tcp), also setup automatic, unattended security updates
  • To allow bosh to route through this "bastion" you'll need to run the following at the commandline
# -D : the local SOCKS5 port
# -f : forks the process in the background
# -C : compresses the data before sending
# -q : quiet mode (wrt the ssh output)
# -N : Tells SSH that no command will be sent once the tunnel is up
ssh -D 5000 -i <ssh-priv-key> -fCqN <username>@<ip-address>
  • locally on your box you'll need to export this local env var export BOSH_ALL_PROXY=socks5://localhost:5000

  • then you can run the normal bosh setup as per https://bosh.io/docs/init-google.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment