环境角色

计算机名 角色 Publie-IP Cluster-IP
inf-c7-n1 mon,osd,mgr,prom/node-exporter 10.199.13.119 192.168.31.119
inf-c7-n2 mon,osd,mgr,prom/node-exporter 10.199.13.122 192.168.31.122
inf-c7-n3 mon,osd,mgr,prom/node-exporter 10.199.13.123 192.168.31.123
inf-c7-n4 ansible, 10.199.13.128
inf-c7-n5 prom/prometheus,prom/alertmanager,grafana/grafana,prom/node-exporter 10.199.13.107
inf-c7-n6 prom/prometheus,prom/alertmanager,grafana/grafana,prom/node-exporter 10.199.13.108
inf-c7-n7 prom/prometheus,prom/alertmanager,grafana/grafana,prom/node-exporter 10.199.13.109

安装操作系统

CentOS7.9最小化安装;

  1. [root@inf-c7-n1 ~]# uname -a
  2. Linux inf-c7-n1 3.10.0-1160.el7.x86_64 #1 SMP Mon Oct 19 16:18:59 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
  3. [root@inf-c7-n1 ~]# cat /etc/centos-release
  4. CentOS Linux release 7.9.2009 (Core)

安装ansible

  1. [root@inf-c7-n4 yum.repos.d]# yum install centos-release-ansible-29.noarch
  2. Loaded plugins: fastestmirror
  3. Loading mirror speeds from cached hostfile
  4. * base: mirrors.aliyun.com
  5. * extras: mirrors.aliyun.com
  6. * updates: mirrors.aliyun.com
  7. Resolving Dependencies
  8. --> Running transaction check
  9. ---> Package centos-release-ansible-29.noarch 0:1-1.el7 will be installed
  10. --> Processing Dependency: centos-release-configmanagement for package: centos-release-ansible-29-1-1.el7.noarch
  11. --> Running transaction check
  12. ---> Package centos-release-configmanagement.noarch 0:1-1.el7.centos will be installed
  13. --> Finished Dependency Resolution
  14. Dependencies Resolved
  15. ==================================================================================================================================================
  16. Package Arch Version Repository Size
  17. ==================================================================================================================================================
  18. Installing:
  19. centos-release-ansible-29 noarch 1-1.el7 extras 3.9 k
  20. Installing for dependencies:
  21. centos-release-configmanagement noarch 1-1.el7.centos extras 4.3 k
  22. Transaction Summary
  23. ==================================================================================================================================================
  24. Install 1 Package (+1 Dependent package)
  25. Total download size: 8.2 k
  26. Installed size: 2.2 k
  27. Is this ok [y/d/N]: y
  28. Downloading packages:
  29. ......
  30. [root@inf-c7-n4 yum.repos.d]# yum install ansible
  31. Loaded plugins: fastestmirror
  32. Loading mirror speeds from cached hostfile
  33. * base: mirrors.aliyun.com
  34. * centos-ansible-29: mirrors.aliyun.com
  35. * extras: mirrors.aliyun.com
  36. * updates: mirrors.aliyun.com
  37. centos-ansible-29 | 3.0 kB 00:00:00
  38. centos-ansible-29/7/x86_64/primary_db | 29 kB 00:00:00
  39. Resolving Dependencies
  40. --> Running transaction check
  41. ---> Package ansible.noarch 0:2.9.23-1.el7 will be installed
  42. --> Processing Dependency: PyYAML for package: ansible-2.9.23-1.el7.noarch
  43. --> Processing Dependency: python-jinja2 for package: ansible-2.9.23-1.el7.noarch
  44. --> Processing Dependency: python-paramiko for package: ansible-2.9.23-1.el7.noarch
  45. --> Processing Dependency: python-six for package: ansible-2.9.23-1.el7.noarch
  46. --> Processing Dependency: python2-cryptography for package: ansible-2.9.23-1.el7.noarch
  47. --> Processing Dependency: sshpass for package: ansible-2.9.23-1.el7.noarch
  48. --> Running transaction check
  49. ---> Package PyYAML.x86_64 0:3.10-11.el7 will be installed
  50. --> Processing Dependency: libyaml-0.so.2()(64bit) for package: PyYAML-3.10-11.el7.x86_64
  51. ---> Package python-jinja2.noarch 0:2.7.2-4.el7 will be installed
  52. --> Processing Dependency: python-babel >= 0.8 for package: python-jinja2-2.7.2-4.el7.noarch
  53. --> Processing Dependency: python-markupsafe for package: python-jinja2-2.7.2-4.el7.noarch
  54. ---> Package python-paramiko.noarch 0:2.1.1-9.el7 will be installed
  55. --> Processing Dependency: python2-pyasn1 for package: python-paramiko-2.1.1-9.el7.noarch
  56. ---> Package python-six.noarch 0:1.9.0-2.el7 will be installed
  57. ---> Package python2-cryptography.x86_64 0:1.7.2-2.el7 will be installed
  58. --> Processing Dependency: python-idna >= 2.0 for package: python2-cryptography-1.7.2-2.el7.x86_64
  59. --> Processing Dependency: python-cffi >= 1.4.1 for package: python2-cryptography-1.7.2-2.el7.x86_64
  60. --> Processing Dependency: python-setuptools for package: python2-cryptography-1.7.2-2.el7.x86_64
  61. --> Processing Dependency: python-ipaddress for package: python2-cryptography-1.7.2-2.el7.x86_64
  62. --> Processing Dependency: python-enum34 for package: python2-cryptography-1.7.2-2.el7.x86_64
  63. ---> Package sshpass.x86_64 0:1.06-2.el7 will be installed
  64. --> Running transaction check
  65. ---> Package libyaml.x86_64 0:0.1.4-11.el7_0 will be installed
  66. ---> Package python-babel.noarch 0:0.9.6-8.el7 will be installed
  67. ---> Package python-cffi.x86_64 0:1.6.0-5.el7 will be installed
  68. --> Processing Dependency: python-pycparser for package: python-cffi-1.6.0-5.el7.x86_64
  69. ---> Package python-enum34.noarch 0:1.0.4-1.el7 will be installed
  70. ---> Package python-idna.noarch 0:2.4-1.el7 will be installed
  71. ---> Package python-ipaddress.noarch 0:1.0.16-2.el7 will be installed
  72. ---> Package python-markupsafe.x86_64 0:0.11-10.el7 will be installed
  73. ---> Package python-setuptools.noarch 0:0.9.8-7.el7 will be installed
  74. --> Processing Dependency: python-backports-ssl_match_hostname for package: python-setuptools-0.9.8-7.el7.noarch
  75. ---> Package python2-pyasn1.noarch 0:0.1.9-7.el7 will be installed
  76. --> Running transaction check
  77. ---> Package python-backports-ssl_match_hostname.noarch 0:3.5.0.1-1.el7 will be installed
  78. --> Processing Dependency: python-backports for package: python-backports-ssl_match_hostname-3.5.0.1-1.el7.noarch
  79. ---> Package python-pycparser.noarch 0:2.14-1.el7 will be installed
  80. --> Processing Dependency: python-ply for package: python-pycparser-2.14-1.el7.noarch
  81. --> Running transaction check
  82. ---> Package python-backports.x86_64 0:1.0-8.el7 will be installed
  83. ---> Package python-ply.noarch 0:3.4-11.el7 will be installed
  84. --> Finished Dependency Resolution
  85. Dependencies Resolved
  86. ==================================================================================================================================================
  87. Package Arch Version Repository Size
  88. ==================================================================================================================================================
  89. Installing:
  90. ansible noarch 2.9.23-1.el7 centos-ansible-29 17 M
  91. Installing for dependencies:
  92. PyYAML x86_64 3.10-11.el7 base 153 k
  93. libyaml x86_64 0.1.4-11.el7_0 base 55 k
  94. python-babel noarch 0.9.6-8.el7 base 1.4 M
  95. python-backports x86_64 1.0-8.el7 base 5.8 k
  96. python-backports-ssl_match_hostname noarch 3.5.0.1-1.el7 base 13 k
  97. python-cffi x86_64 1.6.0-5.el7 base 218 k
  98. python-enum34 noarch 1.0.4-1.el7 base 52 k
  99. python-idna noarch 2.4-1.el7 base 94 k
  100. python-ipaddress noarch 1.0.16-2.el7 base 34 k
  101. python-jinja2 noarch 2.7.2-4.el7 base 519 k
  102. python-markupsafe x86_64 0.11-10.el7 base 25 k
  103. python-paramiko noarch 2.1.1-9.el7 base 269 k
  104. python-ply noarch 3.4-11.el7 base 123 k
  105. python-pycparser noarch 2.14-1.el7 base 104 k
  106. python-setuptools noarch 0.9.8-7.el7 base 397 k
  107. python-six noarch 1.9.0-2.el7 base 29 k
  108. python2-cryptography x86_64 1.7.2-2.el7 base 502 k
  109. python2-pyasn1 noarch 0.1.9-7.el7 base 100 k
  110. sshpass x86_64 1.06-2.el7 extras 21 k
  111. Transaction Summary
  112. ==================================================================================================================================================
  113. Install 1 Package (+19 Dependent packages)
  114. Total download size: 21 M
  115. Installed size: 122 M
  116. Is this ok [y/d/N]: y
  117. Downloading packages:
  118. ......

