Live data from Hacker News

Vagrant 2.0

hashicorp.com

11–20 of 120 posts

Re: Vagrant 2.0

#12
post #10

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

Vagrant abstracts virtual machines. If you want to simulate multiple machines on the same computer you need VMs. You can have multiple docker containers running in those VMs that communicate across VMs. You can then deploy to real hardware having tested the communication across machines.

Re: Vagrant 2.0

#14

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

Completeness of stack. If you're under the impression that your runtime ends where the Docker container does, that will eventually bite you--it's very rare for my workstation to be running the same kernel version as my servers and I've been bitten multiple times in the past by kernel bugs due to differences in version, so even if I use Docker (which is rare) I run it through a known-good virtual machine that mirrors production as closely as possible.

(Vagrant also has a Docker provider, but I can't think of a good reason to use it.)

Re: Vagrant 2.0

#15
post #10

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

Vagrant lets you provision in a codified manner full-fledge VMs. This code can be pulled down by your developers to deploy a development environment on their machines. Inside of this you can choose to run containers of your apps with proper tooling built around it.

Re: Vagrant 2.0

#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 ?

Re: Vagrant 2.0

#17
post #7
post #5

Still doesn't support Ruby 2.4

How so? Can you not install whatever you want with Vagrant? https://rvm.io/integration/vagrant

Wrong way around. Hashicorp decided to release Vagrant as an omnibus installer that packages an embedded Ruby, which (apparently? I haven't checked, I'm going off the earlier post) isn't Ruby 2.4.

They also killed off the gem-distributed version--which is still, to this day, a huge pain in the rear, to the point where I build my own Vagrant so it doesn't use its own weird out-of-the-way Ruby.

Re: Vagrant 2.0

#18
post #10

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

Vagrant is useful if you want to simulate a whole box, or a cluster of boxes - for example, you can spin up a cluster of 3 VMs to run Mesosphere DC/OS [0]. If you build and deploy just containers, and don't have any full VMs in your stack, then you might not need Vagrant.

Vagrant also claims to provide a "good workflow for writing Dockerfiles"; it can provide a nicer user abstraction over `docker [many, many args]` for running your biz [1].

[0]: https://github.com/dcos/dcos-vagrant#dcos-vagrant

[1]: https://www.vagrantup.com/docs/docker/basics.html

Re: Vagrant 2.0

#19
post #10

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

Vagrant lets you provision in a codified manner full-fledge VMs. This code can be pulled down by your developers to deploy a development environment on their machines. Inside of this you can choose to run containers of your apps with proper tooling built around it.

Can't you do the same thing with docker, docker compose?

Re: Vagrant 2.0

#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?
Post reply on HN