About this Video
In this Red Hat® Consulting whiteboarding video, you will learn how Red Hat Ansible® Automation can be used for full end-to-end infrastructure provisioning from bare metal to applications running on Red Hat OpenShift® Container Platform.
Learn more: www.redhat.com/consulting
- Video Channel
- Services and support
- Run time
- January 8, 2019
[Freddy] Hi, my name is Freddy Montero and I'm an architect with the Container and PaaS Practice at Red Hat.
[John] Hi, my name is John Westcott, and I'm a senior consultant in the northeast region for Red Hat.
[Freddy] On today's video, we're gonna talk about how to provision bare-metal machines to applications utilizing Ansible. John, tell us how we can utilize Ansible to start this journey.
[John] Sure, so we all know that Ansible can automate on an existing machine. But Ansible can also be used to provision that machine as part of an automation process. Using supported, existing modules, Ansible can talk to Cloud providers, such as Open Stack, GCP, AWS, and Azure. In addition, there are modules for Ansible to talk to virtualization solutions such as VMWare's Vsphere, or RHV. In addition, there's numerous modules for connecting and working with data center management tools to complete the provisioning process.
[Freddy] That's great to know there's a lot of Ansible modules to provision not only cloud providers, but also virtualization providers, but what if there's something, I want to do something that is not covered by an Ansible module?
[John] Great question. If you encounter a device that doesn't have an existing module for it, Ansible has built in modules for shelling out and executing a command line interface, a CLI. It also has modules for utilizing rest API. Or, if one of those doesn't work for you, you can extend Ansible by writing your own custom module to make Ansible do virtually anything.
[Freddy] Wow. That I didn't know. Since you're out in the field, can you explain to me a little bit how we can put all of this together.
[John] Sure thing. At a client, we created a provisioning process to go all the way from a metadata database to bare metal, to application, and middle ware, and everything else in between. We started by extracting data out of the metadata database, and then talking to providers, to get information such as IPs and host names required to build the machine. Once we had all that information completed, we put it into the customer's CMDB. From there, we talked with our providers to provision us a virtual machine. Once the virtual machine was started, we connected to the virtual machine with Ansible to install the middleware, the application, and perform any other tasks required to complete the provisioning process for that environment.
[Freddy] That's good to know, but how do I know once I create or I create a AVM, that I know that might be in its fully provision.
[John] Another good question. Ansible has built-in modules for waiting for a connection to be established between Ansible Engine and the VM Ware that was recently provisioned.
[Freddy] But, how do I really know that my VM is really fully provisioned?
[John] To complete the provisioning process, you can do a couple different methods. One is you can have baked-in information inside of your VM. Once the VM is up and Ansible can connect to it, with that baked-in information, Ansible can go modify that information as required by security. Another option would be to have a post-provisioning callback script on your machine which, once the machine was provisioned, would modify the machine in such a way that Ansible was able to connect in. A third option which you can leverage if you're using Ansible Tower, is called a provisioning callback. That allows the virtual machine to callback directly into Ansible Tower and request that Ansible Tower completes the provisioning process on the machine that called it.
[Freddy] Okay. So, once the VM is fully provisioned and all the information goes back to Ansible Tower, now that host can be managed just like any other host in the cluster.
[John] That's right. Given this process, do you think this could be used to install an open shift cluster?
[Freddy] Ah, yes, of course. By creating VMs you're utilizing the same process that you explained before, and then utilizing one of the post host mechanisms, we can bootstrap the Ansible OpenShift playbooks to fully create and install an OpenShift cluster.
[John] Cool. So we've talked about a lot of concepts in here, including Ansible, Tower, OpenShift, provisioning from bare metal, and even writing custom modules. If anybody needs help with this, what should they do?
[Freddy] To learn more about this topic, or any other topic, please contact your Red Hat account executive, to schedule a discovery session or visit us at redhat.com\services to find out more what Red Hat consulting or training can do for you. Thank you.