Skip to content

Commit a4221cb

Browse files
committed
Running snippets from a prerelease bundle
1 parent 5ddee5c commit a4221cb

File tree

6 files changed

+50
-14
lines changed

6 files changed

+50
-14
lines changed

docs/search/01-search-community-deploy/env_variables_e2e_prerelease.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ export K8S_CTX="${CLUSTER_NAME}"
22

33
export PRERELEASE_VERSION="1.4.0-prerelease-68b5c0bb136a0d0007a4c8a2"
44

5-
export PRERELEASE_IMAGE_PULLSECRET="${COMMUNITY_PRIVATE_PREVIEW_PULLSECRET_DOCKERCONFIGJSON}"
5+
export PRERELEASE_IMAGE_PULLSECRET="${PRERELEASE_PULLSECRET_DOCKERCONFIGJSON}"
66
export OPERATOR_ADDITIONAL_HELM_VALUES="registry.imagePullSecrets=prerelease-image-pullsecret"
77
export OPERATOR_HELM_CHART="oci://quay.io/mongodb/staging/helm-chart/mongodb-kubernetes:${PRERELEASE_VERSION}"
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
if [[ "${PRERELEASE_IMAGE_PULLSECRET:-""}" == "" ]]; then return 0; fi
2+
3+
user=$(echo -n "${PRERELEASE_IMAGE_PULLSECRET}" | base64 -d | jq -r '.auths."quay.io".auth' | base64 -d | cut -d ':' -f1)
4+
password=$(echo -n "${PRERELEASE_IMAGE_PULLSECRET}" | base64 -d | jq -r '.auths."quay.io".auth' | base64 -d | cut -d ':' -f2)
5+
echo -e "${password}" | \
6+
helm registry login \
7+
--username "${user}" \
8+
--password-stdin quay.io/mongodb/staging/helm-chart

docs/search/02-search-enterprise-deploy/env_variables.sh

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,32 +4,34 @@ export K8S_CTX="<local cluster context>"
44
# the following namespace will be created if not exists
55
export MDB_NS="mongodb"
66

7+
# name of the MongoDB Custom Resource.
78
export MDB_RESOURCE_NAME="mdb-rs"
89

9-
export OPS_MANAGER_PROJECT_NAME="${MDB_RESOURCE_NAME}"
10-
# Ops Manager / Cloud Manager API configuration
11-
export OPS_MANAGER_API_URL="<Base URL to Ops Manager instance, e.g. https://cloud-qa.mongodb.com>"
12-
export OPS_MANAGER_API_USER="<Ops Manager's API user, e.g. abcdef12>"
13-
export OPS_MANAGER_API_KEY="<Ops Manager's API key, e.g. 1234-231-2>"
14-
export OPS_MANAGER_ORG_ID="<Ops Manager's Org ID>"
10+
# OM/CM's project name to be used to manage mongodb replica set
11+
export OPS_MANAGER_PROJECT_NAME="<arbitrary project name>"
12+
13+
# URL to Cloud Manager or Ops Manager instance
14+
export OPS_MANAGER_API_URL="https://cloud-qa.mongodb.com"
15+
16+
# The API key can be an Org Owner - the operator can create the project automatically then.
17+
# The API key can also be created in a particular project that was created manually with the Project Owner scope .
18+
export OPS_MANAGER_API_USER="abcdefg"
19+
export OPS_MANAGER_API_KEY="00000-abcd-efgh-1111-12345678"
20+
export OPS_MANAGER_ORG_ID="62a73abcdefgh12345678"
1521

1622
# minimum required MongoDB version for running MongoDB Search is 8.0.10
1723
export MDB_VERSION="8.0.10"
1824

19-
# name of the MongoDB Custom Resource.
20-
2125
# root admin user for convenience, not used here at all in this guide
2226
export MDB_ADMIN_USER_PASSWORD="admin-user-password-CHANGE-ME"
2327
# regular user performing restore and search queries on sample mflix database
2428
export MDB_USER_PASSWORD="mdb-user-password-CHANGE-ME"
2529
# user for MongoDB Search to connect to the replica set to synchronise data from
2630
export MDB_SEARCH_SYNC_USER_PASSWORD="search-sync-user-password-CHANGE-ME"
2731

