2020-02-08 01:08:49 +00:00
|
|
|
#!/bin/bash -ex
|
2020-02-06 17:02:31 +00:00
|
|
|
|
|
|
|
SCRIPT_NAME=$(basename ${BASH_SOURCE[0]})
|
2020-02-08 01:08:49 +00:00
|
|
|
SCRIPT_DIR=$(dirname ${BASH_SOURCE[0]})
|
2020-02-06 17:02:31 +00:00
|
|
|
CEPHADM_SRC_DIR=${SCRIPT_DIR}/../../../src/cephadm
|
|
|
|
CEPHADM=${CEPHADM_SRC_DIR}/cephadm
|
|
|
|
|
|
|
|
# this is a pretty weak test, unfortunately, since the
|
|
|
|
# package may also be in the base OS.
|
|
|
|
function test_install_uninstall() {
|
2020-02-08 04:16:29 +00:00
|
|
|
( sudo apt update && \
|
|
|
|
sudo apt -y install cephadm && \
|
2020-02-06 17:02:31 +00:00
|
|
|
sudo apt -y remove cephadm ) || \
|
|
|
|
( sudo yum -y install cephadm && \
|
|
|
|
sudo yum -y remove cephadm ) || \
|
|
|
|
( sudo dnf -y install cephadm && \
|
|
|
|
sudo dnf -y remove cephadm )
|
|
|
|
}
|
|
|
|
|
|
|
|
sudo $CEPHADM -v add-repo --release octopus
|
|
|
|
test_install_uninstall
|
|
|
|
sudo $CEPHADM -v rm-repo
|
|
|
|
|
|
|
|
sudo $CEPHADM -v add-repo --dev master
|
|
|
|
test_install_uninstall
|
|
|
|
sudo $CEPHADM -v rm-repo
|
|
|
|
|
|
|
|
sudo $CEPHADM -v add-repo --dev $CEPH_REF
|
|
|
|
test_install_uninstall
|
|
|
|
sudo $CEPHADM -v rm-repo
|
|
|
|
|
|
|
|
echo OK.
|