Install a cluster

Step 1. Precheck

Before installing a new cluster it is recommended to run the Precheck action. By doing this, you make sure that all necessary YUM repositories are available, the cluster doesn’t contain hosts with the same IP addresses, and all other prerequisites are met. Do the following:

  1. Apply the Precheck action to the cluster selected on the Clusters page by clicking the actions default dark actions default light icon in the Actions column.

    Run the cluster precheck
    Run the cluster precheck
  2. Verify the requested action in the opened window.

    Verify the action
    Verify the action
  3. Open the Jobs page to see the result of the Precheck action. If the action completes successfully, the corresponding task changes its status from running to success. If the job fails, it switches to the failed status. Click the job on the Jobs page to see more detailed information about the errors that occurred.

    View jobs
    View jobs

    The window with job inner steps is opened. Click the ellipsis in the Details column for additional information on the current step.

    Switch to job details
    Switch to job details

    A job page contains two sections: ansible [ stdout] and ansible [ stderr ]. These are technical logs of the job that include information from standard I/O streams stdout/stderr. These logs can help to understand what caused the problems. There can also be the optional third section ansible [ check ]. These are the logs of the most frequent errors checks. The description of these errors is more simple and specific, than in two previous technical logs.

    Job details
    Job details
  4. If a task fails, you can expand its description and see the detailed logs. Find the cause of the error, fix it, and run the Precheck action again.

Step 2. Run installation

There are two ways to install cluster services:

  1. Whole cluster. In this method all services are installed automatically one by one after applying the Install action to a cluster.

  2. Single services. In this method each service is installed manually after applying one or more actions to it. This way is also suitable for installing new services in the already deployed cluster.

In both cases each service starts automatically after installation.

NOTE
In case of errors, you can find logs on the Jobs page.

Whole cluster

To install all cluster services within a single action, follow the steps:

  1. Apply the Install action to the cluster selected on the Clusters page by clicking the actions default dark actions default light icon in the Actions column.

    Switch to the whole cluster installation
    Switch to the whole cluster installation
  2. Verify the requested action in the opened window. Notice that setting the Reboot cluster servers after installation flag leads to the hosts being reboot after the installation is completed. Otherwise, the reboot should be done manually.

    Verify the action
    Verify the action
  3. Wait until the job is completed.

  4. If some service fails during installation, but the preceding services are installed successfully, you can try to fix errors and restart installation of all the failed services. To do this, choose the Reinstall action in the Actions column on the Clusters page.

    Installation restart
    Installation restart

Single services

To install one or several cluster services manually, you should add these services to the cluster and then perform the actions described in the following subsections.

CAUTION
Notice that services are installed one by one. Do not install another service until the installation of the previous one is completed.
  1. Open the Services tab on the cluster page. For each service that should be installed, click the actions default dark actions default light icon in the Actions column and select the Install action.

    Switch to installation of single services
    Switch to installation of single services
  2. Verify the action in the opened window.

    Verify the action for the Chrony service
    Verify the action for the Chrony service
    Verify the action for all services except Chrony
    Verify the action for all services except Chrony
  3. Wait until the job is completed. Then check that the service state has changed from created to installed.

  4. Repeat the previous actions for other services that should be installed.

Step 3. Check the cluster state after installation

As a result of successful installation, the cluster and its services change their state according to the following rules:

  • The cluster state, displayed in the State field on the Clusters page, is being changed from created to installed.

    The cluster state after successful installation
    The cluster state after successful installation
  • The state of cluster services, displayed on the Services tab of the cluster page, is being changed from created to installed.

    The state of cluster services after successful installation
    The state of cluster services after successful installation

Step 4. Connect to PostgreSQL via psql

In order to check that PostgreSQL is successfully installed and all necessary databases are created, do the following:

  1. Connect to the ADPG Server (via SSH, etc.) and login under the default user name postgres.

    $ sudo su - postgres
  2. List all PostgreSQL databases.

    $ psql -l

    The result should look like this.

                                      List of databases
       Name    |  Owner   | Encoding |   Collate   |    Ctype    |   Access privileges
    -----------+----------+----------+-------------+-------------+-----------------------
     postgres  | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 |
     template0 | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c/postgres          +
               |          |          |             |             | postgres=CTc/postgres
     template1 | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c/postgres          +
               |          |          |             |             | postgres=CTc/postgres
    (3 rows)
  3. Use one of the two commands:

    • psql — to connect to the default database;

    • psql <database_name> — to connect to the database with the specified name <database_name>.

      psql postgres

      After this you can send queries to the selected database via the psql client.

      postgres=# SELECT 1 AS test;
       test
      ------
          1
      (1 row)
Found a mistake? Seleсt text and press Ctrl+Enter to report it