Set up high availability in Azure

Configure high availability for Cloud Management Platform in Azure

A high availability (HA) deployment of Cloud Management Platform (CMP) in Azure uses two or more VM nodes behind a Standard Azure Load Balancer, with a shared Azure Database for PostgreSQL flexible server and an Azure Files NFS share providing a common data layer across all nodes.

Create virtual machines

Create the required number of Azure virtual machines, such as one primary and one secondary, with either an Oracle Enterprise Linux 8 or RHEL 8 image.

Configure Cloud Management Platform

Perform the following steps on all instances.

Deploy Cloud Management Platform

  1. Deploy using the installer.

Initial platform setup

Perform the following steps on all instances.

  1. Launch the CMP web interface.
  2. Follow the steps in Complete initial setup.

Configure node connectivity

  1. Remove any public IPs created during deployment.
  2. Ensure you can connect to the instances, for example, using Azure Bastion, Azure Cloud Shell, or another VM.

Upgrade the platform

  1. Locate the latest release’s upgrader file from the Support Portal.

  2. SSH into the instance.

  3. Run the following commands, replacing latest-release-upgrader-url with the URL of the upgrader file:

    sudo su -
    wget latest-release-upgrader-url
    tar -xvzf cloudbolt_upgrader_*.tgz
    cd cloudbolt_upgrader_*
    ./upgrade_cloudbolt.sh
    

Prepare for database configuration

Perform the following steps on the primary instance.

The /var/opt/cloudbolt/.postgresql_password file contains postgresql_root_pass and postgresql_pass.

  1. Open an SSH session.

  2. Make a copy of the instance’s database:

    source /var/opt/cloudbolt/.postgresql_password
    export PGPASSWORD=${postgresql_pass}
    pg_dump -h localhost -p 5432 -U cb_dba -w --clean -F t -f /tmp/cloudbolt.tar cloudbolt
    
  3. Run the following command to update permissions on secret-key-for-cloudbolt.bin:

    chmod 777 /var/opt/cloudbolt/secrets/secret-key-for-cloudbolt.bin
    

Create and configure a PostgreSQL database

Create an Azure Database for PostgreSQL flexible server

  1. In the Azure portal, go to Azure Database for PostgreSQL flexible servers and select Create.
  2. Select a Subscription and Resource Group.
  3. Provide a Server name.
  4. Select the same region as your VMs.
  5. Select PostgreSQL version 18.
  6. For Workload type, select Dev/Test or Production.
  7. Configure high availability if required.
  8. Under Authentication, provide Administrator login: cb_dba and a password.
  9. Select Next : Networking >.
  10. Select Private Access (VNet Integration) under Connectivity method.
  11. Under Virtual network select a Virtual network that has a subnet that is delegated for use for PostgreSQL Flexible Server, or create a new one.
  12. Select Review + Create.
  13. Select Create.

After creating the database, select it and copy the Endpoint FQDN from the overview tab.

Configure the instances to use the database

Perform the following steps on the primary instance.

  1. Create the CMP database in the PostgreSQL database, replacing remote-db-dns-name, remote-db-user, and remote-db-pass:

    export PGPASSWORD='<remote-db-pass>'
    psql --host=remote-db-dns-name --port=5432 --username=remote-db-user --dbname=postgres <<END_OF_SQL
    drop database if exists cloudbolt with (force);
    create database cloudbolt;
    grant all privileges on database cloudbolt to cb_dba;
    END_OF_SQL
    
  2. Restore the database copy to the new PostgreSQL database, replacing remote-db-dns-name, remote-db-user, remote-db-pass, and remote-db-port:

    export PGPASSWORD='<remote-db-pass>'
    pg_restore -h remote-db-dns-name -U remote-db-user --no-owner --role=remote-db-user -w -p remote-db-port -e --clean --if-exists -d cloudbolt /tmp/cloudbolt.tar
    
  3. Run the following commands to set permissions for cb_dba, replacing remote-db-dns-name, remote-db-user, and remote-db-pass:

    export PGPASSWORD='<remote-db-pass>'
    psql --host=remote-db-dns-name --port=5432 --username=remote-db-user --dbname=postgres <<END_OF_SQL
    alter role cb_dba in database cloudbolt set search_path to cloudbolt,public;
    grant all privileges on database cloudbolt to cb_dba;
    END_OF_SQL
    
  4. Run the following commands to verify the database connection, ensuring they return values, replacing remote-db-dns-name, remote-db-user, remote-db-pass, and remote-db-port:

    psql postgresql://remote-db-user:remote-db-pass@remote-db-dns-name:remote-db-port/cloudbolt -c "\l" | grep -qw cloudbolt
    
  5. Copy the DATABASES section from /opt/cloudbolt/settings_local.py to /var/opt/cloudbolt/proserv/customer_settings.py, updating the password and hosts fields.

