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 and all the Gluster storage servers: Enable the following repository on the Web Administration server: Enable the following repositories on all the Gluster storage servers: Set up SSH password-less connection from the Web Administration server system to the remote Gluster servers in addition to localhost (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 . If the httpd package is already installed on the Web Administration server, stop the httpd service before continuing with the installation: 3.2. Installation Workflow To install Web Administration, follow the sequence outlined below. For detailed instructions to execute the following sequence, see the section entitled Web Administration Installation of this Guide. Installing the latest version of Ansible and tendrl-ansible on the Web Administration server. Creating inventory file with required groups: tendrl_server and gluster_servers with mandatory and optional ansible variables. Executing the site.yml playbook and accessing the Web Administration environment. Note See also the README file from tendrl-ansible package available at the following path: /usr/share/doc/tendrl-ansible-1.6.3/README.md Ansible Groups The 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. Note For more information about this role and the variables, see the README file from tendrl-ansible package available at 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 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-storage-node/README.md 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 on the Web Administration server: Note Verify that the latest Ansible package is obtained from the rhel-7-server-ansible-2-rpms channel before executing the following steps. Additionally, ensure that the Ansible version is the same on the Web Administration server as available on the storage nodes. Note Latest version of Web Administration is compatible with the latest version of Ansible. Web Administration is not compatible with versions below Ansible 2.5. Create an Ansible inventory file with two Ansible groups: tendrl_server and gluster_servers . Ensure to use FQDNs for all the hosts in the inventory file as shown in the following example: Sample Inventory groups Note For instructions on setting up an inventory file, see Ansible Inventory file setup in Ansible documentation . Add the following required Ansible variables with their corresponding values in the inventory file: etcd_ip_address: configures where etcd instance is listening etcd_fqdn: configures Web Administration components to be able to connect to the etcd graphite_fqdn: configures Web Administration components to be able to connect to graphite Sample Inventory variables Note For more detail, see the Sample Inventory variables at the end of this installation workflow. Add any other optional variables in the inventory file as required. The other variables are listed in the Ansible roles README files at the following paths. Enable or disable features by specifying values to the variables such as etcd-tls client authentication. For detailed TLS configuration instructions, see Chapter 5. TLS Encryption Configuration of this Guide. Note The firewall configuration variable is enabled by default. Note For detailed inventory file configuration, see the README.md file provided with the installation at the following path: Copy the site.yml playbook into the working directory where the inventory file is stored. Copy the prechecks.yml file into the inventory file directory: Set up SSH password-less connection from the Web Administration server system to the remote Gluster servers. Note For information about 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 . Verify SSH connection to all the nodes from the inventory file without asking for password or validation of public key by running: Example Note Ansible should return SUCCESS and pong message for all the nodes as shown in the example above. Do not proceed until the SSH connection is successfully established. To check if Web Administration minimal requirements and setup are met, run the prechecks playbook: Note If there are any missing requirements, the prechecks playbook will detect it immediately, and direct your attention to the specific problem before running the installation. Run the prepared site.yml playbook using the following command to set up the Web Administration server and the Storage nodes: Log in to the Web Administration environment. For login instructions, see the Web Administration Login chapter 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. Sample Inventory Variables If there is a single network interface on all machines, the example inventory variables would be as follows: In the above example: 192.0.2.1 is the IP address of the Web Administration server tendrl.example.com is the hostname of the Web Administration server tendrl.example.com hostname is translated to IP address 192.0.2.1. See the full description in the README file of tendrl-ansible.tendrl-server role and pay attention to the values you specify there when you use multiple network interfaces on the machines. You can define these variables in variable files or from the command line directly, but including them into the inventory file provides you with a single file with a full description of tendrl-ansible setup for future reference. The consolidated variables in the inventory file can be used for the cluster expansion process and also to ensure the installation configuration is intact. The inventory file does not contain the grafana admin password which is stored in the grafana_admin_passwd file generated during tendrl-ansible execution.

Commands:
subscription-manager repos --enable=rhel-7-server-rpms subscription-manager repos --enable=rhel-7-server-ansible-2-rpms
subscription-manager repos --enable=rh-gluster-3-web-admin-server-for-rhel-7-server-rpms
subscription-manager repos --enable=rh-gluster-3-for-rhel-7-server-rpms subscription-manager repos --enable=rh-gluster-3-web-admin-agent-for-rhel-7-server-rpms
systemctl stop httpd
yum install tendrl-ansible
[tendrl_server] tendrl.example.com [gluster_servers] gl1.example.com gl2.example.com gl3.example.com gl4.example.com
[all:vars] etcd_ip_address=192.0.2.1 etcd_fqdn=tendrl.example.com graphite_fqdn=tendrl.example.com
/usr/share/ansible/roles/tendrl-ansible.tendrl-server/README.md /usr/share/ansible/roles/tendrl-ansible.tendrl-storage-node/README.md
less /usr/share/doc/tendrl-ansible-1.6.3/README.md
cp /usr/share/doc/tendrl-ansible-1.6.3/site.yml .
cp /usr/share/doc/tendrl-ansible-1.6.3/prechecks.yml .
ansible -i <inventory_file> -m ping all
ansible -i <inventory_file> -m ping all gl3.example.com | SUCCESS => { "changed": false, "failed": false, "ping": "pong" }
ansible-playbook -i <inventory_file> prechecks.yml
ansible-playbook -i <inventory_file> site.yml
[all:vars] etcd_ip_address=192.0.2.1 etcd_fqdn=tendrl.example.com graphite_fqdn=tendrl.example.com