面包屑 网站,建站培训,盐城哪里做网站,外销网站建立基本环境准备
准备三台服务器#xff08;服务器至少需要添加两块磁盘#xff09;以及一台客户端#xff0c;最好配置时间同步同时再次配置hosts解析。
node1192.168.134.160node2192.168.134.161node3192.168.134.162node4192.168.134.163客户端
配置免密登录
[rootnode…基本环境准备
准备三台服务器服务器至少需要添加两块磁盘以及一台客户端最好配置时间同步同时再次配置hosts解析。
node1192.168.134.160node2192.168.134.161node3192.168.134.162node4192.168.134.163客户端
配置免密登录
[rootnode1 ~]# ssh-keygen -f ~/.ssh/id_rsa -P -q
[rootnode1 ~]# ssh-copy-id node1
[rootnode1 ~]# ssh-copy-id node2
[rootnode1 ~]# ssh-copy-id node3
[rootnode1 ~]# ssh-copy-id node4配置扩展源同时进行部分必需软件安装三个服务器都需要配置
[rootnode1 ~]# wget -O /etc/yum.repos.d/epel.repo https://mirrors.aliyun.com/repo/epel-7.repo
[rootnode1 ~]# yum install python-pip ansible git -y
[rootnode1 ~]# yum install python-netaddr unzip python36-six.noarch python36-PyYAML.x86_64 ansible -y
[rootnode1 ~]# pip3 install pecan
[rootnode1 ~]# pip3 install werkzeug正式部署ceph集群
以下操作均在node1节点完成
克隆存储库
[rootnode1 ~]# git clone https://github.com/ceph/ceph-ansible.git
[rootnode1 ~]# cd ceph-ansible
[rootnode1 ceph-ansible]# git checkout stable-4.0
修改ansible的hosts主机文件并且进行主机清单添加同时使用以下命令检查判断是否正确。
[rootnode1 ceph-ansible]# vim /etc/ansible/hosts
[rootnode1 ceph-ansible]# ansible-inventory --graph
[WARNING]: log file at /root/ansible/ansible.log is not writeable and we cannot create it, abortingall:|--clients:| |--node4|--grafana-server:| |--node1| |--node2| |--node3|--mdss:| |--node1| |--node2| |--node3|--mgrs:| |--node1|--mons:| |--node1| |--node2| |--node3|--osds:| |--node1| |--node2| |--node3|--rgws:| |--node1|--ungrouped:
测试是否可以管理
[rootnode1 ceph-ansible]# ansible all -m ping
node2 | SUCCESS {ansible_facts: {discovered_interpreter_python: /usr/bin/python}, changed: false, ping: pong
}
node4 | SUCCESS {ansible_facts: {discovered_interpreter_python: /usr/bin/python}, changed: false, ping: pong
}
node1 | SUCCESS {ansible_facts: {discovered_interpreter_python: /usr/bin/python}, changed: false, ping: pong
}
node3 | SUCCESS {ansible_facts: {discovered_interpreter_python: /usr/bin/python}, changed: false, ping: pong
}将 ceph-ansible/group_vars/ 下的文件全部备份修改 ceph-ansible/group_vars/all.yml 的配置
[rootnode1 ceph-ansible]# cd group_vars
[rootnode1 group_vars]# for file in *;do cp $file ${file%.*};done修改过的内容如下 [rootnode1 ceph-ansible]# cd group_vars/[rootnode1 group_vars]# vim all.yml
修改后的内容
---
dummy:
mon_group_name: mons
osd_group_name: osds
rgw_group_name: rgws
mds_group_name: mdss
client_group_name: clients
mgr_group_name: mgrs
grafana_server_group_name: grafana-server
configure_firewall: False
ceph_origin: repository
ceph_origin: repository
ceph_repository: community
ceph_mirror: http://mirrors.aliyun.com/ceph
ceph_stable_key: http://mirrors.aliyun.com/ceph/keys/release.asc
ceph_stable_release: nautilus
ceph_stable_repo: {{ ceph_mirror }}/rpm-{{ ceph_stable_release }}
public_network: 192.168.134.0/24
cluster_network: 192.168.134.0/24
monitor_interface: ens33
osd_auto_discovery: true
osd_objectstore: filestore
radosgw_interface: ens33 # 此处配置错误会出现报错msg: Either radosgw_address, radosgw_address_block or radosgw_interface must be provided
dashboard_admin_password: ans123456
grafana_admin_password: admin
dshboard_enabled: False # 此处配置错误会出现CENTOS release not supported 7 with dashboard修改 ceph-ansible/group_vars/osds.yml 配置
[rootnode1 group_vars]# vim osds.yml
.......
devices:
- /dev/sdb
备份 ceph-ansible/site.yml 再修改 ceph-ansible/site.yml 配置 [rootnode1 ceph-ansible]# vim site.yml
---- hosts:- mons - osds- mdss- rgws#- nfss#- rbdmirrors- clients- mgrs#- iscsigws- grafana-server执行启动即可
[rootnode1 ceph-ansible]# ansible-playbook site.yml
健康检查
检查是否部署成功
[rootnode1 ~]# ceph health
HEALTH_WARN mons are allowing insecure global_id reclaim # 该提示部署成功