27.3.4.2.4. 例如:基本聚合模式安装
在清单文件的
[OSEv3:vars]部分中包含以下变量,并根据您的配置需要调整它们:Copy to Clipboard Copied! Toggle word wrap Toggle overflow 在
[OSEv3: Child]部分添加glusterfs来启用[glusterfs]组:[OSEv3:children] masters nodes glusterfs
[OSEv3:children] masters nodes glusterfsCopy to Clipboard Copied! Toggle word wrap Toggle overflow 添加
[glusterfs]部分,其中包含托管 GlusterFS 存储的每个存储节点的条目。对于每个节点,将glusterfs_devices设置为作为 GlusterFS 集群一部分完全管理的原始块设备列表。必须至少列出一个设备。每个设备都必须是空的,没有分区或 LVM PV。以以下形式指定变量:<hostname_or_ip> glusterfs_devices='[ "</path/to/device1/>", "</path/to/device2>", ... ]'
<hostname_or_ip> glusterfs_devices='[ "</path/to/device1/>", "</path/to/device2>", ... ]'Copy to Clipboard Copied! Toggle word wrap Toggle overflow 例如:
[glusterfs] node11.example.com glusterfs_devices='[ "/dev/xvdc", "/dev/xvdd" ]' node12.example.com glusterfs_devices='[ "/dev/xvdc", "/dev/xvdd" ]' node13.example.com glusterfs_devices='[ "/dev/xvdc", "/dev/xvdd" ]'
[glusterfs] node11.example.com glusterfs_devices='[ "/dev/xvdc", "/dev/xvdd" ]' node12.example.com glusterfs_devices='[ "/dev/xvdc", "/dev/xvdd" ]' node13.example.com glusterfs_devices='[ "/dev/xvdc", "/dev/xvdd" ]'Copy to Clipboard Copied! Toggle word wrap Toggle overflow 将
[glusterfs]下列出的主机添加到[nodes]组中:[nodes] ... node11.example.com openshift_node_group_name="node-config-compute" node12.example.com openshift_node_group_name="node-config-compute" node13.example.com openshift_node_group_name="node-config-compute"
[nodes] ... node11.example.com openshift_node_group_name="node-config-compute" node12.example.com openshift_node_group_name="node-config-compute" node13.example.com openshift_node_group_name="node-config-compute"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.ymlCopy 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.ymlCopy to Clipboard Copied! Toggle word wrap Toggle overflow