]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
behave_test: compile cephadm
authorMichael Fritch <mfritch@suse.com>
Mon, 6 Dec 2021 21:58:14 +0000 (14:58 -0700)
committerJohn Mulligan <jmulligan@redhat.com>
Tue, 13 Sep 2022 16:17:20 +0000 (12:17 -0400)
build the compiled cephadm binary during the behave test

Signed-off-by: Michael Fritch <mfritch@suse.com>
Signed-off-by: John Mulligan <jmulligan@redhat.com>
src/test/behave_tests/template/bootstrap_script_template

index de2d6b24f1a04e0bb21d2d06c991d464c51e7fce..de2129e76c8d9d957f4bfe32fd87200ea5966285 100644 (file)
@@ -1,28 +1,30 @@
 export PATH=/root/bin:$PATH
 mkdir /root/bin
+
+CEPHADM="/root/bin/cephadm"
+
 {% raw %}
 {% if ceph_dev_folder is defined %}
-  cp /mnt/{{ ceph_dev_folder }}/src/cephadm/cephadm /root/bin/cephadm
+  /mnt/{{ ceph_dev_folder }}/src/cephadm/build.sh $CEPHADM
 {% else %}
-  cd /root/bin
-  curl --silent --remote-name --location https://raw.githubusercontent.com/ceph/ceph/master/src/cephadm/cephadm
+  curl --silent -o $CEPHADM --location https://raw.githubusercontent.com/ceph/ceph/main/src/cephadm/cephadm.py
 {% endif %}
-chmod +x /root/bin/cephadm
+chmod +x $CEPHADM
 mkdir -p /etc/ceph
 mon_ip=$(ifconfig eth0  | grep 'inet ' | awk '{ print $2}')
 {% if ceph_dev_folder is defined %}
   echo "ceph_dev_folder is defined"
-  cephadm bootstrap --mon-ip $mon_ip --initial-dashboard-password {{ admin_password }} --allow-fqdn-hostname --dashboard-password-noupdate --shared_ceph_folder /mnt/{{ ceph_dev_folder }}
+  $CEPHADM bootstrap --mon-ip $mon_ip --initial-dashboard-password {{ admin_password }} --allow-fqdn-hostname --dashboard-password-noupdate --shared_ceph_folder /mnt/{{ ceph_dev_folder }}
 {% else %}
 echo "ceph_dev_folder is not defined"
-  cephadm bootstrap --mon-ip $mon_ip --initial-dashboard-password {{ admin_password }} --allow-fqdn-hostname --dashboard-password-noupdate
+  $CEPHADM bootstrap --mon-ip $mon_ip --initial-dashboard-password {{ admin_password }} --allow-fqdn-hostname --dashboard-password-noupdate
 {% endif %}
 fsid=$(cat /etc/ceph/ceph.conf | grep fsid | awk '{ print $3}')
 {% for number in range(1, nodes) %}
   ssh-copy-id -f -i /etc/ceph/ceph.pub  -o StrictHostKeyChecking=no root@{{ prefix }}-node-0{{ number }}.{{ domain }}
-  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 }}
+  $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 }}
 {% endfor %}
 {% endraw %}
 {% if configure_osd %}
-cephadm shell --fsid $fsid -c /etc/ceph/ceph.conf -k /etc/ceph/ceph.client.admin.keyring ceph orch apply osd --all-available-devices
-{% endif %}
\ No newline at end of file
+$CEPHADM shell --fsid $fsid -c /etc/ceph/ceph.conf -k /etc/ceph/ceph.client.admin.keyring ceph orch apply osd --all-available-devices
+{% endif %}