Loading...

Follow Red Hat CloudForms on Feedspot

Continue with Google
Continue with Facebook
or

Valid

Ansible continues to grow and is the strategic automation engine for Red Hat’s business. Having a solid and constantly improving integration with Ansible is key for CloudForms’ future success.

Ansible Tower Workflows are widely used in by the industry to orchestrate and govern interactions between different playbooks. CloudForms has been able to run Ansible Tower Jobs since its 4.1 release. Starting with CloudForms 4.7, we will expand this support and will be able to utilize Workflows from the Service Catalog.

Setup

CloudForms is using the concept of Providers, to integrate with other systems. Each Provider integration takes care of building and maintaining an up to date inventory, executing operational tasks, listening to events, and some also support features like Metric Collection or more.

The existing Ansible Tower Provider was extended to include existing Workflows into the inventory. If an Ansible Tower Provider was already configured, CloudForms will automatically add the Workflows to its inventory, after the Upgrade to 4.7 was successfully rolled out. Instructions on how to upgrade CloudForms to 4.7, can be found in the Migrating to Red Hat CloudForms 4.7 guide.

Adding a new Ansible Tower Provider is very simple. Navigate to “Automation”, “Ansible Tower”, “Explorer” and click on “Configuration”, “Add a new Provider”.

Workflows have been introduced with Ansible Tower 3.1. Instructions on how to create and use Workflows can be found in the Ansible Tower Documentation.

Ansible Tower Workflows

After the inventory was updated in CloudForms, Ansible Tower Workflows can be found in “Automation”, “Ansible Tower”, “Explorer” and by clicking on “Templates”.

The new “Type” column will help to separate Workflows from regular Jobs. After clicking on a Workflow, a Detail page will give additional information.

Service Dialogs and Catalogs

From this page, a Service Dialog for the currently selected Workflow can be automatically generated. The Service Dialog will automatically be populated with all extra_var and survey fields. To verify the result or customize the Service Dialog to make it more user-friendly, navigate to “Automation”, “Automate”, “Customization” and “Service Dialogs” in the accordion on the left.

NOTE: Ansible Tower Workflows do not support the “limit” parameter. Since different Jobs in a Workflow can potentially point to different inventories, a “limit” might break a Workflow and is therefore currently not support.

When creating a Service Catalog item select the Ansible Tower Provider and from the list of the “Ansible Tower Templates” the appropriate Workflow. Note the new section “Workflow Templates” at the end of the drop-down list.  

Instructions on how to build a Service Catalog with some examples to get you started, have already been provided in the post Service Catalogs and the User Self-Service Portal.

Job Output

With the embedded Ansible capabilities of CloudForms it was already possible to get the output of a Job in the “My Services”, “Jobs” tab. Starting with CloudForms 4.7, this will also work for Jobs running on Ansible Tower.

After ordering a Service Catalog Item which is using an Ansible Tower Job Template, a new “My Service” Object is created (Navigate to “Services”, “My Services” to find them). Click on the just created object to see some metadata of the Job. Click on the “Jobs” tab to get more details, including start and runtime and the Job output.

The Job Output can be found on the bottom of the Jobs page.

Workflows, variables and limits

Since Workflows are a features CloudForms inherits from Ansible Tower, there are some concepts which have to be kept in mind as well.

Extra Variables and Surveys

Ansible allows the use of variables, which can be defined in many different ways, including the Playbook itself, a role, the environment or in Ansible Tower. Ansible Tower can use Surveys to build a form asking for those variable values when running a Job. When using CloudForms’ Service Catalog features combined with Ansible Tower, a Service Dialog can be created to build an intuitive and user-friendly interface.

When running an Ansible Tower Workflow, all Extra Variables are sent to all subsequent Jobs. For example, if a Workflow has three Jobs (job1, job2, job3) and there are three variables (var1, var2, var3), all three variables are sent to all jobs. It is possible to set a variable to be used in a specific job only.

While this is not really a problem, it’s something to keep in mind, for example by avoiding duplicate variable names in multiple Jobs.

Limits

To run an Ansible Playbook, an inventory has to be used to tell Ansible which endpoints to use and how to access them. Sometimes an Ansible Playbook only has to run on a subset of the inventory. Limits allow the user to use the same inventory but filter out a subgroup of systems.

CloudForms is using this feature when running an Ansible Playbook from a button assigned to a Virtual Machine.

