Openstack Queens版本双节点架构笔记9,Ceph安装1:
做Ceph实验需要重新创建三个Ceph环境用到的虚拟机:(以下实验在node1,node2,node3节点做)
虚拟机初始化搭架参考:Openstack Queens版本双节点架构笔记1,虚拟机环境安装: - 林派文的博客 - CSDN博客 https://blog.csdn.net/qq_38387984/article/details/83245908
网络节点:172.31.31.140 node1
172.31.31.138 node2
172.31.31.137 node3
以下配置在三个节点都配置:
安装 NTP(node 1/2/3节点)
在所有 Ceph 节点上安装 NTP 服务(特别是 Ceph Monitor 节点),以免因时钟漂移导致故障
yum install ntp ntpdate -y
/usr/sbin/ntpdate ntp6.aliyun.com
echo "*/3 * * * * /usr/sbin/ntpdate ntp6.aliyun.com &> /dev/null" > /tmp/crontab
crontab /tmp/crontab
安装ceph (node 1/2/3节点)
yum install -y libibverbs-utils lttng-tools libbabeltrace fuse-libs leveldb gperftools-libs python-prettytable python-requests selinux-policy cryptsetup psmisc python-setuptools gdisk python-flask pyOpenSSL python-cherrypy python-pecan mailcap
yum install librados2 -y
yum install -y python-rados librbd1 python-rbd libcephfs2 python-cephfs librgw2 librados libradosstriper1 libradosstriper-devel python-rgw ceph-common ceph-selinux ceph-base ceph-osd ceph-mon ceph-mds ceph-mgr ceph ceph-radosgw
配置各个节点hosts文件(node 1/2/3节点)
[root@localhost ~]# cat /etc/hosts
172.31.31.140 node1
172.31.31.138 node2
172.31.31.137 node3
设置每个节点的主机名(node 1/2/3节点)
[root@localhost ~]# hostnamectl set-hostname node1
[root@localhost ~]# hostnamectl set-hostname node2
[root@localhost ~]# hostnamectl set-hostname node3
配置各个节点防火墙(node 1/2/3节点)
Ceph Monitors 之间默认使用 6789 端口通信, OSD 之间默认用 6800:7300 这个范围内的端口通信
firewall-cmd --zone=public --add-port=6789/tcp --permanent
firewall-cmd --zone=public --add-port=6800-7300/tcp --permanent
firewall-cmd --reload
实验环境可以:
systemctl stop firewalld
systemctl disable firewalld
sed -i "s/^SELINUX=enforcing/SELINUX=disabled/g" /etc/selinux/config
setenforce 0
SSH无密码登录(node 1节点)
[root@localhost ~]#ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:lrcMtzRJYVl4DOojTZK8bNNmInAiF/5qC9lHCVigoI0 root@controller
The key's randomart image is:
+---[RSA 2048]----+
|o.o +*. |
|+* . . . oo.o |
|E B . + o .. |
| o * o B o . |
| = B S * |
| o o o B B + |
|o + . + |
| o o |
| . |
+----[SHA256]-----+
拷贝key 到各节点(node 1节点)
[root@localhost~]# ssh-copy-id node1
[root@localhost~]# ssh-copy-id node2
[root@localhost~]# ssh-copy-id node3
创建目录
在执行ceph-deploy 的过程中会生成一些配置文件,建议创建一个目录,例如
mk-ceph-cluster。
[root@localhost ~]# mkdir /tmp/mk-ceph-cluster
[root@localhost ~]# cd /tmp/mk-ceph-cluster
(以下操作都在/tmp/mk-ceph-cluster)
ceph.conf(node 1节点)
配置Ceph.conf配置文件,示例文件是默认的,可以根据自己情况进行相应调整和添加。
[global]
fsid = 4ae8397d-810b-496c-9619-9b0eaff1dd59
mon_initial_members = node1
mon_host = 172.31.31.140
auth_cluster_required = cephx
auth_service_required = cephx
auth_client_required = cephx
filestore_xattr_use_omap = true
生成秘钥key(node 1节点)
生成秘钥key
ceph-authtool --create-keyring ceph.keyring --gen-key -n mon. --cap mon 'allow *'
ceph-authtool --create-keyring ceph.client.admin.keyring --gen-key -n client.admin --set-uid=0 --cap mon 'allow *' --cap osd 'allow *' --cap mds 'allow *' --cap mgr 'allow *'
ceph-authtool --create-keyring ceph.client.bootstrap-osd.keyring --gen-key -n client.bootstrap-osd --cap mon 'allow profile bootstrap-osd'
ceph-authtool --create-keyring ceph.mgr.node1.keyring --gen-key -n mgr.node1 --cap mon 'allow profile mgr' --cap osd 'allow *' --cap mds 'allow *'
ceph-authtool --create-keyring ceph.mgr.node2.keyring --gen-key -n mgr.node2 --cap mon 'allow profile mgr' --cap osd 'allow *' --cap mds 'allow *'
ceph-authtool --create-keyring ceph.mgr.node3.keyring --gen-key -n mgr.node3 --cap mon 'allow profile mgr' --cap osd 'allow *' --cap mds 'allow *'
引入秘钥key(node 1节点)
ceph-authtool ceph.keyring --import-keyring ceph.client.admin.keyring
ceph-authtool ceph.keyring --import-keyring ceph.client.bootstrap-osd.keyring
ceph-authtool ceph.keyring --import-keyring ceph.mgr.node1.keyring
ceph-authtool ceph.keyring --import-keyring ceph.mgr.node2.keyring
ceph-authtool ceph.keyring --import-keyring ceph.mgr.node3.keyring
分发配置(node 1节点)
monmaptool --create --add node1 172.31.31.140:6789 --fsid 4ae8397d-810b-496c-9619-9b0eaff1dd59 monmap
cp ceph.client.admin.keyring ceph.client.bootstrap-osd.keyring ceph.keyring ceph.conf monmap /etc/ceph
scp ceph.client.admin.keyring ceph.client.bootstrap-osd.keyring ceph.keyring ceph.conf monmap node2:/etc/ceph
scp ceph.client.admin.keyring ceph.client.bootstrap-osd.keyring ceph.keyring ceph.conf monmap node3:/etc/ceph
初始化监控(node 1节点)
mkdir /var/lib/ceph/mon/ceph-mon.node1
ceph-mon --cluster ceph --mkfs -i node1 --monmap /etc/ceph/monmap --keyring /etc/ceph/ceph.keyring
touch /var/lib/ceph/mon/ceph-mon.node1/done
systemctl start ceph-mon@node1
chown -R ceph:ceph /var/lib/ceph/
systemctl reset-failed ceph-mon@node1.service
systemctl restart ceph-mon@node1.service
systemctl status ceph-mon@node1.service
(排错文档)
初始化磁盘(node 1节点)
ceph-disk zap /dev/sdb
ssh node2 ceph-disk zap /dev/sdb
ssh node3 ceph-disk zap /dev/sdb
准备OSD(node 1节点)
ceph-disk prepare --cluster ceph --cluster-uuid 4ae8397d-810b-496c-9619-9b0eaff1dd59 /dev/sdb
ssh node2 ceph-disk prepare --cluster ceph --cluster-uuid 4ae8397d-810b-496c-9619-9b0eaff1dd59 /dev/sdb
ssh node3 ceph-disk prepare --cluster ceph --cluster-uuid 4ae8397d-810b-496c-9619-9b0eaff1dd59 /dev/sdb
激活OSD(node 1节点)
ceph-disk activate /dev/sdb1 --activate-key /etc/ceph/ceph.client.bootstrap-osd.keyring
ssh node2 ceph-disk activate /dev/sdb1 --activate-key /etc/ceph/ceph.client.bootstrap-osd.keyring
ssh node3 ceph-disk activate /dev/sdb1 --activate-key /etc/ceph/ceph.client.bootstrap-osd.keyring
创建mgr(node 1节点)
mkdir -p /var/lib/ceph/mgr/ceph-node1
ssh node2 mkdir -p /var/lib/ceph/mgr/ceph-node2
ssh node3 mkdir -p /var/lib/ceph/mgr/ceph-node3
#scp keyring
cp ceph.mgr.node1.keyring /var/lib/ceph/mgr/ceph-node1/keyring
scp ceph.mgr.node2.keyring node2:/var/lib/ceph/mgr/ceph-node2/keyring
scp ceph.mgr.node3.keyring node3:/var/lib/ceph/mgr/ceph-node3/keyring
启动mgr(权限ceph:ceph三个节点都要授予,按照提示重启服务)(node 1节点)
chown -R ceph:ceph /var/lib/ceph/
systemctl start ceph-mgr@node1
systemctl reset-failed ceph-mgr@node1.service
systemctl start ceph-mgr@node1.service
systemctl status ceph-mgr@node1.service
node2:
chown -R ceph:ceph /var/lib/ceph/
systemctl start ceph-mgr@node2
systemctl reset-failed ceph-mgr@node2.service
systemctl start ceph-mgr@node2.service
systemctl status ceph-mgr@node2.service
node3:
chown -R ceph:ceph /var/lib/ceph/
systemctl start ceph-mgr@node3
systemctl reset-failed ceph-mgr@node3.service
systemctl start ceph-mgr@node3.service
systemctl status ceph-mgr@node3.service
查看集群健康状态(node 1节点)
如果是active+clean状态就是正常的
root@localhost:~# ceph health
开启dashboard(node 1节点)
ceph config-key put mgr/dashboard/server_addr 172.31.31.140 --cluster=ceph
ceph config-key put mgr/dashboard/server_port 7000 --cluster=ceph
ceph mgr module enable dashboard
打开浏览器输入:172.31.31.140:7000
验证是否安装成功!
Openstack Queens版本双节点架构笔记1,虚拟机环境安装: https://blog.csdn.net/qq_38387984/article/details/83245908
Openstack Queens版本双节点架构笔记2,Openstack环境安装: https://blog.csdn.net/qq_38387984/article/details/83245941
Openstack Queens版本双节点架构笔记3,Keystone安装:https://blog.csdn.net/qq_38387984/article/details/83274421
Openstack Queens版本双节点架构笔记4,Glance安装:https://blog.csdn.net/qq_38387984/article/details/83274547
Openstack Queens版本双节点架构笔记5,Nova安装:https://blog.csdn.net/qq_38387984/article/details/83274567
Openstack Queens版本双节点架构笔记6,Neutron安装:https://blog.csdn.net/qq_38387984/article/details/83274578
Openstack Queens版本双节点架构笔记7,Dashboard安装:https://blog.csdn.net/qq_38387984/article/details/83274601
Openstack Queens版本双节点架构笔记8,验证Databoard实例 https://blog.csdn.net/qq_38387984/article/details/83502979
Openstack Queens版本双节点架构笔记9,Ceph安装1:https://blog.csdn.net/qq_38387984/article/details/83502996
Openstack Queens版本双节点架构笔记10,Ceph安装2:https://blog.csdn.net/qq_38387984/article/details/83503016
Openstack Queens版本双节点架构笔记11,Ceph安装3:https://blog.csdn.net/qq_38387984/article/details/83503033
Openstack Queens版本双节点架构笔记9,Ceph安装1:相关推荐
- OpenStack Juno版本网络节点gre模式配置
2019独角兽企业重金招聘Python工程师标准>>> OpenStack Juno版本网络节点gre模式配置 #开启linux的ip转发功能 #nano /etc/sysctl.c ...
- openstack queens版本修改admin密码
一. 使能admin环境变量 二. openstack queens版本openstack命令 三. 使用命令openstack user password set设置当前账户(admin)的密码 四 ...
- RAC (双节点) + 单实例 DATAGUARD 安装遇到的问题处理
RAC (双节点) + 单实例 DATAGUARD 安装遇到的问题处理 PRIMARY: RAC 双节点 ,存储:ASM STANDBY: 单实例 存储: ASM 单实例 数据库 ...
- OpenStack 云平台流量监控插件tap-as-a-service(Taas)安装步骤(OpenStack queens版本,非devstack)
网上貌似没有任何相关的博客....下面我来讲一讲怎么将devstack下的openstack插件Tap-as-a-service 集成到手工搭建的openstack上 首先,github上面放的都是d ...
- kolla-ansible 部署OpenStack queens版本(转)
一. 实验环境: 3台主机安装CentOS7 minimal系统64G内存,800G+1T * 3硬盘(其中1T盘为后期ceph部署做准备),4个千兆网卡: 用途 网口 ip地址段 控制网络 enp2 ...
- openstack queens 版本 linux bridge起不来的解决办法
报错如下: Apr 3 03:52:48 neutron neutron-linuxbridge-agent: elif tornado and tornado.gen.is_coroutine_fu ...
- 【云计算OpenStack-OpenStack Queens版本】基于OpenStack的云计算环境搭建
基于OpenStack的云计算环境搭建 一.基础环境 1.基本环境信息回顾 2.基本环境网络测试 二.实现过程 1.配置阿里yum源(所有节点) 2.安装NTP时钟服务(所有节点) 3.opensta ...
- OpenStack 最新版本Queens发布 中国公司贡献率排名出炉
文章来源:OpenStack中国 2月28日,OpenStack Queens版本正式发布,这也是OpenStack自诞生以来公布的第17个版本.根据OpenStack基金会披露,为满足边缘计算,HA ...
- (导航页)OpenStack-M版-双节点手工搭建-附B站视频
↓↓↓↓↓↓↓↓视频已上线B站↓↓↓↓↓↓↓↓ >>>>>>传送门 本次搭建采用双节点,离线源搭建, 配置如下 本次搭建采用2台4核4G的虚拟机,也可以改为2核4G ...
最新文章
- 常用的Percona-Toolkit工具
- 新来的妹纸问我 AJAX 请求为什么不安全?没有回答出来。。。
- 建房子 最安全图纸_妄想山海初期该怎么办?砍树狩猎建房子,还能拆别人的房子...
- RabbbitMq Return 消息机制
- 机械硬盘4k读写速度_三星T5移动硬盘应用评测:不止够用,还很好用
- 理解_授权数据模型_Spring Security OAuth2.0认证授权---springcloud工作笔记112
- Getting a handle on
- 前端 img 标签显示 base64 格式的 图片
- php 后台数据 u,Yunucms代码审计:后台XSS和数据库信息泄露
- o2o模式主要利用在哪些领域 企业怎么发展o2o模式?
- 教育部拔尖计划计算机专业的高校,“拔尖计划”10周年!教育部公布的荣誉奖项名单都有谁?...
- Python爬取第一电影天堂最新电影(5000多部)代码实例(一)
- 精密划片机维护及保养
- latex文字加粗、斜体
- 基于ResNet的猫十二分类
- 鲁宾逊非标准微积分与国内高等数学“秀肌肉”
- 闲话Google拼音输入法及其它(一)
- Java常见的线程池有哪些?
- 输出linux内核版本信息,查看linux内核和版本信息
- Android粗浅系统学习(适合入门)
热门文章
- 应用层操作gpio的3种方法之一:通过sysfs文件系统
- Mac 安装非App Store软件
- 解决 413 Request Entity Too Large
- RAD Studio C++ Builder10.4 补丁Patch 2仍然没有彻底解决C ++ Android异常处理错误
- 跟同事杠上了,Apache Beanutils为什么被禁止使用?
- 生物智能与AI——关乎创造、关乎理解
- 原装ipad手写笔有必要买吗?第三方iPad手写笔推荐
- rj45 千兆接口定义_千兆以太网RJ45接口连线引脚定义?
- 自我介绍 的html页面,html初学者自我介绍网页
- linux crash目录,/var/crash目录解析