]> git.proxmox.com Git - ceph.git/blob - ceph/src/test/behave_tests/template/bootstrap_script_template
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / test / behave_tests / template / bootstrap_script_template
1 export PATH=/root/bin:$PATH
2 mkdir /root/bin
3
4 CEPHADM="/root/bin/cephadm"
5
6 {% raw %}
7 {% if ceph_dev_folder is defined %}
8 /mnt/{{ ceph_dev_folder }}/src/cephadm/build.sh $CEPHADM
9 {% else %}
10 curl --silent -o $CEPHADM --location https://raw.githubusercontent.com/ceph/ceph/main/src/cephadm/cephadm.py
11 {% endif %}
12 chmod +x $CEPHADM
13 mkdir -p /etc/ceph
14 mon_ip=$(ifconfig eth0 | grep 'inet ' | awk '{ print $2}')
15 {% if ceph_dev_folder is defined %}
16 echo "ceph_dev_folder is defined"
17 $CEPHADM bootstrap --mon-ip $mon_ip --initial-dashboard-password {{ admin_password }} --allow-fqdn-hostname --dashboard-password-noupdate --shared_ceph_folder /mnt/{{ ceph_dev_folder }}
18 {% else %}
19 echo "ceph_dev_folder is not defined"
20 $CEPHADM bootstrap --mon-ip $mon_ip --initial-dashboard-password {{ admin_password }} --allow-fqdn-hostname --dashboard-password-noupdate
21 {% endif %}
22 fsid=$(cat /etc/ceph/ceph.conf | grep fsid | awk '{ print $3}')
23 {% for number in range(1, nodes) %}
24 ssh-copy-id -f -i /etc/ceph/ceph.pub -o StrictHostKeyChecking=no root@{{ prefix }}-node-0{{ number }}.{{ domain }}
25 $CEPHADM shell --fsid $fsid -c /etc/ceph/ceph.conf -k /etc/ceph/ceph.client.admin.keyring ceph orch host add {{ prefix }}-node-0{{ number }}.{{ domain }}
26 {% endfor %}
27 {% endraw %}
28 {% if configure_osd %}
29 $CEPHADM shell --fsid $fsid -c /etc/ceph/ceph.conf -k /etc/ceph/ceph.client.admin.keyring ceph orch apply osd --all-available-devices
30 {% endif %}