自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

一篇帶給你使用Ansible部署Ceph集群

運(yùn)維 系統(tǒng)運(yùn)維
本篇給大家介紹使用Ansible部署Ceph集群,希望對(duì)你有所幫助!

[[378329]]

 基礎(chǔ)配置

三臺(tái)環(huán)境為centos7.9,以下配置需要在每臺(tái)機(jī)器上執(zhí)行

配置hosts解析

  1. cat >> /etc/hosts <<EOF 
  2. 192.168.2.23 node1 
  3. 192.168.2.24 node2 
  4. 192.168.2.25 node3 
  5. EOF 

關(guān)閉防火墻和selinux

  1. systemctl stop firewalld && systemctl disable firewalld 
  2. setenforce 0 && sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config 

分別在三個(gè)節(jié)點(diǎn)設(shè)置主機(jī)名

  1. hostnamectl set-hostname node1 
  2. hostnamectl set-hostname node2 
  3. hostnamectl set-hostname node3 

配置主機(jī)時(shí)間同步

  1. systemctl restart chronyd.service && systemctl enable chronyd.service 

配置免密登錄

  1. ssh-keygen 
  2. ssh-copy-id -i .ssh/id_rsa.pub node1 
  3. ssh-copy-id -i .ssh/id_rsa.pub node2 
  4. ssh-copy-id -i .ssh/id_rsa.pub node3 

安裝pip和ansible、git

  1. yum install python-pip ansible git -y 

部署ceph集群

克隆存儲(chǔ)庫(kù)

這里我選擇安裝的是ceph nautilus版本

  1. git clone https://github.com/ceph/ceph-ansible.git 
  2. cd ceph-ansible 
  3. git checkout stable-4.0 

安裝ansible依賴包

  1. pip install --upgrade pip 
  2. pip install -r requirements.txt 

修改hosts文件,添加安裝的節(jié)點(diǎn)

  1. cat >> /etc/ansible/hosts <<EOF 
  2. [mons] 
  3. node1 
  4. node2 
  5. node3 
  6.  
  7. [osds] 
  8. node1 
  9. node2 
  10. node3 
  11.  
  12. [mgrs] 
  13. node1 
  14.  
  15. [mdss] 
  16. node1 
  17. node2 
  18. node3 
  19.  
  20. [clients] 
  21. node1 
  22. node2 
  23. node3 
  24.  
  25. [rgws] 
  26. node1 
  27. node2 
  28. node3 
  29.  
  30. [grafana-server] 
  31. node1 
  32.  
  33. EOF 

 備份group_vars下的yml文件

  1. cd ceph-ansible/group_vars 
  2. for file in *;do cp $file ${file%.*};done 

修改group_vars/all.yml配置

  1. --- 
  2. dummy: 
  3. mon_group_name: mons 
  4. osd_group_name: osds 
  5. rgw_group_name: rgws 
  6. mds_group_name: mdss 
  7. client_group_name: clients 
  8. mgr_group_name: mgrs 
  9. grafana_server_group_name: grafana-server 
  10. configure_firewall: False 
  11. ceph_origin: repository 
  12. ceph_origin: repository 
  13. ceph_repository: community 
  14. ceph_mirror: http://mirrors.aliyun.com/ceph 
  15. ceph_stable_key: http://mirrors.aliyun.com/ceph/keys/release.asc 
  16. ceph_stable_release: nautilus 
  17. ceph_stable_repo: "{{ ceph_mirror }}/rpm-{{ ceph_stable_release }}" 
  18. public_network: "192.168.2.0/24" 
  19. cluster_network: "192.168.2.0/24" 
  20. monitor_interface: ens33 
  21. osd_auto_discovery: true 
  22. osd_objectstore: filestore 
  23. radosgw_interface: ens33 
  24. dashboard_admin_password: asd123456 
  25. grafana_admin_password: admin 
  26. pg_autoscale_mode: True 

修改group_vars/osds.yml配置

  1. devices: 
  2.   - /dev/sdb 

修改site.yml配置


開始進(jìn)行安裝

剩下的交給時(shí)間吧,十分鐘左右就裝好了

  1. ansible-playbook -i /etc/ansible/hosts site.yml 

查看安裝狀態(tài),發(fā)現(xiàn)有一個(gè)警告,這是因?yàn)樵谥暗腶ll.yml配置沒有開啟允許自動(dòng)調(diào)整pool中的pg數(shù)pg_autoscale_mode: False,手動(dòng)設(shè)置下即可

  1. ceph osd pool set <pool-name> pg_autoscale_mode on 

 

 

 

責(zé)任編輯:姜華 來源: 運(yùn)維開發(fā)故事
相關(guān)推薦

2022-02-17 08:53:38

ElasticSea集群部署

2022-11-24 06:58:44

Ansible

2021-04-23 08:59:35

ClickHouse集群搭建數(shù)據(jù)庫(kù)

2023-03-29 07:45:58

VS編輯區(qū)編程工具

2021-07-12 06:11:14

SkyWalking 儀表板UI篇

2024-04-19 08:30:27

BitmapRedis數(shù)據(jù)處理

2021-09-13 07:46:06

Kubectl Kubernetes 工具

2022-03-02 08:52:49

PostmangRPCAPI調(diào)試

2022-08-04 08:17:27

React高階組件

2023-07-06 08:22:49

SonarQubeToken

2022-02-25 15:50:05

OpenHarmonToggle組件鴻蒙

2021-04-14 07:55:45

Swift 協(xié)議Protocol

2021-07-08 07:30:13

Webpack 前端Tree shakin

2023-03-13 09:31:04

2021-05-08 08:36:40

ObjectString前端

2021-10-28 08:51:53

GPIO軟件框架 Linux

2021-07-21 09:48:20

etcd-wal模塊解析數(shù)據(jù)庫(kù)

2021-06-21 14:36:46

Vite 前端工程化工具

2021-01-28 08:55:48

Elasticsear數(shù)據(jù)庫(kù)數(shù)據(jù)存儲(chǔ)

2021-04-01 10:51:55

MySQL鎖機(jī)制數(shù)據(jù)庫(kù)
點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號(hào)