Register hosts to Satellite6 via CloudForms and Ansible Tower part 2

This post will show you how to add Ansible Tower as a provider in CloudForms, discover and create a catalog item out of a job template we’ve created and order the catalog item via self service portal.

If you followed part 1 you now have a fully functional Ansible Tower which we can add as a provider to Red Hat CloudForms.

Step 1 Login to CloudForms

Step 2 Go to Configuration -> Configuration Management

Step 3 Click on Configuration and add a new provider

Step 4 Fill in the following values (of course it needs to match your environment)
Now validate your credentials
and hit add

Step 5 After Adding the provider you will see that CloudForms will discover the created job template from Ansible Tower

Step 6 Click on the sat6register job template
Then click configuration -> Create Service Dialog from this Job Template

In my case I did name the template reghosts_to_sat6
Click the save button on the bottom right

Step 7 Now its time to look at the actual service dialog which got created from the Ansible Job Template
Got to Automate -> Customization -> Service Dialogs and click on your service dialog. You will see a dialog which pretty much looks like this
If you want to be able to edit the fields you have to uncheck the readonly box for each field. Per default they are set readonly!

Step 8 Believe it or not but this is a fully functional service dialog which can be added to a catalog in CloudForms. Part 4 of the series which I will release next week will show you how you can make some of these fields dynamic.

Step 9 Create a catalog. Go to Services -> Catalogs -> Catalogs and click on Configuration -> Create new catalog
Name the catalog however you like and add it

Step 10 Lets add the service dialog to the ansible catalog. Click on Services -> Catalogs -> Catalog items -> ansible -> Configuration -> Create new catalog item
As a catalog item type choose AnsibleTower
Add the following values to the catalog item and click add

Step 11 Lets add some color to the catalog item and add an ansible logo. Click on the newly created catalog item and upload the ansible logo.

Step 12 login to the self service ui, you will find that under https://cloudformsfqdn/self_service
Once logged in click on Service Catalog and you will see your ansible catalog item

Step 13 Click on the ansible catalog item and fill out the values. The limit is the host or hosts separated by “:” which you would like to register to Satellite6. The limit cannot be left empty and the host must exist in the Ansible Tower inventory unless you chose the tower inventory to update on launch of a job.
If you have entered all the correct values you can go ahead, add the item to the shopping cart
You can now click on the shopping cart on the top right and order the item

As this item was launched as a service you can follow the work flow under Services->Requests. Once the statemachine steps gets to launch_job you will see the job popping up in the Ansible Tower Console.


After few second, the job is executed and registers the host with the Red Hat Satellite 6 server. The completion of the job can be validated in CloudForms under Services -> Requests or in the Satellite 6 UI.

The next part (part 3) of the blog series which I will release next week will show you how you can add that dialog as a button under vm instances.

Posted in ansible, CloudForms, Puppet | Tagged , , , | Leave a comment

Register hosts to Satellite6 via CloudForms and Ansible Tower part 1

CloudForms is the single pane of glass for virtual machines, cloud instances, and baremetal servers provisioned via Satellite 6. Since we added support for Ansible Tower we can do a lot of magic as we can now call Ansible Tower via CloudForms. What does that mean for operations and orchestration?

Let’s say we have the following use case:

We have a host or multiple hosts which need to be registered to Red Hat Satellite 6 and update to the latest errata. We also want to be able to choose if puppet should be used as a configuration management tool or if the host will be managed by Ansible Tower.

CloudForms gives you endless possibilities on how you could achieve this registration. The blog series will walk you through the steps on how to build the above use case through the out of the box integration with Ansible Tower by Red Hat and Red Hat Satellite 6.

Part 1 Will walk you through how to enable the inventory synchronization between CloudForms and Ansible Tower and how to create the sat6register job which will be executed from CloudForms.
Part 2 Will walk you through how to auto generate a service dialog in CloudForms from an Ansible Tower Job and expose it as a self service catalog item which can be ordered via self service portal.
Part 3 Will walk you through the creation of a custom button sat6register under the VM section which enable you to register a host from the administration ui.
Part 4 Will walk you through the customization of the service dialog to make it dynamic and grab information via api from Red Hat Satellite 6.

