Skip to main content
BeeGFS on NetApp with E-Series Storage
本繁體中文版使用機器翻譯,譯文僅供參考,若與英文版本牴觸,應以英文版本為準。

部署BeeGFS

貢獻者

部署及管理組態時、需要執行一或多個包含執行必要工作的教戰手冊、並將整體系統移至所需狀態。

雖然所有工作都可納入單一教戰手冊中、但對於複雜的系統而言、這種做法很快就變得難以管理。Ansible可讓您建立及發佈角色、以封裝可重複使用的教戰手冊和相關內容(例如:預設變數、工作和處理常式)。如需詳細資訊、請參閱的「Ansible」文件 "角色"

角色通常會在包含相關角色和模組的可Ansible集合中散佈。因此、這些教戰手冊主要是匯入分散在各種NetApp E系列Ansible系列收藏中的多個角色。

註 目前、部署BeeGFS至少需要兩個建置區塊(四個檔案節點)、除非將個別的仲裁裝置設定為連線斷路器、以減輕在使用雙節點叢集建立仲裁時發生的任何問題。
步驟
  1. 建立新的「playbook、yml」檔案、其中包括:

    # 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.
          import_role:
            name: beegfs_ha_7_2
    註 本方針執行幾項「pre_tesss」、以驗證檔案節點上是否安裝Python 3、並檢查所提供的Ansible標記是否受到支援。
  2. 當您準備部署BeeGFS時、請將「Ansible Playbook」命令與庫存和方針檔案搭配使用。

    部署作業會執行所有的「pre_tessment」、然後在繼續實際部署BeeGFS之前提示使用者確認。

    執行下列命令、視需要調整貨叉數量(請參閱以下附註):

    ansible-playbook -i inventory.yml playbook.yml --forks 20
    註 特別是對於較大型的部署、建議使用「叉具」參數來覆寫預設的叉具數量(5)、以增加可選主機平行設定的主機數量。(如需詳細資訊、請參閱 "Ansible Performance調校""控制方針執行") 最大值設定取決於Ansible控制節點上可用的處理能力。上述20個範例是在具有4個CPU(Intel(R)Xeon(R)Gold 6146 CPU @ 3.20GHz)的虛擬Ansible控制節點上執行。

    視部署規模和Ansible控制節點與BeeGFS檔案和區塊節點之間的網路效能而定、部署時間可能會有所不同。