Setup Domain package with no access to DNS settings

234 views 1

How to define a domain package that does not offer DNS editor to customers in the hosting control panel.

Overview

Atomia DNS package allows customers to manage domains and advanced DNS configuration. If you want to sell a new package that only allows customers to manage domains without access to the DNS settings page in the HCP, you need to configure a new package.

You can follow the next steps to configure the domain package:

  1. Configure domain package in the automation server,
  2. Configure domain package in the Billing API,
  3. Create a product for the domain package and
  4. Configure upgrade and downgrade.

Configuring domain package in the automation server

In order to define the domain package for the default provisioning description ProvisioningDescription.xml, you can create the transformation file ProvisioningDescription.DomainPackage.xml like this one:

<?xml version="1.0" encoding="UTF-8"?>
<provisioningDescription xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
  <packageDescription>
    <packageList>
      <package name="DomainPackage" xdt:Transform="Insert">
        <serviceList>
          <service name="CsExternalDomainRelatedSubscriptions" />
        </serviceList>
        <serviceLimitationList>
          <globalLimitation>
            <group maxCount="0">
              <service name="MailAccount" />
            </group>
            <group maxCount="0">
              <service name="Catchall" />
            </group>
            <group maxCount="0">
              <service name="DnsSlaveZone" />
            </group>
            <group maxCount="0">
              <service name="CsMailmanSupport" />
            </group>
            <group maxCount="0">
              <service name="CsCertificate" />
            </group>
            <group maxCount="0">
              <service name="CsSiteBuilder" />
            </group>
            <group maxCount="0">
              <service name="CsMailmanSupport" />
            </group>
            <group maxCount="0">
              <service name="CsMailSupport" />
            </group>
            <group maxCount="0">
              <service name="CsExchangeMailSupport" />
            </group>
            <group maxCount="0">
              <service name="MailForward" />
            </group>
            <group maxCount="0">
              <service name="MailForwardDomain" />
            </group>
            <group maxCount="0">
              <service name="Forwarder" />
            </group>
          </globalLimitation>
        </serviceLimitationList>
        <init>
          <serviceToAdd serviceName="CsExternalDomainRelatedSubscriptions" />
        </init>
        <actionHooks>
          <onBeforeChangePackage argument="{'upgrade_to':['DnsPackage', 'BasePackage','PremiumPackage','ApplicationInstallerPackage'],'downgrade_to':['DomainPackage'],'preview_zone':'preview.dev.atomia.com','keep_mail_on_downgrade':'false','keep_unsupported_services_and_extensions':'false'}" type="Atomia.Provisioning.ActionHooks.PackageChange.UpgradeDowngrade, Atomia.Provisioning.ActionHooks.PackageChange" />
        </actionHooks>
      </package>
    </packageList>
  </packageDescription>
</provisioningDescription>

You should put the transformation file on the location Atomia\AutomationServer\Common\ProvisioningDescriptions \Transformation Files. Then, you should run Recreate config files that is on location Atomia\AutomationServer. You also need to restart automation server from the IIS and Atomia Automation Server Provisioning Engine service from the windows services.

Configuring domain package in the Billing API

The domain package should be defined in the configuration file Atomia\BillingAPIs\BillingApi\Web.config. You can create a transformation Web.DomainPackage.config file in the folder Atomia\BillingAPIs\BillingApi\Transformation Files like one below to insert configuration in the Web.config:

<?xml version="1.0" encoding="utf-8"?>
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
	<atomiaBilling xmlns="atomiaBilling">
		<provisioningOrders>
			<provisioningOrder provisioningService="DomainPackage" order="1" xdt:Transform="Insert"/>
		</provisioningOrders>
	</atomiaBilling>
	<atomiaProvisioningConfiguration xmlns="atomiaProvisioning">
		<provisioningDescriptionMappings>
			<provisioningDescription name="ProvisioningDescription" xdt:Locator="Match(name)">
				<packages>
					<package name="DomainPackage" type="Package" xdt:Transform="Insert">
						<properties>
							<packageProperty key="DomainName" value="DomainName" />
						</properties>
						<includedPackages>
						  <package name="DomainRegistrationContactPackage" type="Package"/>
						</includedPackages>				
					</package>
				</packages>
			</provisioningDescription>		
		</provisioningDescriptionMappings>
	</atomiaProvisioningConfiguration>
</configuration>

Create product for the new package

After you configure the domain package in the automation server and Billing API, you can add a new product in the admin panel for the new package. You should select DomainPackage for the provisioning service to provision the new package when a customer buys the product. You need to add this product to the shop to make it available in the store.

Configuring upgrade and downgrade options

You can add configuration to allow users to upgrade the domain package to other packages from the billing customer panel. Also, you should allow a downgrade of other packages to the domain package. Upgrade/downgrade options are not yet managed via the Atomia Admin panel. You need to execute an insert SQL statement to configure upgrade and downgrade options for the package, for example:

insert into upgrade_group_member(id, fk_group_id, fk_item_id, upgrade_level, upgradeable, downgradeable, upgradeable_from, downgradeable_from)
values (NEWID(), '0BA707E4-D498-4713-BC0F-5DBF8A7E03C2', 'bf714b6e-3d4d-459d-9664-65bf6838f597', 1, 1, 1, 1, 1)

fk_item_id – The ID of the product you have created from the admin panel in the previous step.
fk_group_id – The ID of the upgrade/downgrade group. You can list defined groups with next SQL select * from upgrade_group;. Only products from the same group can be upgraded and downgraded to each other. For the domain package, you need to choose the packages group which already exists when you install Atomia.
upgrade_level – The level of the package. A package is upgradable to packages from the group with a higher level. A package is downgradable to packages from the group with a lower level.
upgradeable – Set to 1 to allow upgrading domain package to other packages.
downgradeable – Set to 1 to allow downgrading domain package to other packages. It is not relevant for the domain package as it should have the lowest level in the group.
upgradeable_from – Set to 1 to allow upgrading other packages to the domain package. It is not relevant for the domain package because it should have the lowest level.
downgradeable_from – Set to 1 to allow downgrading other packages to the domain package.

Keep in mind

Upgrade and downgrade options will only work if all products from the upgrade_group_member have the same renewal period.
All products (items) that you insert into in the table upgrade_group_member you need to add in the shop from the admin panel.

Was this helpful?