Cluster Extension Cloudbursting With AWS Using The Command Line And cmsh
Cluster Extension Cloudbursting With AWS Using The Command Line And cmsh
The command line and cmsh can be used to set up Cluster On Demand clusters for AWS and Azure, as discussed in Chapter 2. The command line and cmsh can also be used to set up Cluster Extension clusters, as are discussed in this chapter for AWS, and in Chapter 5 for Azure.
4.1 The cm-cluster-extension Script For Cluster Extension Clusters
4.1.1 Running The cm-cluster-extension Script On The Head Node For Cluster Extension Clusters
The cm-cluster-extension script is run from the head node. It is a part of the BCM cluster-tools package. It allows cloudbursting to be carried out entirely from the command line for Cluster Extension setups. It is a command line way of carrying out the configuration carried out by the GUI steps of section 3.1 for cloud provider login and cloud director configuration. After the script has completed its setup, then cmsh power commands can launch the required cloud nodes (sections 4.1.2 and 4.2).
The cm-cluster-extension script can be run in CLI mode (here) , or as a TUI dialog (here).
4.1.1.1 Running The cm-cluster-extension Command Line Options As A Shell Dialog
The administrator can specify command line options to cm-cluster-extension, as shown in its help text. The help text is displayed with the -h|--help option:
It can be run with the options directly (some output skipped):
Example
4.1.1.2 Running The cm-cluster-extension TUI
The more user-friendly way to run cm-cluster-extension is to run it without options. This brings up the main screen for its TUI (figure 4.1).

Figure 4.1: Configuration Processing With cm-cluster-extension: Main Screen
Cluster extension cloudbursting deployment can be carried out by selecting AWS (described in this chapter) or Azure (Chapter 5) from the main screen.
After AWS is selected, a new AWS provider can be set if none is already set up. If an AWS region has been configured previously, then its configuration can be removed. Testing only the network connectivity to the various AWS regions is also possible (figure 4.2).

Figure 4.2: Configuration Processing With cm-cluster-extension: Add, Unconfigure, Or Test
If a new AWS provider is selected, then a screen comes up asking for the credentials for Amazon (figure 4.3):

Figure 4.3: Configuration Processing With cm-cluster-extension: Obtaining Credentials
To paste the credentials from the clipboard, the cluster administrator may find it helpful to know that a paste to the TUI can usually be carried out with a <shift><insert>.
After checking and accepting the credentials, the administrator is asked to choose a setup type for the wizard. This can be a default setup, or it can be an advanced setup (figure 4.4):

Figure 4.4: Configuration Processing With cm-cluster-extension: Default Setup Or Advanced Setup
The default setup is recommended for most use cases. The default setup configures an OpenVPN network connection to the cluster extension. The advanced setup allows the network connection to the cluster extension to use Direct Connect for AWS, or another hardware-based VPN.
After a default or advanced setup has been chosen, the initial number of cloud nodes to be set up in the cloud can be set (figure 4.5). A default of 3 is suggested.

Figure 4.5: Configuration Processing With cm-cluster-extension: Setting The Initial Number Of Cloud Nodes
After setting an initial number of cloud nodes, the major regions into which these can be deployed are displayed (figure 4.6):

Figure 4.6: Configuration Processing With cm-cluster-extension: Major Regions Selection
After selecting a major region, the available regions under it into which the cloud nodes can be deployed are displayed (figure 4.7):

Figure 4.7: Configuration Processing With cm-cluster-extension: Regions Selection
After selecting one or more regions, the default region into which the cloud nodes can be deployed can be set (figure 4.8):

Figure 4.8: Configuration Processing With cm-cluster-extension: Default Region Selection
After setting the default region, the availability zone must be set for the public subnets (figure 4.9):

Figure 4.9: Configuration Processing With cm-cluster-extension: Availability Zone Selection For Subnets
A similar screen is displayed for the private subnets.
After setting the availability zones for the public and private subnets, a default instance type must be set for the regular cloud nodes. The major instance type is first set. For example, the m3 type is a common major instance type that can be set (figure 4.10):

