3.17. 使用 Ansible 删除 Ceph 对象网关
若要使用 Ansible 移除 Ceph 对象网关,可使用 shrink-rgw.yml
playbook。
先决条件
- Ansible 管理节点.
- 由 Ansible 部署运行的 Red Hat Ceph Storage 集群。
流程
更改到
/usr/share/ceph-ansible/
目录。Copy to Clipboard Copied! Toggle word wrap Toggle overflow cd /usr/share/ceph-ansible
[user@admin ~]$ cd /usr/share/ceph-ansible
对于 裸机和 容器部署,请运行
shrink-rgw.yml
Ansible playbook:语法
Copy to Clipboard Copied! Toggle word wrap Toggle overflow ansible-playbook infrastructure-playbooks/shrink-rgw.yml -e rgw_to_kill=HOSTNAME.rgw_INSTANCE_NAME_ -u ANSIBLE_USER_NAME -i hosts
ansible-playbook infrastructure-playbooks/shrink-rgw.yml -e rgw_to_kill=HOSTNAME.rgw_INSTANCE_NAME_ -u ANSIBLE_USER_NAME -i hosts
替换:
-
HOSTNAME
,带有 Ceph 对象网关节点的短主机名。每次 playbook 运行时,您只能移除一个 Ceph 对象网关。 -
ANSIBLE_USER_NAME
,使用 Ansible 用户的名称
示例
Copy to Clipboard Copied! Toggle word wrap Toggle overflow ansible-playbook infrastructure-playbooks/shrink-rgw.yml -e rgw_to_kill=node03.rgw0 -u admin -i hosts
[user@admin ceph-ansible]$ ansible-playbook infrastructure-playbooks/shrink-rgw.yml -e rgw_to_kill=node03.rgw0 -u admin -i hosts
-
- 从存储集群中的所有 Ceph 配置文件移除 Ceph 对象网关条目。
确保 Ceph 对象网关已成功移除:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow ceph -s
[root@mon ~]# ceph -s
其它资源
- 有关安装 Red Hat Ceph Storage 的更多信息,请参阅 Red Hat Ceph Storage 安装指南。
- 如需了解更多与 Ansible 清单配置相关的信息,请参阅 {storage_product} 安装指南 中的配置 Ansible 清单位置 部分。