Skip to content

Commit

Permalink
cstart.sh: compile cephadm
Browse files Browse the repository at this point in the history
update cstart/ckill scripts to use the compiled cephadm binary

Signed-off-by: Michael Fritch <[email protected]>
  • Loading branch information
mgfritch authored and phlogistonjohn committed Sep 13, 2022
1 parent 2713f6b commit 4bc88b9
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 4 deletions.
10 changes: 9 additions & 1 deletion src/ckill.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
#!/bin/bash -e

if [ -e CMakeCache.txt ]; then
[ -z "$CEPH_BIN" ] && CEPH_BIN=bin
fi

if [ -z "$CEPHADM" ]; then
CEPHADM="${CEPH_BIN}/cephadm"
fi

# fsid
if [ -e fsid ] ; then
fsid=`cat fsid`
Expand All @@ -9,5 +17,5 @@ else
fi
echo "fsid $fsid"

sudo ../src/cephadm/cephadm rm-cluster --force --fsid $fsid
sudo $CEPHADM rm-cluster --force --fsid $fsid

14 changes: 11 additions & 3 deletions src/cstart.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
#!/bin/bash -e

if [ -e CMakeCache.txt ]; then
[ -z "$CEPH_BIN" ] && CEPH_BIN=bin
fi

if [ -z "$CEPHADM" ]; then
CEPHADM="${CEPH_BIN}/cephadm"
fi

image_base="quay.io/ceph-ci/ceph"

if which podman 2>&1 > /dev/null; then
Expand Down Expand Up @@ -55,8 +63,8 @@ if ! sudo $runtime image inspect $image_base:$shortid 1>/dev/null 2>/dev/null; t
sudo ../src/script/cpatch -t $image_base:$shortid
fi

sudo ../src/cephadm/cephadm rm-cluster --force --fsid $fsid
sudo ../src/cephadm/cephadm --image ${image_base}:${shortid} bootstrap \
sudo $CEPHADM rm-cluster --force --fsid $fsid
sudo $CEPHADM --image ${image_base}:${shortid} bootstrap \
--skip-pull \
--fsid $fsid \
--mon-addrv "[v2:$ip:$port]" \
Expand All @@ -69,7 +77,7 @@ sudo chmod 755 ceph.client.admin.keyring
echo 'keyring = ceph.client.admin.keyring' >> ceph.conf

# don't use repo digests; this implicitly does a pull and we don't want that
bin/ceph config set mgr mgr/cephadm/use_repo_digest false
${CEPH_BIN}/ceph config set mgr mgr/cephadm/use_repo_digest false

echo
echo "sudo ../src/script/cpatch -t $image_base:$shortid"
Expand Down

0 comments on commit 4bc88b9

Please sign in to comment.