Ansible Tower Workflows do not support the “limit” option though. Potentially a workflow can have many Jobs with different inventories (e.g. run a sub job on the storage, a sub job on the network and a sub job on some servers, each using different inventories). A limit parameter would potentially break this Workflow (e.g. if the limit would be a specific Virtual Machine, the network and storage jobs would fail).

Read Full Article
  • Show original
  • .
  • Share
  • .
  • Favorite
  • .
  • Email
  • .
  • Add Tags 

Red Hat Cloudforms provides several ways to customize virtual machine provisioning,  the out-of-the-box VM Provisioning State Machine has multiple steps through which VM provisioning request crawl, among them one of the step is PostProvison, this step is used to perform post-provisioning activities on the provisioned virtual system.  In this article, I will explain how to customize PostProvison method using an example of ‘add an additional disk to the VM’ use case.

Use case

VMWare Template from which virtual machines suppose to be provisioned has two disks attached, we would like to use this template to provision virtual machine but with an option to ask users if they would like to add an additional disk to the provisioned virtual machine, if the user opts for the option, he should also be able to set the size for the additional disk.

Upon successful VM provisioning, there should be total of three disks attached to the virtual machine, the third disk size is chosen by the user.

Implementing the use case


In order to implement this use case, several modifications and customizations are needed,    Here is the list of actions that need to be performed.

  1. Create a Service Catalog with an option for end users to choose if an additional disk to be attached the provisioned virtual machine or not, if selected yes, prompt to enter the disk size.
  2. Create a method either in Ruby or Ansible Playbook which will add an additional disk to provisioned vm.
  3. Extend the default provisioning state machine and add that method as part of statemachine.

Lets see step by step procedure of implementing the same.

STEP 1: DIALOG CREATION

 

In order to create a service catalog, first, you need to create service dialog by navigating to  Automation -> Automate -> Customization -> Service Dialog.

In this dialog, the end user will enter the vm name, size of disk (in gb) and check additional disk required checkbox, if checkbox is not checked than it will not add an  additional disk.

Things need to be considered while passing dialog information:

a) VM Name: this information is passed so that newly provisioned vm should be of the same name that is being passed by an end user. This is letting us assign names to VMs at provisioning time.

Here the Label can be anything but the Name should be “vm_name”. The reason for that is vm_name, which is key_name recognized by the CatalogItemInitialization.

 b)  Size of Disk: In this box, the end user needs to pass the disk size in GB.

Here, Label is for the end user visibility but we should be concerned with the value passed in the Name box. This value is used further in our ruby method.

c) Additional Disk required: This is a checkbox if is being marked by end user than only new additional disk would be added else it will skip the request.

Again,  Label is for end user visibility but we should be concerned with value passed in Name box. This value is  further used in our ruby method.

Once Dialog is prepared, Lets got to next step i.e. creation of ruby method.

STEP 2: METHOD CREATION

A Ruby method has been created which will add a disk to the newly provisioned vm.

In the above method, the VM information is fetched from the “prov” object which is persistent till the provisioning get completed. Prov object could be provisioning request, provisioning task or template object i.e.

prov=$evm.root['miq_provision_request'] $evm.root['miq_provision'] $evm.root['miq_provision_request_template']

It’s a $evm.root which make the value persistent so to transit the value from one state to another state in the provisioning state machine.

Now to add an additional disk in the newly provisioned vm, for that you can find the vm object from prov object as this object has associations to other objects which are defined in the automate service models (“vmdb/lib/miq_automation_engine/service_models”)

For example, in our method we find the vm object as

Vm = prov.vm (vm has direct association with prov object as defined in automate model)

It will first validate if “additional disk required” is checked or not. For that, first we need to fetch the dialog value for “check_additonal_disk” like below:

additional_disk = prov.get_option(:dialog_check_additional_disk)

It will return the output either in t or f if its “t” it is checked or if it is “f”  it is not checked.

 If it is checked, then add disk method will be executed.

To add an additional disk, “addDisk” method has been used with VM object. This method expects below  parameters so to get it executed i.e.

  • Storage_name
  • Size in mb
  • Optional values like:
  • Dependent Disk
  • Thin provisioned

In above method,, I  fetched the size information value dynamically from end users i.e.

size = prov.get_option(:dialog_size).to_i

 

During service dialog creation, the name value for disk size is “size” and tot value we need to prefix with dialog that’s why it is fetched as dialog_size.

And storage name is chosen the same where vm resides i.e. vm.storage_name.

Once the method created, you can validate it. If validate successfully, then save it and create an instance for your add_disk method, just like below:

