Live data from Hacker News

Vagrant 2.0

hashicorp.com

31–40 of 120 posts

Re: Vagrant 2.0

#31

What's the use case where I'd want to use Vagrant instead of Docker?

Docker is a fragmented mess network wise if you need to support developers on both windows and macOS. Also, docker requires hyper-v and admin privs on Windows. And you can't run VirtualBox with hyper-v active so you need to choose either of the two options. Granted, you could run Docker in virtualbox but it wouldn't be very clean.

Re: Vagrant 2.0

#32
post #10

How does Vagrant work with Docker? Why do you need Vagrant if you're using Docker?

Docker performs much better on a VirtualBox VM than the VM used by Docker for Mac

This is, in my experience, not true. Anecdotally, xhyve has performed much better for Docker; especially when choosing the appropriate method for volume mount consistency[1], which has solved most FS performance issues I have run into.

[1] https://docs.docker.com/docker-for-mac/osxfs-caching/

Re: Vagrant 2.0

#33
post #6

In the change log, I’m happy to see “improved the resilience of some Virtualbox commands.” At Airbnb, we used to use Vagrant with Virtualbox and the Chef provisioner to create our dev environments, but we migrated totally away from Vagrant after struggling with Virtualbox bugs, and strangeness with Vagrant’s internal state and locking. Seems like this issue is finally addressed: https://github.com/mitchellh/vagrant/i…

What did you end up using instead of Vagrant?

We re-implemented Vagrant's Chef provisioning feature on top of OpenSSH with ControlMaster. This cut about 3 mystery seconds mystery time from our provision process.

Instead of targeting local Virtualbox VMs, we use AWS boxes created by the internal tool we use to manage our production fleet.

Re: Vagrant 2.0

#34
post #10

How does Vagrant work with Docker? Why do you need Vagrant if you're using Docker?

Running Linux/debian/freebsd on Windows/Mac, Simulating actual networks on a single computer ...

You can then run Docker inside a Vagrant VM.

Re: Vagrant 2.0

#35
post #20
post #16

since i am using docker-compose locally, i have little use for vagrant nowadays. For staging and production the docker containers run inside a Kubernetes environment which i don't want to replicate locally. Am i missing something ?

I guess the main thing you're missing is that it you're not obligated to comment on things that don't apply to you?

harsh

Re: Vagrant 2.0

#36

Anybody know if they has code-signed their Windows and macOS binaries with 2.0? It's a shame so many "core" developer tools are not code-signed. It makes life hard in companies where binary whitelisting is used.

It also creates an unnecessary attack surface against core infrastructure.

Re: Vagrant 2.0

#37
post #20
post #16

since i am using docker-compose locally, i have little use for vagrant nowadays. For staging and production the docker containers run inside a Kubernetes environment which i don't want to replicate locally. Am i missing something ?

I guess the main thing you're missing is that it you're not obligated to comment on things that don't apply to you?

Snowflake SJW is triggered.

Re: Vagrant 2.0

#38

What's the use case where I'd want to use Vagrant instead of Docker?

I'm a big advocate of Kubernetes and I don't know the answer to this question, for sure. If you want to simulate a machine that has a kernel of its own, and you need to be able to make that kernel version different from the kernel version on the host, you definitely need Vagrant instead of Docker for that.

My team has no such requirements and IMHO uses Vagrant solely because of inertia. We've always used Vagrant, it's what most people have installed on their machine, there is a Vagrant box with some of the moderately difficult to configure things already done, so we all can use the same configuration, like the Oracle Client libraries and the nginx frontend with a self-signed localhost certificate (required so your local development can talk to our auth server).

There's absolutely no reason we couldn't do the same thing with Docker. We just haven't.

I would argue that if you aren't using Packer or if writing your own customizations into Vagrantfile, you aren't really using Vagrant and it's a somewhat harmful black-box for us. Those steps are baked into the box file, not done in a Vagrantfile as provisioning steps, not able to be inspected inside of an Ansible playbook; so that knowledge of how to do these things could easily be lost and it would be a headache to reproduce. Packer is roughly what we need to make it better. For my team, Vagrant is just a thin wrapper over VirtualBox, so the team does not need to know that they are using VirtualBox.

The second reason you might want to use Vagrant instead of Docker is if some leadership in your org has declared that you still may not use Docker for anything. This is the case here; you may use Docker but not without a good reason and not without having your usage reviewed by a panel of experts on various subjects (it's the Design Review Board.)

We got our usage of Docker approved so that we can manage Jenkins via Helm. The kubernetes-plugin for Jenkins creates pods as build slaves, and when they complete their jobs they go away. You want your builds to run in a clean environment, you want your slaves to be disposable; pods are ephemeral, may group containers together, and they go away when they complete the job. That's just exactly what problem this tech was meant to solve.

DRB thought that was a great justification and it was approved. I am still the only place that I'm aware of across the entire institution where Docker is used in an approved way though.

Re: Vagrant 2.0

#39
post #20
post #16

since i am using docker-compose locally, i have little use for vagrant nowadays. For staging and production the docker containers run inside a Kubernetes environment which i don't want to replicate locally. Am i missing something ?

I guess the main thing you're missing is that it you're not obligated to comment on things that don't apply to you?

It seemed like a pretty legitimate question: is there a compelling reason to give Vagrant 2 a look if Docker/Kubernetes is your current workflow? It seems to me you took it as more of an us-vs-them comment.

Re: Vagrant 2.0

#40

What's the use case where I'd want to use Vagrant instead of Docker?

Vagrant is also used as an easy way to spin up development environments e.g. for embedded systems via virtualbox. I am not aware of a simple way to create a GUI with docker. With vagrant it is just one line: v.gui = true
Post reply on HN