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

    Making Templates on a Scale HC3 Cluster

    IT Discussion
    scale scale hc3 virtualization how to
    2
    9
    2.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.
    • scottalanmillerS
      scottalanmiller
      last edited by

      Templating, or making a base image of an OS, is an important means of standardization and speeding up the deployment of virtual machines on nearly any virtualization platform (especially cloud platforms.) Doing this on a Scale HC3 cluster is no different and is very easy.

      Before we have any templates we need to make a gold reference VM from which to work. This is a one time manual virtual machine creation process (which can be automated through any usual means: e.g. Kickstart for Red Hat Linux.) We do this like any normal VM installation, by uploading an installation ISO to our Scale media library, creating a new VM and performing an installation.

      At this point, once the VM is installed, we could make a template, but generally we are going to want to modify the base image before templating. For example, likely running updates to ensure that our template is fully patched before we use it as a base for other systems reducing the number of patches to download and apply to the resulting VMs. Often we will want to add a root key or local administration account and apply permissions to the base image to make access and administration of the VMs easier and possibly automated for in house scripts or agentless like Ansible. Including standard tools like glances, htop, sysstat, fail2ban or Chef. Enabling a firewall.

      Once our template is ready, we simply power it down and then use the clone button to make new VMs from our template. The template itself would remain powered down.

      0_1453122526981_temp1.png

      To make templates easier to use on the Scale HC3, I recommend making a tag for them called "templates" and keeping any and all templates in a separate group away from other VMs so that they are easily identifiable. And, of course, designate them by name such as by ending their name with "-template."

      1 Reply Last reply Reply Quote 8
      • scottalanmillerS
        scottalanmiller
        last edited by scottalanmiller

        It would be standard practice to, from time to time, power on a template in order to perform updates and patches so that the base template was as secure and stable as possible and to save additional time in the preparation of resulting VMs.

        1 Reply Last reply Reply Quote 3
        • scottalanmillerS
          scottalanmiller
          last edited by scottalanmiller

          Another typical thing to have added to a base template is applications. In the example above I showed a generic operating system template, like you might make for Ubuntu, CentOS or Windows 2012 R2. But it would also be common to template a fully configured application, such as a Redis node, or NGinx server that could be rapidly cloned and powered on to handle additional workloads either in an application cluster or simply making another server similar to other, existing workloads.

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

            This is one grip I have with XenServer. "Templates" are either the templates that come with XenServer which are more presets for the options for the install, or they are the templates that you can create from a VM you've set up. You can append something to the name to show it's different, but you still have to wade through a list of 20 or so templates to find the one you want.

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

              @johnhooks said:

              This is one grip I have with XenServer. "Templates" are either the templates that come with XenServer which are more presets for the options for the install, or they are the templates that you can create from a VM you've set up. You can append something to the name to show it's different, but you still have to wade through a list of 20 or so templates to find the one you want.

              You can tag in the Scale. I tag with "template" as the main group and then it is in a separate group from everything else rather than in with the other VMs.

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

                @scottalanmiller said:

                @johnhooks said:

                This is one grip I have with XenServer. "Templates" are either the templates that come with XenServer which are more presets for the options for the install, or they are the templates that you can create from a VM you've set up. You can append something to the name to show it's different, but you still have to wade through a list of 20 or so templates to find the one you want.

                You can tag in the Scale. I tag with "template" as the main group and then it is in a separate group from everything else rather than in with the other VMs.

                Ah after looking you can do that with XO.

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

                  Another important aspect of a template is that you can have someone with access to the "master" root password set it once and then never need it again and no need to share it. You provide access through keys, root keys or sudo or whatever, and have this built in so that a password is never needed. This increases security and efficiency immensely. This fixes some of the complexities of the break-glass system.

                  1 Reply Last reply Reply Quote 2
                  • scottalanmillerS
                    scottalanmiller
                    last edited by

                    Another thing that we have done with our templates at the NTG Lab, we have added our ELK FileBeat client into the template so that any machine created with the template will automatically send log files to our ELK server upon creation. This speeds up new system creation, increases standardization, reduces the chance for error and just makes everything that much easier.

                    Of course it does not have to be ELK, you could include logging capacity for Splunk or Loggly or similar service just as easily.

                    1 Reply Last reply Reply Quote 3
                    • scottalanmillerS
                      scottalanmiller
                      last edited by

                      And adding Topbeat too, to send performance information to the ELK system as well.

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