After Instance Creation, Next step is to Extend the Provisioning state machine.

STEP 3: EXTENDING STATE MACHINE

The first thing that we must do is copy the ManageIQ/Infrastructure/VM/Provisioning/StateMachines/VMProvision_VM/Provision VM from Template (template) state machine instance into our own custom domain so that we can edit the schema.

Now we edit the schema of the copied class:

Add the new states i.e. AddDisk. Make sure it is added after Post provision state so that VM should be provisioned before adding an additional disk.

STEP 4. Add Our New Instance to the Copied State Machine

Now we edit our copied Provision VM from Template state machine instance to add the AddDisk instance URIs to the appropriate steps (see Adding the instance URIs to the provisioning state machine).

.

STEP 5:  Order a Service Catalog so to provision new vm with additional disk.

Read Full Article
  • Show original
  • .
  • Share
  • .
  • Favorite
  • .
  • Email
  • .
  • Add Tags 

Download this Summit Quick Reference Guide for CloudForms for a complete list of CloudForms sessions and labs at Red Hat Summit 2019.

A few highlights:

Hybrid cloud management strategies and best practices
Learn how Red Hat’s hybrid cloud management strategy is evolving to address customer needs. Hear how traditional management products, such as Red Hat Satellite and Red Hat CloudForms are being connected with Red Hat Ansible Tower and new SaaS solutions to provide customers with comprehensive and flexible hybrid cloud management options.

Hybrid cloud cost management challenges, opportunities, and best practices
In this session, we’ll talk about tools and best practices to discover, report, and analyze the cost and consumption of public and private cloud resources today and lay the groundwork for automated optimization of resource consumption and application priorities.

Word Wide Technology (WWT) bare metal provisioning solution
Learn how to control bare metal resources by leveraging Redfish in Ansible playbooks.

LAB: Private cloud lab with OpenStack, Ansible, and CloudForms
Get some hands-on experience with a private cloud based on Red Hat OpenStack, Ansible Tower and CloudForms.

And a lot of our Product Managers and Engineers will be in attendance.  Stop by the demo station for “Hybrid Cloud Management” in the Red Hat booth, or reach out to your sales rep to schedule a meeting in the Customer Briefing Center.

Hope to see you in Boston!

Read Full Article
  • Show original
  • .
  • Share
  • .
  • Favorite
  • .
  • Email
  • .
  • Add Tags 

Red Hat Cloudforms provides several ways to customize virtual machine provisioning,  the out-of-the-box VM Provisioning State Machine has multiple steps through which VM provisioning request crawl, among them one of the step is PostProvison, this step is used to perform post-provisioning activities on the provisioned virtual system.  In this article, I will explain how to customize PostProvison method using an example of ‘add an additional disk to the VM’ use case.

Use case

VMWare Template from which virtual machines suppose to be provisioned has two disks attached, we would like to use this template to provision virtual machine but with an option to ask users if they would like to add an additional disk to the provisioned virtual machine, if the user opts for the option, he should also be able to set the size for the additional disk.

Upon successful VM provisioning, there should be total of three disks attached to the virtual machine, the third disk size is chosen by the user.

Implementing the use case


In order to implement this use case, several modifications and customizations are needed,    Here is the list of actions that need to be performed.

  1. Create a Service Catalog with an option for end users to choose if an additional disk to be attached the provisioned virtual machine or not, if selected yes, prompt to enter the disk size.
  2. Create a method either in Ruby or Ansible Playbook which will add an additional disk to provisioned vm.
  3. Extend the default provisioning state machine and add that method as part of statemachine.

Lets see step by step procedure of implementing the same.

STEP 1: DIALOG CREATION

 

In order to create a service catalog, first, you need to create service dialog by navigating to  Automation -> Automate -> Customization -> Service Dialog.

In this dialog, the end user will enter the vm name, size of disk (in gb) and check additional disk required checkbox, if checkbox is not checked than it will not add an  additional disk.

Things need to be considered while passing dialog information:

a) VM Name: this information is passed so that newly provisioned vm should be of the same name that is being passed by an end user. This is letting us assign names to VMs at provisioning time.

Here the Label can be anything but the Name should be “vm_name”. The reason for that is vm_name, which is key_name recognized by the CatalogItemInitialization.

 b)  Size of Disk: In this box, the end user needs to pass the disk size in GB.

Here, Label is for the end user visibility but we should be concerned with the value passed in the Name box. This value is used further in our ruby method.

c) Additional Disk required: This is a checkbox if is being marked by end user than only new additional disk would be added else it will skip the request.

