Cloud Assert - Help Center
            Knowledge Base Microsoft Azure Stack Billing Installation

            Setup Guide

            This setup guide provides detailed setup instructions. It does not contain any type of processing information.


            The information in this setup guide is subject to change.
            CLOUD ASSERT BILLING SETUP & CONFIGURATION GUIDE |




            Billing for Microsoft Azure Stack Setup & 

            Configuration Guide.

            Version: 1.1.1.9

            API Version: 2.1.7.40


            Published: May, 22, 2019






















            1. Introduction

            The Cloud Assert Billing solution is a tool which can enable chargeback for the resources utilized in Microsoft Azure Stack. It allows the cloud administrator to set prices in Pay-As-You-Go, Fixed payment and hybrid models.

            1.1 General Pre-requisites

            1. Connection to a SQL server
            1. SQL Server name, in the format, <IP Address of the SQL Server>/<Instance name>
            2. SQL authenticated user credential
            3. Name of the Billing database

            Note:  Billing Database must be created prior to the deployment and it must be accessible from Azure Stack.

            1. NetBIOS name of the Azure Stack domain (On ASDK, the default is AzureStack)
            2. Azure Stack service Admin account credentials (Azure AD account)
            1. Ensure if the service Admin account has "Global Administrator" role
            1. Tenant Subscription 
            1. ID of the Tenant Subscription where Cloud Assert components need to be deployed
            2. Tenant Subscription administrator account credentials
            3. A tenant subscription created from an Azure Stack Offer/Plan that includes Microsoft Compute, Storage and Network services with default quotas added
            4. Upon creating the tenant subscription, the Microsoft Compute, Storage and Network services need to be registered from the Subscription > Resource Providers blade in the Tenant portal
            1. Certificate
            1. For integrated systems (i.e. multi-node), a .pfx certificate with the following domain, along with the certificate chain (i.e., root authority and any intermediate authorities):  *.cloudassert.<Azure Stack region>.<Azure Stack external FQDN> should be procured from a public authority. 
            2. For ASDK, certificate is generated as a part of the deployment.
            3. Password for the .pfx certificate.
            1. Azure Stack cloud administrator credential for Privileged endpoint access E.g., <Azure Stack domain>\cloudadmin
            2. Download the Windows 2016 Datacenter image from the marketplace through the Marketplace Management blade in the Admin portal
            3. Install Azure PowerShell version 1.7.2 (Azure PowerShell)

            Note: Uninstall any Azure PowerShell versions other than 1.7.2


            1.2 Recommended Virtual Machine Size for Billing Resource Provider

            • For POC (Proof of Concept) or when the billing solution is deployed for the first time, the deployment scripts will take care of creating the VM (VM of size Standard A3) and installing the resource provider.
            • For production, it is recommended to increase the size of the VM to Standard A4 and ensure that the VM doesn’t restart on it’s own.



            2. Deploying Billing Resource Provider

            • Sign in to a host that can access the privileged endpoint VM.
            • On Azure Stack Development Kit installations, sign in to the physical host.
            • On multi-node systems, the host must be a system that can access the privileged endpoint.
            • Extract the contents of Billing resource provider to a temporary directory using any extractor tool.
            • Place the generated .pfx file in the DependencyFilesLocalPath as follows:
            • Only a single certificate file exists in the DependencyFilesLocalPath 
            • The file name must not contain any special characters.
            • The certificate must be placed in the DependencyFilesLocalPath before retrying the deployment
            • Edit the InstallBilling.ps1 script with the account information and passwords as needed by the script.
            • Open a new elevated (administrative) PowerShell console and change to the directory where the files have been extracted. Use a new window to avoid problems that might arise from incorrect PowerShell modules that are already loaded on the system.
            • Run InstallBilling.ps1 script.

            Note: The system where the script is being run must be a Windows 10 or Windows Server 2016 system with the latest version of the .NET runtime installed. 

            3. Verifying the Deployment in Azure Stack Portals

            Note 

            After the installation script finishes running, refresh the admin portal to see the Billing extension. 

            1. In Admin Portal, click on Resource Groups. Then select the system.<location>.cloudassert.billing resource group and verify if the deployment succeeded.
            2. In Tenant Portal, click on Resource Groups. Then select the system.<location>.cloudassert.billing.rp resource group and verify if the deployment succeeded.


















            4. Activating the license for Billing

            To activate the Billing license, 

            1. Login to the Billing Resource Provider Virtual Machine.
            2. Open a new elevated (administrative) PowerShell console and change to the directory “C:\temp”.
            3. Run ActivateLicense.ps1 script and specify the required parameters.


            Parameter name

            Description

            Comment or default value

            LicenseKey

            Unique identifier of the License

            Required

            EmailId

            Email Id that is mapped with the License

            Required


            1. Copy the generated License.cal file to the location “C:\inetpub\MgmtSvc-CloudAssertBilling\bin”
            2. Recycle the IIS application pool for the site MgmtSvc-CloudAssertBilling
            3. In Admin Portal, click Billing > License blade to see the licensed features and quotas.


            5. General Upgrade Installation Instructions

            5.1 Pre-Uninstall Steps

            • Take a backup of Cloud Assert billing database.
            • Take a backup of the following files from their respective locations.

            File Name

            File Path

            Web.config

            C:\inetpub\MgmtSvc-CloudAssertBilling

            License.cal

            C:\inetpub\MgmtSvc-CloudAssertBilling\bin

            CloudAssert.WAP.Billing.AgentService.exe.config

            C:\Program Files\CloudAssertBilling\CloudAssert.WAP.Billing.AgentService

            web.config

            C:\inetpub\AzureStack-BillingAdminExtension

            web.config

            C:\inetpub\AzureStack-BillingTenantExtension

            Web.config

            C:\inetpub\AzureStack-BillingRP

            5.2 Uninstallation Steps

            • Uninstall existing Usage and Billing installers from Add or Remove Programs on the resource provider machine.
            • Delete ‘CloudAssertBilling’ from ‘C:\Program Files’ if present after uninstalling Billing Agent Service setup.

            5.3 Installation Steps

            • Extract the billing installers to a desired location.
            • To install the Billing API and Agent service components via command line, download the ‘setup.bat’ file here.
            • Copy the initialize.ini file from the following location ‘C:\Packages\Plugins\Microsoft.Powershell.DSC\2.19.0.0\DSCWork\setupBillingConfiguration.0\AzureStack.Billing.Setup.1.0.0\content\Setup\Packages’.
            • Place ‘setup.bat’ and ‘initialize.ini’ (which are acquired from the above steps) files in the folder where the billing installers have been extracted.

            5.3.1 Install Billing API Service

            • Open a command prompt as administrator.
            • Navigate to the billing installers folder.
            • Run ‘setup.bat install-api’.

            5.3.2 Install Billing Admin Extension

            • In the command prompt, change the directory to the AdminExtension folder.
            • Run the command “CloudAssert.AzureStack.Billing.AdminExtension.deploy.cmd /y”

            5.3.3 Install Billing Tenant Extension

            • In the command prompt, change the directory to the TenantExtension folder.
            • Run the command “CloudAssert.AzureStack.Billing.TenantExtension.deploy.cmd /y”

            5.3.4 Install Billing RP

            • In the command prompt, change the directory to the RP folder.
            • Run the command “CloudAssert.MAS.Billing.ResourceProvider.deploy.cmd /y”

            5.3.5 Install Billing Agent Service

            • Refresh the admin/tenant portal and verify that Billing extension is working fine.
            • Open a command prompt as administrator.
            • Navigate to the billing installers folder.
            • Run ‘setup.bat install-agent’.

            5.4 Post Installation Steps

            • Download the BillingTool here and extract it.
            • Open a command prompt as administrator.
            • Navigate to the billing tool folder.
            • Run the ‘UpdateDatabase’ command in BillingTool.exe as below,






            6. Managing Pricing Profiles

            The Pricing Profiles allows the administrator to set price for each resource and its meters that are specified by the resource providers.

            6.1 Configuring A Pricing Profile

            1. Click on Pricing Profiles.
            2. Click Base Profiles.



            1. Click on the desired pricing profile name.



            1. Specify a name for the pricing profile.
            2. (Optional) Select Yes/No for the ‘SET MONTHLY FEE?’ field.
            3. (Optional) Specify the ‘MONTHLY FEE’ amount.
            4. (Optional) Specify the ‘ONE-TIME FEE’ amount.
            5. (Optional) If the tax rate needs to be included for the tenants who subscribe to the offer associated with this pricing profile, Select Yes/No for the ‘APPLY STANDARD TAX RATE?’ field.

            Note: The standard tax rate must be specified under Settings → Invoice PDF Settings → Standard Tax Rate. The ‘Apply Tax?’ must be set to ‘Yes’ for the tax rate to be applied.

            1. (Optional) Specify the ‘MARKUP PERCENT’. 
            2. (Optional) Select Yes/No for the ‘APPLY MARKUP ONLY FOR BASE PROFILES? field. 
            3. (Optional) Choose a base profile to link the current pricing profile with it.

            Note: Opting 'Yes' will apply the markup value only if the resources match in the base profile. Opting 'NO' will apply the markup value for resource that matches in the child profile (Even if there is no base for this profile).







            1. (Optional) Choose a ‘PROMO TYPE’ and specify the ‘PROMO CREDIT AMOUNT’.
            2. (Optional) To update the credits for existing subscriptions, choose ‘Yes’ in ‘UPDATE PROMOTION CREDITS FOR EXISTING SUBSCRIPTIONS?’ field. 

            Note: If the promo credit needs to be calculated in percentage, check the ‘SPECIFY PROMORTION IN PERCENTAGE?’ must be set to ‘Yes’.

            1. Specify the ‘REGION’, ‘CURRENCY TEXT’ and ‘CURRENCY SYMBOL’ and click Save button at the top.







            7. Quotas

            The ‘Quotas’ extension allows the service admin to create/edit quotas which can be later used to add the Billing service in an Azure Stack plan. By default, a ‘Azure-Stack-Base’ quota is created. This quota can be cloned and configured.


            7.1 Setting Pricing Profile and Enabling/Disabling Email Notification

            Once a quota is cloned, it can be configured. To configure the quota, click on the quota name.


            • The name of the quota can be changed any time.
            • The name of the quota can be changed any time.
            • The configured pricing profile must be set. (Refer 

            8. Adding Billing Service to Azure Stack Plan

            Once the pricing profile and quotas are configured, the Billing service can be added to an Azure Stack Plan which later can be added to an Azure Stack offer.

            1. Click ‘Plans’ extension of Azure Stack in the admin portal.
            2. Choose an existing plan or create a new plan.


            1. Click ‘Service and quotas’ and click the ‘Add’ button.


            1. Choose ‘CloudAssert.Billing’ under Services and Click ‘Select’ button.


            1. Click Quota → ‘CloudAssert.Billing’. List of quotas that was configured will be listed. Select a desired Quota and click OK to save the quota.




            9. Registering Billing Resource Provider in a Subscription

            Once the tenant subscribes an offer with Billing Service, the Billing Resource Provider must be registered in that subscription to avail the service and for the cost computation to happen.

            • Click ‘Subscriptions’ extension in Azure Stack Tenant Portal.
            • Choose the Billing Service enabled subscription. 


            • Click ‘Resource Providers’ section.


            • Click ‘Register’ for the ‘CloudAssert.Billing’ Provider.




            Updated: 20 Aug 2019 09:42 PM
            Helpful?  
            Help us to make this article better
            0 0