ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Vagrant and KVM

    Scheduled Pinned Locked Moved IT Discussion
    kvmvagrantvirtualization
    18 Posts 6 Posters 3.6k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • stacksofplatesS
      stacksofplates
      last edited by

      What's the advantage to vagrant over just using Ansible with kickstart/preseed config?

      RamblingBipedR stacksofplatesS 2 Replies Last reply Reply Quote 1
      • RamblingBipedR
        RamblingBiped @stacksofplates
        last edited by RamblingBiped

        @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... 😄

        http://docs.ansible.com/ansible/guide_vagrant.html

        stacksofplatesS 1 Reply Last reply Reply Quote 1
        • stacksofplatesS
          stacksofplates @RamblingBiped
          last edited by

          @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... 😄

          http://docs.ansible.com/ansible/guide_vagrant.html

          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.

          scottalanmillerS 1 Reply Last reply Reply Quote 0
          • stacksofplatesS
            stacksofplates
            last edited by

            The other cool thing about using Ansible with kickstart files is Ansible can provision the kickstart for your physical machines too.

            1 Reply Last reply Reply Quote 0
            • scottalanmillerS
              scottalanmiller @stacksofplates
              last edited by

              @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... 😄

              http://docs.ansible.com/ansible/guide_vagrant.html

              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

              stacksofplatesS 1 Reply Last reply Reply Quote 1
              • stacksofplatesS
                stacksofplates @scottalanmiller
                last edited by

                @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... 😄

                http://docs.ansible.com/ansible/guide_vagrant.html

                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.

                StrongBadS 1 Reply Last reply Reply Quote 0
                • StrongBadS
                  StrongBad @stacksofplates
                  last edited by

                  @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... 😄

                  http://docs.ansible.com/ansible/guide_vagrant.html

                  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.

                  http://www.vagrantbox.es/

                  1 Reply Last reply Reply Quote 1
                  • IRJI
                    IRJ
                    last edited by

                    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
                    
                    1 Reply Last reply Reply Quote 1
                    • stacksofplatesS
                      stacksofplates @stacksofplates
                      last edited by

                      @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.

                      black3dynamiteB 1 Reply Last reply Reply Quote 0
                      • black3dynamiteB
                        black3dynamite @stacksofplates
                        last edited by

                        @stacksofplates said in Vagrant and KVM:

                        Vagrant is much better than kickstarting

                        Why is it better?

                        IRJI stacksofplatesS 2 Replies Last reply Reply Quote 0
                        • IRJI
                          IRJ @black3dynamite
                          last edited by

                          @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 🙂

                          1 Reply Last reply Reply Quote 0
                          • stacksofplatesS
                            stacksofplates @black3dynamite
                            last edited by

                            @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.

                            1 Reply Last reply Reply Quote 2
                            • 1 / 1
                            • First post
                              Last post