Git Product home page Git Product logo

vagrantfiles's Introduction

Vagrantfiles for desktop applications

This is a collection of Vagrantfiles and shell scripts I'm using to experiment with running all of my desktop applications in virtualbox VMs.

The Vagrantfiles are structured in hierarchical directories: [OS]/[Release]/[Environment]/[Application]. The Vagrantfiles include some provisioning logic that makes it easy to manage this setup for multiple applications.

Support for defaults in your home directory

Each Vagrantfile gets a unique $vm_id, and then the Vagrantfile looks for a file at ~/.config/vagrant/defaults.rb. If one is found there, it is loaded.

You can use the defaults file along with $vm_id to load VM-specific defaults and behavior without modifying their Vagrantfiles. An example ~/config/vagrant/defaults.rb:

if $vm_id == 'debian-bullseye-openbox-firefox'
    Vagrant.configure("2") do |config|
        config.vm.provider "virtualbox" do |vb|
            vb.customize ['sharedfolder', 'add', :id, '--name', 'Downloads', '--hostpath', File.join(Dir.home, 'Downloads'), '--automount', '--auto-mount-point', '/home/vagrant/Downloads']
        end
    end
end

This would add your local Downloads folder to the Firefox VM at ~/Downloads and automatically mount it. (The above is for example purposes, a future version of my Firefox Vagrantfile will have this built-in.)

Personal Notes

My goal is to eventually run all of my desktop applications in individual VMs.

But why?

I want to decouple my applications from my operating system. I want to be able to reliably "black start" my entire development environment -- to go from an empty hard drive to a fully functional desktop environment, with all my data restored, with only a little effort. I want to wrest control back from applications with ravenous appetites for resources -- I want to be able to choose exactly how much CPU, RAM, and disk each one gets. I want better security from suspect applications that are a regrettable professional necessity (like Zoom). I want to run the best applications each operating system has to offer all on one platform. I like the idea of Qubes but I want the convenience and hardware support of a mainstream Linux distribution on my laptop.

Those were all motivations that drove me to think about this for a while, but this is gradually also becoming an experiment in minimal desktop Linux and an opportunity to learn Vagrant (and then explore its boundaries a bit).

So far the experiment is going well! These VMs are being hosted on an early 2019 model LG Gram 17Z990, so newer and more powerful hardware shouldn't have any trouble with them.

I'm making these freely available (MIT-licensed) in part because this will force me to have a hard separation between my personal data and the applications that manage it.

Feel free to open an Issue with a suggestion or a bug report or even make a pull request with some environments and applications of your own.

TODO

vagrantfiles's People

Contributors

robsheldon avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

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.