Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support multisite in ceph2 setup #84

Merged
merged 2 commits into from
Jun 3, 2024
Merged

support multisite in ceph2 setup #84

merged 2 commits into from
Jun 3, 2024

Conversation

nizamial09
Copy link
Member

@nizamial09 nizamial09 commented May 27, 2024

start the cluster with RGW_MULTISITE=1 and docker-compose up -d --scale ceph2=1 --scale prometheus2=1

Also removing the ceph-cluster2 container. Since that can be replaced with ceph2 container.

@nizamial09 nizamial09 requested a review from cloudbehl May 27, 2024 08:41
@@ -75,7 +73,7 @@ fi

# Disable ssl (if selected)
readonly VSTART_HAS_SSL_FLAG=$(cat /ceph/src/vstart.sh | grep DASHBOARD_SSL | wc -l)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [shellcheck] reported by reviewdog 🐶
Declare and assign separately to avoid masking return values. SC2155

@@ -75,7 +73,7 @@ fi

# Disable ssl (if selected)
readonly VSTART_HAS_SSL_FLAG=$(cat /ceph/src/vstart.sh | grep DASHBOARD_SSL | wc -l)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[shellcheck] reported by reviewdog 🐶
Useless cat. Consider 'cmd < file | ..' or 'cmd file | ..' instead. SC2002

@@ -75,7 +73,7 @@ fi

# Disable ssl (if selected)
readonly VSTART_HAS_SSL_FLAG=$(cat /ceph/src/vstart.sh | grep DASHBOARD_SSL | wc -l)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[shellcheck] reported by reviewdog 🐶
Consider using 'grep -c' instead of 'grep|wc -l'. SC2126

@@ -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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [shellcheck] reported by reviewdog 🐶
Possible misspelling: DASHBOARD_SSL may not be assigned. Did you mean DASHBOARD_URL? SC2153

@@ -7,21 +7,23 @@ 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)
echo "hostname $(hostname)"
export IS_FIRST_CLUSTER=$(( $(hostname | grep -E '(-cluster2|ceph2)' | wc -l) == 0 ))

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[shellcheck] reported by reviewdog 🐶
Consider using 'grep -c' instead of 'grep|wc -l'. SC2126

@@ -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/-cluster//g' -e 's/2//g')

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [shellcheck] reported by reviewdog 🐶
Declare and assign separately to avoid masking return values. SC2155

this is being used for multi-site setup. But replacing this with
ceph2 container would be enough

Signed-off-by: Nizamudeen A <[email protected]>
@@ -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)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [shellcheck] reported by reviewdog 🐶
Declare and assign separately to avoid masking return values. SC2155

@@ -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)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[shellcheck] reported by reviewdog 🐶
Consider using 'grep -c' instead of 'grep|wc -l'. SC2126

@@ -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')

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [shellcheck] reported by reviewdog 🐶
Declare and assign separately to avoid masking return values. SC2155

@nizamial09 nizamial09 merged commit 99bdde2 into main Jun 3, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants