CEPHADM="/root/bin/cephadm"
CEPHADM_SRC="/mnt/{{ ceph_dev_folder }}/src/cephadm/cephadm"
-cp $CEPHADM_SRC $CEPHADM
+ln -s $CEPHADM_SRC $CEPHADM
mkdir -p /etc/ceph
-mon_ip=$(ifconfig eth0 | grep 'inet ' | awk '{ print $2}')
+if [ "$(grep -oE '[0-9]+' /etc/fedora-release)" -lt 41 ]; then
+ # for fedora <41 compatibility
+ mon_ip=$(ifconfig eth0 | grep 'inet ' | awk '{ print $2 }')
+else
+ mon_ip=$(ip -4 addr show ens3 | grep -oP '(?<=inet\s)\d+(\.\d+){3}')
+fi
bootstrap_extra_options='--allow-fqdn-hostname --dashboard-password-noupdate'
netmask: 255.255.255.0
numcpus: 1
memory: 2048
- image: fedora40
+ image: fedora42
notify: false
admin_password: password
disks:
extra_args="-P quick_install=True"
CLUSTERS=1
NODES=3
+CEPH_DEV_FOLDER=""
for arg in "$@"; do
case "$arg" in
use_cached_image=true
;;
-dir=*|--ceph-dir=*)
- extra_args+=" -P ceph_dev_folder=${arg#*=}"
+ CEPH_DEV_FOLDER="${arg#*=}"
+ extra_args+=" -P ceph_dev_folder=${CEPH_DEV_FOLDER}"
;;
-e|--expanded-cluster)
extra_args+=" -P expanded_cluster=True"
printf "Saving the image: %s\n" "$image_name"
podman save -o ceph_image.tar quay.ceph.io/ceph-ci/ceph:main
+# build cephadm binary if it does not exist
+printf "\nChecking for cephadm binary...\n"
+pushd ${CEPH_DEV_FOLDER}/src/cephadm/
+if [[ ! -f cephadm ]]; then
+ echo "Building cephadm binary..."
+ python3 build.py cephadm
+else
+ printf "\ncephadm binary already exists."
+fi
+popd
+
NODE_IP_OFFSET=100
PREFIX="ceph"
for cluster in $(seq 1 $CLUSTERS); do
npm run build ${FRONTEND_BUILD_OPTS} &
cd ${CEPH_DEV_FOLDER}
-: ${VM_IMAGE:='fedora40'}
-: ${VM_IMAGE_URL:='https://download.fedoraproject.org/pub/fedora/linux/releases/40/Cloud/x86_64/images/Fedora-Cloud-Base-Generic.x86_64-40-1.14.qcow2'}
+: ${VM_IMAGE:='fedora42'}
+: ${VM_IMAGE_URL:='https://download.fedoraproject.org/pub/fedora/linux/releases/42/Cloud/x86_64/images/Fedora-Cloud-Base-Generic-42-1.1.x86_64.qcow2'}
kcli download image -p ceph-dashboard -u ${VM_IMAGE_URL} ${VM_IMAGE}
kcli delete plan -y ceph || true
# Compile cephadm locally for the shared_ceph_folder to pick it up