搜索

此内容没有您所选择的语言版本。

Chapter 3. Installing Web Administration

download PDF

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 and all the Gluster storage servers:

    # subscription-manager repos --enable=rhel-7-server-rpms
    
    # subscription-manager repos --enable=rhel-7-server-ansible-2-rpms
  2. Enable the following repository on the Web Administration server:

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

    # 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
  4. 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.

  5. If the httpd package is already installed on the Web Administration server, stop the httpd service before continuing with the installation:

    # systemctl stop httpd

3.2. Installation Workflow

To install Web Administration, follow the sequence outlined below. For detailed instructions to execute the following sequence, see the next section entitled Web Administration Installation of this Guide.

  1. Installing the latest version of Ansible and tendrl-ansible on the Web Administration server.
  2. Creating inventory file with required groups: tendrl_server and gluster_servers with mandatory and optional ansible variables.
  3. 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:

  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 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

  2. 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

  1. Install the latest version of Ansible and tendrl-ansible on the Web Administration server:

    # yum install tendrl-ansible
    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.

  2. 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

    [tendrl_server]
    tendrl.example.com
    
    [gluster_servers]
    
    gl1.example.com
    gl2.example.com
    gl3.example.com
    gl4.example.com
    Note

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

  3. 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

      [all:vars]
      
      etcd_ip_address=192.0.2.1
      etcd_fqdn=tendrl.example.com
      graphite_fqdn=tendrl.example.com
      Note

      For more detail, see the Sample Inventory variables at the end of this installation workflow.

  4. 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.

    # /usr/share/ansible/roles/tendrl-ansible.tendrl-server/README.md
    # /usr/share/ansible/roles/tendrl-ansible.tendrl-storage-node/README.md
    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:

    # less /usr/share/doc/tendrl-ansible-1.6.3/README.md
  5. Copy the site.yml playbook into the working directory where the inventory file is stored.

    # cp /usr/share/doc/tendrl-ansible-1.6.3/site.yml .
  6. Copy the prechecks.yml file into the inventory file directory:

    # cp /usr/share/doc/tendrl-ansible-1.6.3/prechecks.yml .
  7. 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.

  8. 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 as shown in the example above. Do not proceed until the SSH connection is successfully established.

  9. To check if Web Administration minimal requirements and setup are met, run the prechecks playbook:

    # ansible-playbook -i <inventory_file> prechecks.yml
    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.

  10. 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
  11. 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:

[all:vars]

etcd_ip_address=192.0.2.1
etcd_fqdn=tendrl.example.com
graphite_fqdn=tendrl.example.com

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.

Red Hat logoGithubRedditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

© 2024 Red Hat, Inc.