Perform the following steps on all instances.

  1. Run the following commands to stop and disable PostgreSQL:

    systemctl stop postgresql-18; systemctl disable postgresql-18
    

    The service is postgresql-18 on nodes installed with CMP 2026.3.97 or later, and postgresql-14 on older nodes.

Create and configure an Azure Files NFS file share

Register the NFS file share feature

If the AllowNfsFileShares feature is already registered, skip this step and continue to Create a storage account and file share.

  1. Register the AllowNfsFileShares feature in your Azure Subscription:

    az feature register --name AllowNfsFileShares --namespace Microsoft.Storage
    
  2. Verify feature registration:

    az feature show --name AllowNfsFileShares --namespace Microsoft.Storage --query properties.state
    

Create a storage account and file share

resourceGroup="<resource-group>"
storageAccountName="<orgname>cmpfiles"
location="<region>"

az storage account create \
    --resource-group $resourceGroup \
    --name $storageAccountName \
    --location $location \
    --sku Premium_LRS \
    --kind FileStorage

az storage share-rm create \
    --resource-group $resourceGroup \
    --storage-account $storageAccountName \
    --name nfscmpfiles \
    --enabled-protocol NFS \
    --root-squash NoRootSquash \
    --quota 100
$resourceGroup = "<resource-group>"
$storageAccountName = "<orgname>cmpfiles"
$location = "<region>"

