OpenStack Projects Module: Installation

Buy and download the module from the ModulesGarden website.

This module allows you to provision a public cloud service with two types of billing:

  • Reservation Model: a customer buys a cloud project with the predefined amount of virtual resources, such as vCPUs, RAM, storage.
  • Pay-as-you-Grow Model: a customer buys an access to a cloud project with “virtually” unlimited resources and pays only for the consumed resources.

Prerequisites

1. Deploy a Virtuozzo Infrastructure cluster.

2. Create the compute cluster.

3. Configure a storage policy named standard for boot volumes on Kubernetes master nodes. Ensure that the selected policy is available for all projects where you are planning to deploy Kubernetes.

4. You need access to the Virtuozzo Infrastructure admin panel.

5. Install WHMCS and obtain a license for it.

6. Configure WHMCS as follows:

  • You need access to WHMCS via SSH and the admin UI.
  • Configure at least one payment method, for example, Mail in Payment.
  • Create at least one client and user.

Configuring Virtuozzo Infrastructure

In this example, we will create all customers’ projects in a single domain in Virtuozzo Infrastructure.

1. Create a domain named whmcs-cloud dedicated to WHMCS customers. In the admin panel, go to SettingsProjects and users and click Create domain.

2. In the Default domain, go to Domain users and click Create user. Specify the following parameters:

  • Name: whmcs-admin
  • Role: System administrator
  • System permission set: Full
  • Domain permission set: Full
  • Image uploading: enabled

As a system administrator, you will be able to create an individual domain per customer. However, we recommend using projects for users, instead of domains. To use individual projects per customer in the whmcs-cloud domain, you can also create a user with the Domain administrator role in this domain.

Installing the module

You can find the official installation guide on the module website.

1. Connect to your WHMCS server via SSH:

1
ssh <user>@<whmcs_server_name>

2. Download a new version of the module and unzip it to your home folder:

1
2
wget https://virtuozzo-whmcs.s3.amazonaws.com/openstack_projects_1.7.0_whmcs_opensource.zip
unzip openstack_projects_1.7.0-i237_whmcs_opensource.zip

3. Copy the new version to the WHMCS module location:

1
sudo cp -r /home/user/modules/servers/OpenstackProjects /var/www/whmcs/modules/servers

4. Configure the license file:

1
sudo vi /var/www/whmcs/modules/servers/OpenstackProjects-backup/license_RENAME.php

5. Rename the license file:

1
sudo mv /var/www/whmcs/modules/servers/OpenstackProjects-backup/license_RENAME.php /var/www/whmcs/modules/servers/OpenstackProjects-backup/license.php

6. Change the file permissions:

1
sudo chmod 777 -R /var/www/whmcs/modules/servers/OpenstackProjects/storage

Configuring WHMCS

1. Create a connection to Virtuozzo Infrastructure. In the WHMCS admin panel, go to System SettingsProducts/ServicesServers and click Add new server. Specify the following parameters:

  • Name: eu3-cloud.virtuozzo.com - cloud
  • Hostname: eu3-cloud.virtuozzo.com
  • Module: OpenStack Projects
  • Username: whmcs-admin
  • Password: <your_password>
  • User type: System Admin
  • Identity Port/Path: 5000
  • Click Get Versions and select Identity Version: V3
  • Domain: Default
  • Project ID: <admin_project_id>
  • Secure: yes

whmcs configuration 1

Then, click Test Connection and save your server configuration.

2. Create a server group. Go to System SettingsProducts/ServicesServers and click Create New Group. Specify the following parameters:

  • Name: eu3-cloud
  • Selected servers: eu3-cloud.virtuozzo.com - cloud

3. Create a new group named Virtuozzo Cloud. Go to System SettingsProducts/Services and click Create a New Group.

4. Create a product:

4.1. Go to System Settings* → Products/Services and click Create a New Product. Specify the following parameters:

  • Product name: Virtuozzo Cloud Reservation - EU3
  • Product type: Other
  • Product group: Virtuozzo Cloud
  • Module: OpenStack Projects
  • Create as hidden: no

4.2. Click Continue to go to the Module Settings tab, and then select Server Group to eu3-cloud. Now, configure the module settings as follows:

  • Default Domain: whmcs-cloud
  • Client Projects Mode: Default
  • Project User Roles: project_admin, image_upload
  • OpenStack Panel Web Address: <self-service_url_with_domain_name>, for example, https://eu3-cloud.virtuozzo.com/login/whmcs-cloud
  • Default Project Name: Project-{clientId}-{serviceId}-{orderId}
  • Default User Name: {clientId}
  • Client Area Login Information: Username, Password
  • Configurable Options Settings->RAM Unit: GB
  • Automatically setup the product when you manually accept a pending order: yes

4.3. Go to the Pricing tab and configure the following:

  • Payment Type: recurring
  • One Time/Monthly->Enable: yes

5. Create configurable options to define resource quotas your users will be able to assign to the project:

5.1. Go to System SettingsProducts/ServicesVirtuozzo Cloud Reservation - EU3Module Settings and click Create Configurable Options. Select the following options:

  • cores|Cores

  • floating_ips|Floating IP Addresses

  • ram|RAM

  • gigabytes_standard|gigabytes_standard

  • loadbalancer|Load Balancer

  • Container infrastructure: hardlimit|Hard Limit

    This is the minimum required parameters, but you can add other quotas later.

5.2. Go to System SettingsProducts/ServicesVirtuozzo Cloud Reservation - EU3, open the Configurable option tab, and select the created options. Then, save changes.

5.3. Go to System SettingsProducts/ServicesConfigurable optionsConfigurable Option and edit the created options. You have the following options:

  • Sort order defines the order in which options appear in the option list during a service order.

  • Hidden hides an option from a client. You may need it if you want some quotas to be defined, but client cannot edit them.

    Edit cores|Cores as follows:

  • Option Name: cores|vCPU (cores is the variable name, and vCPU is the human-readable name of this parameter)

  • Minimum Quantity Required: 4

  • Maximum Allowed: 64

  • One Time/Monthly: 4 (this is your monthly price per single vCPU)

    Configure all other options based on the vCPU example and save changes. You configuration should look like this:

whmcs configuration 2

This is the minimum configuration you need to provide a public cloud with the reservation billing model.

Creating the first project

Let’s test our setup.

1. Log in to the WHMCS self-service interface under any user account and order the newly created product. Go to ServicesOrder New ServiceVirtuozzo CloudVirtuozzo Cloud Reservation - EU3. You configuration screen should looks like this:

whmcs project

2. Configure the required resources and continue to the checkout.

3. Once you order the service as a client, go to AdminOrdersList all orders, find your last oder, and accept it. The system will create a new project and user in Virtuozzo Infrastructure, it usually takes up to 5 minutes.

4. Now, return to your service on the ServicesMy servicesVirtuozzo Cloud Reservation - EU3 screen, open it, and go to Log in to Panel. The system will open the Virtuozzo Infrastructure self-service panel in a separate browser window. Enter the username and password provided by WHMCS, to be able to manage Virtuozzo Infrastructure services in the self-service panel. You can also configure single-sign on from WHMCS to Virtuozzo Infrastructure for secure login.