This is the multi-page printable view of this section. Click here to print.

Return to the regular view of this page.

Creating a cluster using MC

After you install and configure MC, you can use Management Console to install a Vertica cluster on hosts where Vertica software has not been installed.

Enterprise Mode only

After you install and configure MC, you can use Management Console to install a Vertica cluster on hosts where Vertica software has not been installed. The Cluster Installation assistant lets you specify the hosts you want to include in your Vertica cluster, loads the Vertica software onto the hosts, validates the hosts, and assembles the nodes into a cluster.

Complete the following tasks:

  1. Prepare the hosts - Prepare each host that will become a node in the cluster.

  2. Create a private key file - MC needs password-less SSH to connect to hosts and install Vertica software. Create a private key to enable MC access to the hosts.

  3. Use the MC cluster installation wizard - Use the wizard to install a Vertica cluster on hosts that do not have Vertica software already installed on them.

  4. Validate hosts and create the cluster - Host validation is the process where the MC runs tests against each host in a proposed cluster. You must validate hosts before the MC can install Vertica on each host.

After you successfully create a cluster using MC, see Create a database on a cluster.

1 - Prepare the hosts

This topic applies only to on-premises installations.

This topic applies only to on-premises installations.

Before you can install a Vertica cluster using the MC, you must prepare each host that will become a node in the cluster. The cluster creation process runs validation tests against each host before it attempts to install the Vertica software. These tests ensure that the host is correctly configured to run Vertica.

Validate the hosts

The validation tests provide:

  • Warnings and error messages when they detect a configuration setting that conflicts with the Vertica requirements or any performance issue

  • Suggestions for configuration changes when they detect an issue

All hosts must pass validation before the cluster can be created.

If you accepted the default configuration options when installing the OS on your host, then the validation tests will likely return errors, since some of the default options used on Linux systems conflict with Vertica requirements. See Operating system configuration overview for details on OS settings. To speed up the validation process you can perform the following steps on the prospective hosts before you attempt to validate the hosts. These steps are based on Red Hat Enterprise Linux and CentOS systems, but other supported platforms have similar settings.

2 - Create a private key file

Before you can install a cluster, Management Console must be able to access the hosts on which you plan to install Vertica.

Before you can install a cluster, Management Console must be able to access the hosts on which you plan to install Vertica. MC uses password-less SSH to connect to the hosts and install Vertica software using a private key file.

If you already have a private key file that allows access to all hosts in the potential cluster, you can use it in the cluster creation wizard.