安装nautilus源

  1. [root@inf-c7-n4 yum.repos.d]# yum install centos-release-ceph-nautilus.noarch
  2. Loaded plugins: fastestmirror
  3. Loading mirror speeds from cached hostfile
  4. * base: mirrors.aliyun.com
  5. * centos-ansible-29: mirrors.aliyun.com
  6. * extras: mirrors.aliyun.com
  7. * updates: mirrors.aliyun.com
  8. Resolving Dependencies
  9. --> Running transaction check
  10. ---> Package centos-release-ceph-nautilus.noarch 0:1.2-2.el7.centos will be installed
  11. --> Processing Dependency: centos-release-storage-common for package: centos-release-ceph-nautilus-1.2-2.el7.centos.noarch
  12. --> Processing Dependency: centos-release-nfs-ganesha28 for package: centos-release-ceph-nautilus-1.2-2.el7.centos.noarch
  13. --> Running transaction check
  14. ---> Package centos-release-nfs-ganesha28.noarch 0:1.0-3.el7.centos will be installed
  15. ---> Package centos-release-storage-common.noarch 0:2-2.el7.centos will be installed
  16. --> Finished Dependency Resolution
  17. Dependencies Resolved
  18. ==================================================================================================================================================
  19. Package Arch Version Repository Size
  20. ==================================================================================================================================================
  21. Installing:
  22. centos-release-ceph-nautilus noarch 1.2-2.el7.centos extras 5.1 k
  23. Installing for dependencies:
  24. centos-release-nfs-ganesha28 noarch 1.0-3.el7.centos extras 4.3 k
  25. centos-release-storage-common noarch 2-2.el7.centos extras 5.1 k
  26. Transaction Summary
  27. ==================================================================================================================================================
  28. Install 1 Package (+2 Dependent packages)
  29. Total download size: 15 k
  30. Installed size: 3.0 k
  31. Is this ok [y/d/N]: y
  32. Downloading packages:
  33. ......

