Windows Azure Pack – Implement billing with Cloud Cruiser

Cloud Cruiser is software that delivers financial management for Clouds. Windows Azure Pack is able to connect to Cloud Cruiser to make chargeback and billing in complete transparency with tenants. In this topic, I will show you how to implement Cloud Cruiser Express edition with Windows Azure Pack to make billing.

Requirements

Before following this topic, you need below requirements:

  • A server with JRE x64 1.7 installed (not 1.8 otherwise the Cloud Cruiser installation will fail)
    • Add environment variable called JAVA_HOME where the value is c:\program files\Java\jre7
  • Virtual Machine Manager must be connected to Operations Manager (cf. this topic)
  • A working Windows Azure Pack and VM Clouds (cf. this topic)

Verify configuration

First connect to your SPF server and open IIS management console (inetmgr). Navigate to application pools and verify that the identity of Usage is a domain account.

This account must be also in SPF_Usage local group as below:

Configure Windows Azure Pack Usage Service

Cloud Cruiser will connect to Windows Azure Pack Usage Service. with credentials. However The user name and the password are randomly generated while installing Windows Azure Pack. So with the below script, I configure my own credentials to connect to Usage Service. This script should be run on a server that hosts privilege Windows Azure Pack services.

Import-Module MgmtSvcAdmin
Set-MgmtSvcSetting -Namespace UsageService -Name Username -Value 'UsageClient'
Set-MgmtSvcSetting -Namespace UsageService -Name Password -Value 'password' –Encode

Add Operations Manager to Service Provider Foundation

First connect to a SPF server and run the below script to register Operations Manager (OM) Data Warehouse to Service Provider Foundation.

Import-module spfadmin
# Specify the SQL server that hosts OM Data Warehouse
$OMDWSqlServer = "SQLAAG02.home.net"
# Specify a OM Management server
$OMServer      = "VMOMG01.home.net"

$stamp         = Get-SCSPFStamp;
$server        = New-SCSPFServer -Name $OMServer `
                                 -ServerType OMDW `
                                 -Stamps $stamp[0];
$setting       = New-SCSPFSetting -Name $OMDWSqlServer `
                                  –Value "Data Source=$OMDWSqlServer;Initial Catalog=OperationsManagerDW;Integrated Security=True" `
                                  -SettingType DatabaseConnectionString –Server $server

Next run the command Get-SCSPFSetting to verify if the OM Data Warehouse is registered.

Configure Operations Manager Data Warehouse database

Now we have to give permissions on OM Data Warehouse database to the account that run the Usage application pools on SPF Server (mine is called home\sa-spf-svc02). So open management studio and navigate to security login and edit the properties of this account. Navigate to User Mapping and select OperationsManagerDW. Then select OpsMgrReader as database role membership.

Next edit the properties of OperationsManagerDW database. Verify that the account as Execute permission as below.

Register Service provider Usage

Open the administrative management portal of Windows Azure Pack and navigate to VM Clouds. Click on Use an existing VM Clouds endpoint to collect metering data.

Next I specify the service URL, and credentials to connect. I use a local account that is member of all SPF local groups.

Once the connection is successful, the table Records in Microsoft.MgmtSvc.Usage database should be filled as below.

Install Cloud Cruiser

Be sure that you are using a JRE 64bit version 1.7 and not a 1.8. Otherwise the installation will fail!

Download Cloud Cruiser Express here. Next run the installation of Cloud Cruiser. Then specify an install path and a working path.

Next specify a product name, a tomcat port and an E-mail address. The Admin user name and password will be used by Windows Azure pack to connect to Cloud Cruiser endpoint.

Choose a database type. In this case I choose SQL Server.

Next specify SQL Server settings. If you specify an Application User that doesn’t exist, it will be created in security login of the SQL Server instance.

Next enter the Usage Service information. You can specify the admin API URL of Windows Azure Pack. The user and password are those specified in Configure Windows Azure Pack Usage Service part.

To finish run this script to allow inbound connection on port TCP/8080.

New-NetFirewallRule -DisplayName "Tomcat" `
                    -Action Allow `
                    -Direction Inbound `
                    -LocalPort 8080 `
                    -Protocol TCP `
                    -Enabled True

Register Cloud Cruiser REST Endpoint

Connect to the administrative management portal and navigate to user costs. Next click on Register your Cloud Cruiser REST endpoint. Specify the Rest Endpoint as below and the user name and password that you have provided while installing Cloud Cruiser.

Once the Cloud Cruiser is registered in Windows Azure Pack, you should have something as below:

Add Cloud Cruiser to hosting plan

Now we have to add the Cloud Cruiser to a hosting plan. So browse to a hosting plan and click on Add Service.

Select Cloud Cruiser and click on ok.

After sometime, information should appear in User Costs.

Connect to Cloud Cruiser management portal

To configure financial plan, you can connect to cloud cruiser: https://<servername>:8080

About Romain Serre

Romain Serre works in Lyon as a Senior Consultant. He is focused on Microsoft Technology, especially on Hyper-V, System Center, Storage, networking and Cloud OS technology as Microsoft Azure or Azure Stack. He is a MVP and he is certified Microsoft Certified Solution Expert (MCSE Server Infrastructure & Private Cloud), on Hyper-V and on Microsoft Azure (Implementing a Microsoft Azure Solution).

2 comments

  1. Hello Romain,
    in my administrative management portal the “user costs” tab is missing. There is a way to add\enable the “user costs” tab ?

    Thanks
    FF

    • Hi Francisco,

      Have you installed the “Cloud Cruiser fomr WIndows Azure Pack: Admin Site extension” from Web Plateform Installer in your servers that host privilege services?

      Bye 🙂

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

x

Check Also

Windows Azure Pack – Authenticate tenants with AD FS

By default, Windows Azure Pack provides an Authentication site for tenants. This authentication site can ...

Windows Azure Pack – Website gallery issue

I had an issue with the WebSite Gallery in my Windows Azure Pack installation. When ...

Windows Azure Pack – PowerShell tenant API

Thanks to the Public Tenant API hosted on public services tier, the tenants can use ...