Hacker News new | past | comments | ask | show | jobs | submit login
Ask HN: Is Vagrant dead or dated? Do people still use it?
72 points by sirkarthik on Oct 3, 2017 | hide | past | web | favorite | 66 comments
Is Vagrant a dead or dated tech now? Do the dev teams still use it?



I use it all the time. It does exactly what I need. I'm usually either a one man dev team or the only experienced person in the room and I don't have the time or resources to do all the work that docker requires of me. I've been to a bunch of docker meetups because everyone loves the thing but it just seems like a hassle. I tried switching 3 times (2014, 2015, and 2016) and aborted each time after a couple days of grief.

I posit that people who use and love docker have larger teams with proper full-time admins and not just 1-3 people wearing all the hats. This is fine. I just have to be super judicious with my time.

I've also heard that many of the benefits come if you have a lot of servers running that are talking to each other. I'm not really doing that. There's also supposedly some lower overhead costs in using it but 32GB of ram which is nothing special these days has been more than sufficient for my virtualbox needs; heck I usually have 28 or so left over.

Vagrant+virtualbox I use all the time (here's the vagrantfile I am currently using: http://9ol.es/Vagrantfile - no chef or puppet stuff I just do it manually) . It doesn't do much and that's perfect, just what I'm looking for.


> I posit that people who use and love docker have larger teams with proper full-time admins and not just 1-3 people wearing all the hats.

We switched from a Vagrant based workflow, to a docker-compose one, and we are a team of 2 developers. That said, I identified use cases for Docker that offered very compelling advantages. For a typical web app, this may not be the case. In our situation, we run a load that is very background-job intensive, with multiple clusters of external resources used by the background jobs, so it's definitely a different story than the typical 2-3 tier web stack.


If you're working on a Linux workstation, Docker will spin up and run much faster than either VirtualBox or VMWare. This alone makes it worth switching.

I don't know what the current situation is on Windows or MacOSX. Back when I used them for my own work, the only choice was to run a VirtualBox instance running Linux and then run Docker on top of that. Clearly that solution is more of a lateral move from Vagrant.


Unless you need to spin up OpenBSD and FreeBSD instances with an almost like Docker workflow. That’s where I use Vagrant still.


On Linux you have much better options for vagrant than Virtual Box. I recommend vagrant-lxc


Ok cool. I'd like applications to have a shared persistent storage space which isn't destroyed in between executions and their own network address. Haven't been able to pull it off. If I can't get that then it's a non-starter.


Understood, everyone's use case is different. On my team, we were using Vagrant to spin up something that looked a lot like our test environment (and, in turn, production) and that was a server running MySQL, Apache and PHP. Setting up a Docker instance that ran both and included some test data wasn't hard to setup and was faster to spin up on Linux workstations.


I'm totally open to trying again if I can get to success.


So, what is your stack ? I can help


I've also tried Docker 2 different times and couldn't get the demos working on my Macbook Pro. And by now I have a pretty good Vagrantfile that works on both Mac and Windows well.


I'm currently on attempt #5 to grok Docker, and feel like I've finally broken through to understanding.

The problem seems to be that there are no good "overview" tutorials out there that I could find. I'll end up writing one.


> I don't have the time or resources to do all the work that docker requires of me

> I posit that people who use and love docker have larger teams with proper full-time admins and not just 1-3 people wearing all the hats.

I’m not aware of what your use cases are, but I found Docker pretty simple to use and less of a headache than Vagrant. What work is it requiring you to do? I also use it for many projects that I am the sole dev for.


On OSX Vagrant always had issues with rsync of files. If you're using vagrant as just a blank machine, there is no difference between a blank debian/jessie docker image - apart from the lower resource usage. If you're not orchestrating anything concrete onto that vagrant box, I feel a proper workflow would be of benefit, i.e. properly reproducible builds. Take all those manual commands, prefix them with RUN in a docker file, done.


I think you’re describing an issue with virtual box not with Vagrant directly.

You could just as easily and much more portably put those “manual steps” into a shell script and run it as a Vagrant provisioning script. If you pick the right base box you will have portability across Mac, Linux, Windows hosts, using any number of available hypervisor/ish layers (vbox, parallels, VMWare, hyperv, lxc, etc)


Your Vagrantfile is "super" minimal. I like it.

You can execute a Shell script when the box is first provisioned. Just add something like this:

    config.vm.provision :shell, path: "provision.sh"
This might help save doing some manual steps if you have to rebuild the VM for whatever reason.


I see a lot of comparisons here to Docker, but IMO they solve two different use-cases. To me, Vagrant is most useful when I'm developing a project and want a reproducible yet easily mutable development environment. The Vagrantfile specifies packages to install and setup commands to run much like a Dockerfile, but the project source code directory is mounted as a volume so you can edit locally, re-compile & run remotely, etc. You could probably achieve something similar with Docker, but then you'd have to customize the mounts and deal with it ending up in different paths on different developers' machines & such. Vagrant and the ability to just clone a repo & run "vagrant up" is still very convenient.


docker-compose works very similar. I clone, run "docker-compose up", and I'm running against the local copy of the code that I can edit, etc


> You could probably achieve something similar with Docker, but then you'd have to customize the mounts and deal with it ending up in different paths on different developers' machines & such.

Docker Compose can configure volumes via relative paths, e.g. './' and '../'


From personal experience, I use docker-compose to create most development environments today. The main reason for this is that maintaining a vagrant (base) box is cumbersome, while maintaining a Dockerfile and/or a docker-compose file is not.

However, there are still cases that I think Vagrant is far superior. I recently had a security-related use-case that wanted me to very precisely replicate a common production environement (LAMP w/ exim4 MTA). On docker this is complicated. On Vagrant it's very simple.

So I don't think it's dead or dated, even though Docker has replaced it for a large range of my own use cases.


Is there some specific reason you would maintain your own base box?

My company maintains a series of Debian base boxes (forked from the box cutter project) but our bread and butter is infra projects, and packer makes it a pretty quick process to rebuild once you identify what to change for a given fix/feature.


I keep a Vagrant box in parallel with nearly every server I manage, as a staging/testing instance where I can check new configuration. In this capacity it's great, though I find it a little heavyweight for use as a dev environment for individual applications. Since people are making disparaging comments comparisons to Docker, I'll comment that for me they serve two different purposes: I use Vagrant for managing server configuration, and Docker for managing isolated applications, many of which may be running on a given server. For low-friction development, nothing beats running the stuff locally, but for languages/environments I don't use frequently and deployment, Docker+Vagrant are perfect.

Also, I build a Debian repository at https://vagrant-deb.linestarve.com which serves the .deb files so you don't have to update them manually whenever a new version of Vagrant is released.


We give Vagrant boxes to developers of short term projects. Some of them have Windows and we think it's easier than docker there. Furthermore our production environment is not dockerized, so it would be extra work for us. However provisioning a Vagrant box is not a zero errors experience. There are dependency problems and the occasional PC that won't run it no matter what. Maybe an image on a VPS provider would be easier to maintain and have a lower TCO.


Docker's requirement for Hyper-V makes it a total nonstarter on Windows for me (enabling Hyper-V totally precludes you using Virtualbox/VMWare without rebooting). I am sure there are workarounds to just install the tools and have it manage a boot2docker instance in Virtualbox like it did prior to the Hyper-V adoption but that just increases the friction.


What hypervisor do you have the devs use? I’ve had a lot of issue lately supporting a client using vbox (I generally use parallels for day to day stuff).


About a year ago I was on a big vagrant craze. We develop applications in JS and our primary deployment platform was Linux. We were hoping that if we developed in a linux environment, it would work better and it seemed like a pretty good idea. After a lot of usage, its slowness and quirks/bugs made it a bigger pain to use.

At least for our usage, it was pretty simple to switch our JS dev environment to support Windows (the primary development platform of our developers) without much hassle.

For now, If I need a VM, I'll stick to virtual box and maintain a persistent development environment, rather than something configurable and replicatable.

In the future I'd love to see someone take something like Docker and turn it into a development environment platform.


When I first started to use Vagrant I had slowness issues as well. However, through a bit of digging around I figured out that by mounting the shared folder through NFS and to create a swap file, pretty much all slowness issues disappeared.


It generally works, but debugging between components in different containers can be a real pain. For languages that don't support remote debugging in some sense you can be SOL (though that is perhaps true in vagrantland too)


I use it on a team of 3. The main reason for not using Docker is 2 devs use mac full time, and I have a macbook air for when I'm not at home w/ my Linux desktop. So we'd have to use boot 2 docker anyways, which uses Vagrant. So might as well just use Vagrant. Its not perfect. A lot of file watchers do not work right or are slow. "Git status" just hangs the box, and nodemon / pm2 watch don't work unless I enable a special "polling" flag. But it beats the status quo of on boarding a new dev & telling them to manually setup a dev environment. On boarding new developers went from months to an hour, which is mainly due to Ansible... but Vagrant is a means to being able to test Ansible scripts.

Another gripe is we have to edit the Vagrantfile & adjust the CPU / memory usage for each developer. There's no way to have a local override AFAIK.

We also have another Vagrant box that emulates our IOT devices, which runs X server. That's been a huge productivity gain in that we can just change code live, instead of having to rsync code to a physical device to test it. .


I noticed your comment yesterday and meant to reply, and then forgot about it.

So, you're right there is no "built in" support for Overrides on a per-project basis in Vagrant. There is some built in support - it will source local Vagrantfile files and wrap them around the project specific one (so e.g. my $VAGRANT_HOME/Vagrantfile is setup to tweak the defaults for the Vagrant-Hostmanager and Vagrant-Parallels plugins, and this then applies to all Vagrant machines that don't otherwise change those settings).

