We use Vagrant for dev environment automation and provisioning. It works smoothly. But sometimes, if vagrant has some problem(we faced LOT of them starting from SSH to networking config), the new developers who join us and are supposed to just boot up the box and start working, have a really hard time coping up with that. So I was just wondering, ain't there some easier way(like having a GUI like VirtualBox to start and end an env) of managing these virtual environments?
maybe my question should be, What are the best practices on this area, other than Vagrant?
Vagrant uses virtualbox as the virtualization layer, so you can start a vagrant vm using the gui. Add the following to your VagrantFile.
config.vm.boot_mode = :gui
Also take a look at sahara as it lets you treat it more like a sandbox with quick rollbacks, etc.
I'll echo the other comment here. If you already have a setup that works smoothly make sure you have everyone using the same versions of VirtualBox, Vagrant and the basebox.
As for a UI and more distribution options you might find Wanton of interest: https://github.com/maestrodev/wanton
The nix
package manager is really worth checking out: http://nixos.org/nix
It provides the command nix-shell
, which starts a shell based on the file shell.nix
, which corresponds to the Vagrantfile
in the nix-world.
In contrast to Vagrant however there is no costly virtualization involved. What makes the magic happen is the functional approach to package management using cryptographic hashes of the build inputs.
The configuration was updated in v1.1 for GUI mode:
config.vm.provider "virtualbox" do |v|
v.gui = true
end
From: http://docs.vagrantup.com/v2/virtualbox/configuration.html
Besides that, I am very happy with the new version, I would give it a try
I'm not sure there is an alternative. Vagrant is a relatively new software. Problems with ssh on Vagrant seems to appear when virtualbox addons version on the VM is different from the Virtualbox version on the host machine, and I'm not sure there is a solution apart from reinstalling correct versions.
edit virtualbox addons are named VirtualBox Guest Additions
Add "config.ssh.forward_x11 = true" to your Vagrantfile then you can easily use X-Windows.
I used vagrant in the past and I also switched to a pure docker solution because it was too heavy / difficult to setup / slow to star (that is my personal point of view). I usually build my files with docker compose and when I don't want to do it manually I use stakkr (a lightweight wrapper made in python : https://github.com/edyan/stakkr).
Cheers
You could use Docker if you don't mind the configuration overhead https://www.docker.com/
I suggest to use devilbox that using docker as backend
© 2022 - 2024 — McMap. All rights reserved.