TABLE OF CONTENTS

Overview

The WebHosting Linux module is discontinued and will no longer be available for installation starting from CloudBlue Commerce 21.0. 

If you want to upgrade to the latest version of CloudBlue Commerce (21.0 and later), you will need to stop signing up new customers to hosting services and notify your existing hosting customers that they need to back up and migrate their websites elsewhere.

When they finish migrating websites, you can remove the customers' accounts along with their data and run a cleanup tool to delete all components related to WebHosting Linux from CloudBlue Commerce.

This article explains how to use the cleanup tool.

Supported Configurations

  • CloudBlue Commerce 20.5

What Happens During Cleanup

The cleanup tool does the following:

  1. Deactivates all service templates related to the WebHosting Linux module to make it impossible to buy and provision new WebHosting Linux subscriptions from UX1 Marketplace.
  2. (Optional) Synchronizes all online stores (UX1 Marketplaces) to unpublish the service plans that are based on the deactivated service templates. You should do this to prevent users from purchasing WebHosting Linux subscriptions in online stores.
  3. Removes all packages related to the WebHosting Linux module from service nodes.
  4. Archives all orders related to the WebHosting Linux module. To learn more about the archiving of orders, please refer to the Billing Provider Guide.
  5. Removes all packages related to the WebHosting Linux module from the internal repository on the management node.

Installing the Cleanup Tool

To obtain and install the cleanup tool, use the instructions in this article.

Preparing for Cleanup

To remove the WebHosting Linux module from your installation of CloudBlue Commerce, you need to remove or migrate all websites and webspaces from the service nodes related to the WebHosting Linux module. The cleanup tool does not do anything to customer or reseller subscriptions. You must process them on your own.

To remove the subscriptions that are no longer needed, follow the instructions in this guide.

During the creation of new reseller accounts associated with the WebHosting Linux module, the system may create webspaces for resellers on one of the WebHosting Linux shared hosting nodes. To proceed with the cleanup, you must subscribe resellers to other service plans that do not contain WebHosting Linux resources. The following is an overview of the steps that you need to perform:

  1. In the Provider Panel of CloudBlue Commerce, create a service template.
  2. In Billing, create a reseller service template.
  3. In Billing, create a service plan based on the reseller template.
  4. In Billing, locate the service plan to which the reseller is currently subscribed, and add the service plan that you created in step 3 to the list of plans available for upgrade.
  5. In Billing, locate the reseller's subscription, click Switch Plan, and select the plan that you created in step 3.
  6. In Billing, process the order related to the plan change.

Removing WebHosting Linux Resources from Customers' Subscriptions

If there are subscriptions that include resources related to WebHosting Linux and other resources (for example, DNS resources), such subscriptions cannot be deleted as they may be used by other services. In such cases, to continue with the cleanup process, you need to do one of the following:

  1. Switch all subscriptions with resources related to WebHosting Linux to another service plan.
  2. Remove resources related to WebHosting Linux.

To remove resources related to WebHosting Linux from subscriptions, please use the instructions provided in this article.

Removing WebHosting Linux Resources from Resellers' Subscriptions

If there are WebHosting Linux resources in a reseller subscription, do the following:
Step 1. Notify the reseller that they must migrate their websites and the websites of their customers elsewhere. When they finish migrating, remove the subscriptions.

Step 2. Log in to the Reseller Panel on behalf of that reseller and remove all WebHosting Linux resources from service templates.

Step 3. Log in to the Provider Panel and switch the reseller's subscription to another plan that does not include WebHosting Linux resources.

Attaching and Detaching Nodes During Subscription Removal or Switching Subscriptions to Another Plan

If you plan to reuse the nodes that are used by WebHosting Linux subscriptions and to keep the contents of websites on those nodes, you first need to detach those nodes from CloudBlue Commerce, delete the subscriptions from CloudBlue Commerce or switch the subscriptions to another service plan, and then attach those nodes back to CloudBlue Commerce.
You can detach all WebHosting Linux nodes by using the following command:
# ./clean-up-whl-module.py detach-nodes
That command detaches WebHosting Linux nodes that are used by the following services: WebHosting Linux, Web File Manager, phpMyAdmin, and phpPgAdmin.
Important: MySQL and PostgreSQL database servers are not related to WebHosting Linux nodes. They will not be detached after running that command. When you delete subscriptions that include MySQL or PostgreSQL database resources, the respective databases will be removed as well. If you want to keep those databases, you need to back them up before removing subscriptions and then restore them after subscriptions are removed. You might want to keep those databases if you migrated from WebHosting Linux to WebHosting Plesk.
Important: Redis is used as storage for virtual host configurations. When you remove webspaces from CloudBlue Commerce, their virtual host configurations are also removed. To prevent the loss of virtual host configurations, you must switch all Redis instances from master-slave replication mode to standalone mode.
Important: The WebHosting Linux service automatically creates A and AAAA DNS records in domain zones if internal domain hosting is enabled. The removal of the WebHosting Linux service implies that all resources, including domain records related to WebHosting Linux subscriptions, are removed. This means that those domain records must be detached from the WebHosting Linux service, and their DNS record kind must be changed to Manual.
Note: While a node is detached from CloudBlue Commerce, no operations, such as the creation or removal of websites and databases, can be performed on it. For this reason, we recommend detaching nodes outside normal business hours and within a planned maintenance window. To attach nodes back to CloudBlue Commerce, use the following command:
# ./clean-up-wsh-module.py attach-nodes --node-ids <node IDs>
In this command, --node-ids contains a comma-separated list of the IDs of the nodes that must be attached to CloudBlue Commerce

