ceph开启https连接

您所在的位置:网站首页 ca证书在哪里打开 ceph开启https连接

ceph开启https连接

2024-02-12 06:37| 来源: 网络整理| 查看: 265

ceph开启https连接

ceph默认并不开启https连接,如要开启https需事先在所有rgw节点创建ca证书。

一、CA证书的创建

注:ca证书创建流程多种多样,如有需要请自行学习,此处仅提供一种稍简单的创建方式,以下流程请严格按照顺序执行

openssl genrsa -des3 -out server.key 1024

在这里插入图片描述

openssl req -new -key server.key -out server.csr

[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-E9C9N2Un-1587019197352)(C:\Users\user\AppData\Roaming\Typora\typora-user-images\1586769126333.png)]

openssl rsa -in server.key -out server.key

[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-yMeF0MGL-1587019197354)(C:\Users\user\AppData\Roaming\Typora\typora-user-images\1586769522499.png)]

openssl x509 -req -days 3650 -in server.csr -signkey server.key -out server.pem cat server.key >> server.pem

可将生成好的证书复制到其他节点的证书目录下

scp /etc/ceph/cert/* node01:/etc/ceph/cert/ scp /etc/ceph/cert/* node03:/etc/ceph/cert/ 二、在已创建好的集群开通https 1、修改配置文件(单个网关为例) vim /etc/ceph/ceph.conf

[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-tAMm7H8V-1587019197357)(C:\Users\user\AppData\Roaming\Typora\typora-user-images\1586422036922.png)]

2、重启网关服务并查看状态

重启网关后集群会重新读取配置信息并让其生效

systemctl restart [email protected] systemctl status [email protected]

注:若重启失败,请查看配置以及证书创建是否正确

三、使用ceph-ansible安装集群时开启https

此处不再介绍使用ceph-ansible安装集群,如有需要请阅读《ceph-ansible部署ceph参考》

1、打开all.yml文件,添加配置 vim ceph-ansible/group_vars/all.yml 2、添加radosgw_frontend_ssl_certificate配置

注:事先必须在所有rgw节点创建证书

[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-h7buWxUw-1587019197359)(C:\Users\user\AppData\Roaming\Typora\typora-user-images\1586422775684.png)]

四、验证 curl命令验证

[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-F31WDHPA-1587019197360)(C:\Users\user\AppData\Roaming\Typora\typora-user-images\1586423138823.png)]

boto3验证

[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-25XnkaoO-1587019197361)(C:\Users\user\AppData\Roaming\Typora\typora-user-images\1586423197670.png)]

[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-gGfnNoCC-1587019197361)(C:\Users\user\AppData\Roaming\Typora\typora-user-images\1586423239822.png)]



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3