Red Hat Training

A Red Hat training course is available for Red Hat Gluster Storage

Chapter 3. Installing Web Administration

This chapter covers installing Red Hat Gluster Web Administration using Ansible automation.

3.1. Prerequisites

Before installing Red Hat Gluster Web Administration, ensure the following prerequisites are met:

  1. Enable the following repositories on the Web Administration server:

    # subscription-manager repos --enable=rhel-7-server-rpms
    # subscription-manager repos --enable=rh-gluster-3-web-admin-server-for-rhel-7-server-rpms
  2. Enable the following repositories on the Gluster storage server:

    # subscription-manager repos --enable=rhel-7-server-rpms --enable=rh-gluster-3-for-rhel-7-server-rpms
    # subscription-manager repos --enable=rh-gluster-3-web-admin-agent-for-rhel-7-server-rpms
  3. Set up SSH password-less connection from the Web Administration server system to the remote Gluster servers in addition to itself (SSH to localhost).

    Note

    For information on how to set up SSH key-based authentication, see the Using Key-based Authentication section in the Red Hat Enterprise Linux System Administrator’s Guide.

  4. The Web Administration server and the Gluster Storage servers must have properly configured Fully Qualified Domain Name (FQDN) and should be resolved from the rest of the nodes.
Note

Ensure to use FQDNs for volumes creation as Web Administration does not support short hostnames. Volumes already created in the Gluster clusters using short names or IP addresses will display inconsistent data in the Web Administration interface.

Important

Before initiating Web Administration installation using tendrl-ansible, it is highly recommended to create the Gluster Cluster to be imported first in the absence of an existing one. If the Gluster cluster is created after installation of Web Administration, the cluster import operation may fail. In case of Web Administration manual installation, create the Gluster cluster first and then subsequently install the tendrl-node-agent to avoid potential cluster import failure issues.

3.2. Installation Workflow

The entire installation process goes through the following sequence:

  1. Installing the latest version of Ansible and tendrl-ansible.
  2. Creating inventory file with the required groups: tendrl-server and gluster-servers.
  3. Creating a site.yml playbook based on site.yml.sample from tendrl-ansible package.
  4. Executing the site.yml playbook and accessing the Web Administration environment.

To check if Tendrl minimal requirements and setup are satisfied, run the /usr/share/doc/tendrl-ansible-*/prechecks.yml playbook which is included in the sample playbook. If there are any problems with the prechecks.yml file then the sample site.yml file will fail, pointing you to the particular configuration problem. Running the prechecks.yml file is advisable before commencing installation.

Note

The site.yml.sample file can be accessed from this path: /usr/share/doc/tendrl-ansible-*/site.yml.sample

Note

See also the README file from tendrl-ansible package available on the following path: /usr/share/doc/tendrl-ansible-*/README.md

Ansible Groups

The sample site.yml playbook from tendrl-ansible package expects the hosts to be divided into two groups according to its functionality:

  1. tendrl-server: contains one machine acting as Web Administration server.
  2. gluster-servers: contains all the Red Hat Gluster Storage nodes.

Ansible Roles

The tendrl-ansible package contains two Ansible roles with tasks intended for a particular component:

  1. tendrl-ansible.tendrl-server: contains tasks for Web Administration server belonging to the tendrl-server group in the inventory file.

    Note

    For more information on this role and the variables, see the README file from tendrl-ansible package available on the following path: /usr/share/ansible/roles/tendrl-ansible.tendrl-server/README.md

  2. tendrl-ansible.tendrl-storage-node: contains tasks for Red Hat Gluster Storage nodes belonging to the gluster-servers group in inventory file.
Note

For more information on this role and the variables, see the README file from tendrl-ansible package available on the following path: /usr/share/ansible/roles/tendrl-ansible.tendrl-storage-node/README.md

Note

For more information on writing Ansible playbooks, see the Ansible playbooks documentation.

3.3. Web Administration Installation

The following procedure outlines the steps to install Web Administration the Ansible way.

Procedure. Installing Web Administration

  1. Install the latest version of Ansible and tendrl-ansible:

    # yum -y install ansible tendrl-ansible
    Note

    Verify the version installed by running ansible --version.

  2. Create an Ansible inventory file with two Ansible groups: tendrl-server and gluster-servers. Ensure to use FQDNs for tendrl-server and gluster-servers in the inventory file.

    Note

    For instructions on setting up an inventory file, see Ansible Inventory information in Ansible documentation.

  3. Create a site.yml file based on the site.yml.sample file:

    # cp /usr/share/doc/tendrl-ansible-*/site.yml.sample site.yml
  4. Edit the site.yml file using a preferred text editor and prospectively update the ansible variables in the playbook if required.

    Note

    The site.yml.sample file contains ansible variables with pre-defined default values. If required, edit the variables based on the system parameters and preferences.

    Note

    To configure TLS-based security for etcd, follow the instructions in the TLS Encryption Configuration chapter. After TLS encryption is configured, continue with the remaining steps below

  5. Verify SSH connection to all the nodes from the inventory file without asking for password or validation of public key by running:

    # ansible -i <inventory_file> -m ping all

    Example

    # ansible -i <inventory_file> -m ping all
    gl3.example.com | SUCCESS => {
        "changed": false,
        "failed": false,
        "ping": "pong"
    }
    Note

    Ansible should return SUCCESS and pong message for all the nodes like shown in the example above. Do not proceed unless the SSH connection is successfully established.

  6. Run the prepared site.yml playbook using the following command to set up the Web Administration server and the Storage nodes:

    # ansible-playbook -i <inventory_file> site.yml
  7. Log in to the Web Administration environment. For login instructions, see Chapter 4. Web Administration Login of this Guide.
Note

The tendrl-ansible.tendrl-server role creates the default user as admin and default password as adminuser. The default password is stored in the /root/password file of the Web Administration server.

3.3.1. Installation File Samples

Sample Inventory File

Here is an example of an inventory file for a 4-node Gluster cluster:

[tendrl-server]
tendrl.example.com

[gluster-servers]

gl1.example.com
gl2.example.com
gl3.example.com
gl4.example.com