OpenStack Ceph集群部署

安装ceph部署工具cephadm

dnf install -y cephadm

安装ceph命令:

dnf install -y ceph-common

使用cephadm安装ceph

cephadm bootstrap --mon-ip 192.168.10.0 --allow-overwrite --cluster-network 192.168.100.0/23

#部署完成后有admin密码信息,需保存,登录ceph页面使用

设置免密登陆

ssh-keygen -t rsa

ssh-copy-id Ceph101

ssh-copy-id Ceph102

ssh-copy-id Ceph103

ssh-copy-id -f -i /etc/ceph/ceph.pub root@Ceph101

ssh-copy-id -f -i /etc/ceph/ceph.pub root@Ceph102

ssh-copy-id -f -i /etc/ceph/ceph.pub root@Ceph103

添加Ceph节点

ceph orch host add Ceph101 192.168.10.101 mon

ceph orch host add Ceph102 192.168.10.102 mon

ceph orch host add Ceph103 192.168.10.103

开启自动添加osd

 ceph orch apply osd --all-available-devices

节点没添加成功的话,使用此命令添加:

ceph orch daemon reconfig node-exporter. Ceph103 

配置ceph

ceph osd pool create volumes

ceph osd pool create images

ceph osd pool create backups

ceph osd pool create vms

rbd pool init volumes

rbd pool init images

rbd pool init backups

rbd pool init vms

OpenStack集群Ceph配置

将ceph.conf配置文件复制到OpenStack部署机的目录下

ssh kollatest sudo tee /etc/kolla/config/ceph.conf </etc/ceph/ceph.conf

注意调整ceph.conf文件的格式,开头不能有tab和空格,在末尾追加三条配置

auth_cluster_required = cephx

auth_service_required = cephx

auth_client_required = cephx

  

创建glance、cinder的keyring认证文件

ceph auth get-or-create client.glance mon 'profile rbd' osd 'profile rbd pool=images' mgr 'profile rbd pool=images'  -o /etc/ceph/ceph.client.glance.keyring

ceph auth get-or-create client.cinder mon 'profile rbd' osd 'profile rbd pool=volumes, profile rbd pool=vms, profile rbd-read-only pool=images' mgr 'profile rbd pool=volumes, profile rbd pool=vms' -o /etc/ceph/ceph.client.cinder.keyring

ceph auth get-or-create client.cinder-backup mon 'profile rbd' osd 'profile rbd pool=backups' mgr 'profile rbd pool=backups' -o /etc/ceph/ceph.client.cinder-backup.keyring

将认证文件同步到部署机的对应目录下(部署机)

ceph auth get-or-create client.glance | ssh kollatest sudo tee /etc/kolla/config/glance/ceph.client.glance.keyring

ceph auth get-or-create client.cinder | ssh kollatest sudo tee /etc/kolla/config/cinder/cinder-volume/ceph.client.cinder.keyring

ceph auth get-or-create client.cinder | ssh kollatest sudo tee /etc/kolla/config/nova/ceph.client.cinder.keyring

ceph auth get-or-create client.cinder | ssh kollatest sudo tee /etc/kolla/config/cinder/cinder-backup/ceph.client.cinder.keyring

ceph auth get-or-create client.cinder-backup | ssh kollatest sudo tee /etc/kolla/config/cinder/cinder-backup/ceph.client.cinder-backup.keyring

Ceph部署完成,执行kolla-ansible部署OpenStack即可

  • 6
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

灰羽翎

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值