Skip to content

Commit

Permalink
mgr/dashboard: fix bootstrap script for cephadm installation
Browse files Browse the repository at this point in the history
Signed-off-by: avanthakkar <avanjohn@gmail.com>
  • Loading branch information
avanthakkar committed Sep 13, 2023
1 parent 2bc9a17 commit 30eabab
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/pybind/mgr/dashboard/ci/cephadm/bootstrap-cluster.sh
@@ -1,15 +1,18 @@
#!/usr/bin/env bash

set -x
set -ex

export PATH=/root/bin:$PATH
mkdir /root/bin

export CEPHADM_IMAGE='quay.ceph.io/ceph-ci/ceph:main'

CEPHADM="/root/bin/cephadm"
CEPHADM_SRC="/mnt/{{ ceph_dev_folder }}/src/cephadm/cephadm"

/mnt/{{ ceph_dev_folder }}/src/cephadm/build.sh $CEPHADM_SRC
ln -s $CEPHADM_SRC $CEPHADM

/mnt/{{ ceph_dev_folder }}/src/cephadm/build.sh $CEPHADM
mkdir -p /etc/ceph
mon_ip=$(ifconfig eth0 | grep 'inet ' | awk '{ print $2}')

Expand All @@ -22,7 +25,7 @@ bootstrap_extra_options='--allow-fqdn-hostname --dashboard-password-noupdate'
# bootstrap_extra_options+=" ${bootstrap_extra_options_not_expanded}"
# {% endif %}

$CEPHADM bootstrap --mon-ip $mon_ip --initial-dashboard-password {{ admin_password }} --shared_ceph_folder /mnt/{{ ceph_dev_folder }} ${bootstrap_extra_options}
$CEPHADM bootstrap --mon-ip $mon_ip --initial-dashboard-password {{ admin_password }} --shared_ceph_folder /mnt/{{ ceph_dev_folder }} ${bootstrap_extra_options} --no-cleanup-on-failure

fsid=$(cat /etc/ceph/ceph.conf | grep fsid | awk '{ print $3}')
cephadm_shell="$CEPHADM shell --fsid ${fsid} -c /etc/ceph/ceph.conf -k /etc/ceph/ceph.client.admin.keyring"
Expand Down

0 comments on commit 30eabab

Please sign in to comment.