Author: Meng Jie Min (Meng.Jie.Min@ibm.com)
This blog provides best practices on how to configure IBM® Cloud Pak® for AIOps’s infrastructure management for consumption-based chargeback via the integration with IBM Cloud Infrastructure Center.
Objective
Cloud Infrastructure Center can integrate with the ‘infrastructure automation’ component of Cloud Pak for AIOps to provide support for chargeback, based on a consumption model.
The consumption model is based on the used resources to a virtual machine (VM), such as the number of CPUs, memory, and network. After Cloud Infrastructure Center is integrated with the ‘infrastructure automation’ component of Cloud Pak for AIOps, the chargeback report of Cloud Infrastructure Center with the used resources can be generated and managed on the chargeback dashboard of the Cloud Pak for AIOps console.
You can use the chargeback dashboard of the Cloud Pak for AIOps console to view and manage the chargeback cost. The chargeback feature enables to calculate VM charges based on provider or tenant (project).
Terminologies
· IBM Cloud Pak for AIOps: Cloud Pak for AIOps is an IT operations management solution that lets IT operators place AI at the core of their IT operation toolchain. It includes a component named ‘infrastructure automation’, which includes components from IBM Cloud Pack for Multi-cloud Management.
· Infrastructure Automation: Infrastructure automation is included in Cloud Pak for AIOps. ‘Infrastructure automation’ consists of these components from Cloud Pak for Multi-cloud Management:
o Infrastructure management, previously called Red Hat CloudForms.
o Managed services, previously called Terraform & Service Automation or IBM Cloud Automation Manager.
Environment
· IBM Cloud Infrastructure Center version 1.2.1 or above
· IBM Cloud Park for AIOps version 4.1.0 or above
Example
The steps in this example describe how an administrator generates a consumption-based chargeback report for KVM with Cloud Pak for AIOps and Cloud Infrastructure Center, for the 5 virtual machines in the ‘ibm-default project’ of Cloud Infrastructure Center.
![](https://dw1.s81c.com//IMWUC/MessageImages/c588b71f0e1445be8601b93aa97b5dfb.png)
For more information about managing projects in Cloud Infrastructure Center, refer to Managing projects.
Prerequisite:
· Make sure that you turn on the monitoring data collection for collecting the metering on Cloud Infrastructure Center. For more information refer to enabling and disabling monitoring services.
Steps:
1. Open ‘Infrastructure management’ of Cloud Pak for AIOps
a. Login to Cloud Pak for AIOps and browse to ‘Menu’.
![](https://dw1.s81c.com//IMWUC/MessageImages/8a64500d7eaf41dab0ba1a32d1307c94.png)
b. On the menu click ‘Automate Infrastructure’ > ‘Infrastructure management’.
![](https://dw1.s81c.com//IMWUC/MessageImages/3ee47a7f6ea7419f99925fdcb89fe733.png)
2. Add Cloud Infrastructure Center as a new Cloud Provider
a. On the left menu bar of ‘IBM Automation | Infrastructure Management’, click ‘Compute’ > ‘Clouds’ > ‘Providers’.
![](https://dw1.s81c.com//IMWUC/MessageImages/632a4798a92d48b5a71726e6f5dd3774.png)
b. Click ‘Configuration’ > ‘Add a New Cloud Provider’.
![](https://dw1.s81c.com//IMWUC/MessageImages/9763815a1d0e4b72b43904b1786ff0be.png)
c. Fill the blanks with following attributes.
![](https://dw1.s81c.com//IMWUC/MessageImages/1d8052da81e84edb9e454ef90b1f8b56.png)
![](https://dw1.s81c.com//IMWUC/MessageImages/0e0bee6864fa4ece85eebbe2212392df.png)
i. Type: IBM Cloud Infrastructure Center
ii. Name: You can change based on preference
iii. Zone: default
iv. Provider Region: RegionOne
v. API Version: Keystone V3
vi. Domain ID: default
vii. Tenant Mapping Enabled: Switch to On
viii. Security Protocol: SSL without validation
ix. Hostname (for IPv4 or IPv6 address): IP or Hostname for Cloud Infrastructure Center
x. API Port: 5000
xi. Username and Password: Base on your Cloud Infrastructure Center
xii. Events Type: Disabled
Note: The ‘Username’ and ‘Password’ (credential to Cloud Infrastructure Center) is administrator of Cloud Infrastructure Center but not an administrator of a specified project. The administrator of Cloud Infrastructure Center is the default admin after installation (root) or new configured non-root user admin (for more information, refer to Non-root user authorization on Cloud Infrastructure Center). If LDAP is configured, it would be the initial admin on the LDAP (for more information, refer to Configuring LDAP). This administrator of Cloud Infrastructure Center can manage all projects. After the Cloud Provider is added, chargeback reports for different projects’ virtual machines of Cloud Infrastructure Center might be generated according to the report template chargeback filters (specified at Step 6).
d. Click ‘Validate’ and add the Cloud Provider after ‘Validation Successful’ shown in step c above.
![](https://dw1.s81c.com//IMWUC/MessageImages/7353dc20718b4454950f5c9bcfeeed2d.png)
e. It will take some time to synchronize data from Cloud Infrastructure Center.
![](https://dw1.s81c.com//IMWUC/MessageImages/e69e3f4aff7740b1be889615236e3d0f.png)
3. Enable the application settings for chargeback
a. Click ‘Settings’ > ‘Application Settings’.
![](https://dw1.s81c.com//IMWUC/MessageImages/9d0aa26fa374427b912812ae8f574214.png)
b. In the ‘IA: IM Region: Region 0 [0]’ section, choose ‘C & U Collection’ and enable ‘Collect for All Clusters’ in ‘Clusters’ and ‘Collect for All Datastores’ in Datastores. Click ‘Save’ button.
![](https://dw1.s81c.com//IMWUC/MessageImages/a5fd17e7ed9b4090a889aed9c00d092b.png)
Choose ‘Zones ’ > ‘Zone: Default Zone (current)’ > ‘Server: EVM[1] (current)’ and enable following in ‘Server Roles’:
i. ‘Capacity & Utilization Coordinator’
ii. ‘Capacity & Utilization Data Collector’
iii. ‘Capacity & Utilization Data Processor’
Click ‘Save’ button.
![](https://dw1.s81c.com//IMWUC/MessageImages/e4efaa08a75a462389c811b57309b801.png)
4. Create the chargeback rate for the consumption model
Note that chargeback report metrics include ‘allocated’ resources and ‘used’ resources. To use consumption model, you must have to set the rates for the ‘used’ CPU(s), memory, network I/O and disk storage not to zero. The rates for ‘’allocation’ CPU(s), memory and disk storage must set to zero.
a. Click ‘Overview’ > ‘Rates’.
![](https://dw1.s81c.com//IMWUC/MessageImages/4892c0c2dcd548ac96e55374b21f2e32.png)
b. Click ‘Configuration’ > ‘Add a new Chargeback Rate’.
![](https://dw1.s81c.com//IMWUC/MessageImages/28ce14df12e54c79bc92bd31663257d5.png)
c. Create a compute chargeback rate, select ‘Type’ > ‘Compute’. Click ‘Add’ button.
![](https://dw1.s81c.com//IMWUC/MessageImages/e34dc309f08044f69994c88aa8fc2244.png)
![](https://dw1.s81c.com//IMWUC/MessageImages/9a0ecb8c0057412f857ca56f8dcc7643.png)
d. Create a storage chargeback rate, select ‘Type’ > ‘Storage’. Click ‘Add’ button.
![](https://dw1.s81c.com//IMWUC/MessageImages/36765be8e5e44c26bed2df828bfd9ad9.png)
e. Check the compute chargeback rate and storage chargeback rate are added successfully.
![](https://dw1.s81c.com//IMWUC/MessageImages/3c288c3fc26740b7880172f1712d543a.png)
5. Assign the chargeback rate to the specific projects
a. Click ‘Overview’ > ‘Chargeback’ > ‘Assignments’.
![](https://dw1.s81c.com//IMWUC/MessageImages/42d7a8c1f7324e2d8d14427eef880b68.png)
b. Select ‘Compute’, assign to ‘Tenants’ and select ‘Rate’ for the project. Click ‘Save’.
![](https://dw1.s81c.com//IMWUC/MessageImages/7c2c4e3f5214437cbe8c69171be200f3.png)
c. Select ‘Storage’, assign to ‘Tenants’ and select ‘Rate’ for the project. Click ‘Save’.
![](https://dw1.s81c.com//IMWUC/MessageImages/ef9e77b6af794f97950bc2abd5c14425.png)
6. Create the chargeback report
a. Click ‘Overview’ > ‘Reports’.
![](https://dw1.s81c.com//IMWUC/MessageImages/d4edc1a48f12484c81ae5b093797f9e3.png)
b. Select ‘All Reports’ > ‘My Company (All Groups)’ > ‘Custom’. ![](https://dw1.s81c.com//IMWUC/MessageImages/8d98c4cf75924a9b8ba9a34e3e0936e6.png)
c. Click ‘Configuration’ > ‘Add a new report’.
![](https://dw1.s81c.com//IMWUC/MessageImages/9b1fa357483c4be9af1a0df2747d773c.png)
d. Fill the field of ‘Columns’ as needed.
![](https://dw1.s81c.com//IMWUC/MessageImages/08352ca542994448bd9210376bfa5515.png)
Note: In the `Selected Fields`, you can use following columns to generate consumption report:
i. CPU Total Cost
ii. CPU Used Cost
iii. CPU Used Rate
iv. CPU Used
v. Chargeback Rates
vi. Disk I/O Used Cost
vii. Disk I/O Used Rate
viii. Fixed Compute Metric
ix. Memory Used Cost
x. Memory Used Rate
xi. Memory Total Cost
xii. Network I/O Used Cost
xiii. Network I/O Used Rate
xiv. Network I/O Used
xv. Storage Total Cost
xvi. Storage Used Cost
xvii. Storage Used Rate
Storage Used
e. Fill the field of ‘Formatting’ as needed.
![](https://dw1.s81c.com//IMWUC/MessageImages/ba59963871094a13b92d33d6d24b3c64.png)
f. Fill the field of ‘Filter’ as needed.
![](https://dw1.s81c.com//IMWUC/MessageImages/f22b47628c91437aa4672b7429a20859.png)
g. Select ‘Preview’ to check the report and click ‘Add’ button.
![](https://dw1.s81c.com//IMWUC/MessageImages/b1163c216e0344fea684ab50b5623eb3.png)
7. Generate chargeback reports
a. Click ‘Overview’ > ‘Reports’ and select ‘All Reports’ > ‘My Company (All Groups)’ > ‘Custom’ > ‘IBM-Z-Consumption-Model-Report' and click ‘Queue’ button to generate a new report.
![](https://dw1.s81c.com//IMWUC/MessageImages/2f3e7baae6984054955cfd5abda19550.png)
b. Click ‘Overview’ > ‘Report’ to check all saved reports.
![](https://dw1.s81c.com//IMWUC/MessageImages/edafeee90d17486ea8f9af8493f8e517.png)
![](https://dw1.s81c.com//IMWUC/MessageImages/0af26ec58bc54d22ab0187ae6c93a207.png)
Note: It may take hours to synchronize metric data with a new cloud provider. If the report shows no record, try again after several hours.
Summary
Following the description of the blog, you should be able to integrate IBM Cloud Infrastructure Center with IBM Cloud Pak for AIOps in consumption-based chargeback support.
Related information