Figure 4.10: Configuration Processing With cm-cluster-extension: Major Instance Type
After selecting the major instance type, the specific default instance type can be set for the regular cloud nodes. The m3.medium type, (3.75GB RAM, 4GB SSD, 3 EC2 compute units) is a common default that can be used: (figure 4.11):

Figure 4.11: Configuration Processing With cm-cluster-extension: Default Instance Type
After setting the default instance type for the regular cloud nodes, screens (similar to figures 4.10 and 4.11) are displayed to guide the administrator into setting a default instance type screen for the cloud director node type.
After having set the default instance types for the regular and cloud director nodes. the VPN connection to the cluster extension is configured.
If the advanced setup (figure 4.4) was selected earlier in the wizard, then the administrator can select the type of VPN connection to the cluster extension (figure 4.12):

Figure 4.12: Configuration Processing With cm-cluster-extension: Custom VPN Configuration
-
This can be the OpenVPN option that is automatically configured if the
advancedsetup is not chosen. -
With the
advancedsetup it is also possible to configure-
Direct Connect (for AWS)
-
or another hardware-based VPN
-
As part of VPN configuration, the wizard guides the administrator through the process of configuring the cluster extension so that the extension:
-
creates a new VPC for each cluster region. Alternatively, an existing VPC can be set.
-
creates subnets for its private and public networks per region by default. Alternatively, existing subnets can be used instead, but the cloud director must be able to contact the on-premises head node.
-
creates a security group for each region by default. Alternatively, existing security groups can be used instead.
After the VPN connection is configured, the summary screen (figure 4.13) is displayed. This lets the administrator look things over before deployment:

