diff --git a/README.md b/README.md index 1e1c1209b0..7a68bd1faa 100644 --- a/README.md +++ b/README.md @@ -308,14 +308,14 @@ docker-compose exec ceph /docker/sso/sso-disable.sh RGW_MULTISITE=1 ``` -* Start ceph (cluster 1) + ceph cluster 2: +* Start ceph (cluster 1) + ceph2 (cluster 2): ``` -docker-compose up -d --scale ceph-cluster2=1 +docker-compose up -d --scale ceph2=1 --scale prometheus2=1 ``` * Run 100s duration [benchmark](https://github.com/markhpc/hsbench#usage): ``` -docker-compose exec ceph-cluster2 bash +docker-compose exec ceph2 bash hsbench -a -s -u http://127.0.0.1:8000 -z 4K -d 100 -t 10 -b 10 ``` diff --git a/docker-compose.yml b/docker-compose.yml index 78e3c22fa9..52342c4590 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -53,12 +53,6 @@ services: ports: ['${CEPH_PROXY_HOST_PORT:-4200}:4200','${CEPH_HOST_PORT:-11000}:11000'] scale: 1 - ceph-cluster2: - extends: - service: ceph-base - container_name: ceph-cluster2 - hostname: ceph-cluster2 - ceph-host2: extends: service: ceph-base diff --git a/docker/ceph/set-rgw.sh b/docker/ceph/set-rgw.sh index a6ff50ee54..1aed2f654d 100755 --- a/docker/ceph/set-rgw.sh +++ b/docker/ceph/set-rgw.sh @@ -146,7 +146,7 @@ if [[ "$RGW_MULTISITE" == 1 ]]; then echo -n "{$(cat ${RGW_REALM_USER_ACCESS_KEY_FILE} | sed 's/,$//')}" > "${RGW_REALM_USER_ACCESS_KEY_FILE}" echo -n "{$(cat ${RGW_REALM_USER_SECRET_KEY_FILE} | sed 's/,$//')}" > "${RGW_REALM_USER_SECRET_KEY_FILE}" else - readonly FIRST_CLUSTER_HOSTNAME=$(hostname | sed -e 's/-cluster.//') + readonly FIRST_CLUSTER_HOSTNAME=$(hostname | sed -e 's/2//g') readonly CLUSTER2_PULL_REALM="${REALM_NAME_PREFIX}1" readonly CLUSTER2_ZONEGROUP="${ZONEGROUP_NAME_PREFIX}1-${CLUSTER2_PULL_REALM}" readonly CLUSTER2_ZONE="${ZONE_NAME_PREFIX}3-${CLUSTER2_ZONEGROUP}" diff --git a/docker/ceph/set-start-env.sh b/docker/ceph/set-start-env.sh index c940e37e2a..3fd60f6b41 100755 --- a/docker/ceph/set-start-env.sh +++ b/docker/ceph/set-start-env.sh @@ -7,21 +7,14 @@ set -e [[ -d "$MGR_PYTHON_PATH"/dashboard/frontend ]] && export IS_UPSTREAM_LUMINOUS=0 [[ -z "$RGW" ]] && export RGW=1 -export IS_FIRST_CLUSTER=$(hostname | grep -v cluster | wc -l) +export IS_FIRST_CLUSTER=$(hostname | grep -v ceph2 | wc -l) -[[ ("$IS_CEPH_RPM" == 0 || -n "$CEPH_REPO_DIR") && "$IS_UPSTREAM_LUMINOUS" == 0 && "$IS_FIRST_CLUSTER" == 1 ]] \ +[[ ("$IS_CEPH_RPM" == 0 || -n "$CEPH_REPO_DIR") && "$IS_UPSTREAM_LUMINOUS" == 0 ]] \ && export FRONTEND_BUILD_REQUIRED=1 FRONTEND_BUILD_OPTIONS=${FRONTEND_BUILD_OPTIONS:-"--deleteOutputPath=false"} if [[ "$RGW_MULTISITE" == 1 ]]; then export RGW=0 # Required to prevent vstart from starting any rgw daemon. - - if [[ "$IS_FIRST_CLUSTER" == 0 ]]; then - export FS=0 - export MDS=0 - export MGR=0 - export MON=1 - fi fi RGW_DEBUG='' diff --git a/docker/ceph/start-ceph.sh b/docker/ceph/start-ceph.sh index 6dfe0854d3..accb8058ef 100755 --- a/docker/ceph/start-ceph.sh +++ b/docker/ceph/start-ceph.sh @@ -58,10 +58,8 @@ if [[ "$RGW" -gt 0 || "$RGW_MULTISITE" == 1 ]]; then fi # Enable prometheus module -if [[ "$IS_FIRST_CLUSTER" == 1 ]]; then - "$CEPH_BIN"/ceph mgr module enable prometheus - echo 'Prometheus mgr module enabled.' -fi +"$CEPH_BIN"/ceph mgr module enable prometheus +echo 'Prometheus mgr module enabled.' #Enable and set test_orchestrator module if [[ "$TEST_ORCHESTRATOR" == 1 ]]; then @@ -75,7 +73,7 @@ fi # Disable ssl (if selected) readonly VSTART_HAS_SSL_FLAG=$(cat /ceph/src/vstart.sh | grep DASHBOARD_SSL | wc -l) -if [[ "$DASHBOARD_SSL" == 0 && "$VSTART_HAS_SSL_FLAG" == 0 && "$IS_FIRST_CLUSTER" == 1 ]]; then +if [[ "$DASHBOARD_SSL" == 0 && "$VSTART_HAS_SSL_FLAG" == 0 ]]; then echo "Disabling SSL..." SSL_OPTIONS='--force' @@ -91,7 +89,7 @@ if [[ "$DASHBOARD_SSL" == 0 && "$VSTART_HAS_SSL_FLAG" == 0 && "$IS_FIRST_CLUSTER fi # Secondary cluster start (or upstream mimic start) ends here. -[[ "$IS_FIRST_CLUSTER" == 0 || "$CEPH_VERSION" -le '13' ]] && exit 0 +[[ "$CEPH_VERSION" -le '13' ]] && exit 0 # Create dashboard "test" user: [[ "$CEPH_VERSION" -gt '14' ]] && DASHBOARD_USER_CREATE_OPTIONS='--force-password'