vagrant-service-manager
vagrant-service-manager copied to clipboard
Add command for exporting sample Vagrantfile
From @navidshaikh on November 12, 2015 9:39
@veillard suggested to add a command in plugin to export a sample Vagrantfile.
For example:
vagrant adbinfo export-vagrantfile
can export a sample Vagranfile
as below in current working directory
# -*- mode: ruby -*-
# vi: set ft=ruby :
#Vagrant file for libvirt/kvm and virtualbox provider
Vagrant.configure(2) do |config|
config.vm.box = "atomicapp/dev"
config.vm.network "forwarded_port", guest: 2376, host: 2379, auto_correct: true
config.vm.provider "virtualbox" do |vbox, override|
vbox.memory = 1024
vbox.cpus = 2
# Enable use of more than one virtual CPU in a virtual machine.
vbox.customize ["modifyvm", :id, "--ioapic", "on"]
end
end
This could be handy for quick starts.
Copied from original issue: projectatomic/vagrant-adbinfo#21
From @bexelbie on November 19, 2015 10:9
I like the idea, I am not sold on the sample file as outlined. How about we choose the sample file once we resolve some of the ip resolution patches?
@bexelbie : Yes, the sample file going to be evolved.
I like the idea. I was thinking about how we can autogenerate a Vagrantfile for a certain usecase. But when we moved towards unifying the Vagrantfiles I dropped the idea.
@LalatenduMohanty I am not aware of a goal to unify the vagrant files. I thought we wanted to simplify them and make it easy to manage services in the box. I am worried a single file is either a default of nothing that forces extra setup or will always result in a first boot that immediately needs reconfiguration for use cases.
I think we should not unify and keep shipping simple samples and that we should consider adding some generation down the line.
Even better than this would be, if a user can just use vagrant init
to generate an empty Vagrantfile for ADB/CDK. This would require that the remaining necessary configuration of the Vagrantfile used atm, gets moved into the default Vagrantfile which is part of the box itself.