Probably what you really want though is the ability to override per-project, per-dev.

This is where it helps (a lot) if you know ruby, or if you're willing to learn a little (which was my case for this problem).

I've put the basics of this concept into a gist here: https://gist.github.com/stephenreay/2afd4205e76836f20e176722...


Docker for Mac doesn't use boot2docker anymore, it uses the native MacOS virtualisation layer https://www.docker.com/docker-mac


If you're ever interested in taking another look you might consider Docker for Mac. There should be no need to use boot2docker anymore. Docker for Mac is the official, recommended solution, and uses HyperKit for lightweight virtualisation and in my experience is a lot faster than using Vagrant with something like VirtualBox.


I use Vagrant all the time. It's fan-freaking-tastic for testing application deployments. I can write up some Ansible/Puppet/Salt code, do a vagrant up, and have some confidence that my deploy logic is sound.


I use Vagrant+VirtualBox all the time for my development environments. I love Docker too but I find that Docker has a higher barrier of entry and comes with more mental overhead. I find that Docker works really well for production environments.

Having Vagrant with shell script provisioning makes it super simple to create reproducible dev environments that works for everyone on the team.


My manager just got back from Hashicon in Austin. I asked him what his main takeaway was and that was that Vagrant is kind of dead. I mean there is still Packer, and Hashicorp is absolutely still around, so I don’t think it’s that bad at all.

