Managing OpenStack with CloudForms 4.5 Ansible Inside

CloudForms 4.5 introduces Embedded Ansible, also know as Ansible Inside.

CloudForms can now use Ansible natively to manage Virtual Machines, as well as Amazon and VMware management systems.

At present, RHV and OpenStack are not supported. A method of managing RHV systems is covered here.

However, this blog covers a method of managing OpenStack systems.

Firstly...

Make sure you've enabled the embedded Ansible role and then added a GitHub playbook repository, this one in this example.

Also, at least one OpenStack Cloud provider should be present in CloudForms.

Helpfully, a set of Ansible modules is available to use to connect and manage OpenStack.

Authenticating with OpenStack

To authenticate with OpenStack, we use the os_auth module.

Using this module, we can have a playbook task to authenticate to OpenStack but this requires the Keystone endpoint, user, password and tenant.

With this playbook, the task creates a temporary config file, which we use to connect to OpenStack and we're passing the OpenStack hostname and credentials to a playbook, from the service dialogue.

OpenStack---Create-External-Network-3

Additionally, we specify whether SSL is enabled, as this has a bearing on the Keystone URL.

Create the Service

Firstly, import this service dialogue.

The dialogue relies on automate methods to populate the fields dynamically. The methods can be found here and should be imported the usual way.

Then create a service as usual, selecting Ansible Playbook as the type.

Select the Repository, Playbook and the imported dialogue.

Adding-a-new-Service-Catalog-Item

Running the Playbook

Now the playbook can be ordered as a service.

Selecting from available OpenStack instances and the credentials will be populated automatically.

Also specify the network name for this example.

order-service-3

Viewing the deployed service in My Services, we can see the playbook output.

standard-out