Thank you for reading this post, don't forget to subscribe!
[root@ceph3 ~]# cat /etc/hosts
192.168.1.201 ceph1
192.168.1.202 ceph2
192.168.1.203 ceph3
[root@ansible ~]# yum install sshpass git
[root@ansible ~]# git clone https://github.com/ceph/ceph-ansible
[root@ansible ~]# cd ceph-ansible
git checkout stable-4.0
pip install -r requirements.txt
cp site.yml.sample site.yml
cp group_vars/all.yml.sample group_vars/all.yml
cp group_vars/mons.yml.sample group_vars/mons.yml
cp group_vars/osds.yml.sample group_vars/osds.yml
[root@ansible ceph-ansible]# cat inventory.txt
1 2 3 4 5 6 7 8 9 10 11 12 13 |
[mons] 192.168.1.201 192.168.1.202 192.168.1.203 [osds] 192.168.1.201 192.168.1.202 192.168.1.203 [mgrs] 192.168.1.201 [grafana-server] 192.168.1.201 |
правим основной файл с переменными:
[root@ansible ceph-ansible]# cat group_vars/all.yml | grep -v ^# | grep -v ^$
1 2 3 4 5 6 7 8 9 10 11 |
ceph_repository_type: cdn ceph_origin: repository ceph_repository: community ceph_stable_release: nautilus monitor_interface: enp0s3 public_network: "192.168.1.1/24" dashboard_admin_user: admin dashboard_admin_password: 123456789 grafana_admin_user: admin grafana_admin_password: 123456789 |
правим osds.yml указывая наши диски /dev/sdb
[root@ansible ceph-ansible]# cat group_vars/osds.yml | grep -v ^# | grep -v ^$
1 2 |
devices: - /dev/sdb |
ansible-playbook site.yml -i inventory.txt --ask-pass
ждём, по идее всё должно быть ок.
мы ещё включали установку dashboard, проверим:
https://192.168.1.201:8443/#/dashboard
и grafana
https://192.168.1.201:3000/?orgId=1