Step 1 Login to Ansible Tower with an admin user

Step 2 Click on the project tab on the top left
Step 3 Then click +ADD

Step 4 Fill in the following information
NAME: Can be arbitrary
DESCRIPTION: I like to see the giturl of the project there so
ORGANIZATION: In my case default
Step 5 Once done hit save
and go back to the project tab
where you will see the following

Step 6 Create machine credentials for the hosts you would like to access via ssh. Click on settings

Fill in the information for your host. In my case I did use username password. In your case it could be an ssh-key. The vault password is used to decrypt the admin_pass password for the Red Hat Satellite 6 connection. You can learn how to set the initial vault password it here:
click +ADD

Step 7 Create the credential to connect to your Red Hat CloudForms appliance. We will need those when we setup the inventory sync between Ansible Tower and Red Hat CloudForms. Repeat Step 6 (You won’t need a vault password here). As a type choose CloudForms
and hit +ADD
Step 8 Now we are ready to go and create an inventory for the hosts which are in CloudForms. We need this as ansible is going to ask us about the inventory if we create the job template. Click on the inventory tab
and click the +ADD button.
Fill in the following values
and hit save. You will get redirected to the groups page. Here is where you could add group variables for the CloudForms inventory.

Click the ADD Group button and
fill in the following values
and hit save

Step 9 Now Sync the inventory on the bottom left corner of the page
You will get redirected to the following page. Once the sync is finished you should see a screen similar to this if you have hosts within CloudForms.

Step 10 We are finally ready to create the job in Ansible Tower. Click on the Job Template tab
click +ADD
and enter the following values for the job template

Step 11. Add the following values to the EXTRA VARIABLE field
sat6_ip: $HOST_IP_ADDR
sat6_fqdn: $HOST_FQDN
admin_user: admin
org: redhat
loc: nyc
hostgroup: false
activationkey: ak-Reg_To_Library_soe_no_puppet

Make sure you create a password in the /roles/sat6register/group_vars/all/vault file as it will be looked up by /roles/sat6register/group_vars/all/vars file containing admin_pass: “{{ vault_admin_pass}}”.
You also find instructions on how to do this here:

Make sure that the box Prompt on launch is checked. This is very important as if you don’t do this right you will NOT be able to override any extra_vars from CloudForms when executing the job template.
. We are now done with the Ansible Tower setup. Let’s go to part 2 which will explain howto setup CloudForms to execute this Job Template.

Posted in ansible, CloudForms, Puppet | Tagged , , | Leave a comment

RHV 4.0 / RHEV 4.0 Dynamic Inventory For Ansible Tower

Out of the box Ansible Tower 3.0.2 does not come with the Red Hat Virtualization 4.0 provider. You will find the instructions here to get it working:

Step 1: SSH into the ansible tower

[dobby@dobby ~]$ ssh

Step 2: Install ovirt-engine-sdk-python

[root@towerldo ~]# yum install ovirt-engine-sdk-python

Step 3: cd into /opt/rh and get the ovirt.ini file

[root@towerldo ~]# cd /opt/rh
[root@towerldo ~]# wget