Figure 4.13: Configuration Processing With cm-cluster-extension: Summary Screen
The summary screen allows the following:
-
An administrator can just go ahead, save the configuration, and deploy the cluster extension. This is usually the expected action.
-
The configuration settings YAML file can be viewed. To scroll, the PageUp and PageDown keys are used.
-
The advanced configuration settings screen can be accessed in addition to the standard settings. The advanced settings are usually left alone.
-
The configuration file, <configuration file>, can be saved and the TUI can be exited. By default, the value of <configuration file> is set to
cm-cluster-extension.confin the home directory of the user. On exiting the TUI, deployment with that configuration can be carried out manually by running:
After cm-cluster-extension has carried out a successful deployment, the cloud nodes (the cloud director and regular cloud nodes) can be launched.
4.1.2 Launching The Cloud Director For Cluster Extension Clusters
Launching the cluster in the cloud requires that the cloud director (section 3.2) and cloud nodes be powered up. This can be done using Base View as described in sections 3.2 and 3.3. It can also be carried out in cmsh, for example, the cloud director eu-west-1-director can be powered up from device mode with:
Example
If the administrator is unsure of the exact cloud director name, one way it can easily be found is via tab-completion within the device mode of cmsh. Alternatively, the cloud directors for AWS can be listed with:
Example
As explained in section 3.2, the cloud director takes some time to power up. Its status can be followed in the notice messages sent to the cmsh session, or in the Base View event viewer. The status can also be queried via the status command in device node. For example, a watch instruction such as:
will show a series of outputs similar to:
4.2 Launching The Cloud Nodes
Once the cloud director is up on the cloud provider, the regular cloud nodes can also be powered up. This does however first require that the corresponding cloud node objects exist. That is, that CMDaemon must have a representation of the cloud nodes, even if they do not yet exist on the cloud provider. The objects must each have an IP address assigned to them that is consistent with that of the cloud director that manages them. That is, the network address of the cloud nodes must be what the cloud director expects.
BCM’s cluster extension utilities create 3 cloud node objects by default (figure 4.7, here). Cloning them is an easy way to extend the number of deployable cloud nodes.
With Base View, this can be done with the Clone command to assign properties to the clone that match the original (section 3.3), but advance the relevant IP addresses by 1. In cmsh, the clone command works the same way.
To launch a cloud node that has an object, a command can be run as follows:
4.2.1 Creating And Powering Up Many Nodes
For a large number of cloud nodes, the creation and assignment of IP addresses can be done with the clone option of the foreach command, (section 2.5.5.9 of the Administrator Manual), together with a node range specification. This is the same syntax as used to create non-cloud regular nodes with cmsh.
Earlier on in this section, starting from here, a TUI session was run that ended up creating
-
the cloud director
eu-west-1-directorand -
regular node objects
eu-west-1-cnode001up toeu-west-1-cnode003.
Continuing with the end result of that session, cloning many further regular cloud nodes can now be carried out by cloning eu-west-1-cnode003:
Example
As a reminder, the node range option -n eu-west-1-cnode004..eu-west-1-cnode012 would also be valid for the preceding example, and perhaps easier to comprehend, although longer.
The IP addresses are assigned to the cloud nodes via heuristics based on the value of eu-west1-cnode003 and its cloud director.
Powering up many cloud nodes can carried out using cmsh with the node range option as follows:
Example
4.3 Miscellaneous Cloud Tools
4.3.1 Setting Exclude Lists With excludelistsnippets
The excludelistsnippets submode allows extra exclude list entries to be created and configured for a provisioned file system.
These extra exclude list snippets are added to the regular exclude lists described in section 5.6 of the Administrator Manual. The addition of these exclude list snippets to the regular lists is done by setting a mode parameter to the snippets. The mode parameter sets the exclude list that is associated with an exclude list snippet, as indicated by the following table:
An exclude list snippet with an associated mode parameter behaves as if its entries are run along with the regular exclude list that is associated with it.
For example, to exclude the files /useless/test1 and /useless/test2, a snippet called test may be created as follows:
Example
When the test snippet is used, its corresponding .rsync file has the following configuration:
4.3.1.1 Setting Filesystem Synchronization For Edge Director Filesystem Partitions
The edge director role allows the sync/cm/shared property to decide if the /cm/shared filesystem partition should be synchronized.
Example
4.4 Connecting To AWS With Direct Connect Or A Hardware VPN
For simple configurations, BCM recommends, and provides, OpenVPN by default for cluster extension cloudbursting VPN connectivity. If there is a wish to use Direct Connect or a hardware VPN (for example, an IPSec tunnel), then BCM can be configured to work with those.
The AWS cluster extension always runs in an AWS Virtual Private Cloud (VPC). In the default deployment scenario, the head node communicates with the cloud nodes using an OpenVPN connection between the head node and the cloud director. In the case of a Direct Connect connection or a hardware VPN, the head node can be configured to communicate directly with the cloud director and cloud nodes.
Setting up Direct Connect or a VPN for a cluster extension can be carried out according to these three steps:
-
VPC creation (section 4.4.1). This step can be skipped if an existing VPC is to be used.
-
Connecting the local network to the VPC (section 4.4.2). The connection can be with, for example, Direct Connect, or a hardware VPN. This step can be skipped if the local network is already connected to an existing VPC via a Direct Connect or a hardware VPN connection.
-
Configuring and deploying the cluster extension (section 4.4.3).
4.4.1 Creating a VPC
The Amazon Virtual Private Cloud (VPC) is a logically isolated section of the AWS cloud. A VPC allows complete control over the networking environment for cloud resources used by the cluster extension. The VPC enables the cloud director and cloud nodes to securely communicate with each other and can be extended to the local network of the cluster. Documentation for Amazon VPC can be found at:
https://docs.aws.amazon.com/vpc/latest/userguide/what-is-amazon-vpc.html
A new VPC can be created and configured for the cluster extension as follows:
-
After logging in to the AWS management console, https://console.aws.amazon.com/console/, the following navigation path can be followed:
Services>VPC>VPC Dashboard> VPCs >Create VPC. -
An IPv4 CIDR block can be set to a desired range. This range should not conflict with the address space used on-premises. A possible range could be, for example:
10.42.0.0/16 -
Once the VPC range is set, a subnet can be set via the options under the navigation path:
VIRTUAL PRIVATE CLOUD>Subnets>Create subnet. -
The VPC created in step 2 is selected as the VPC during the
Create subnetdialog. An IPv4 CIDR block that is a subnet of the VPC range must also be defined in theCreate subnetdialog. A possible subnet range would be, for example:10.42.0.0/24
4.4.2 Connecting The Local Network To The VPC
Amazon offers two options to connect the local network to the VPC: Direct Connect and VPN.
4.4.2.1 Connecting Via Direct Connect
To connect the local network to the VPC via Direct Connect requires a private virtual interface. Amazon’s instructions to use AWS Direct Connect to access a VPC are at:
https://docs.aws.amazon.com/directconnect/latest/UserGuide/Welcome.html
4.4.2.2 Connecting Via A Site-To-Site Connection Using A VPN
Connecting an on-premises network to the virtual network using a VPN requires an Amazon Site-to-Site connection. Amazon’s instructions for configuring a site-to-site VPN connection are at:
https://docs.aws.amazon.com/vpn/latest/s2svpn/SetUpVPNConnections.html
The site-to-site connection consists of 4 components:
-
a customer gateway (routes traffic from VPC to local network)
-
a target gateway (routes traffic from local network to VPC)
-
a security group
-
a connection
The target gateway can either be a virtual private gateway or a transit gateway, depending on the configuration of the other AWS resources.
If the customer gateway device does not support BGP, then the site-to-site connection needs to be configured for static routing. The default Static IP Prefixes are: 10.141.0.0/16, 192.168.200.0/24.
4.4.3 Configuring And Deploying The Cluster Extension
Once IP connectivity from on-prem to the AWS virtual network is running, the final step is creating the cluster extension using the newly created site-to-site connection.
4.4.3.1 Getting Through Shorewall
First, the firewall on the head node must be adjusted to accept traffic from the cloud subnet. Using the openports mode of the firewall role in cmsh, one rule is added per port that must be reachable from the peer subnet, restricting the source address to that subnet where possible:
The add command is repeated for each required port and protocol. The shorewall service is restarted automatically after commit.
4.4.3.2 Cluster Extension Advanced Settings Configuration
A cluster extension can now be created using the cm-cluster-extension utility in TUI mode as explained in section 4.1.1, here.
However, on reaching the summary screen (figure 4.13, here), the cluster administrator should not immediately select the Save config & deploy option, but should first go to the Advanced settings option, which opens up an Advanced plugin configuration screen (figure 4.14):

