# Installation

Usage and Billing solutions can be installed in two different ways,

* _Single Machine Setup_
* _Distributed Multi-Machine Setup_

### Single Machine Setup

If all the Windows Azure Pack (WAP) components like Admin Portal, Tenant Portal, etc. are setup in a single machine, then all the CloudAssertBilling installers can be installed in the same machine.

**IMPORTANT NOTE:** The agent service setup alone is installed after all the preliminary settings and configurations are done. The steps for it are discussed under _Step 10 – Installing Usage and Billing Agent Service_ section.

#### Install Usage and Billing API Service

* Download the ‘CloudAssert.WAP.Billing.Service.Setup’ installer after registering into [https://www.cloudassert.com/register](https://www.cloudassert.com/register)
* Click on the installer and click ‘Next’ button.

![](https://1682904349-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2Fwap-billing%2F-Lp8KZ_6kZYrYPOY2QCF%2F-Lp8N2_DjLp26ndPWcU0%2F2.png?generation=1568894109334748\&alt=media)

* Click the ‘I accept the terms in the License Agreement’ check box to accept the EULA and click the ‘Next’ button.

![](https://1682904349-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2Fwap-billing%2F-Lp8KZ_6kZYrYPOY2QCF%2F-Lp8N2_Ewm6c2LCDCgly%2F3.png?generation=1568894109335831\&alt=media)

* Click ‘Next’ button.

![](https://1682904349-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2Fwap-billing%2F-Lp8KZ_6kZYrYPOY2QCF%2F-Lp8N2_FeNtslSpar2uf%2F4.png?generation=1568894109338606\&alt=media)

* To install the API Service with AppPoolIdentity use the default option. Change the default option if a specific service account needs to be used to run the AppPool. Click the ‘Next’ button.

![](https://1682904349-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2Fwap-billing%2F-Lp8KZ_6kZYrYPOY2QCF%2F-Lp8N2_G4zbdzzwdD91V%2F5.png?generation=1568894109330208\&alt=media)

* Set the user name and password for the API Service resource provider credentials and click the ‘Test’ button, if the ‘Test Result’ label displays a green tick mark click ‘Next’ button. Make a note of the user name and password that is set, it is used while installing the Billing Agent Service Setup.

![](https://1682904349-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2Fwap-billing%2F-Lp8KZ_6kZYrYPOY2QCF%2F-Lp8N2_H8xfZNmzaofuO%2F6.png?generation=1568894109331204\&alt=media)

* Specify the database server name, instance name (if any) under ‘Database Instance’. _E.g.: ‘myserver\myinstance’ or ‘myserver,portnumber’_
  * Specify the database name (refer _GENERAL PRE-REQUISITES_) and click the ‘Test’ button.

1. If the ‘Test Result’ label displays a green tick mark click ‘Next’ button.

![](https://1682904349-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2Fwap-billing%2F-Lp8KZ_6kZYrYPOY2QCF%2F-Lp8N2_IsuRJ8c-6syVV%2F7.png?generation=1568894109332892\&alt=media)

*
  1. &#x20;If the database is not created beforehand, specify the database server name and instance name (if any) under ‘Database Instance’ and click the ‘Create the database now’ button.
     1. &#x20;Select the type of login authentication and specify the database name, login user name and password.
     2. Click ‘Create’ button, when the ‘Result’ label displays a green tick close the dialog box.
     3. Repeat steps _1.7.1_ and _1.7.2_ .

![](https://1682904349-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2Fwap-billing%2F-Lp8KZ_6kZYrYPOY2QCF%2F-Lp8N2_Jr3pIjAHbBG30%2F8.png?generation=1568894109346980\&alt=media)

* Specify the login user name and password for the database created. (Example: _CloudAssertBilling_)
  * Click the ‘Test’ button.
  * If the ‘Test Result’ label displays a green tick mark click ‘Next’ button.

![](https://1682904349-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2Fwap-billing%2F-Lp8KZ_6kZYrYPOY2QCF%2F-Lp8N2_K__wSj8v-tzYX%2F9.png?generation=1568894109344744\&alt=media)

* &#x20;Specify the WAP database server name, instance name (if any) under ‘WAP Database Instance’ _E.g.: ‘myserver\myinstance’ or ‘myserver,portnumber’_
  * Click the ‘Test’ button
  * If the ‘Test Result’ label displays a green tick mark click ‘Next’ button.

![](https://1682904349-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2Fwap-billing%2F-Lp8KZ_6kZYrYPOY2QCF%2F-Lp8N2_LJyTXcA7UQVZH%2F10.png?generation=1568894109331206\&alt=media)

* Specify the login user name and password for the WAP database.
  * Click the ‘Test’ button
  * If the ‘Test Result’ label displays a green tick mark click ‘Next’ button.

![](https://1682904349-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2Fwap-billing%2F-Lp8KZ_6kZYrYPOY2QCF%2F-Lp8N2_MKOb6KKY13Nn9%2F11.png?generation=1568894109336868\&alt=media)

* Click ‘Install’ button to install the Usage and Billing – API Service, click ‘Finish’ button to exit the installer after completion of the installation.

#### Install Usage and Billing Admin Extension

* Download the ‘CloudAssert.WAP.Billing.Extension.Admin.Setup’ installer after registering into [https://www.cloudassert.com/register](https://www.cloudassert.com/register)
* Click on the installer and follow instructions on the installer and click ‘Next’ till the installer finishes and then click ‘Finish’ to exit. Sample installer screens shown below:

![](https://1682904349-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2Fwap-billing%2F-Lp8KZ_6kZYrYPOY2QCF%2F-Lp8N2_NBuVIx7KowsBb%2F12.png?generation=1568894109371905\&alt=media)

#### Install Usage and Billing Tenant Extension

* Download the ‘CloudAssert.WAP.Billing.Extension.Tenant.Setup’ installer after registering into [https://www.cloudassert.com/register](https://www.cloudassert.com/register)
* Click on the installer and follow instructions on the installer and click ‘Next’ till the installer finishes and then click ‘Finish’ to exit.

### Distributed Multi-Machine Setup

If the Windows Azure Pack (WAP) components are installed in different machines in the distributed environment, then the Usage and Billing components are required to be installed on different machines respectively.

| **Note:** For upgrade installations refer _General Upgrade Installation Instructions_ _._                                                                                                                                          |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **IMPORTAN NOTE:** The agent service setup alone is installed after all the preliminary settings and configurations are done. The steps for it are discussed under _Step 10 – Installing Usage and Billing Agent Service_ section. |

#### Install Usage and Billing API Service

**Pre-Requisites:**

* Usage and Billing API Service can co-exist with other WAP Portal components, for example the Usage and Billing API Service can be installed on the same machine as WAP Admin API machine.
* It is better to install the Usage and Billing – API Service in each of the machines where WAP ‘**Admin-API**’ component is installed.
  * Ensure that the machine has at least 4 GB RAM, preferably 8 GB
  * Ensure that firewall is configured to allow access to inbound port 30045
  * Ensure that this machine can talk to the SQL database server on which the Usage and Billing database will be configured (refer _GENERAL PRE-REQUISITES_).
  * Ensure that IIS, Asp.Net MVC features and other features similar to the requirements for Windows Azure Pack portal installations are met.
  * Ensure that the machine can connect to internet if the Payment gateway feature is enabled (Licensed Feature).
  * Download the ‘CloudAssert.WAP.Billing.Service.Setup’ installer after registering into [https://www.cloudassert.com/register](https://www.cloudassert.com/register)
  * Repeat steps _1.2_ to _1.10_ from ‘_Install Usage and Billing API Service_’ under ‘_Single Machine Setup_’ section to complete the installation in each of the machines where WAP ‘Admin-API’ component is installed. .

#### Install Usage and Billing Admin Extension

* Logon to the machine on which WAP ‘**Admin-Site**’ is installed.
* Download the ‘CloudAssert.WAP.Billing.Extension.Admin.Setup’ installers from:

[https://cloudassertdownloads.blob.core.windows.net/usage-rc/CloudAssert.WAP.Billing.Extension.Admin.Setup.msi](https://cloudassertdownloads.blob.core.windows.net/usage-rc/CloudAssert.WAP.Billing.Extension.Admin.Setup.msi)

* Click on the installer and follow instructions on the installer and click ‘Next’ till the installer finishes and then click ‘Finish’ to exit.
* Repeat the above steps for each machine in which WAP ‘**Admin-Site**’ is installed.

#### Install Usage and Billing Tenant Extension

* Logon to the machine on which WAP ‘**Tenant-Site**’ is installed.
* Download the ‘CloudAssert.WAP.Billing.Extension.Tenant.Setup’ installers from:

[https://cloudassertdownloads.blob.core.windows.net/usage-rc/CloudAssert.WAP.Billing.Extension.Tenant.Setup.msi](https://cloudassertdownloads.blob.core.windows.net/usage-rc/CloudAssert.WAP.Billing.Extension.Tenant.Setup.msi)

* Click on the installer and follow instructions on the installer and click ‘Next’ till the installer finishes and then click ‘Finish’ to exit.
* Repeat the above steps for each machine in which WAP ‘**Tenant-Site**’ is installed.
