kolla-ansible部署ceph
时间: 2023-07-09 12:03:41 浏览: 239
Kolla-ansible是一个用于部署OpenStack的Ansible playbook集合。要使用kolla-ansible来部署Ceph,您需要在控制节点上安装kolla-ansible和ceph-ansible。以下是部署Ceph的基本步骤:
1. 在控制节点上安装kolla-ansible和ceph-ansible:
```
sudo apt-get install python3-dev libffi-dev gcc libssl-dev python3-venv
sudo apt-get install python3-pip
sudo pip3 install -U pip
sudo pip3 install kolla-ansible
sudo git clone https://github.com/ceph/ceph-ansible.git /usr/share/ceph-ansible
```
2. 准备kolla-ansible部署环境:
```
sudo mkdir -p /etc/kolla
sudo chown $USER:$USER /etc/kolla
cp -r /usr/local/share/kolla-ansible/etc_examples/kolla/* /etc/kolla
cp /usr/local/share/kolla-ansible/ansible/inventory/* .
```
3. 配置kolla-ansible:
编辑/etc/kolla/globals.yml文件,设置以下内容:
```
kolla_base_distro: "ubuntu"
kolla_install_type: "source"
openstack_release: "rocky"
network_interface: "eth0"
neutron_plugin_agent: "openvswitch"
ceph_backend: "bluestore"
ceph_osd_pool_default_size: "2"
ceph_osd_pool_default_pg_num: "128"
```
4. 配置ceph-ansible:
编辑/etc/kolla/globals.yml文件,设置以下内容:
```
[mons]
mon1
mon2
mon3
[osds]
osd1
osd2
osd3
[mdss]
mds1
mds2
```
5. 生成kolla-ansible部署文件:
```
kolla-genpwd
kolla-ansible -i ./all-in-one bootstrap-servers
kolla-ansible -i ./all-in-one prechecks
kolla-ansible -i ./all-in-one deploy
```
6. 部署完成后,您可以使用以下命令测试Ceph集群:
```
sudo docker ps
sudo ceph health
```
阅读全文