Managing cloud infrastructures

The cloud is a popular but vague term, used to describe IaaS. There are many types of resources that can be provided by a cloud, although the most commonly discussed are compute and storage. Ansible is capable of interacting with numerous cloud providers, in order to discover, create, or otherwise manage resources within them. Note that although we will focus on the compute and storage resources in this chapter, Ansible has a modules for interacting with many more cloud resource types, such as load balancers, and even cloud role-based access controls.

One such cloud provider that Ansible can interact with is OpenStack (an open source cloud operating system), and this is a likely solution for those with a need for on-premise IaaS functionality. A suite of services provides interfaces to manage compute, storage, and networking services, plus many other supportive services. There is not a single provider of OpenStack; instead, many public and private cloud providers build their products with OpenStack, and thus although the providers may themselves be disparate, they provide the same APIs and software interfaces so that Ansible can automate tasks with ease in these environments.

Ansible has supported OpenStack services since very early in the project. That initial support has grown to include over forty modules, with support for managing the following:

  • Compute
  • Bare-metal compute
  • Compute images
  • Authentication accounts
  • Networks
  • Object storage
  • Block storage

In addition to performing create, read, update, and delete (CRUDactions on the preceding types of resources, Ansible also includes the ability to use OpenStack (and other clouds) as an inventory source, and we touched on this earlier, in Chapter 1, The System Architecture and Design of Ansible. Each execution of ansible or ansible-playbook that utilizes an OpenStack cloud as an inventory source will get on-demand information about what compute resources exist, and various facts about those compute resources. Since the cloud service is already tracking these details, this can reduce overheads by eliminating the manual tracking of resources.

To demonstrate Ansible's ability to manage and interact with cloud resources, we'll walk through two scenarios: a scenario to create and then interact with new compute resources, and a scenario that will demonstrate using OpenStack as an inventory source.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.83.150