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

    Automated Provisioning - KVM & CM tools

    IT Discussion
    kvm ansible saltstack automation libvirt
    5
    11
    1.4k
    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.
    • AdamFA
      AdamF
      last edited by

      This post will probably seem like I'm jumping around a bit, because I have so many questions about where to begin. So apologies in advance.

      I'm starting another project in my home lab. I want to be able to spin up new servers from a clone or template, and then make changes to the new servers automatically. I'd like to accomplish the following:

      1. On my KVM host (plain Fedora 30 host with KVM), spin up a server, and clone it.
      2. With that clone, I want the ability to create new servers from that clone, and then tweak different things about the new server such as hostname, IP address, and some other items within the OS or application. (Perhaps with Ansible, Saltstack, other?)
      3. The assigned IP address for each server can either come from a DHCP server, or from a list of hard coded IP addresses. (I do not currently have a DHCP server in this lab)

      I do not currently have any solutions like Openstack, or any other web front ends to easily do this. I manage KVM VMs with both Virt-manager, and with libvirt. I am open to other solutions if they would be a better fit for this type of project.

      What is a good solution for this project? Basically, an automation solution for new server setups. (I guess you would consider it private cloud automation.)

      jmooreJ 1 Reply Last reply Reply Quote 1
      • black3dynamiteB
        black3dynamite
        last edited by black3dynamite

        Its been a while since I've try this before. But you can use something like virt-builder to most of what you want if you deploying Linux VMs.
        https://developer.fedoraproject.org/tools/virt-builder/about.html

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

          You can do this with vagrant . You can attach login scripts into the Vagrant config file or you can actually build templates which they call boxes.

          AdamFA 1 Reply Last reply Reply Quote 0
          • AdamFA
            AdamF @IRJ
            last edited by

            @IRJ said in Automated Provisioning - KVM & CM tools:

            You can do this with vagrant . You can attach login scripts into the Vagrant config file or you can actually build templates which they call boxes.

            Is Vagrant meant for production environments as well? This project is a proof of concept, that I would later hope to take into a production environment.

            IRJI 1 Reply Last reply Reply Quote 0
            • IRJI
              IRJ @AdamF
              last edited by

              @fuznutz04 said in Automated Provisioning - KVM & CM tools:

              @IRJ said in Automated Provisioning - KVM & CM tools:

              You can do this with vagrant . You can attach login scripts into the Vagrant config file or you can actually build templates which they call boxes.

              Is Vagrant meant for production environments as well? This project is a proof of concept, that I would later hope to take into a production environment.

              I have used vagrant in my lab and really like it, but if you design your environment properly it wont matter what tool you use to automate the build.

              You need to learn scripting so you can utilize bash and/or ansible to do these builds. Then you can use whatever mechanism you want to do the virtualization like vagrant or terraform.

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

                Terraform will do this and I have an Ansible role to do it also.

                As @IRJ mentioned Vagrant will work also. However I feel Terraform is a better fit as you have more control over the specific pieces of your infrastructure.

                AdamFA 1 Reply Last reply Reply Quote 1
                • AdamFA
                  AdamF @stacksofplates
                  last edited by

                  @stacksofplates said in Automated Provisioning - KVM & CM tools:

                  Terraform will do this and I have an Ansible role to do it also.
                  As @IRJ mentioned Vagrant will work also. However I feel Terraform is a better fit as you have more control over the specific pieces of your infrastructure.

                  You would still prefer Terraform over Ansible for this as well?

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

                    @fuznutz04 said in Automated Provisioning - KVM & CM tools:

                    @stacksofplates said in Automated Provisioning - KVM & CM tools:

                    Terraform will do this and I have an Ansible role to do it also.
                    As @IRJ mentioned Vagrant will work also. However I feel Terraform is a better fit as you have more control over the specific pieces of your infrastructure.

                    You would still prefer Terraform over Ansible for this as well?

                    Not the same kind of tool. Terraform is about creating virtual infrastructure. Ansible is about management.

                    1 Reply Last reply Reply Quote 0
                    • jmooreJ
                      jmoore @AdamF
                      last edited by

                      @fuznutz04 My first thought about how to best do something like this is Ansible. There are several ways but to me this sounds like what Ansible is meant to do.

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

                        @fuznutz04 said in Automated Provisioning - KVM & CM tools:

                        @stacksofplates said in Automated Provisioning - KVM & CM tools:

                        Terraform will do this and I have an Ansible role to do it also.
                        As @IRJ mentioned Vagrant will work also. However I feel Terraform is a better fit as you have more control over the specific pieces of your infrastructure.

                        You would still prefer Terraform over Ansible for this as well?

                        Yeah. My role can create the VMs, but Terraform had more functionality for that. Ansible overlaps in the infrastructure provisioning space a lot, but it lacks keeping states like Terraform does.

                        AdamFA 1 Reply Last reply Reply Quote 0
                        • AdamFA
                          AdamF @stacksofplates
                          last edited by

                          @stacksofplates said in Automated Provisioning - KVM & CM tools:

                          @fuznutz04 said in Automated Provisioning - KVM & CM tools:

                          @stacksofplates said in Automated Provisioning - KVM & CM tools:

                          Terraform will do this and I have an Ansible role to do it also.
                          As @IRJ mentioned Vagrant will work also. However I feel Terraform is a better fit as you have more control over the specific pieces of your infrastructure.

                          You would still prefer Terraform over Ansible for this as well?

                          Yeah. My role can create the VMs, but Terraform had more functionality for that. Ansible overlaps in the infrastructure provisioning space a lot, but it lacks keeping states like Terraform does.

                          I'd like to learn both. I just started with Ansible a day or two ago. I have been (and still am) using SaltStack.

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