安装ceph-ansible

  1. [root@inf-c7-n4 yum.repos.d]# yum install ceph-ansible
  2. Loaded plugins: fastestmirror
  3. Loading mirror speeds from cached hostfile
  4. * base: mirrors.aliyun.com
  5. * centos-ansible-29: mirrors.aliyun.com
  6. * centos-ceph-nautilus: mirrors.aliyun.com
  7. * centos-nfs-ganesha28: ftp.sjtu.edu.cn
  8. * extras: mirrors.aliyun.com
  9. * updates: mirrors.aliyun.com
  10. Resolving Dependencies
  11. --> Running transaction check
  12. ---> Package ceph-ansible.noarch 0:4.0.62-1.el7 will be installed
  13. --> Processing Dependency: python2-netaddr for package: ceph-ansible-4.0.62-1.el7.noarch
  14. --> Running transaction check
  15. ---> Package python2-netaddr.noarch 0:0.7.19-5.el7 will be installed
  16. --> Finished Dependency Resolution
  17. Dependencies Resolved
  18. ==================================================================================================================================================
  19. Package Arch Version Repository Size
  20. ==================================================================================================================================================
  21. Installing:
  22. ceph-ansible noarch 4.0.62-1.el7 centos-ceph-nautilus 237 k
  23. Installing for dependencies:
  24. python2-netaddr noarch 0.7.19-5.el7 centos-ceph-nautilus 1.5 M
  25. Transaction Summary
  26. ==================================================================================================================================================
  27. Install 1 Package (+1 Dependent package)
  28. Total download size: 1.8 M
  29. Installed size: 9.6 M
  30. Is this ok [y/d/N]: y
  31. Downloading packages:
  32. ......

