27.3.4.2.5. 例如:基本独立模式安装
在清单文件的
[OSEv3:vars]
部分中包含以下变量,并根据您的配置需要调整它们:Copy to Clipboard Copied! Toggle word wrap Toggle overflow 在
[OSEv3: Child]
部分添加glusterfs
来启用[glusterfs]
组:[OSEv3:children] masters nodes glusterfs
[OSEv3:children] masters nodes glusterfs
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 添加
[glusterfs]
部分,其中包含托管 GlusterFS 存储的每个存储节点的条目。对于每个节点,将glusterfs_devices
设置为作为 GlusterFS 集群一部分完全管理的原始块设备列表。必须至少列出一个设备。每个设备都必须是空的,没有分区或 LVM PV。另外,将glusterfs_ip
设置为节点的 IP 地址。以以下形式指定变量:<hostname_or_ip> glusterfs_ip=<ip_address> glusterfs_devices='[ "</path/to/device1/>", "</path/to/device2>", ... ]'
<hostname_or_ip> glusterfs_ip=<ip_address> glusterfs_devices='[ "</path/to/device1/>", "</path/to/device2>", ... ]'
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 例如:
[glusterfs] gluster1.example.com glusterfs_ip=192.168.10.11 glusterfs_devices='[ "/dev/xvdc", "/dev/xvdd" ]' gluster2.example.com glusterfs_ip=192.168.10.12 glusterfs_devices='[ "/dev/xvdc", "/dev/xvdd" ]' gluster3.example.com glusterfs_ip=192.168.10.13 glusterfs_devices='[ "/dev/xvdc", "/dev/xvdd" ]'
[glusterfs] gluster1.example.com glusterfs_ip=192.168.10.11 glusterfs_devices='[ "/dev/xvdc", "/dev/xvdd" ]' gluster2.example.com glusterfs_ip=192.168.10.12 glusterfs_devices='[ "/dev/xvdc", "/dev/xvdd" ]' gluster3.example.com glusterfs_ip=192.168.10.13 glusterfs_devices='[ "/dev/xvdc", "/dev/xvdd" ]'
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 注意前面的步骤仅提供一些必须添加到清单文件中的选项。使用完整清单文件来部署红帽 Gluster 存储。
切换到 playbook 目录并运行安装 playbook。将清单文件的相对路径作为选项提供。
对于新的 OpenShift Container Platform 安装:
cd /usr/share/ansible/openshift-ansible ansible-playbook -i <path_to_inventory_file> playbooks/prerequisites.yml ansible-playbook -i <path_to_inventory_file> playbooks/deploy_cluster.yml
$ cd /usr/share/ansible/openshift-ansible $ ansible-playbook -i <path_to_inventory_file> playbooks/prerequisites.yml $ ansible-playbook -i <path_to_inventory_file> playbooks/deploy_cluster.yml
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 对于现有 OpenShift Container Platform 集群安装:
cd /usr/share/ansible/openshift-ansible ansible-playbook -i <path_to_inventory_file> playbooks/openshift-glusterfs/config.yml
$ cd /usr/share/ansible/openshift-ansible $ ansible-playbook -i <path_to_inventory_file> playbooks/openshift-glusterfs/config.yml
Copy to Clipboard Copied! Toggle word wrap Toggle overflow