28-
2932
export OPERATOR_HELM_CHART="mongodb/mongodb-kubernetes"
3033
# comma-separated key=value pairs for additional parameters passed to the helm-chart installing the operator
3134
export OPERATOR_ADDITIONAL_HELM_VALUES=""
3235

33-
export MDB_CONNECTION_STRING="mongodb://mdb-user:${MDB_USER_PASSWORD}@${MDB_RESOURCE_NAME}-svc.${MDB_NS}.svc.cluster.local:27017/?replicaSet=mdbc-rs"
34-
echo "new connection string = ${MDB_CONNECTION_STRING}"
36+
export MDB_CONNECTION_STRING="mongodb://mdb-user:${MDB_USER_PASSWORD}@${MDB_RESOURCE_NAME}-svc.${MDB_NS}.svc.cluster.local:27017/?replicaSet=${MDB_RESOURCE_NAME}"
3537

docs/search/02-search-enterprise-deploy/env_variables_e2e_prerelease.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
export K8S_CTX="${CLUSTER_NAME}"
22

3-
export PRERELEASE_VERSION="1.4.0-prerelease-68b5c0bb136a0d0007a4c8a2"
3+
export PRERELEASE_VERSION="1.4.0-prerelease-68b9584ac0a75a00070384a0"
44

5-
export PRERELEASE_IMAGE_PULLSECRET="${COMMUNITY_PRIVATE_PREVIEW_PULLSECRET_DOCKERCONFIGJSON}"
5+
export PRERELEASE_IMAGE_PULLSECRET="${PRERELEASE_PULLSECRET_DOCKERCONFIGJSON}"
66
export OPERATOR_ADDITIONAL_HELM_VALUES="registry.imagePullSecrets=prerelease-image-pullsecret"
77
export OPERATOR_HELM_CHART="oci://quay.io/mongodb/staging/helm-chart/mongodb-kubernetes:${PRERELEASE_VERSION}"
88

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
export K8S_CTX="<kube context name>"
2+
3+
# specify prerelease version
4+
export PRERELEASE_VERSION="1.4.0-prerelease-68b9584ac0a75a00070384a0" # mongodb search version used is 1.53.0-95-g8411af86f
5+
6+
# base64 of docker's config.json containing credentials to quay.io
7+
export PRERELEASE_IMAGE_PULLSECRET="<base64 of dockerconfigjson>"
8+
9+
# this parameter is passed to the helm install to instruct the operator to
10+
# configure every pod with prerelease-image-pullsecret
11+
export OPERATOR_ADDITIONAL_HELM_VALUES="registry.imagePullSecrets=prerelease-image-pullsecret"
12+
export OPERATOR_HELM_CHART="oci://quay.io/mongodb/staging/helm-chart/mongodb-kubernetes:${PRERELEASE_VERSION}"
13+
14+
# OM/CM's project name to be used to manage mongodb replica set
15+
export OPS_MANAGER_PROJECT_NAME="<arbitrary project name>"
16+
17+
# URL to Cloud Manager or Ops Manager instance
18+
export OPS_MANAGER_API_URL="https://cloud-qa.mongodb.com"
19+
20+
# The API key can be an Org Owner - the operator can create the project automatically.
21+
# The API key can also be created in a particular project that was created manually with the Project Owner scope .
22+
export OPS_MANAGER_API_USER="abcdefg"
23+
export OPS_MANAGER_API_KEY="00000-abcd-efgh-1111-12345678"
24+
export OPS_MANAGER_ORG_ID="62a73abcdefgh12345678"
25+

docs/search/02-search-enterprise-deploy/test.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ run 02_0050_create_ops_manager_resources.sh
1717
run 02_0048_configure_prerelease_image_pullsecret.sh
1818

1919
run_for_output 02_0090_helm_add_mogodb_repo.sh
20+
run 02_0080_helm_login_to_prerelease_registry.sh
2021
run_for_output 02_0100_install_operator.sh
2122
run 02_0305_create_mongodb_database_resource.sh
2223
run_for_output 02_0310_wait_for_database_resource.sh

0 commit comments

Comments
 (0)