Also when I say dead I mean “not sexy conference talk anymore”, so whatever that’s worth,


It means it's the best kind of software now: mature and stable.


From the perspective of someone who works at Docker, we still use it to quickly spin up machines to test the installation of Docker on various kernel setups / OS's.

It still has its use-cases and Docker can't cover some of those special test cases since it shares the kernel with the host system.


Where I work, getting Vagrant working is more feasible than getting Docker working, because we're stuck on a pretty old RHEL that doesn't have a new enough kernel to run Docker but does have VirtualBox in the standard image. I certainly have a sense that the latter is eating the former's lunch, but we are still using Vagrant for testing and I still like it. I last used it a couple months ago to help a friend get started with PHP. It's a very good replacement for things like MAMP that embed a database, web server and programming language for new developers.


(Disclaimer - ex HashiCorp employee)

I use Vagrant daily. I mostly work on operating systems other than Linux (SmartOS, FreeBSD), so Docker is not a replacement for me.

In general it works well enough with VMWare - Virtualbox doesn’t support the features I need. The closed source nature of the Fusion plugin is annoying, given that there are (basically) show-stoppin bugs which have not been resolved in months. However, Vagrant or some derivative has a long future ahead, at least for those of us not on Linux.


Vagrant boxes are great for fast/simple VM needs.

Docker is probably better for larger and longer term use.

Either is pretty damn good for development machines, with Vagrant being slightly easier to hack on.


The repo has updates from just a few days ago, and IIRC, v2 just came out at the beginning of last month.

So I'd say no to "Is it dead?" Is it dated? Well I stopped using it once I found Docker (years ago), but can't say much for others. I'd be using it if I targeted other hosting platforms than Linux.

https://github.com/hashicorp/vagrant


Vagrant still has a place in the world, but for many cases Docker is taking over. The prime reason that docker is what we're using is that from dev instances of services to dropping a production container on your desktop it's easy to test similar to what is shipping.

That said, Vagrant has a lot of nice tooling for simple development workflows (e.g. Vagrantfile)


Our team still use it. I built the dev environment with Vagrant.

We are using Kubernetes in the dev environment, and Docker Native simply doesn't work for what we want to do. Back then, about 9 months ago when I put this together, Minkube did not support native Linux, so I ended up creating the Packer scripts that baked in a customized Nanokube and loaded it with the tooling.

The current team has a mixed bag of people on Windows and a few people on Mac. Bash for Windows wasn't mature enough at the time -- and even if it were, we'd still have to create some sort configuration management to get it installed for people.

Our team is small and we've since been swamped with writing new features. I'll probably do a refresh of the dev environment in the "dead" months in Nov and Dec -- signing up for a Vagrant Enterprise account, ditching Nanokube for Minikube, fix a bunch of bugs.


