-
Language:
English
-
Language:
English
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:
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
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
Set up SSH password-less connection from the Web Administration server system to the remote Gluster servers in addition to itself (SSH to localhost).
NoteFor 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.
- 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.
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.
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:
- Installing the latest version of Ansible and tendrl-ansible.
- Creating inventory file with the required groups: tendrl-server and gluster-servers.
-
Creating a
site.yml
playbook based onsite.yml.sample
from tendrl-ansible package. -
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.
The site.yml.sample file can be accessed from this path: /usr/share/doc/tendrl-ansible-*/site.yml.sample
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:
- tendrl-server: contains one machine acting as Web Administration server.
- 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:
tendrl-ansible.tendrl-server: contains tasks for Web Administration server belonging to the tendrl-server group in the inventory file.
NoteFor 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
- tendrl-ansible.tendrl-storage-node: contains tasks for Red Hat Gluster Storage nodes belonging to the gluster-servers group in inventory file.
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
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
Install the latest version of Ansible and tendrl-ansible:
# yum -y install ansible tendrl-ansible
NoteVerify the version installed by running
ansible --version
.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.
NoteFor instructions on setting up an inventory file, see Ansible Inventory information in Ansible documentation.
Create a
site.yml
file based on thesite.yml.sample
file:# cp /usr/share/doc/tendrl-ansible-*/site.yml.sample site.yml
Edit the
site.yml
file using a preferred text editor and prospectively update the ansible variables in the playbook if required.NoteThe site.yml.sample file contains ansible variables with pre-defined default values. If required, edit the variables based on the system parameters and preferences.
NoteTo 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
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" }
NoteAnsible should return
SUCCESS
andpong
message for all the nodes like shown in the example above. Do not proceed unless the SSH connection is successfully established.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
- Log in to the Web Administration environment. For login instructions, see Chapter 4. Web Administration Login of this Guide.
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