Coder Social home page Coder Social logo

stevedore's Introduction

stevedore

A common Vagrant environment for developing, testing, or playing with the Docker ecosystem.

Setup

Virtualization Setup

Right now we assume Mac OS X.

  • Install Vagrant (1.7.4 is known good)
  • Install Virtualbox or VMware Fusion (with Vagrant plugin)
  • Install dnsmasq brew install dnsmasq
  • Configure dnsmasq:
    • Stop all VMs (Docker Machine or otherwise)
    • Run scripts/setup-dnsmasq.sh

Optionally:

  • Instant Vagrant snapshotting vagrant plugin install vagrant-multiprovider-snap
  • Add hosts to your laptops’s /etc/hosts. Go doesn’t use resolver so you’ll have to use IP addresses to talk to these hosts with Docker otherwise

Optional Host Side SSH setup

Typing vagrant ssh hostname in a specific directory is not nearly as clean looking as just ssh hostname. Vagrant provides vagrant ssh-config but you can't just append the output. It might change after a destroy. So there has to be a better way. To get passwordless SSH by vm short name. Unfortunately SSH config doesn't have an include directive. But some shell magic will automate the problem away.

Move your original ~/.ssh/config to ~/.ssh/config.00_default. Then set the following functions in your preferred shell:

compile-ssh-hosts () {
  cat ~/.ssh/config.* > ~/.ssh/config
}

update-vagrant-ssh () {
  vagrant ssh-config > ~/.ssh/config.$(basename ${PWD})
  compile-ssh-hosts
}

At this point you'll be able to run update-vagrant-ssh after you setup the environment and you'll have everything working.

Also for ZSH users you can set the following snippet to get host autocompletion working.

zstyle -s ':completion:*:hosts' hosts _ssh_config
[[ -r ~/.ssh/config ]] && _ssh_config+=($(cat ~/.ssh/config* | sed -ne 's/Host[=\t ]//p'))
zstyle ':completion:*:hosts' hosts $_ssh_config

stevedore's People

Contributors

mbentley avatar metcalfc avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

stevedore's Issues

Add documentation on initial setup

  • Add more detailed documentation on starting stevedore; specifically in regards to needing to have a DOCKER_HOST set to be able to generate the certificates (i.e. - you must use boot2docker to generate the certs)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.