Figure 4.14: Cluster Extension Configuration Processing: Advanced Plugins Screen
The clusterextension option should be selected, which opens up an advanced options settings screen (figure 4.15):

Figure 4.15: Cluster Extension Configuration Processing: Advanced Plugins For ’clusterextension’ Options Screen
In this screen:
-
the
Create tunnel networksoption should be set toFalse -
the
VPC for region<region> should be set to the VPC created for the cluster extension. The cluster extension is what is being connected to via Direct Connect or via a site-to-site connection -
The
Security groupsto use should be set for the cloud nodes and the cloud director.
4.4.3.3 Custom Security Groups Configuration
For the security group it is important to realize that the default security groups, as created by the cluster extension utility, do not accept traffic from the IPSec tunnel. It is recommended to create a custom security group, and to use that for both the director and the nodes. To create this security group:
-
From the AWS management console, the following navigation path is used:
VPC Dashboard>Security Groups>Create security group -
The cluster extension VPC is selected
-
A new inbound rule is added, to accept all traffic from the cluster and the VPC. For example:
192.168.200.0/24and10.42.0.0/16.
The TUI advanced settings screens can be backed out of by selecting Back twice. The option Save config & deploy can then be selected to create the cluster extension.
4.4.3.4 Cloud Node Certificate Autosigning
By default BCM does not issue certificates for nodes on the external network. This means that for cloud nodes the certificates need to be issued manually, once for every new cloud node.
Alternatively, to automatically sign certificate requests by cloud nodes, autosign can be enabled by the administrator for external networks. Autosigning may be a security concern, as this allows anyone on the external network to request a node certificate. Autosign can be enabled on externalnet in cmsh as follows:
The cluster extension can now be deployed as explained in section 4.1.2.