Create a private key file

  1. Log into the server as root or as a user with sudo privileges.

  2. Change to your home directory.

    $ cd ~
    
  3. Create an .ssh directory if one does not already exist.

    $ mkdir .ssh
    
  4. Generate a passwordless private key/public key pair.

    $ ssh-keygen -q -t rsa -f ~/.ssh/vid_rsa -N ''
    

    This command creates two files: vid_rsa and vid_rsa.pub. The vid_rsa file is the private key file that you upload to the MC so that it can access nodes on the cluster and install Vertica. The vid_rsa.pub file is copied to all other hosts so that they can be accessed by clients using the vid_rsa file.

  5. Make your .ssh directory readable and writable only by yourself.

    $ chmod 700 /root/.ssh
    
  6. Change to the .ssh directory.

    $ cd ~/.ssh
    
  7. Edit sshd.config as follows to disable password authentication for root:

    PermitRootLogin without-password
    
  8. Concatenate the public key into to the file vauthorized_keys2.

    $ cat vid_rsa.pub >> vauthorized_keys2
    
  9. If the host from which you are creating the public key will also be in the cluster, copy the public key into the local-hosts authorized key file:

    cat vid_rsa.pub >> authorized_keys
    
  10. Make the files in your .ssh directory readable and writable only by yourself.

    $ chmod 600 ~/.ssh/*
    
  11. Create the .ssh directory on the other nodes.

    $ ssh <host> "mkdir /root/.ssh"
    
  12. Copy the vauthorized key file to the other nodes.

    $ scp -r /root/.ssh/vauthorized_keys2 <host>:/root/.ssh/.
    
  13. On each node, concatenate the vauthorized_keys2 public key to the authorized_keys file and make the file readable and writable only by the owner.

    $ ssh <host> "cd /root/.ssh/;cat vauthorized_keys2 >> authorized_keys; chmod 600 /root/.ssh/authorized_keys"
    
  14. On each node, remove the vauthorized_keys2 file.

    $ ssh -i /root/.ssh/vid_rsa <host> "rm /root/.ssh/vauthorized_keys2"
    
  15. Copy the vid_rsa file to the workstation from which you will access the MC cluster installation wizard. This file is required to install a cluster from the MC.

A complete example of the commands for creating the public key and allowing access to three hosts from the key is below. The commands are being initiated from the docg01 host, and all hosts will be included in the cluster (docg01 - docg03):

ssh docg01
cd ~/.ssh
ssh-keygen -q -t rsa -f ~/.ssh/vid_rsa -N ''
cat vid_rsa.pub > vauthorized_keys2
cat vid_rsa.pub >> authorized_keys
chmod 600 ~/.ssh/*
scp -r /root/.ssh/vauthorized_keys2 docg02:/root/.ssh/.
scp -r /root/.ssh/vauthorized_keys2 docg03:/root/.ssh/.
ssh docg02 "cd /root/.ssh/;cat vauthorized_keys2 >> authorized_keys; chmod 600 /root/.ssh/authorized_keys"
ssh docg03 "cd /root/.ssh/;cat vauthorized_keys2 >> authorized_keys; chmod 600 /root/.ssh/authorized_keys"
ssh -i /root/.ssh/vid_rsa docg02 "rm /root/.ssh/vauthorized_keys2"
ssh -i /root/.ssh/vid_rsa docg03 "rm /root/.ssh/vauthorized_keys2"
rm ~/.ssh/vauthorized_keys2

3 - Use the MC cluster installation wizard

The Cluster Installation Wizard guides you through the steps required to install a Vertica cluster on hosts that do not already have Vertica software installed.

The Cluster Installation Wizard guides you through the steps required to install a Vertica cluster on hosts that do not already have Vertica software installed.

Prerequisites

Before you proceed, make sure you:

  • Installed and configured Management Console.

  • Prepared the hosts that you will include in the Vertica database cluster.

  • Created the private key (pem) file and copied it to your local machine.

  • Obtained a copy of your Vertica license if you are installing the Premium Edition. If you are using the Community Edition, a license key is not required.

  • Downloaded the Vertica server RPM (or DEB file).

  • Have read/copy permissions on files stored on the local browser host that you will transfer to the host on which MC is installed.

Permissions on files to transfer to MC

On your local workstation, you must have at least read/write privileges on files you'll upload to MC through the Cluster Installation Wizard. These files include the Vertica server package, the license key (if needed), the private key file, and an optional CSV file of IP addresses.

Create a Vertica cluster using MC

  1. Connect to Management Console and log in as an MC administrator.

  2. On MC's Home page, click the Provisioning task. The Provisioning dialog appears.

  3. Click Create a cluster.

  4. The Create Cluster wizard opens. Provide the following information:

    1. Cluster name—A label for the cluster. Choose a name that is unique within MC. IF you do not enter a name here, MC assigns a random unique cluster name. You can edit the name later when you view the cluster on the Infrastructure page. Note that this name is an alias that exists only in MC. If you reimport the cluster, you would need to edit the cluster name again to reestablish this name.

    2. Vertica Admin User—The user that is created on each of the nodes when they are installed, typically 'dbadmin'. This user has access to Vertica and is also an OS user on the host.

    3. Password for the Vertica Admin User—The password you enter (required) is set for each node when MC installs Vertica.

    4. Vertica Admin Path—Storage location for catalog files, which defaults to /home/dbadmin unless you specified a different path during MC configuration (or later on MC's Settings page).

  5. Click Next and specify the private key file and host information:

    1. Click Browse and navigate to the private key file (vid_rsa) that you created earlier.

    2. Include the host IP addresses. You have three options:

      Specify later (but include number of nodes). This option allows you to specify the number of nodes, but not the specific IPs. You can specify the specific IPs before you validate hosts.

      Import IP addresses from local file. You can specify the hosts in a CSV file using either IP addresses or host names.

      Enter a range of IP addresses. You can specify a range of IPs to use for new nodes. For example 192.168.1.10 to 192.168.1.30. The range of IPs must be on the same or contiguous subnets.

  6. Click Next and select the software and license:

    1. Vertica Software. If one or more Vertica packages have been uploaded, you can select one from the list. Otherwise, select Upload a new local vertica binary file and browse to a Vertica server file on your local system.

    2. Vertica License. Click Browse and navigate to a local copy of your Vertica license if you are installing the Premium Edition. Community Edition versions require no license key.

  7. Click Next. The Create cluster page opens. If you did not specify the IP addresses, select each host icon and provide an IP address by entering the IP in the box and clicking Apply for each host you add.

You are now ready to Validate hosts and create the cluster.

4 - Validate hosts and create the cluster

Host validation is the process where the MC runs tests against each host in a proposed cluster.

Host validation is the process where the MC runs tests against each host in a proposed cluster.

You can validate hosts only after you have completed the cluster installation wizard. You must validate hosts before the MC can install Vertica on each host.

At any time during the validation process, but before you create the cluster, you can add and remove hosts by clicking the appropriate button in the upper left corner of the page on MC. A Create Cluster button appears when all hosts that appear in the node list are validated.

How to validate hosts

To validate one or more hosts:

  1. Connect to Management Console and log in as an MC administrator.

  2. On the MC Home page, click the Databases and Clusters task.

  3. In the list of databases and clusters, select the cluster on which you have recently run the cluster installation wizard (Creating... appears under the cluster) and click View.

  4. Validate one or several hosts:

    • To validate a single host, click the host icon, then click Validate Host.

    • To validate all hosts at the same time, click All in the Node List, then click Validate Host.

    • To validate more than one host, but not all of them, Ctrl+click the host numbers in the node list, then click Validate Host.

  5. Wait while validation proceeds.

    The validation step takes several minutes to complete. The tests run in parallel for each host, so the number of hosts does not necessarily increase the amount of time it takes to validate all the hosts if you validate them at the same time. Hosts validation results in one of three possible states:

    • Green check mark—The host is valid and can be included in the cluster.

    • Orange triangle—The host can be added to the cluster, but warnings were generated. Click the tests in the host validation window to see details about the warnings.

    • Red X—The host is not valid. Click the tests in the host validation window that have red X's to see details about the errors. You must correct the errors re-validate or remove the host before MC can create the cluster.

      To remove an invalid host: Highlight the host icon or the IP address in the Node List and click Remove Host.

All hosts must be valid before you can create the cluster. Once all hosts are valid, a Create Cluster button appears near the top right corner of the page.

How to create the cluster

  1. Click Create Cluster to install Vertica on each host and assemble the nodes into a cluster.

    The process, done in parallel, takes a few minutes as the software is copied to each host and installed.

  2. Wait for the process to complete. When the Success dialog opens, you can do one of the following:

    • Optionally create a database on the new cluster at this time by clicking Create Database

    • Click Done to create the database at a later time

See Creating a Database on a Cluster for details on creating a database on the new cluster.

5 - Create a database on a cluster

After you use the MC Cluster Installation Wizard to create a Vertica cluster, you can create a database on that cluster through the MC interface.

After you use the MC Cluster Installation Wizard to create a Vertica cluster, you can create a database on that cluster through the MC interface. You can create the database on all cluster nodes or on a subset of nodes.

If a database had been created using the Administration Tools on any of the nodes, MC detects (autodiscovers) that database and displays it on the Manage (Cluster Administration) page so you can import it into the MC interface and begin monitoring it.

MC allows only one database running on a cluster at a time, so you might need to stop a running database before you can create a new one.

The following procedure describes how to create a database on a cluster that you created using the MC Cluster Installation Wizard. To create a database on a cluster that you created by running the install_vertica script, see Creating an Empty Database.

Create a database on a cluster

To create a new empty database on a new cluster:

  1. If you are already on the Databases and Clusters page, skip to the next step. Otherwise:

    1. Connect to MC and sign in as an MC administrator.

    2. On the Home page, click Existing Infrastructure.

  2. If no databases exist on the cluster, continue to the next step. Otherwise:

    1. If a database is running on the cluster on which you want to add a new database, select the database and click Stop.

    2. Wait for the running database to have a status of Stopped.

  3. Click the cluster on which you want to create the new database and click Create Database.

  4. The Create Database wizard opens. Provide the following information:

    • Database name and password. See Creating a database name and password for rules.

    • Optionally click Advanced to open the advanced settings and change the port, and catalog path, and data path. By default the MC application/web server port is 5450 and paths are /home/dbadmin, or whatever you defined for the paths when you ran the cluster creation wizard. Do not use the default agent port 5444 as a new setting for the MC application/web server port. See MC Settings > Configuration for port values.

  5. Click Continue.

  6. Select nodes to include in the database.

    The Database Configuration window opens with the options you provided and a graphical representation of the nodes appears on the page. By default, all nodes are selected to be part of this database (denoted by a green check mark). You can optionally click each node and clear Include host in new database to exclude that node from the database. Excluded nodes are gray. If you change your mind, click the node and select the Include check box.

  7. Click Create in the Database Configuration window to create the database on the nodes.

    The creation process takes a few moments and then the database is started and a Success message appears.

  8. Click OK to close the success message.

    The Database Manager page opens and displays the database nodes. Nodes not included in the database are gray.