Configuring SPF and Windows Azure Pack for IaaS usage and metering
After configuring VMM and OM for IaaS usage and metering in the previous blog post (here) it’s now time to configuring SPF and Windows Azure Pack to import Usage data from Operations Manager Data Warehouse into Windows Azure Pack (WAP) Usage Database.
The series includes the following posts:
- IaaS Usage and Service Reporting using System Center 2012 R2 and Windows Azure Pack
- Configuring VMM and OM for IaaS usage and metering.
- Configuring SPF and Windows Azure Pack for IaaS usage and metering. (This blog post)
- Installing & configuring Service Reporting for IaaS usage and metering.
Service Provider Foundation has a usage module that WAP uses to collect data from Operations Manager data warehouse. In this blog post we will go over how to configure the following:
- Configure SPF to extract data from Operations Manager Data Warehouse
- Configure WAP to connect to SPF Usage Service
- Verify that Data is being stored in the WAP usage database
The following things must be configured before starting on this guide
- Completing all steps and pre-requisites from the previous blog post: Configuring VMM and OM for IaaS usage and metering
|Operations Manager Server:||OM01.contoso.com|
|Operations Manager Database Server:||DB04.contoso.com|
|WAP Database Server:||DB02.contoso.com|
|Service Reporting Server||VMM01.contoso.com|
|Service Reporting Database||DB06.contoso.com|
Configure SPF to extract data from Operations Manager Data Warehouse
The usage module in SPF needs to be configured using PowerShell. With SPF there is a set of commands that enables you to configure settings in SPF. By using these commands you can tell SPF where the Operations Manager Server and Data Warehouse database are located.
To configure SPF Usage do the following:
1. Logon to the SPF server as an Administrator
2. Open IIS Manager Console
3. Select Application Pools
4. Check the identity for the Usage Application (eg. Contoso\!spf)
5. Close the IIS console
6. Open Computer Management Console > Local Users Groups > Groups
7. Verify that the user you will later use to query SPF for data from WAP is member of the local SPF_Usage users group, if not add the user to the Group. In this scenario I’m using SPF Usage Application Identity user. Any other user can be used as long as it’s member of the Usage security Group.
8. Open PowerShell console with administrative privilege
9. Run the following commands (change values in “<>” with your own values):
# Provide server name to the OM DW SQL instance
$OMDWSqlServer = "<SCOM DW DB SQL Server>”
Example: $OMDWSqlServer = "DB04.contoso.com"
# Provide server name to the OM RMS Server
$OMServer = "<SCOM RMS Server Name>"
Example: $OMServer = "OM01.contoso.com"
# Register the SCOM Data Warehouse instance to SPF usage metering
$stamp = Get-SCSPFStamp;
$server = New-SCSPFServer -Name $OMServer -ServerType OMDW -Stamps $stamp;
For SPF Preview use the following command:
$setting = New-SCSPFSetting -Name $OMDWSqlServer -SettingString "Data Source=$OMDWSqlServer;Initial Catalog=OperationsManagerDW;Integrated Security=True" -SettingType DatabaseConnectionString –Server $server
For SPF RTM use the following command:
$setting = New-SCSPFSetting -Name $OMDWSqlServer –Value "Data Source=$OMDWSqlServer;Initial Catalog=OperationsManagerDW;Integrated Security=True" -SettingType DatabaseConnectionString –Server $server
To verify if the setting has been applied to SPF run the following command:
10. Logon to the SQL Server that hosts the SCOM DW DB as SQL Admin
11. Start SQL Management Studio
12. Select Security > Logins
13. Right Click on Logins folder and select “New Login”
14. Add the SPF Usage Application Identity user for Login name. eg. Contoso\!spf
15. Select User Mapping under “Select a page”
16. Select OperationsManagerDW and select OpsMgrReader under “Database role membership”
17. Click Ok
18. Right Click OperationsManagerDW under Database and select Properties
19. Select Permissions and pick the user just added under User and Roles.
20. Verify that the user has Execute permission on the database, if not assign this permission as shown below.
21. Close SQL Management Studio
Configure WAP to connect to SPF Usage Service
The Usage module inside WAP uses SPF to collect data from Operations Manager Data Warehouse. For WAP usage to collect this data we need to tell WAP where the SPF Usage service is located.
To enable this in WAP do the following
1. Start a browser that has access to the WAP Admin Portal and login in as administrator
2. Select VM Clouds from the main menu
3. Select the VM Clouds Configuration from the VM Clouds menu
4. Select Register Service Provider Usage
5. Provide information for each field as given in the example below and Click Ok.
Username is the user you added to the SPF_Usage Group under step 7 for Configure SPF to extract data from Operations Manager Data Warehouse.
NB: Remember to add /Usage after the port number for the SPF usage service.
Verify that Data is being stored in the WAP usage database
To verify that IaaS data is being stored in the WAP Usage Database do the following:
1. Logon the WAP Database as Administrator
2. Start SQL Management Studio
3. Select Databases > Tables
4. Right Click on Usage.Records and select “Select Top 1000 Rows”
5. Verify that the result returns Data with ResourceId “VM Utilization”
6. Close the SQL Management Studio Console
Now that we see data in the WAP Usage DB, we have successfully integrated SPF and Windows Azure Pack.
This will now enable us to configure Service Reporting and using billing adapters against Windows Azure Pack.
In the next blog post I will go through how Service Reporting can be configured.
My colleague KR Kandavel is working on a series of blog posts explaining how you can build a billing adapter.
- Link to blog post coming soon
See you next time for more blogging about Windows Azure Pack & System Center 2012 R2 :-)