配置/etc/hosts文件

  1. [root@inf-c7-n1 ~]# cat /etc/centos-release
  2. CentOS Linux release 7.9.2009 (Core)
  3. [root@inf-c7-n1 ~]# cat /etc/hosts
  4. 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
  5. ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
  6. 10.199.13.119 inf-c7-n1
  7. 10.199.13.122 inf-c7-n2
  8. 10.199.13.123 inf-c7-n3
  9. 10.199.13.128 inf-c7-n4
  10. 10.199.13.107 inf-c7-n5
  11. 10.199.13.108 inf-c7-n6
  12. 10.199.13.109 inf-c7-n7

生成密钥文件

  1. [root@inf-c7-n4 ~]# ssh-keygen
  2. Generating public/private rsa key pair.
  3. Enter file in which to save the key (/root/.ssh/id_rsa):
  4. Created directory '/root/.ssh'.
  5. Enter passphrase (empty for no passphrase):
  6. Enter same passphrase again:
  7. Your identification has been saved in /root/.ssh/id_rsa.
  8. Your public key has been saved in /root/.ssh/id_rsa.pub.
  9. The key fingerprint is:
  10. SHA256:cPja6om+NUsW2gpxeR/7Vqwc3iFxbdKX64Dgz+WjzGc root@inf-c7-n4
  11. The key's randomart image is:
  12. +---[RSA 2048]----+
  13. | |
  14. | . |
  15. | o . o .|
  16. | . + .. o +..|
  17. | . o o S .+.o ..|
  18. | o + = +o.+o . |
  19. | . . B +oo*o.o |
  20. | . * = .Bo.E . |
  21. | .=o= ..++ . |
  22. +----[SHA256]-----+

配置免密登录

  1. [root@inf-c7-n4 ~]# ssh-copy-id -i .ssh/id_rsa.pub inf-c7-n1
  2. /usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: ".ssh/id_rsa.pub"
  3. The authenticity of host 'inf-c7-n1 (10.199.13.119)' can't be established.
  4. ECDSA key fingerprint is SHA256:Nzy5jCpTBlcNdJmceW7RjxcDzmaiXVvdPdJt/Avct1g.
  5. ECDSA key fingerprint is MD5:7c:c1:54:03:13:d7:1c:f7:22:31:6f:8b:c9:be:90:e1.
  6. Are you sure you want to continue connecting (yes/no)? yes
  7. /usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
  8. /usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
  9. root@inf-c7-n1's password:
  10. Number of key(s) added: 1
  11. Now try logging into the machine, with: "ssh 'inf-c7-n1'"
  12. and check to make sure that only the key(s) you wanted were added.
  13. [root@inf-c7-n4 ~]# ssh-copy-id -i .ssh/id_rsa.pub inf-c7-n2
  14. /usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: ".ssh/id_rsa.pub"
  15. The authenticity of host 'inf-c7-n2 (10.199.13.122)' can't be established.
  16. ECDSA key fingerprint is SHA256:dbXDcapX6D4jnzXODW75ZLWyQxJb59WtHb4gXxmsnww.
  17. ECDSA key fingerprint is MD5:54:3b:fb:be:68:ec:a7:48:bb:b5:06:0a:1b:52:33:63.
  18. Are you sure you want to continue connecting (yes/no)? yes
  19. /usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
  20. /usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
  21. root@inf-c7-n2's password:
  22. Number of key(s) added: 1
  23. Now try logging into the machine, with: "ssh 'inf-c7-n2'"
  24. and check to make sure that only the key(s) you wanted were added.
  25. [root@inf-c7-n4 ~]# ssh-copy-id -i .ssh/id_rsa.pub inf-c7-n3
  26. /usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: ".ssh/id_rsa.pub"
  27. The authenticity of host 'inf-c7-n3 (10.199.13.123)' can't be established.
  28. ECDSA key fingerprint is SHA256:NLEMW+tRUS1K9rA4XgMFuO+dM6A3wpIuJgydp9/WkJo.
  29. ECDSA key fingerprint is MD5:b1:9e:2d:9c:0f:82:b5:d3:af:8b:c8:47:4b:ec:dc:b3.
  30. Are you sure you want to continue connecting (yes/no)? yes
  31. /usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
  32. /usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
  33. root@inf-c7-n3's password:
  34. Number of key(s) added: 1
  35. Now try logging into the machine, with: "ssh 'inf-c7-n3'"
  36. and check to make sure that only the key(s) you wanted were added.
  37. ......