We use vagrant in conjunction with docker and other container services. Vagrant is our development box, new devs pull down and install the vagrant box, and that box will have a lot of configuration built in. Makes it very easy for new developers to start running our docker containers and related processes.


As others have pointed out, use-cases for Vagrant still exist, but docker containers is a more popular VE for development. Docker very much still has stuff to work through (ex. docker storage) to believe there's going to be a hot new VE sooner rather than later.


In order of complexity you have: * shell scripts * AMIs * vagrant * docker

Depending on what you need, any one of those may be a valid option for standing up a box.

I could use a shell script to essentially do everything to prepare a box.

If it's a stateless server, then creating an AMI is simple and the image can be used to drive auto-scaling groups etc.

If my local development scenario is more complicated or I'm doing it a lot, maybe vagrant is the better choice. Because then it can setup the box as well as provision a vm with virtualbox.

But if you're doing something in the cloud or something beyond an auto-scaling group, I would look to docker for inspiration.

That's where I'm at.


I've only started using seriously in the company I just started in.

They gave me a good computer so I didn't have problems with the spinning up of the vms but I'm pretty sure that that load would slow my own computer to a crawl. I also can't say I'm a fan of the syntax of the Vagrantfile but that might be because I'm too used to docker-compose.

All in all, I think it's a good tool, but I think I'd use docker for most use cases, including the one I'm working on, but it's too late to change vagrant there.


I moved away from it.

Today I have a Java system which composes bash scripts out of fragments and puts them in the cloud-init data for virtual machines. The machine does whatever it is going to do, then it drops a message to a message queue to say it is done and trigger a pleasant chime if successful, otherwise a painful scream if failed. The Java program automatically downloads the cloud-init logs and can usually point out where the failure happened if there was a failure.


I use Vagrant when I want to screw around with Linux without spending money spinning up a box in a random cloud service. I use docker-compose for development.


We use Vagrant at work and it serves us well. We do all of our provisioning with Chef however, using one cookbook for our Vagrant box and web servers. This allows us to achieve a more-or-less consistent configuration across all environments.

One of these days, I'd like to do a deep dive into Nix. I'm not sure it can really be compared to Vagrant or Docker, but the idea of purely functional provisioning appeals to me.


I use Vagrant as a common means of describing a VM. A VBox user on Mac or Linux can launch my box using a known, reputable base image.

The same code and constructs can be used in Vagrant as with other elements or phases of deployment; scripts, runbooks, playbooks, recipies - all can be used locally the same way they might be at cloud scale.

It's a major win for me, I hope Vagrant has a long and fruitful life.


I was wondering the same thing. There are very few Vagrant tutorials later than 2013-14.

Apparently it has been succeeded (2015) by Otto (https://www.hashicorp.com/blog/otto/), though I'd never heard of Otto until just now.


It wasn't really. Otto was touted as a long-term successor to Vagrant, it never gained much traction and ended up being decommissioned a year later: https://www.hashicorp.com/blog/decommissioning-otto/

Vagrant OTOH, is still being maintained.


Otto was about providing high levels of abstraction but it couldn't deliver, just as much as Terraform.

Terraform also started as a happy path abstraction, then the nitty gritty reality kicked in and suddenly you are no longer abstracted from the platform but forced to code on another platform for another platform. I'm even surprised it took off this much.



I think Otto is dead


Vagrant is awesome! Why would it be dead?


I use vagrant a lot for testing provisioning scripts. For example, having an Ansible setup with 2-app, 3-mongo and 1 redis server makes the script complicated, so I use >close< to production ( DO / Linode ) Linux distribution and try the scripts on my local machine. Works like charm.


I use it for personal projects and schoolwork, mainly to provide me with convenient to configure headless Linux boxes on my Macs without needing to depend on network connectivity to ssh into a remote box (after the initial provisioning and occasional apt-get/yum updates).


I use it a lot for my dev environment


I use it to support legacy systems.

If we are deploying to docker, I use docker. Otherwise, I use vagrant.


I use Ansible + Vagrant for development env only and for some times to test on different env too like staging etc.

I try to shift my env to docker but faced alot issues in configuring and running some scripts on docker-compose up.


We still have a team using it to manage its dev environment but I can see it withering. Nowadays I just use it to launch a painless lxc or download a vbox image without hassle.


Random hint: if like us you you have a mixture of legacy and Kubernetes deployments, run minikube with a VM driver of None in your vagrant.


We still use it for our development environments to test our deployment / provisioning tools.


I don't know anyone who uses it, but they did just release 2.0 last month.


Kinda infuriating when people assume sw is dead because there is no longer hype around it. Vagrant is still alive and used. It still has its warts but it's a stable piece of software. Not long ago they released 2.0.




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: