Atomia Cloud Hosting Platform

Configure subscription based billing

25 views 0

Before you begin

Subscription based billing means that a customer orders a service at a fixed price per time period, for example a monthly subscription. Before starting with the configuration you should think through what intervals you want to support, and what parameters for have for each product. For example, how much cpu, ram, and disk should your virtual machines have? What size of volumes are you going to sell?

The following steps need to be performed in order to setup Atomia to work with subscription based billing:

  1. Setup your products in Atomia Billing
  2. Configure Atomia Hosting control panel for subscription based mode
  3. Configure Atomia Billing Customer control panel for subscription based mode

Setup your products in Atomia Billing

Atomia currently supports the provisioning of VPS instances and volumes in subscription based mode. The configuration differs for both products, so they are described independently below.

VPS instances

Create a new product for each of your desired products with the following values:

  • Provisioning service: VirtualMachine
  • Provisioning allowed: Whichever you prefer
  • Product category: Cloud service
  • Article number: The article number you prefer, for example VPS-SMALL
  • Name/Description: A descriptive name and description for this product
  • Taxes: Your preferred tax settings, not covered by this documentation
  • Type of billing: Fixed price and Recurring
  • Renewal period: Add a renewal period for all the different periods that should be available to choose from for this product
  • Options: For default configuration you can leave this as is
  • Other data: Add a new field with the name “InstanceType” and set the value as the desired flavor for this product, for example “m1.tiny”

VPS volumes

Create a new product for each of your desired products with the following values:

  • Provisioning service: Volume
  • Provisioning allowed: Whichever you prefer
  • Product category: Cloud service
  • Article number: The article number you prefer, for example VPS-VOL-100
  • Name/Description: A descriptive name and description for this product
  • Taxes: Your preferred tax settings, not covered by this documentation
  • Type of billing: Fixed price and Recurring
  • Renewal period: Add a renewal period for all the different periods that should be available to choose from for this product
  • Options: For default configuration you can leave this as is
  • Other data: Add a new field with the name “VolumeSize” and set the value as the size in GB for the volume

Add the VPS products to your shop

In order for the products to be available in the Control Panel they need to be added to your default shop. This can be done in Admin Panel > Products > Shops. Select the default shop and press Edit, click on Add new product and select your newly created products and add the VPS instance products with the category VPS and the volumes with the category Volume.

Configure Atomia Hosting Control Panel for subscription based mode

There are a couple of configuration steps needed in order for the Hosting Control Panel to work with subscription based billing. The first thing to do is to change the mode from usage based to subscription based. This is done by editing the file “C:\Program Files (x86)\Atomia\HostingControlPanel\bin\Atomia.Web.Plugin.VPS.dll.conf”. In the pluginSettingsList set:

<pluginSetting name="EnableUsageBased" value="false" />

Secondly, the configured OpenStack images need to be mapped to products. This is done in the file C:\Program Files (x86)\Atomia\AutomationServer\Common\Modules\Atomia.Provisioning.Modules.OpenStack.dll.config. The following should be added to the cloudinfo JSON configuration:

For each of the images you want to offer one of these entries should be added where image_id is the id of the image (image_id in the AvailableImages configuration) and product_ids is all the products (VPS sizes) that this image should be available in.

'ImageToProductMappings': [
	{
		'image_id' : 'ff80f383-aa0b-4a74-9d41-1c20ddab327e',
		'product_ids' : ['VPS-TINY','VPS-SMALL']
	}
]

As for all configuration in Atomia, editing should be done through a transformation file!

Configure Atomia Billing Customer Panel for subscription based mode

The first thing to configure in Billing Customer Panel is the appConfig file found at “C:\Program Files (x86)\Atomia\BillingCustomerPanel\App_Data\appConfig.config”. In this file you need to change the options listed below.

<globalSetting name="ShowCloudTab" value="true" />
<globalSetting name="SubscriptionsShowVPSTab" value="true" />

These settings will enable the cloud tab in the Billing Customer Panel and make the cloud service subscriptions appear in the list of subscriptions.

After performing the above steps you are able to order cloud services in subscription mode.

Was this helpful?