How to Switch Redis to Standalone Mode

The WebHosting Linux service uses Redis to store virtual host configurations. Apache uses the data stored in Redis for each Apache reload process. Redis uses master-slave replication mode, where the master is the management node, and a slave is a WebHosting Linux web node. When you destroy a WebHosting Linux subscription, the configuration data of that subscription is removed from Redis. To prevent the loss of configuration data, you must switch Redis on each WebHosting Linux web node to standalone mode. To do this, complete these steps on every WebHosting Linux web node, including those that are members of web clusters:

  1. Log in to the WebHosting Linux web node you need.
  2. Create a snapshot of the data of the Redis instance on that node by using this command:
    # redis-cli -s /var/lib/redis/redis.sock SAVE
    The snapshot will be saved to /var/lib/redis/dump.rdb.
  3. Back up the snapshot file by using this command:
    # cp /var/lib/redis/dump{,-with-websites}.rdb
  4. Switch the Redis instance to standalone mode by commenting the slaveof and masterauth sections in /etc/redis.conf.
  5. Restart the Redis instance.

WebHosting Linux DNS records will be removed during service termination in CloudBlue Commerce. To prevent this, all necessary DNS records must be marked as Manual. To do this, execute the following SQL commands in your system database:
# UPDATE dns_record_references SET obj_kind='manual', obj_domain='manual' WHERE obj_domain='Apache' and obj_kind='Instance';
# UPDATE dns_record_references SET obj_kind='manual', obj_domain='manual' WHERE obj_domain='ProFTPD';

Performing the Cleanup

You can clean up your installation of CloudBlue Commerce by subsequently running the following commands:

  1. deactivate-service-templates
  2. synchronize-online-stores
  3. remove-packages-from-service-nodes
  4. uninstall-module

If you want to ensure that all the cleanup steps can be carried out successfully, you can run each of these commands with the –check-only key. It performs all checks without making any changes to your CloudBlue Commerce installation.

To view the help page for the cleanup tool, run the tool without any arguments or run it with the --help (-h) option.

Note: You must run the cleanup tool on the management node as root.

Step 1. Deactivating Service Templates

You need to deactivate all service templates related to the WebHosting Linux module to make it impossible to buy and provision new WebHosting Linux subscriptions from Customer Panel (UX1). After deactivating a service template, all service plans based on it become no longer available for purchasing. To remove these plans from online stores (Marketplaces), you must synchronize the online stores.

To deactivate the service templates related to WebHosting Linux, run the script as follows:

# ./clean-up-whl-module.py [--check-only] deactivate-service-templates

Where:

[--check-only] is an optional parameter that performs all checks without making any changes to the CloudBlue Commerce installation.

Step 2. Synchronizing Online Stores

This is an optional step, but we highly recommend performing it. You should unpublish the service plans that are based on the deactivated service templates to make it impossible to buy and provision new WebHosting Linux subscriptions from online stores. Note that during the synchronization, all other settings, even those that are not related to service plans, will be synchronized as well. If you do not want to synchronize some of the online stores at this moment, synchronize those online stores manually later.

To synchronize all online stores, run the script as follows:

# ./clean-up-whl-module.py [--check-only] synchronize-online-stores

Where:

[--check-only] is an optional parameter that performs all checks without making any changes to the CloudBlue Commerce installation.

Step 3. Removing Packages from Service Nodes

This step removes all packages related to the WebHosting Linux module from service nodes. Any user data related to these modules is not removed. During this step, all nodes related to the WebHosting Linux module are detached automatically. While the nodes are detached, CloudBlue Commerce cannot operate on them. For this reason, we recommend performing this step outside normal business hours.

To remove all packages related to the WebHosting Linux module from service nodes, run the script as follows:

# ./clean-up-whl-module.py [--check-only] remove-packages-from-service-nodes

Where:

[--check-only] is an optional parameter that performs all checks without making any changes to the CloudBlue Commerce installation.

After this step is completed, you can manually remove these nodes from CloudBlue Commerce and decommission them if needed.

Step 4. Updating UI Configuration Files on Branding UI Cluster in Kubernetes

If you have a Branding UI Cluster in Kubernetes, perform the following:

  1. Log in to the Kubernetes node using SSH.
  2. Execute the following command:
    kubectl exec $(kubectl get pod -l service=branding-ui-cluster-ui --output=jsonpath={.items..metadata.name} | head -n 1) -c branding-ui-cluster-ui -- mv -f /mnt/brands/puitconf/{amt_st.properties,apache.properties,backup.properties,web_hosting.properties,common_filemanager.properties,crontabs.properties,db_manager.properties,domain_parking.properties,proftpd.properties,logrotate.properties} /mnt/brands/puitconf_d/
  3. Restart Branding UI Cluster pods.

Step 5. Uninstalling the WebHosting Linux Module

Note: During this step, the pa-agent and pau services will be restarted.

To remove all packages related to the WebHosting Linux module from the internal repository on the management node, run the script as follows:

# ./clean-up-whl-module.py [--check-only] uninstall-module

Where:

[--check-only] is an optional parameter that performs all checks without making any changes to the CloudBlue Commerce installation.

The Outcome

After all cleanup steps are performed, you will be able to upgrade CloudBlue Commerce to version 21.0. All items related to the WebHosting Linux module will be removed from CloudBlue Commerce:

  • Service templates will be disabled.
  • Subscriptions, including websites, databases, and applications, will be removed from CloudBlue Commerce.
  • Service nodes will be detached.
  • The WebHosting Linux module will be removed.