]>
Commit | Line | Data |
---|---|---|
b3b6e05e TL |
1 | #!/usr/bin/env bash |
2 | ||
3 | export PATH=/root/bin:$PATH | |
4 | mkdir /root/bin | |
522d829b TL |
5 | |
6 | cp /mnt/{{ ceph_dev_folder }}/src/cephadm/cephadm /root/bin/cephadm | |
b3b6e05e TL |
7 | chmod +x /root/bin/cephadm |
8 | mkdir -p /etc/ceph | |
9 | mon_ip=$(ifconfig eth0 | grep 'inet ' | awk '{ print $2}') | |
522d829b | 10 | |
a4b75251 | 11 | cephadm bootstrap --mon-ip $mon_ip --initial-dashboard-password {{ admin_password }} --allow-fqdn-hostname --skip-monitoring-stack --dashboard-password-noupdate --shared_ceph_folder /mnt/{{ ceph_dev_folder }} |
522d829b | 12 | |
b3b6e05e | 13 | fsid=$(cat /etc/ceph/ceph.conf | grep fsid | awk '{ print $3}') |
a4b75251 | 14 | cephadm_shell="cephadm shell --fsid ${fsid} -c /etc/ceph/ceph.conf -k /etc/ceph/ceph.client.admin.keyring" |
522d829b | 15 | |
b3b6e05e TL |
16 | {% for number in range(1, nodes) %} |
17 | ssh-copy-id -f -i /etc/ceph/ceph.pub -o StrictHostKeyChecking=no root@{{ prefix }}-node-0{{ number }}.{{ domain }} | |
522d829b | 18 | {% if expanded_cluster is defined %} |
a4b75251 | 19 | ${cephadm_shell} ceph orch host add {{ prefix }}-node-0{{ number }}.{{ domain }} |
522d829b | 20 | {% endif %} |
b3b6e05e | 21 | {% endfor %} |
522d829b TL |
22 | |
23 | {% if expanded_cluster is defined %} | |
a4b75251 | 24 | ${cephadm_shell} ceph orch apply osd --all-available-devices |
522d829b | 25 | {% endif %} |