diff --git a/compose-helper.sh b/compose-helper.sh deleted file mode 100755 index b3ab0be..0000000 --- a/compose-helper.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash -e - -cd "$1" -docker-compose up -d \ No newline at end of file diff --git a/startup.sh b/startup.sh new file mode 100755 index 0000000..8322de4 --- /dev/null +++ b/startup.sh @@ -0,0 +1,17 @@ +#!/bin/bash -e + +docker pull docker.io/ceph/daemon:latest-nautilus + +#bring up mon, mds, mgr +for role_dir in /ceph/m*; do + role_name=$(basename "$role_dir") + cd "$role_name" + HOSTNAME="$HOSTNAME" docker-compose up -d +done + +#manually bring up osd +for osd_dir in /ceph/osd_*; do + osd_name=$(basename osd_dir) + osd_id=$(echo "$osd_dir" | cut -d'_' -f2) + docker run -d --rm --net=ceph --hostname "$HOSTNAME" --privileged -v /ceph/"$osd_name"/etc/ceph:/etc/ceph -v /ceph/"$osd_name"/var/lib/ceph:/var/lib/ceph -v /dev:/dev -e OSD_ID="$osd_id" --name "$osd_name" docker.io/ceph/daemon:latest-nautilus osd_ceph_volume_activate +done \ No newline at end of file