Vagrant and KVM
-
@RamblingBiped said in Vagrant and KVM:
@stacksofplates said in Vagrant and KVM:
What's the advantage to vagrant over just using Ansible with kickstart/preseed config?
From what I understand, Ansible integrates with the VM provisioning done using Vagrant. At the time of VM creation you can define a specific Ansible playbook from withing the Vagrantfile that can completely configure your VM from the base Vagrant image, and kickoff subsequent builds/configurations.
Vagrant alone is usually used directly by developers to build one-off environments that conform to the production environment's constraints. Ansible is most often used as an automation tool for Operations/DevOps to force/maintain uniformity/conformity of configuration in a production environment. Blending the two together aids in simplifying the configuration management of both production and development environments.
Hypothetically, I believe you could do everything you need to do in the absence of Vagrant just using Ansible and Ansible playbooks. I have a hunch that Vagrant allows you to abstract the base VM configuration out of your Ansible Playbooks and configurations and helps reduce the complexity of your playbooks and speeds VM deployment and administration. I'll hopefully be able to confirm that in the not so distant future...
So I don't know anything about preseed stuff, but Im not seeing what Vagrant does that a kickstart file doesn't do. You could just have Ansible tell KVM to build from a kickstart file and even include default config in the post install of the kickstart. Then if anything else was needed Ansible could do it after the VM is created. You could even have Ansible create the kickstart files using the jinja templates.
-
The other cool thing about using Ansible with kickstart files is Ansible can provision the kickstart for your physical machines too.
-
@stacksofplates said in Vagrant and KVM:
@RamblingBiped said in Vagrant and KVM:
@stacksofplates said in Vagrant and KVM:
What's the advantage to vagrant over just using Ansible with kickstart/preseed config?
From what I understand, Ansible integrates with the VM provisioning done using Vagrant. At the time of VM creation you can define a specific Ansible playbook from withing the Vagrantfile that can completely configure your VM from the base Vagrant image, and kickoff subsequent builds/configurations.
Vagrant alone is usually used directly by developers to build one-off environments that conform to the production environment's constraints. Ansible is most often used as an automation tool for Operations/DevOps to force/maintain uniformity/conformity of configuration in a production environment. Blending the two together aids in simplifying the configuration management of both production and development environments.
Hypothetically, I believe you could do everything you need to do in the absence of Vagrant just using Ansible and Ansible playbooks. I have a hunch that Vagrant allows you to abstract the base VM configuration out of your Ansible Playbooks and configurations and helps reduce the complexity of your playbooks and speeds VM deployment and administration. I'll hopefully be able to confirm that in the not so distant future...
So I don't know anything about preseed stuff, but Im not seeing what Vagrant does that a kickstart file doesn't do. You could just have Ansible tell KVM to build from a kickstart file and even include default config in the post install of the kickstart. Then if anything else was needed Ansible could do it after the VM is created. You could even have Ansible create the kickstart files using the jinja templates.
I think Vagrant handles more platforms
-
@scottalanmiller said in Vagrant and KVM:
@stacksofplates said in Vagrant and KVM:
@RamblingBiped said in Vagrant and KVM:
@stacksofplates said in Vagrant and KVM:
What's the advantage to vagrant over just using Ansible with kickstart/preseed config?
From what I understand, Ansible integrates with the VM provisioning done using Vagrant. At the time of VM creation you can define a specific Ansible playbook from withing the Vagrantfile that can completely configure your VM from the base Vagrant image, and kickoff subsequent builds/configurations.
Vagrant alone is usually used directly by developers to build one-off environments that conform to the production environment's constraints. Ansible is most often used as an automation tool for Operations/DevOps to force/maintain uniformity/conformity of configuration in a production environment. Blending the two together aids in simplifying the configuration management of both production and development environments.
Hypothetically, I believe you could do everything you need to do in the absence of Vagrant just using Ansible and Ansible playbooks. I have a hunch that Vagrant allows you to abstract the base VM configuration out of your Ansible Playbooks and configurations and helps reduce the complexity of your playbooks and speeds VM deployment and administration. I'll hopefully be able to confirm that in the not so distant future...
So I don't know anything about preseed stuff, but Im not seeing what Vagrant does that a kickstart file doesn't do. You could just have Ansible tell KVM to build from a kickstart file and even include default config in the post install of the kickstart. Then if anything else was needed Ansible could do it after the VM is created. You could even have Ansible create the kickstart files using the jinja templates.
I think Vagrant handles more platforms
That makes sense. If you have a mix of Debian based and RH based (does it do BSD?) I can see that. I've never played with preseed stuff so Vagrant may very well be much better than that.
-
@stacksofplates said in Vagrant and KVM:
@scottalanmiller said in Vagrant and KVM:
@stacksofplates said in Vagrant and KVM:
@RamblingBiped said in Vagrant and KVM:
@stacksofplates said in Vagrant and KVM:
What's the advantage to vagrant over just using Ansible with kickstart/preseed config?
From what I understand, Ansible integrates with the VM provisioning done using Vagrant. At the time of VM creation you can define a specific Ansible playbook from withing the Vagrantfile that can completely configure your VM from the base Vagrant image, and kickoff subsequent builds/configurations.
Vagrant alone is usually used directly by developers to build one-off environments that conform to the production environment's constraints. Ansible is most often used as an automation tool for Operations/DevOps to force/maintain uniformity/conformity of configuration in a production environment. Blending the two together aids in simplifying the configuration management of both production and development environments.
Hypothetically, I believe you could do everything you need to do in the absence of Vagrant just using Ansible and Ansible playbooks. I have a hunch that Vagrant allows you to abstract the base VM configuration out of your Ansible Playbooks and configurations and helps reduce the complexity of your playbooks and speeds VM deployment and administration. I'll hopefully be able to confirm that in the not so distant future...
So I don't know anything about preseed stuff, but Im not seeing what Vagrant does that a kickstart file doesn't do. You could just have Ansible tell KVM to build from a kickstart file and even include default config in the post install of the kickstart. Then if anything else was needed Ansible could do it after the VM is created. You could even have Ansible create the kickstart files using the jinja templates.
I think Vagrant handles more platforms
That makes sense. If you have a mix of Debian based and RH based (does it do BSD?) I can see that. I've never played with preseed stuff so Vagrant may very well be much better than that.
yes it does. OpenBSD too.
-
Gonna bring this back to the dead because vagrant is awesome. I am using now with libvirt
This is how I configure it on Ubuntu 18.04 (note you must install qemu / kvm first)
#*********************************************************** # Vagrant QEMU / KVM Dependencies #*********************************************************** sudo apt-get build-dep vagrant ruby-libvirt sudo apt-get install qemu libvirt-bin ebtables dnsmasq-base sudo apt-get install libxslt-dev libxml2-dev libvirt-dev zlib1g-dev ruby-dev #*********************************************************** # Vagrant QEMU / KVM Plugin #*********************************************************** sudo vagrant plugin install vagrant-libvirt #*********************************************************** # Download, copy, and install vagrant #*********************************************************** sudo apt install unzip sudo wget https://releases.hashicorp.com/terraform/0.12.0/terraform_0.12.0_linux_amd64.zip sudo unzip terraform_0.12.0_linux_amd64.zip sudo mv terraform /usr/local/bin/ #*********************************************************** # Start Vagrant VM # In prepared project directory, run following command: #*********************************************************** # vagrant up --provider=libvirt
-
@stacksofplates said in Vagrant and KVM:
What's the advantage to vagrant over just using Ansible with kickstart/preseed config?
Also I'm a moron. I've been using it for a couple years and Vagrant is much better than kickstarting.
-
-
@black3dynamite said in Vagrant and KVM:
@stacksofplates said in Vagrant and KVM:
Vagrant is much better than kickstarting
Why is it better?
Just try it and you'll see
-
@black3dynamite said in Vagrant and KVM:
@stacksofplates said in Vagrant and KVM:
Vagrant is much better than kickstarting
Why is it better?
It's much faster and you can use tools like Ansible to provision the Vagrant boxes. It's just really flexible and fast.