Again,  Label is for end user visibility but we should be concerned with value passed in Name box. This value is  further used in our ruby method.

Once Dialog is prepared, Lets got to next step i.e. creation of ruby method.

STEP 2: METHOD CREATION

A Ruby method has been created which will add a disk to the newly provisioned vm.

In the above method, the VM information is fetched from the “prov” object which is persistent till the provisioning get completed. Prov object could be provisioning request, provisioning task or template object i.e.

prov=$evm.root['miq_provision_request'] $evm.root['miq_provision'] $evm.root['miq_provision_request_template']

It’s a $evm.root which make the value persistent so to transit the value from one state to another state in the provisioning state machine.

Now to add an additional disk in the newly provisioned vm, for that you can find the vm object from prov object as this object has associations to other objects which are defined in the automate service models (“vmdb/lib/miq_automation_engine/service_models”)

For example, in our method we find the vm object as

Vm = prov.vm (vm has direct association with prov object as defined in automate model)

It will first validate if “additional disk required” is checked or not. For that, first we need to fetch the dialog value for “check_additonal_disk” like below:

additional_disk = prov.get_option(:dialog_check_additional_disk)

It will return the output either in t or f if its “t” it is checked or if it is “f”  it is not checked.

 If it is checked, then add disk method will be executed.

To add an additional disk, “addDisk” method has been used with VM object. This method expects below  parameters so to get it executed i.e.

  • Storage_name
  • Size in mb
  • Optional values like:
  • Dependent Disk
  • Thin provisioned

In above method,, I  fetched the size information value dynamically from end users i.e.

size = prov.get_option(:dialog_size).to_i

 

During service dialog creation, the name value for disk size is “size” and tot value we need to prefix with dialog that’s why it is fetched as dialog_size.

And storage name is chosen the same where vm resides i.e. vm.storage_name.

Once the method created, you can validate it. If validate successfully, then save it and create an instance for your add_disk method, just like below:

After Instance Creation, Next step is to Extend the Provisioning state machine.

STEP 3: EXTENDING STATE MACHINE

The first thing that we must do is copy the ManageIQ/Infrastructure/VM/Provisioning/StateMachines/VMProvision_VM/Provision VM from Template (template) state machine instance into our own custom domain so that we can edit the schema.

Now we edit the schema of the copied class:

Add the new states i.e. AddDisk. Make sure it is added after Post provision state so that VM should be provisioned before adding an additional disk.

STEP 4. Add Our New Instance to the Copied State Machine

Now we edit our copied Provision VM from Template state machine instance to add the AddDisk instance URIs to the appropriate steps (see Adding the instance URIs to the provisioning state machine).

.

STEP 5:  Order a Service Catalog so to provision new vm with additional disk.

Read Full Article
  • Show original
  • .
  • Share
  • .
  • Favorite
  • .
  • Email
  • .
  • Add Tags 

Download this Summit Quick Reference Guide for CloudForms for a complete list of CloudForms sessions and labs at Red Hat Summit 2019.

A few highlights:

Hybrid cloud management strategies and best practices
Learn how Red Hat’s hybrid cloud management strategy is evolving to address customer needs. Hear how traditional management products, such as Red Hat Satellite and Red Hat CloudForms are being connected with Red Hat Ansible Tower and new SaaS solutions to provide customers with comprehensive and flexible hybrid cloud management options.

Hybrid cloud cost management challenges, opportunities, and best practices
In this session, we’ll talk about tools and best practices to discover, report, and analyze the cost and consumption of public and private cloud resources today and lay the groundwork for automated optimization of resource consumption and application priorities.

Word Wide Technology (WWT) bare metal provisioning solution
Learn how to control bare metal resources by leveraging Redfish in Ansible playbooks.

LAB: Private cloud lab with OpenStack, Ansible, and CloudForms
Get some hands-on experience with a private cloud based on Red Hat OpenStack, Ansible Tower and CloudForms.

Hope to see you in Boston!

Read Full Article
  • Show original
  • .
  • Share
  • .
  • Favorite
  • .
  • Email
  • .
  • Add Tags 
Red Hat CloudForms by Victor Estival Lopez - 1M ago

Wow! We can’t believe it’s almost time for another exciting Red Hat Summit!

This year, aside from all the super interesting sessions we usually have, please, take a look at our keynote speakers! Satya Nadella, Microsoft CEO will be on stage with Jim

This year it will be in Boston, MA  from May 7 until May 9