定义ansible hosts

  1. [root@inf-c7-n4 ceph-ansible]# cat /etc/ansible/hosts |grep -v '^#'|grep -v '^$'
  2. [mons]
  3. inf-c7-n1
  4. inf-c7-n2
  5. inf-c7-n3
  6. [osds]
  7. inf-c7-n1
  8. inf-c7-n2
  9. inf-c7-n3
  10. [grafana-server]
  11. inf-c7-n5
  12. inf-c7-n6
  13. inf-c7-n7

定义ansible-playbook变量

  1. [root@inf-c7-n4 ceph-ansible]# cp site.yml.sample site.yml
  2. [root@inf-c7-n4 group_vars]# cp all.yml.sample all.yml
  3. [root@inf-c7-n4 group_vars]# cat all.yml|grep -v '^#'|grep -v '^$'
  4. ---
  5. dummy:
  6. ceph_origin: repository
  7. ceph_repository: community
  8. ceph_stable_release: nautilus
  9. monitor_interface: eth0
  10. public_network: "10.199.13.0/24"
  11. cluster_network: "192.168.31.0/24"
  12. dashboard_admin_password: p@ssw0rd
  13. grafana_admin_password: admin
  14. [root@inf-c7-n4 group_vars]# cp osds.yml.sample osds.yml
  15. [root@inf-c7-n4 group_vars]# cat osds.yml |grep -v '^#'|grep -v '^$'
  16. ---
  17. dummy:
  18. devices:
  19. - /dev/vdb
  20. - /dev/vdc
  21. - /dev/vdd

