]>
Commit | Line | Data |
---|---|---|
b3b6e05e TL |
1 | #!/usr/bin/env bash |
2 | ||
3 | export PATH=/root/bin:$PATH | |
4 | mkdir /root/bin | |
5 | {% if ceph_dev_folder is defined %} | |
6 | cp /mnt/{{ ceph_dev_folder }}/src/cephadm/cephadm /root/bin/cephadm | |
7 | {% else %} | |
8 | cd /root/bin | |
9 | curl --silent --remote-name --location https://raw.githubusercontent.com/ceph/ceph/master/src/cephadm/cephadm | |
10 | {% endif %} | |
11 | chmod +x /root/bin/cephadm | |
12 | mkdir -p /etc/ceph | |
13 | mon_ip=$(ifconfig eth0 | grep 'inet ' | awk '{ print $2}') | |
14 | {% if ceph_dev_folder is defined %} | |
15 | cephadm bootstrap --mon-ip $mon_ip --initial-dashboard-password {{ admin_password }} --allow-fqdn-hostname --dashboard-password-noupdate --shared_ceph_folder /mnt/{{ ceph_dev_folder }} | |
16 | {% else %} | |
17 | cephadm bootstrap --mon-ip $mon_ip --initial-dashboard-password {{ admin_password }} --allow-fqdn-hostname --dashboard-password-noupdate | |
18 | {% endif %} | |
19 | fsid=$(cat /etc/ceph/ceph.conf | grep fsid | awk '{ print $3}') | |
20 | {% for number in range(1, nodes) %} | |
21 | ssh-copy-id -f -i /etc/ceph/ceph.pub -o StrictHostKeyChecking=no root@{{ prefix }}-node-0{{ number }}.{{ domain }} | |
22 | {% endfor %} |