Git Product home page Git Product logo

lope's People

Contributors

crazybus avatar geogdog avatar martyca avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

lope's Issues

Add support for running virtualbox/vagrant inside of lope

A really common dependency for development and testing environments is vagrant and virtualbox. While vagrant supports using docker as the provisioner it will never give you something "virtual machine" like. Allowing vagrant to talk to virtualbox from inside a docker image brings a lot of challenge. Mostly of these challenges come from the fact that vagrant directly calls the VBoxManage command to interact with virtualbox.

Design (with working POC)

When lope is run with the -vbox flag the following happens:

  • Lope starts a http endpoint which allows running commands and will return the output
  • A binary called VBoxManage is added into the docker container which proxies all commands to the lope http endpoint and prints the result
  • localhost is set to the IP address of the host machine running docker (host.docker.internal) --add-host=localhost:192.168.65.2
  • Lope runs as the current user and that user has an actual account in the docker image (requirement of vagrant)
  • The working directory is set to the host working directory so that mounting directories into virtualbox works as expected

With all of these things setup lope is able to start a container and run vagrant up && vagrant ssh successfully!

Todo

  • Move current server POC code directly into lope
  • Move current client POC code and build and release it as a separate binary. This client works for VBoxManage but has been written in a way to be a generic host command proxy
  • Find a nice way to get the value of host.docker.internal so that the localhost of the container can be set to it.
  • Don't run as root when the -vbox flag is added
  • When running a container as the current user actually add the users account into the image. This will also fix some weirdness with git and running as different users.
  • Set working directory to match the host working directory. (Should this be the lope default?)
  • Automatically set the $HOME directory (normally blacklisted)
  • Mount ~/.vagrant.d/boxes/ into the container
  • Add option in vagrant to use "localhost" instead of "127.0.0.1". This used to be the default but was changed because OSX doesn't have localhost by default (or didn't a few years ago). vagrant source. For testing purposes this can be monkey patched with RUN sed -i 's/127.0.0.1/localhost/g' /opt/vagrant/embedded/gems/2.1.1/gems/vagrant-2.1.1/plugins/providers/virtualbox/provider.rb

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.