Step 4: Edit the values in /opt/rh/ovirt.ini with your correct RHV4 url (the path after your FQDN is “ovirt-engine/api” and password for the admin user

[root@towerldo ~]# cat /opt/rh/ovirt.ini
# Ansible RHV ini file
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# Ansible is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with Ansible.  If not, see .

# Author: Laurent Domb  based on Josha Inglis  ovirt.ini for ovirt 3.6 and the gce.ini by Eric Johnson

# ovirt Service Account configuration information can be stored in the
# libcloud '' file. Ideally, the '' file will already
# exist in your PYTHONPATH and be picked up automatically with an import
# statement in the inventory script. However, you can specify an absolute
# path to the file with 'libcloud_secrets' parameter.
ovirt_api_secrets =

# If you are not going to use a '' file, you can set the necessary
# authorization parameters here.
ovirt_url =
ovirt_username = admin@internal
ovirt_password = iloveopensource

Step 5. Now login into ansible tower as privileged user who is allowed to add an inventory.


Step 6. Got to Settings
Inventory Scripts

And click on “Create a new custom inventory”

Step 7. Add a name

Step 8. For the Custom Script get the and paste the content into the field

and click save

Step 9. click on inventories
and add

Step 10. In new inventory enter a name for you new RHV4 inventory
and hit save
You will get redirected to the groups page where you create new group (+ ADD GROUP).

Step 11. For inventory choose custom script and add the script we added in step 7 under Custom Inventory Script

Step 12. Once saved go back to the inventories tab and click on you new inventory

Step 13. You can new sync your new inventory by pressing the sync button

Step 14. If everything goes well you should see something like

Posted in ansible | Tagged , , | Leave a comment

CloudForms the Swiss army knife of Hybrid Cloud Management

Today a dream came true for me by getting the honor to present at Red Hat Summit in SF 2016 “Automation and configuration management across hybrid clouds with CloudForms, Satellite6 and Ansible Tower“. When I joined Trivadis in 2006 Daniel Steiner who was a Senior Linux Engineer took me under his wings (He had earned a Red Hat Fedora when he passed his RHCE before 2006) I told him that one day I will be speaking at Red Hat Summit. So today is that day. My gratitude goes to him for inspiring me to go down this path.

I am posting my slide deck as well as the 2 videos so that you can review the potential of the Red Hat management suite.

Red Hat CloudForms made huge progress in the last few releases. As you may know we added an Azure provider in 4.0 and now a Google Compute Provider in 4.1. As a bonus we also have integration into Ansible Tower which makes automation a whole lot easier. Having Google as a provider is great as we now can triage application (OpenShift Dedicated, Puppet, Ansible) and instance provisioning between the 3 major cloud providers Google, Azure and AWS.

On top of that you are now able to use Satellite 6 and Ansible Tower for configuration management. This opens unlimited possibilities in terms of system and application configuration management as you can provision on premise or off premise across hybrid clouds and run the same configuration management role/class/container stack everywhere you go.

My talk at Summit shows the above but more importantly on how CloudForms, Satellite 6, and Ansible Tower integrate with each other and what you can do with it. That said with a CMP that integrates automation/orchestration and configuration management/content management the “sky” is the limit.

Other improvements are highlighted by Lucy Kerner she shows the capability of doing scap scans on VM’s and re mediating the non compliant configurations via CloudForms Ansible Tower and Satellite 6. Compliance, security automation, and remediation with Red Hat CloudForms, Red Hat Satellite, and Ansible Tower by Red Hat

Here is my presentation Automation and configuration management across hybrid clouds with Red Hat CloudForms, Red Hat Satellite 6, and Ansible Tower by Red Hat


Sources: (Satellite 6 CI/CD) (CloudForms CI/CD) (puppet modules + cloud init)

Posted in ansible, Cloud, CloudForms, Openstack, Puppet | Tagged , , , , | Leave a comment

CloudForms Hybrid Cloud Sessions at Red Hat Summit SF 2016

Please join us at Red Hat Summit in SF and attend the sessions below. Those sessions highlight how versatile CloudForms is and what problems it can solve for you.
Red Hat Summit pass discounted rate of $1,195: RHSRAF

Tuesday, 10:15am
Enabling digital transformation via the Red Hat management portfolio
Alessandro Perilli, Red Hat
Joe Fitzgerald, Red Hat
William Nix, Red Hat

Tuesday, 3:30pm
Red Hat Cloud roadmap

James Labocki, Red Hat
Rob Young – Principal Product Manager, Red Hat
Xavier Lecauchois, Red Hat

Tuesday, 3:30pm
Red Hat containers roadmap
Mike McGrath – Managing Architect, Platform, Red Hat
Xavier Lecauchois, Red Hat
Sayan Saha – Sr. Manager, Product Management, Red Hat
Stephen Gordon, Red Hat
Ben Breard – Technology Product Manager, Red Hat
Joe Fernandes – Senior Director of Product Management, Red Hat
Rich Sharples – Senior Director of Product Management, Red Hat

Wednesday, 11:30am
Red Hat CloudForms 2016 roadmap
Scott Drennan – Product Manager, Nuage Networks
Eric Johnson, Google
John Hardy, Red Hat

Wednesday, 4:45pm
Automating Azure public and private clouds with Red Hat CloudForms 4
Jason Ritenour, Red Hat

Wednesday, 4:45pm
Automation and configuration management across hybrid clouds with Red Hat CloudForms, Red Hat Satellite 6, and Ansible Tower by Red Hat
Laurent Domb – Sr. Cloud Solutions Architect, Red Hat
John Hoffer, Red Hat
Mike Dahlgren – Red Hat Solutions Architect, Red Hat

Thursday, 10:15am
Red Hat CloudForms: Cutting VM creation time by 75% at General Mills
Ashley Nelson, General Mills
Mike Dahlgren – Red Hat Solutions Architect, Red Hat

Thursday, 11:30am
Continuous integration with Red Hat cloud solutions
Oded Ramraz, Red Hat
Sim Zacks, Red Hat

Thursday, 3:30pm
Compliance, security automation, and remediation with Red Hat CloudForms, Red Hat Satellite, and Ansible Tower by Red Hat
Matthew Micene – Solution Architect, DLT Solutions
Lucy Kerner – Senior Cloud Solutions Architect, Red Hat

Thursday, 4:45pm
OpenShift advanced management with Red Hat CloudForms
Itamar Heim, Red Hat
Federico Simoncelli – Associate Manager, Red Hat

Book Signing
Thursday, 11:15am – North Upper Lobby
Mastering CloudForms Automation
Peter McGowan

Posted in ansible, Cloud, CloudForms, Openstack, Puppet | Leave a comment

Build a RHEL Cloud Image for GCE

This is a brief tutorial on how you can create a Red Hat Enterprise Linux cloud image for Googles Compute Engine. These instructions are meant for a Linux hosts which runs KVM.

1. Download the GCE Tools google-cloud-sdk so you can create and upload the future image. You will need to have internet connection as the tool will comunicate with GCE’s api.

2. Untar the Google cloud SDK

[root@host191 ~]# tar -xzvf google-cloud-sdk-112.0.0-linux-x86_64.tar.gz
[root@host191 ~]# cd google-cloud-sdk/

3. Install the SDK. You will need to be able to communicate to the outside world here as well as visit a website

[root@host191 ~]#  ./

4. Once installed build your linux VM. Create a qcow2 disk. You will have to convert the disk later on to raw format.

[root@host191 ~]# qemu-img create -f qcow2 /var/lib/libvirt/images/gce.qcow2 10G

5. Follow:
Google also supports meta data service so you can install cloud-init as well which you can find in the rhel-7-server-rh-common-rpms. Once your done you can shutdown your vm and convert it into raw. IMPORTANT, the name of your disk needs to be disk.raw .

6. Convert the image to raw. The image needs to be named disk.raw

[root@host191 ~]#  qemu-img convert -f qcow2 -O raw gce.qcow2 disk.raw

7. Tar it up.

[root@host191 ~]#  tar -Sczf gcerhel7.tar.gz disk.raw

8. If there is no data store create one. Rhelimages is my datastore name

[root@host191 ~]# ./gsutil mb gs://rhelimages/

9. Upload the tarball to the gce storage

[root@host191 ~]# ./gsutil cp /var/lib/libvirt/images/gcerhel7.tar.gz gs://rhelimages/

10. Create the compute image. Once done you will be able to create GCE compute instances from that image.

[root@host191 ~]#  ./gcloud compute images create rhel7-custom-amd64 --source-uri gs://rhelimages/gcerhel7.tar.gz
Posted in Cloud, CloudForms, Linux | Tagged , , | Leave a comment

A Recipe to Build a Successful Cloud Environment: Stop Thinking Legacy, Think Cloud!

The awesome Narendra Narang and myself got invited to speak as alternate speakers at OpenStack Summit in Austin 2016. Unfortunately nobody backed out and we were not able to present our talk about building a successful cloud environment. Attached find our presentation. The presentation will walk you through the journey of what you will have to think of and what you will have to prepare for to get to a successful cloud environment.

Posted in Cloud | Leave a comment

CloudForms sample provisioning, metrics collection and events workflows

Recently I had a customer asking about how our solutions suite works and what we can do with it. RedHat for me is one of the only companies in the world who can pretty much deliver the full stack from infrastructure up to application and back. With RHEL OSP8 we even include OpenDaylight which means we now cover the network as well. So where does CloudForms fit in and how does it integrate with the rest of the suite like Satellite6, Ansible, OpenShift, OpenStack, RHEV, VMWare, SCVMM, Aamazon Ec2, Azure?

The next 3 diagrams walk you through a sample provisioning workflow on how CloudForms interacts with the different components, as well as a high level overview of metrics collection and the events mechanism.

Sample Provisioning Workflow
General Provisoining workflow

Metrics Collection High Level Diagram
metrics highlevel workflow

Events Collection High Level Diagram
events workflow

Posted in CloudForms | Tagged , , , | Leave a comment

Red Hat Summit San Francisco 2016 here we come

This June 26-28, 2016 Mike Dahlgren and I will speak at Red Hat summit in San Francisco. The topic is:

Automation and configuration management across hybrid clouds with CloudForms, Satellite6 and Ansible Tower

Have you ever wondered what you need to be able to automate and orchestrate you data centers as well as cloud environments? Did you start your configuration management and orchestration projects and you realized you were thinking to small and underestimated the effort for cultural change in the company? This talk will take you on a journey of how you need to think and what tools Red Hat is providing to build a successful automation suite with CloudForms, Satellite6 and Ansible Tower. The talk will showcase examples and integration’s between CloudForms, Satellite6 and Ansible Tower and will give you advice on how to motivate your dev and ops teams to work together and change mindsets.

Posted in CloudForms, Linux, Openstack, Puppet | Tagged | Leave a comment

CloudForms smart state analysis preparation for VSphere 6.0

In the past we used the VMware-vix-disklib-5.5.2-1890828.x86_64.tar.gz for VSphere 5.5 which was pretty easy to install. VMWare included a script called which did all the work for you. In 6.0 the script is gone.

Attached find the steps to get it working with CloudForms 4 and VSphere 6.
You can find the VDDK 6.0 here:

1 Copy the downloaded file VMware-vix-disklib-6.0.0-2498720.x86_64.tar.gz to /tmp on the appliance.
2. Untar the VMware-vix-disklib-6.0.0-2498720.x86_64.tar.gz

[root@miq ~] tar -xzvf VMware-vix-disklib-6.0.0-2498720.x86_64.tar.gz

3. Create the directory /usr/lib/vmware-vix-disklib

[root@miq ~] mkdir -p /usr/lib/vmware-vix-disklib

4. Move the following directories and their contents into /usr/lib/vmware-vix-disklib:
bin64, include, lib64

[root@miq ~] mv /tmp/vmware-vix-disklib-distrib/bin64 /usr/lib/vmware-vix-disklib/
[root@miq ~] mv /tmp/vmware-vix-disklib-distrib/lib64 /usr/lib/vmware-vix-disklib/
[root@miq ~] mv /tmp/vmware-vix-disklib-distrib/include /usr/lib/vmware-vix-disklib/

5. Create symlinks to the libvixdiskLib so that introspection will work.

[root@miq ~] ln -s /usr/lib/vmware-vix-disklib/lib64/ /usr/lib/
[root@miq ~] ln -s /usr/lib/vmware-vix-disklib/lib64/ /usr/lib/

6. Load the libs

[root@miq ~] ldconfig
[root@miq ~] ldconfig -p | grep vix
[root@miq ~] reboot
Posted in CloudForms | Leave a comment