]>
Commit | Line | Data |
---|---|---|
b3b6e05e TL |
1 | #!/usr/bin/env bash |
2 | ||
20effc67 TL |
3 | set -x |
4 | ||
b3b6e05e TL |
5 | export PATH=/root/bin:$PATH |
6 | mkdir /root/bin | |
522d829b | 7 | |
1e59de90 | 8 | export CEPHADM_IMAGE='quay.ceph.io/ceph-ci/ceph:reef' |
39ae355f | 9 | |
1e59de90 TL |
10 | CEPHADM="/root/bin/cephadm" |
11 | ||
12 | /mnt/{{ ceph_dev_folder }}/src/cephadm/build.sh $CEPHADM | |
b3b6e05e TL |
13 | mkdir -p /etc/ceph |
14 | mon_ip=$(ifconfig eth0 | grep 'inet ' | awk '{ print $2}') | |
522d829b | 15 | |
20effc67 | 16 | bootstrap_extra_options='--allow-fqdn-hostname --dashboard-password-noupdate' |
2a845540 TL |
17 | |
18 | # commenting the below lines. Uncomment it when any extra options are | |
19 | # needed for the bootstrap. | |
20 | # bootstrap_extra_options_not_expanded='' | |
21 | # {% if expanded_cluster is not defined %} | |
22 | # bootstrap_extra_options+=" ${bootstrap_extra_options_not_expanded}" | |
23 | # {% endif %} | |
20effc67 | 24 | |
1e59de90 | 25 | $CEPHADM bootstrap --mon-ip $mon_ip --initial-dashboard-password {{ admin_password }} --shared_ceph_folder /mnt/{{ ceph_dev_folder }} ${bootstrap_extra_options} |
522d829b | 26 | |
b3b6e05e | 27 | fsid=$(cat /etc/ceph/ceph.conf | grep fsid | awk '{ print $3}') |
1e59de90 | 28 | cephadm_shell="$CEPHADM shell --fsid ${fsid} -c /etc/ceph/ceph.conf -k /etc/ceph/ceph.client.admin.keyring" |
522d829b | 29 | |
b3b6e05e | 30 | {% for number in range(1, nodes) %} |
39ae355f | 31 | ssh-copy-id -f -i /etc/ceph/ceph.pub -o StrictHostKeyChecking=no root@192.168.100.10{{ number }} |
522d829b | 32 | {% if expanded_cluster is defined %} |
20effc67 | 33 | ${cephadm_shell} ceph orch host add {{ prefix }}-node-0{{ number }} |
522d829b | 34 | {% endif %} |
b3b6e05e | 35 | {% endfor %} |
522d829b TL |
36 | |
37 | {% if expanded_cluster is defined %} | |
a4b75251 | 38 | ${cephadm_shell} ceph orch apply osd --all-available-devices |
522d829b | 39 | {% endif %} |