Red Hat Summit 2019 is at the Boston Convention and Exhibition Center.

415 Summer St
Boston, MA 02210

You can find more information here https://www.redhat.com/en/summit/2019

Read Full Article
  • Show original
  • .
  • Share
  • .
  • Favorite
  • .
  • Email
  • .
  • Add Tags 
Red Hat CloudForms by Victor Estival Lopez - 1M ago

Wow! We can’t believe it’s almost time for another exciting Red Hat Summit!

This year, aside from all the super interesting sessions we usually have, please, take a look at our keynote speakers! Satya Nadella, Microsoft CEO will be on stage with Jim

This year it will be in Boston, MA  from May 7 until May 9

Red Hat Summit 2019 is at the Boston Convention and Exhibition Center.

415 Summer St
Boston, MA 02210

You can find more information here https://www.redhat.com/en/summit/2019

Read Full Article
  • Show original
  • .
  • Share
  • .
  • Favorite
  • .
  • Email
  • .
  • Add Tags 
Red Hat CloudForms by Victor Estival Lopez - 2M ago

CloudForms 4.7 is ready to be deployed on your systems, you can find more information in the Press Release and you can download the packages from the official Red Hat site

It provides the following key enhancements:

  • Improved Ansible Tower Integration: support for Workflows as a Catalog Item, support for Organization Structure.
  • Updates for managing OpenStack platforms: Storage refresh improvement, OverCloud Dashboard, Private Key Download.
  • Additional management capabilities for Red Hat Virtualization: Refresh performance improvements, Dynamic Sysprep support.
  • User Experience Enhancement: Multi-appliance configuration sharing, global region reporting tenants with the same name.
  • Lenovo Xclarity update: Inventory of racks, blades, chassis and switches, topology updates better handling of status, out-of-the-box dashboard.
  • New Provider: Redfish compliant standard hardware can be discovered and inventoried. Detailed views and relationships. Power operations and topology views. Tech preview
  • New provider for Nuage, which gives the ability to manage its networking services from CloudForms
Read Full Article
  • Show original
  • .
  • Share
  • .
  • Favorite
  • .
  • Email
  • .
  • Add Tags 
Red Hat CloudForms by Victor Estival Lopez - 4M ago

CloudForms 4.7 is ready to be deployed on your systems, you can find more information in the Press Release and you can download the packages from the official Red Hat site

It provides the following key enhancements:

  • Improved Ansible Tower Integration: support for Workflows as a Catalog Item, support for Organization Structure.
  • Updates for managing OpenStack platforms: Storage refresh improvement, OverCloud Dashboard, Private Key Download.
  • Additional management capabilities for Red Hat Virtualization: Refresh performance improvements, Dynamic Sysprep support.
  • User Experience Enhancement: Multi-appliance configuration sharing, global region reporting tenants with the same name.
  • Lenovo Xclarity update: Inventory of racks, blades, chassis and switches, topology updates better handling of status, out-of-the-box dashboard.
  • New Provider: Redfish compliant standard hardware can be discovered and inventoried. Detailed views and relationships. Power operations and topology views. Tech preview
  • New provider for Nuage, which gives the ability to manage its networking services from CloudForms
Read Full Article
  • Show original
  • .
  • Share
  • .
  • Favorite
  • .
  • Email
  • .
  • Add Tags 
Red Hat CloudForms by Victor Estival Lopez - 4M ago

The CloudForms team is proud to announce the release of CloudForms 4.7 Beta1. Based on the ManageIQ Hammer release, this release contains several enhancements and bug fixes and is the result of about many months of upstream development.

Some of the notable enhancements include:

  • Ansible improvements, including integration with external Ansible Tower workflows.
  • Enhancements in OpenStack: new Dashboard and the ability to discover OpenStack Director Providers
  • New provider for Nuage, which gives the ability to manage its services from CloudForms
  • New provider for Red Fish (Tech Preview) that allows managing physical services in a similar way as we manage virtual machines
  • Improvements in the Lenovo providers, like rack topology or Ansible playbook execution against physical resources

For more details and a list of all other improvements see the release notes.

We’d like to encourage all of our customers to download the beta from access.redhat.com and to try it out. Any issues can be reported by opening a case with Red Hat support.

Read Full Article

Read for later

Articles marked as Favorite are saved for later viewing.
close
  • Show original
  • .
  • Share
  • .
  • Favorite
  • .
  • Email
  • .
  • Add Tags 

Separate tags by commas
To access this feature, please upgrade your account.
Start your free month
Free Preview