Ansible Module Installation & Configuration

The following sections provide instructions for installing, configuring, and setting up the solution environment. Before you begin you should have a design for implementation based on the Ansible modules, playbooks, and variables available in the Ansible Modules package.

Installation Prerequisites

To install and configure the KumoScale software Ansible Modules package you must meet the following requirements:

  1. The Ansible software will be installed on one of the following platforms:
    • CentOS 7.x
    • CentOS 8.x.
    • Ubuntu 18.x with multipath disabled for the NVMe protocol. To disable multipath for the NVMe protocol:
      • echo "options nvme_core multipath=N" > /etc/modprobe.d/50-nvme_core.conf
  2. The initiator has access to both the management and the KumoScale software data
  3. The initiator and Ansible software run on Python 3 or above. Verify the installed version by running the following command:
    • python --version
  4. Ansible modules v2.9.6 is installed on a machine connected to the management port. Verify by running the following command:
    • ansible –version
  5. If you need to install the latest version enter the command:
    • yum install -y epel-release ansible
  6. The initiator should have these packages installed:
    • mdadm, nvme-cli
  7. If needed, you can install by entering the appropriate command for your OS:
    • [centos 7.x]
      • yum install dmidecode mdadm nvme-cli
    • [centos 8.x]
      • dnf install python3 dmidecode mdadm nvme-cli
    • [ubuntu 18.x]
      • apt install dmidecode mdadm nvme-cli
  8. The initiator must support the NVMe-oF™ network protocol with Transmission Control Protocol (TCP) or Remote Direct Memory Access (RDMA) transport.
  9. The initiator (host) NQN must be unique; each initiator (host) has to have a distinctive host NQN assigned to it under the file /etc/nvme/hostnqn.
  10. For example:
    • ansible-fig3-inline
  11. The host name must be unique.
  12. KumoScale software must be configured with the masters for storage cluster and:
    • One or more groups of SSDs.
    • One or more portals using TCP or RDMA transport.

Installation of the KumoScale Software Ansible Modules Package

To install the Ansible Modules packages complete the steps below:

  1. Set the initiators host group with target hosts. Edit the /etc/ansible/hosts file and add specific values for host name or IP address in the initiators group as shown below:
    • #hosts

      [initiators]

      host1_name

      host2_name

      host3_name

      <host4 IP address>

      <host5 IP address>
  2. Extract the KumoScale Software Ansible Modules package, kumoscale-ansible-version.tar, containing playbooks and modules, to the running directory. For example:
    • tar -xvf package kumoscale-ansible-<version>.tar
  3. Modify the variable file. Update the variable file yml according to your environment and required configuration. See The Variable File for details on the variables.
  4. Prepare the Initiator using the yml playbook. The initiator name is listed under host in vars.yml . This will prepare the initiator for using Ansible modules and install ks-agent:
    • ansible-playbook -v install_host.yml
  5. Create a token for using KumoScale software using the yml playbook.
  6. Add a new storage node to the KumoScale Provisioner Service using the appropriate tool depending on whether you are using appliance mode, managed mode with Kubernetes, or managed mode on bare-metal.
  7. Configure your Syslog server using the yml playbook for logging md events to the server.
  8. Run the relevant playbook from Example Playbooks according to the desired configuration:
    • ansible-playbook -v ansible <Playbook.yml> [-e state=present/absent/modify]

Directories and Files Description

The following table describes the directories and files extracted during installation.

Table 1. Ansible Modules Package Directories and Files

Directory or File

Description

examples

Directory containing example Ansible playbooks.

library

Directory containing Ansible modules.

module_utils

Directory containing common methods used by Ansible modules.

files

Directory containing custom files used for running Ansible modules with support for NVMe modules.

templates

Directory used for generating ks-agent.conf.

ansible.cfg

File with custom options for running Ansible modules in addition to /etc/ansible/ansible.cfg.

requirements.txt

File used for installing Python packages with pip.

 

Upgrade KumoScale Software Ansible Modules

To upgrade KumoScale Software Ansible Modules, provide the location of the ks-agent rpm or deb on a remote host as follows:

  1. Edit vars.yaml and set agent_rpm_path to the path of the ks-agent rpm. For example:
    • agent_rpm_path: /root/ks-agent-3.w20.12345.x86_64.rpm
  2. Run the command
    • ansible-playbook -v upgrade_host.yml

       

Next: Ansible Module Package