Skip to main content
BeeGFS on NetApp with E-Series Storage

Deploy BeeGFS

Contributors mcwhiteside netapp-jolieg

Deploying and managing the configuration involves running one or more playbooks that contain the tasks Ansible needs to execute and bring the overall system to the desired state.

While all tasks can be included in a single playbook, for complex systems, this quickly becomes unwieldy to manage. Ansible allows you to create and distribute roles as a way of packaging reusable playbooks and related content (for example: default variables, tasks, and handlers). For more information, see the Ansible documentation for Roles.

Roles are often distributed as part of an Ansible collection containing related roles and modules. Thus, these playbooks primarily just import several roles distributed in the various NetApp E-Series Ansible collections.

Note Currently, at least two building blocks (four file nodes) are required to deploy BeeGFS, unless a separate quorum device is configured as a tiebreaker to mitigate any issues when establishing quorum with a two-node cluster.
Steps
  1. Create a new playbook.yml file and include the following:

    # BeeGFS HA (High Availability) cluster playbook.
    - hosts: eseries_storage_systems
      gather_facts: false
      collections:
        - netapp_eseries.santricity
      tasks:
        - name: Configure NetApp E-Series block nodes.
          import_role:
            name: nar_santricity_management
    - hosts: all
      any_errors_fatal: true
      gather_facts: false
      collections:
        - netapp_eseries.beegfs
      pre_tasks:
        - name: Ensure a supported version of Python is available on all file nodes.
          block:
            - name: Check if python is installed.
              failed_when: false
              changed_when: false
              raw: python --version
              register: python_version
            - name: Check if python3 is installed.
              raw: python3 --version
              failed_when: false
              changed_when: false
              register: python3_version
              when: 'python_version["rc"] != 0 or (python_version["stdout"] | regex_replace("Python ", "")) is not version("3.0", ">=")'
            - name: Install python3 if needed.
              raw: |
                id=$(grep "^ID=" /etc/*release* | cut -d= -f 2 | tr -d '"')
                case $id in
                  ubuntu) sudo apt install python3 ;;
                  rhel|centos) sudo yum -y install python3 ;;
                  sles) sudo zypper install python3 ;;
                esac
              args:
                executable: /bin/bash
              register: python3_install
              when: python_version['rc'] != 0 and python3_version['rc'] != 0
              become: true
            - name: Create a symbolic link to python from python3.
              raw: ln -s /usr/bin/python3 /usr/bin/python
              become: true
              when: python_version['rc'] != 0
          when: inventory_hostname not in groups[beegfs_ha_ansible_storage_group]
        - name: Verify any provided tags are supported.
          fail:
            msg: "{{ item }} tag is not a supported BeeGFS HA tag. Rerun your playbook command with --list-tags to see all valid playbook tags."
          when: 'item not in ["all", "storage", "beegfs_ha", "beegfs_ha_package", "beegfs_ha_configure", "beegfs_ha_configure_resource", "beegfs_ha_performance_tuning", "beegfs_ha_backup", "beegfs_ha_client"]'
          loop: "{{ ansible_run_tags }}"
      tasks:
        - name: Verify before proceeding.
          pause:
            prompt: "Are you ready to proceed with running the BeeGFS HA role? Depending on the size of the deployment and network performance between the Ansible control node and BeeGFS file and block nodes this can take awhile (10+ minutes) to complete."
        - name: Verify the BeeGFS HA cluster is properly deployed.
          ansible.builtin.import_role:
            name: netapp_eseries.beegfs.beegfs_ha_7_4
    Note This playbook runs a few pre_tasks that verify Python 3 is installed on the file nodes and check that the Ansible tags provided are supported.
  2. Use the ansible-playbook command with the inventory and playbook files when you’re ready to deploy BeeGFS.

    The deployment will run all pre_tasks, and then prompt for user confirmation before proceeding with the actual BeeGFS deployment.

    Run the following command, adjusting the number of forks as needed (see the note below):

    ansible-playbook -i inventory.yml playbook.yml --forks 20
    Note Especially for larger deployments, overriding the default number of forks (5) using the forks parameter is recommended to increase the number of hosts that Ansible configures in parallel. (For more information, see Controlling playbook execution.) The maximum value setting depends on the processing power available on the Ansible control node. The above example of 20 was run on a virtual Ansible control node with 4 CPUs (Intel® Xeon® Gold 6146 CPU @ 3.20GHz).

    Depending on the size of the deployment and network performance between the Ansible control node and BeeGFS file and block nodes, deployment time might vary.