安装部署

  1. [root@inf-c7-n4 ceph-ansible]# ansible-playbook site.yml -vvv
  2. ansible-playbook 2.9.23
  3. config file = /usr/share/ceph-ansible/ansible.cfg
  4. configured module search path = [u'/usr/share/ceph-ansible/library']
  5. ansible python module location = /usr/lib/python2.7/site-packages/ansible
  6. executable location = /usr/bin/ansible-playbook
  7. python version = 2.7.5 (default, Oct 14 2020, 14:45:30) [GCC 4.8.5 20150623 (Red Hat 4.8.5-44)]
  8. Using /usr/share/ceph-ansible/ansible.cfg as config file
  9. host_list declined parsing /etc/ansible/hosts as it did not pass its verify_file() method
  10. script declined parsing /etc/ansible/hosts as it did not pass its verify_file() method
  11. auto declined parsing /etc/ansible/hosts as it did not pass its verify_file() method
  12. Parsed /etc/ansible/hosts inventory source with ini plugin
  13. statically imported: /usr/share/ceph-ansible/roles/ceph-handler/tasks/check_running_cluster.yml
  14. statically imported: /usr/share/ceph-ansible/raw_install_python.yml
  15. statically imported: /usr/share/ceph-ansible/roles/ceph-handler/tasks/check_running_cluster.yml
  16. statically imported: /usr/share/ceph-ansible/roles/ceph-handler/tasks/check_running_cluster.yml
  17. statically imported: /usr/share/ceph-ansible/roles/ceph-handler/tasks/check_running_cluster.yml
  18. statically imported: /usr/share/ceph-ansible/roles/ceph-handler/tasks/check_running_cluster.yml
  19. statically imported: /usr/share/ceph-ansible/roles/ceph-handler/tasks/check_running_cluster.yml
  20. statically imported: /usr/share/ceph-ansible/roles/ceph-handler/tasks/check_running_cluster.yml
  21. statically imported: /usr/share/ceph-ansible/roles/ceph-handler/tasks/check_running_cluster.yml
  22. statically imported: /usr/share/ceph-ansible/roles/ceph-nfs/tasks/create_rgw_nfs_user.yml
  23. statically imported: /usr/share/ceph-ansible/roles/ceph-nfs/tasks/start_nfs.yml
  24. statically imported: /usr/share/ceph-ansible/roles/ceph-handler/tasks/check_running_cluster.yml
  25. statically imported: /usr/share/ceph-ansible/roles/ceph-handler/tasks/check_running_cluster.yml
  26. statically imported: /usr/share/ceph-ansible/roles/ceph-handler/tasks/check_running_cluster.yml
  27. Skipping callback 'actionable', as we already have a stdout callback.
  28. Skipping callback 'counter_enabled', as we already have a stdout callback.
  29. Skipping callback 'debug', as we already have a stdout callback.
  30. Skipping callback 'dense', as we already have a stdout callback.
  31. Skipping callback 'dense', as we already have a stdout callback.
  32. Skipping callback 'full_skip', as we already have a stdout callback.
  33. Skipping callback 'json', as we already have a stdout callback.
  34. Skipping callback 'minimal', as we already have a stdout callback.
  35. Skipping callback 'null', as we already have a stdout callback.
  36. Skipping callback 'oneline', as we already have a stdout callback.
  37. Skipping callback 'selective', as we already have a stdout callback.
  38. Skipping callback 'skippy', as we already have a stdout callback.
  39. Skipping callback 'stderr', as we already have a stdout callback.
  40. Skipping callback 'unixy', as we already have a stdout callback.
  41. Skipping callback 'yaml', as we already have a stdout callback.
  42. PLAYBOOK: site.yml *******************************************************************************************************************************
  43. 16 plays in site.yml
  44. [WARNING]: Could not match supplied host pattern, ignoring: mdss
  45. [WARNING]: Could not match supplied host pattern, ignoring: rgws
  46. [WARNING]: Could not match supplied host pattern, ignoring: nfss
  47. [WARNING]: Could not match supplied host pattern, ignoring: rbdmirrors
  48. [WARNING]: Could not match supplied host pattern, ignoring: clients
  49. [WARNING]: Could not match supplied host pattern, ignoring: mgrs
  50. [WARNING]: Could not match supplied host pattern, ignoring: iscsigws
  51. [WARNING]: Could not match supplied host pattern, ignoring: iscsi-gws
  52. [WARNING]: Could not match supplied host pattern, ignoring: rgwloadbalancers
  53. PLAY [mons,osds,mdss,rgws,nfss,rbdmirrors,clients,mgrs,iscsigws,iscsi-gws,grafana-server,rgwloadbalancers] ***************************************
  54. TASK [check for python] **************************************************************************************************************************
  55. task path: /usr/share/ceph-ansible/raw_install_python.yml:2
  56. Friday 17 September 2021 14:43:11 +0800 (0:00:00.112) 0:00:00.112 ******
  57. <inf-c7-n1> Attempting python interpreter discovery
  58. <inf-c7-n2> Attempting python interpreter discovery
  59. <inf-c7-n3> Attempting python interpreter discovery
  60. <inf-c7-n1> ESTABLISH SSH CONNECTION FOR USER: None
  61. <inf-c7-n2> ESTABLISH SSH CONNECTION FOR USER: None
  62. <inf-c7-n5> Attempting python interpreter discovery
  63. <inf-c7-n3> ESTABLISH SSH CONNECTION FOR USER: None
  64. <inf-c7-n7> Attempting python interpreter discovery
  65. ......
  66. ......
  67. TASK [show ceph status for cluster ceph] *********************************************************************************************************
  68. task path: /usr/share/ceph-ansible/site.yml:508
  69. Friday 17 September 2021 15:15:17 +0800 (0:00:01.902) 0:32:05.977 ******
  70. ok: [inf-c7-n1 -> inf-c7-n1] =>
  71. msg:
  72. - ' cluster:'
  73. - ' id: 62fcf0e4-4491-45fd-934f-2ff184be6ff0'
  74. - ' health: HEALTH_WARN'
  75. - ' mons are allowing insecure global_id reclaim'
  76. - ' '
  77. - ' services:'
  78. - ' mon: 3 daemons, quorum inf-c7-n1,inf-c7-n2,inf-c7-n3 (age 12m)'
  79. - ' mgr: inf-c7-n2(active, since 20s), standbys: inf-c7-n3, inf-c7-n1'
  80. - ' osd: 9 osds: 9 up (since 7m), 9 in (since 7m)'
  81. - ' '
  82. - ' data:'
  83. - ' pools: 0 pools, 0 pgs'
  84. - ' objects: 0 objects, 0 B'
  85. - ' usage: 9.0 GiB used, 81 GiB / 90 GiB avail'
  86. - ' pgs: '
  87. - ' '
  88. META: ran handlers
  89. META: ran handlers
  90. PLAY RECAP ***************************************************************************************************************************************
  91. inf-c7-n1 : ok=368 changed=53 unreachable=0 failed=0 skipped=586 rescued=0 ignored=0
  92. inf-c7-n2 : ok=285 changed=44 unreachable=0 failed=0 skipped=531 rescued=0 ignored=0
  93. inf-c7-n3 : ok=296 changed=47 unreachable=0 failed=0 skipped=518 rescued=0 ignored=0
  94. inf-c7-n5 : ok=145 changed=42 unreachable=0 failed=0 skipped=292 rescued=0 ignored=0
  95. inf-c7-n6 : ok=135 changed=41 unreachable=0 failed=0 skipped=286 rescued=0 ignored=0
  96. inf-c7-n7 : ok=135 changed=42 unreachable=0 failed=0 skipped=286 rescued=0 ignored=0
  97. INSTALLER STATUS *********************************************************************************************************************************
  98. Install Ceph Monitor : Complete (0:04:08)
  99. Install Ceph OSD : Complete (0:01:35)
  100. Install Ceph Dashboard : Complete (0:02:28)
  101. Install Ceph Grafana : Complete (0:02:31)
  102. Install Ceph Node Exporter : Complete (0:02:03)
  103. Install Ceph Crash : Complete (0:00:24)
  104. Friday 17 September 2021 15:15:17 +0800 (0:00:00.128) 0:32:06.106 ******
  105. ===============================================================================
  106. ceph-common : install redhat ceph packages ---------------------------------------------------------------------------------------------- 934.58s
  107. /usr/share/ceph-ansible/roles/ceph-common/tasks/installs/install_redhat_packages.yml:18 ---------------------------------------------------------
  108. install ceph-mgr packages on RedHat or SUSE --------------------------------------------------------------------------------------------- 145.92s
  109. /usr/share/ceph-ansible/roles/ceph-mgr/tasks/pre_requisite.yml:9 --------------------------------------------------------------------------------
  110. ceph-container-engine : install container packages --------------------------------------------------------------------------------------- 63.66s
  111. /usr/share/ceph-ansible/roles/ceph-container-engine/tasks/pre_requisites/prerequisites.yml:26 ---------------------------------------------------
  112. ceph-dashboard : check if dashboard admin user exists ------------------------------------------------------------------------------------ 44.98s
  113. /usr/share/ceph-ansible/roles/ceph-dashboard/tasks/configure_dashboard.yml:154 ------------------------------------------------------------------
  114. ceph-grafana : wait for grafana to start ------------------------------------------------------------------------------------------------- 44.79s
  115. /usr/share/ceph-ansible/roles/ceph-grafana/tasks/configure_grafana.yml:110 ----------------------------------------------------------------------
  116. ceph-common : install centos dependencies ------------------------------------------------------------------------------------------------ 31.31s
  117. /usr/share/ceph-ansible/roles/ceph-common/tasks/installs/install_redhat_packages.yml:10 ---------------------------------------------------------
  118. install ceph-grafana-dashboards package on RedHat or SUSE -------------------------------------------------------------------------------- 25.94s
  119. /usr/share/ceph-ansible/roles/ceph-grafana/tasks/configure_grafana.yml:2 ------------------------------------------------------------------------
  120. ceph-osd : use ceph-volume lvm batch to create bluestore osds ---------------------------------------------------------------------------- 22.51s
  121. /usr/share/ceph-ansible/roles/ceph-osd/tasks/scenarios/lvm-batch.yml:3 --------------------------------------------------------------------------
  122. ceph-infra : install firewalld python binding -------------------------------------------------------------------------------------------- 14.26s
  123. /usr/share/ceph-ansible/roles/ceph-infra/tasks/configure_firewall.yml:16 ------------------------------------------------------------------------
  124. ceph-grafana : make sure grafana is down ------------------------------------------------------------------------------------------------- 11.37s
  125. /usr/share/ceph-ansible/roles/ceph-grafana/tasks/configure_grafana.yml:13 -----------------------------------------------------------------------
  126. ceph-dashboard : copy self-signed generated certificate on mons --------------------------------------------------------------------------- 9.01s
  127. /usr/share/ceph-ansible/roles/ceph-dashboard/tasks/configure_dashboard.yml:84 -------------------------------------------------------------------
  128. gather and delegate facts ----------------------------------------------------------------------------------------------------------------- 8.65s
  129. /usr/share/ceph-ansible/site.yml:42 -------------------------------------------------------------------------------------------------------------
  130. ceph-mgr : wait for all mgr to be up ------------------------------------------------------------------------------------------------------ 8.61s
  131. /usr/share/ceph-ansible/roles/ceph-mgr/tasks/mgr_modules.yml:11 ---------------------------------------------------------------------------------
  132. ceph-mon : fetch ceph initial keys -------------------------------------------------------------------------------------------------------- 8.12s
  133. /usr/share/ceph-ansible/roles/ceph-mon/tasks/ceph_keys.yml:20 -----------------------------------------------------------------------------------
  134. ceph-mon : waiting for the monitor(s) to form the quorum... ------------------------------------------------------------------------------- 7.70s
  135. /usr/share/ceph-ansible/roles/ceph-mon/tasks/ceph_keys.yml:2 ------------------------------------------------------------------------------------
  136. add modules to ceph-mgr ------------------------------------------------------------------------------------------------------------------- 7.38s
  137. /usr/share/ceph-ansible/roles/ceph-mgr/tasks/mgr_modules.yml:44 ---------------------------------------------------------------------------------
  138. ceph-container-engine : start container service ------------------------------------------------------------------------------------------- 6.50s
  139. /usr/share/ceph-ansible/roles/ceph-container-engine/tasks/pre_requisites/prerequisites.yml:81 ---------------------------------------------------
  140. ceph-dashboard : config the current dashboard backend ------------------------------------------------------------------------------------- 6.28s
  141. /usr/share/ceph-ansible/roles/ceph-dashboard/tasks/configure_dashboard.yml:122 ------------------------------------------------------------------
  142. ceph-infra : install chrony --------------------------------------------------------------------------------------------------------------- 6.06s
  143. /usr/share/ceph-ansible/roles/ceph-infra/tasks/setup_ntp.yml:15 ---------------------------------------------------------------------------------
  144. ceph-common : configure red hat ceph community repository stable key ---------------------------------------------------------------------- 5.70s
  145. /usr/share/ceph-ansible/roles/ceph-common/tasks/installs/redhat_community_repository.yml:10 -----------------------------------------------------

完成

  1. [root@inf-c7-n1 ~]# ceph -s
  2. cluster:
  3. id: 62fcf0e4-4491-45fd-934f-2ff184be6ff0
  4. health: HEALTH_OK
  5. services:
  6. mon: 3 daemons, quorum inf-c7-n1,inf-c7-n2,inf-c7-n3 (age 2h)
  7. mgr: inf-c7-n2(active, since 111m), standbys: inf-c7-n3, inf-c7-n1
  8. osd: 9 osds: 9 up (since 118m), 9 in (since 118m)
  9. data:
  10. pools: 1 pools, 32 pgs
  11. objects: 0 objects, 0 B
  12. usage: 9.5 GiB used, 80 GiB / 90 GiB avail
  13. pgs: 32 active+clean

image.png
image.png