怎么看懂ceph的官方文档

首页 > 技术 > 作者:YD1662023-11-10 19:36:25

4)安装docker :(所有节点操作,包括新增)

# centos7 wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo # 安装yum-config-manager配置工具 yum -y install yum-utils # 设置yum源 yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo # 安装docker-ce版本 yum install -y docker-ce #启动docker服务并开机自启 systemctl enable --now docker # 查看版本号 docker --version # 查看版本具体信息 docker version # Docker镜像源设置 # 修改文件 /etc/docker/daemon.json,没有这个文件就创建 # 添加以下内容后,重启docker服务: cat >/etc/docker/daemon.json<<EOF { "registry-mirrors": ["http://hub-mirror.c.163.com"] } EOF systemctl restart docker 5)安装cephadm

下载cephadm脚本: (只在主节点操作)

mkdir -p /opt/ceph/my-cluster ; cd /opt/ceph/my-cluster curl --silent --remote-name --location https://github.com/ceph/ceph/raw/octopus/src/cephadm/cephadm -o cephadm chmod x cephadm # 或者: #curl https://raw.githubusercontent.com/ceph/ceph/v15.2.1/src/cephadm/cephadm -o cephadm #chmod x cephadm #//**//下载出错:配置/etc/hosts 文件--—> 199.232.28.133 raw.githubusercontent.com # 安装python3:(所有节点执行) yum install python3 -y # 配置ceph存储库 :(或指定版本) ./cephadm add-repo --release octopus #或 #./cephadm add-repo --version 15.2.1 # 开始安装ceph-common,ceph工具 ./cephadm install ceph-common ceph # 安装cephadm工具 ./cephadm install which cephadm which ceph 6)初始化 ceph 集群

当前节点安装 mon、 mgr 角色,部署 prometheus、 grafana、 alertmanager、 node-exporter等服务。

#先安装一个节点,其它节点通过后面的命令添加到集群中即可 #您需要知道用于集群的第一个监视器守护程序的IP地址。 #如果有多个网络和接口,要确保选择任何可供访问Ceph群集的主机访问的网络和接口。 cephadm bootstrap --mon-ip 192.168.182.130 ##### 命令特点: #在本地主机上为新集群创建监视和管理器守护程序。 #为Ceph集群生成一个新的SSH密钥,并将其添加到root用户的/root/.ssh/authorized_keys文件中。 #将与新集群进行通信所需的最小配置文件编写为/etc/ceph/ceph.conf。 #将client.admin管理密钥的副本写入/etc/ceph/ceph.client.admin.keyring。 #将公用密钥的副本写入 /etc/ceph/ceph.pub。 # 查看部署的服务 docker ps #=======输出信息======= Ceph Dashboard is now available at: URL: https://local-168-182-130:8443/ User: admin Password: 0ard2l57ji You can access the Ceph CLI with: sudo /usr/sbin/cephadm shell --fsid d1e9b986-89b8-11ed-bec2-000c29ca76a9 -c /etc/ceph/ceph.conf -k /etc/ceph/ceph.client.admin.keyring Please consider enabling telemetry to help improve Ceph: ceph telemetry on For more information see: https://docs.ceph.com/docs/master/mgr/telemetry/

怎么看懂ceph的官方文档,(9)

根据提示可知,有个web地址:https://ip:8443/,这里的截图是部署完之后的截图。

怎么看懂ceph的官方文档,(10)

通过ceph命令查看集群状态

ceph -s

怎么看懂ceph的官方文档,(11)

7)添加新节点

在新主机的根用户authorized_keys文件中安装群集的公共SSH密钥 :

ssh-copy-id -f -i /etc/ceph/ceph.pub root@local-168-182-131 ssh-copy-id -f -i /etc/ceph/ceph.pub root@local-168-182-132

怎么看懂ceph的官方文档,(12)

上一页12345下一页

栏目热文

文档排行

本站推荐

Copyright © 2018 - 2021 www.yd166.com., All Rights Reserved.