Enabling CloudBlue Connect Integration

Before proceeding with the integration, ensure that the Virtuozzo Application Management CloudBlue connector is installed on the dedicated AlmaLinux 9 VPS.

CloudBlue Connect Configuration File

To ensure the smooth connection of the CloudBlue Connect API with the PaaS platform, adjust the config.json file and start the following three applications:

  • cloudblue-fulfillments - processes fulfillments; creates and manages domains, projects, and users
  • cloudblue-usage - sends usage reports for active assets
  • cloudblue-usage-files - confirms processed usage files

1. Copy the config-logging.json config from the example. No further adjustments are required for this file.

1
cp /etc/cloudblue-connector/config-logging.json.example /etc/cloudblue-connector/config-logging.json

2. Copy the main configuration file example as your config.json file:

1
cp /etc/cloudblue-connector/config.json.example /etc/cloudblue-connector/config.json

The default configuration file looks as follows:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
{
    "vap_infra_domain": "virtuozzo.com",
    "vap_user_group": "beta",
    "misc": {
        "hidePasswordsInLog": true,
        "testMarketplaceId": "MP-43209",
        "testMode": true,
        "billingStatDelayInHours": 1
    },
    "apiEndpoint": "https://api.clarocloud.com.co/public/v1",
    "products": ["PRD-576-330-536"],
    "report_usage": ["PRD-576-330-536"],
    "templates": {
        "PRD-576-330-536": {"grant": "TL-757-345-804", "revoke": "Access to Application Management Platform has been revoked"}
    }
}

3. Change the default parameters for your /etc/cloudblue-connector/config.json configuration file:

  • vap_infra_domain - Application Management platform domain name
  • vap_user_group - Application Management platform user group name
  • misc - additional configuration options to define connector behavior:
    • hidePasswordsInLog - wipe plain-text passwords Connector events output (default: true)
    • testMarketplaceId - ID of the Marketplace to place asset requests for evaluation. If not set, all asset requests from all Marketplaces will be processed regardless of the “testMode” setting
    • testMode - test mode enabled (true) or not (false). If enabled, requests made in “testMarketplaceId” will be processed, and if not – ignored (default: false)
    • billingStatDelayInHours – delay for requesting usage data (required to guarantee that data is generated on the Application Management side). For example (if set to “1”), at 6:00, the connector will request data for 5:00
  • apiEndpoint - CloudBlue Connect API endpoint URL
    CloudBlue API endpoint
  • products - list of product IDs from CloudBlue Connect
    CloudBlue product ID
  • report_usage - list of product IDs with “pay-as-you-go” resource model from CloudBlue Connect (should be the same ID as in the “products” setting)
  • templates - set of template IDs that are used for your product when fulfillment is confirmed or cancelled, for example Products > Embedding > Approved Templates:
    CloudBlue template ID

4. For security reasons, the connector does not store passwords in plain text. For specifying the Application Management and CloudBlue API tokens use cloudblue-password-manager.

1
2
cloudblue-password-manager [-h] [--set-cloudblue-token]
                                  [--set-vap-token]

When specifying an API token, you can copy value from the Integrations > Tokens > API Key/Handle.

CloudBlue API token

5. Enable and start three other services - cloudblue-fulfillments.service, cloudblue-usage.service, and cloudblue-usage-files.service.

Note: To ensure that the cloudblue-fulfillments service runs properly, execute the following:

1
cloudblue-fulfillments

Additionally, you can verify cloudblue-usage and cloudblue-usage-files:

1
2
cloudblue-usage
cloudblue-usage-files
1
2
3
4
5
6
7
8
systemctl enable cloudblue-fulfillments.service
systemctl start cloudblue-fulfillments.service

systemctl enable cloudblue-usage.service
systemctl start cloudblue-usage.service

systemctl enable cloudblue-usage-files.service
systemctl start cloudblue-usage-files.service

Note: If you want to change Application Management user authentication token, use the same API key and generate a new authentication token. Otherwise, you can delete the connector.pem file, implying the subsequent generation of a new API key and a new Application Management admin user authentication token. Encrypted passwords are stored in the passwords_db.sqlite3 database.

1
2
3
4
5
6
cd /etc/cloudblue-connector/ ; ls -la

-rw-r--r-- 1 root root 4619 May 15 19:49 config-logging.json
-rw-r--r-- 1 root root 2471 Jun 19 17:22 config.json
-rw-r--r-- 1 root root 4567 Jun 19 17:27 connector.pem
-rw-r--r-- 1 root root 9753 Jun 19 17:27 passwords_db.sqlite3

Configuring Application Management Admin Panel

Below is a list of configurations required on the Virtuozzo Application Management side.

1. Generate an access token for the Application Management admin user by following the steps in the linked guide.

Application Management access token

2. In the admin panel, prepare a user group for users registered via the CloudBlue Connect. Ensure the following quotas are set as follows for this group:

  • account.minbalance = -9999 – to avoid automatic user deactivation
  • account.personal.min.threshold = 0 – to disable low balance notifications
  • sleep.after.inactive.hours = 0 – to disable automatic hibernation of the inactive environments
  • sleep.stop.after.hours = -1 – to disable automatic stop of the hibernated environments

Application Management quotas

3. Additionally, you can set this user group as default for signups.

signup group

What’s Next?