From: Pere Diaz Bou Date: Tue, 4 Jan 2022 09:10:15 +0000 (+0100) Subject: cephadm/box: remove unnecessary bash files X-Git-Tag: v17.1.0~148^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F43763%2Fhead;p=ceph.git cephadm/box: remove unnecessary bash files Signed-off-by: Pere Diaz Bou --- diff --git a/src/cephadm/box/setup_ssh.sh b/src/cephadm/box/setup_ssh.sh deleted file mode 100755 index 5b81c2cbf68..00000000000 --- a/src/cephadm/box/setup_ssh.sh +++ /dev/null @@ -1,50 +0,0 @@ -#!/usr/bin/env bash - -set -e - -function run-sshd() { - echo "Creating sshd server on $(hostname):$(hostname -i)" - # SSH - if [[ ! -f "/root/.ssh/id_rsa" ]]; then - mkdir -p ~/.ssh - chmod 700 ~/.ssh - ssh-keygen -b 2048 -t rsa -f ~/.ssh/id_rsa -q -N "" - fi - - cat ~/.ssh/id_rsa.pub >> /root/.ssh/authorized_keys - if [[ ! -f "/root/.ssh/known_hosts" ]]; then - ssh-keygen -A - fi - - # change password - echo "root:root" | chpasswd - echo "PermitRootLogin yes" >> /etc/ssh/sshd_config - echo "PasswordAuthentication yes" >> /etc/ssh/sshd_config - - /usr/sbin/sshd - echo "sshd finished" -} - -function copy-cluster-ssh-key() { - echo "Adding cluster ssh key to all hosts: ${HOST_IPS}" - HOST_IPS=$(echo $HOST_IPS) - for ip in $(echo $HOST_IPS) - do - if [[ ! $ip == $(hostname -i) ]] - then - echo $ip - # copy cluster key - sshpass -p "root" ssh-copy-id -f -o StrictHostKeyChecking=no -i /etc/ceph/ceph.pub "root@${ip}" - fi - done - echo "Finished adding keys, you can now add existing hosts containers to the cluster!" -} - -case $1 in - run-sshd) - run-sshd - ;; - copy-cluster-ssh-key) - copy-cluster-ssh-key - ;; -esac diff --git a/src/cephadm/box/start b/src/cephadm/box/start deleted file mode 100755 index 2a279535843..00000000000 --- a/src/cephadm/box/start +++ /dev/null @@ -1,46 +0,0 @@ -#!/usr/bin/env bash -set -euxo pipefail - -# link so we can debug cephadm -ln -s -f /cephadm/cephadm $CEPHADM_PATH -chmod +x $CEPHADM_PATH - - -EXTRA_ARGS=() -if [[ -n "${SHARED_CEPH_FOLDER-}" ]]; then - EXTRA_ARGS+=(--shared_ceph_folder "$SHARED_CEPH_FOLDER") -fi - -docker load < /cephadm/box/docker/ceph/image/quay.ceph.image.tar - -# cephadm guid error because it sometimes tries to use quay.ceph.io/ceph-ci/ceph: -# instead of master's tag -export CEPHADM_IMAGE=quay.ceph.io/ceph-ci/ceph:master -echo "export CEPHADM_IMAGE=quay.ceph.io/ceph-ci/ceph:master" >> ~/.bashrc - -if [[ -n "$CEPHADM_IMAGE" ]]; then - EXTRA_ARGS+=--skip-pull -fi - -export CEPH_SOURCE_FOLDER=/ceph -$CEPHADM_PATH --verbose bootstrap \ - --mon-ip "$(hostname -i)" \ - --allow-fqdn-hostname \ - --initial-dashboard-password admin \ - --dashboard-password-noupdate \ - --shared_ceph_folder /ceph \ - "${EXTRA_ARGS[@]}" - -# make sure vg and lvs are visible -vgchange --refresh -for((i=0;i<$NUM_OSDS;i++)); do - echo "Creating osd.${i}" - # create osd folder - $CEPHADM_PATH ceph-volume --shared_ceph_folder /ceph lvm create --bluestore --no-tmpfs --data "/dev/vg1/lv${i}" --no-systemd - echo "Deploying osd.${i}..." - # deploy osd with osd data folder - $CEPHADM_PATH deploy --name "osd.${i}" - # FIX: this command should substitute lvm create + deploy but there is a 'type' file not found error in ceph-osd - # $CEPHADM_PATH shell -- ceph orch daemon add osd "$(hostname):/dev/vg1/lv${i}" - echo "osd.${i} deployed!" -done;