az storage account create `
    --resource-group $resourceGroup `
    --name $storageAccountName `
    --location $location `
    --sku Premium_LRS `
    --kind FileStorage

az storage share-rm create `
    --resource-group $resourceGroup `
    --storage-account $storageAccountName `
    --name nfscmpfiles `
    --enabled-protocol NFS `
    --root-squash NoRootSquash `
    --quota 100

Configure the storage account

  1. In the Azure portal, go to Storage accounts and select the new storage account.
  2. Under Properties, select Networking.
  3. Under Public network access, select Manage.
  4. Next to Public network access, select Enable.
  5. Next to Public network access scope, select Enable from selected networks.
  6. Select the virtual networks, IP addresses, and resource instances that can access the account, and select Save.
  7. Under Settings, select Configuration.
  8. Set Secure transfer required to Disabled, and select Save.
  9. Under Data storage, select File shares.
  10. Select the file share.
  11. Select Connect.
  12. Select Linux.
  13. Copy the Mount point.

Configure NFS on the instances

  1. SSH into all instances.

  2. On all instances, run the following commands, using the mount path:

    sudo yum install nfs-utils
    mkdir /mnt/nfs
    sudo mount -t nfs -o vers=4,minorversion=1,sec=sys <storageaccount>.file.core.windows.net:/<storageaccount>/nfscmpfiles /mnt/nfs
    
  3. On the primary instance only, run the following commands:

    mv /var/opt/cloudbolt /mnt/nfs/cloudbolt
    mv /var/log/cloudbolt/jobs /mnt/nfs/jobs
    mv /var/www/html/cloudbolt/static /mnt/nfs/static
    
  4. On secondary instances only, run the following commands:

    rm -rf /var/opt/cloudbolt
    rm -rf /var/log/cloudbolt/jobs
    rm -rf /var/www/html/cloudbolt/static
    
  5. On all instances, run the following commands:

    mkdir /var/opt/cloudbolt
    mkdir /var/log/cloudbolt/jobs
    mkdir /var/www/html/cloudbolt/static
    sudo mount -t nfs -o vers=4,minorversion=1,sec=sys <storageaccount>.file.core.windows.net:/<storageaccount>/nfscmpfiles/cloudbolt /var/opt/cloudbolt
    sudo mount -t nfs -o vers=4,minorversion=1,sec=sys <storageaccount>.file.core.windows.net:/<storageaccount>/nfscmpfiles/jobs /var/log/cloudbolt/jobs
    sudo mount -t nfs -o vers=4,minorversion=1,sec=sys <storageaccount>.file.core.windows.net:/<storageaccount>/nfscmpfiles/static /var/www/html/cloudbolt/static
    
  6. On all instances, open the /etc/fstab file for editing, add the following lines (using the mount path), and save the file:

    <storageaccount>.file.core.windows.net:/<storageaccount>/nfscmpfiles/cloudbolt /var/opt/cloudbolt nfs rw,hard,intr,rsize=8192,wsize=8192,timeo=14 0 0
    <storageaccount>.file.core.windows.net:/<storageaccount>/nfscmpfiles/jobs /var/log/cloudbolt/jobs nfs rw,hard,intr,rsize=8192,wsize=8192,timeo=14 0 0
    <storageaccount>.file.core.windows.net:/<storageaccount>/nfscmpfiles/static /var/www/html/cloudbolt/static nfs rw,hard,intr,rsize=8192,wsize=8192,timeo=14 0 0
    
  7. On all instances, run mount -fav to validate the update.

Reboot instances

On all instances, run sudo reboot to reboot the instances.

Post-reboot checks

After rebooting, verify that essential services are starting and healthy on each of your nodes.

Apache HTTP server

  1. Check the httpd status:

    systemctl status httpd
    
  2. If httpd fails to start or is unhealthy, you may need to set SELinux to permissive mode, or create SELinux entries to grant httpd access to NFS share files.

    Option 1: Run SELinux in permissive mode

    1. Set SELinux to permissive for the current session:

      setenforce 0
      
    2. Open /etc/selinux/config for editing:

      vi /etc/selinux/config
      
    3. Set SELINUX to permissive and save the file:

      SELINUX=permissive
      
    4. Restart the CMP application:

      supervisorctl restart jobengine:* && systemctl restart httpd
      

    Option 2: Add SELinux entries

    1. Refer to How to Prepare SELinux Policies for CMP Appservers

httpd should now be starting and healthy. Ensure there are no errors in /var/log/cloudbolt/application.log. Load the CMP UI.

Firewall

  1. If httpd is healthy and you are unable to access the CMP UI, ensure the firewall is configured to allow access on the required ports. The following instructions are for firewalld:

    firewall-cmd --permanent --add-service=http
    firewall-cmd --permanent --add-service=https
    firewall-cmd --reload
    

CMP system status

Check System Status to ensure all services are green:

  1. In the CMP UI, go to Admin > All Admin > System Status.
  2. Under Health Checks, verify that all services are green.

Create an Azure Load Balancer

  1. In the Azure portal, go to Load balancers.
  2. Select Create > Standard Load Balancer.
  3. Select a Subscription and Resource Group.
  4. Provide a Name.
  5. Select the same Region as your VMs.
  6. Next to Type, select Public.
  7. Select Next : Frontend IP Configuration >.
    1. Select Add a frontend IP configuration.
      1. Provide Name: cmp-vip, select to create a new public IP address, and select Save.
  8. Select Next : Backend pools >.
    1. Select Add a backend pool.
      1. Provide Name: cmp-pool, select the instance virtual network, add the instances, and select Save.
  9. Select Next : Inbound rules >.
    • Select Add a load balancing rule to create a rule for HTTP.
      • Frontend IP address: cmp-vip
      • Backend pool: cmp-pool
      • Port: 80
      • Backend port: 80
      • Health probe: Create new
        • Name: cmp-check
        • Protocol: TCP
        • Port: 80
        • Select Save.
      • Session persistence: Source IP
      • Select Save.
    • Select Add a load balancing rule to create a rule for HTTPS.
      • Name: https
      • Frontend IP address: cmp-vip
      • Backend pool: cmp-pool
      • Port: 443
      • Backend port: 443
      • Health probe: cmp-check
      • Session persistence: Source IP
      • Select Save.
  10. Select Next : Outbound rule >.
    • Select Add an outbound rule.
      • Name: cmplb-out
      • Frontend IP address: cmp-vip
      • Backend pool: cmp-pool
      • Port allocation: Use the default number of outbound ports
      • Select Save.
  11. Select Review + create.
  12. Select Create.