Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: mrjones <[email protected]>
  • Loading branch information
henokgetachew and mrjones-plip authored Dec 11, 2024
1 parent 6fdfd32 commit bcf4325
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ For single node deployment, create a YAML file with this contents, being sure to
* `<version>` - 4.x version you're upgrading to
* `<password>` - retrieved from `get-env` call above
* `<secret>` - retrieved from `get-env` call above
* `<admin_user>` - needs to be the same as used in 3.x - likely `medic`
* `<admin-user>` - needs to be the same as used in 3.x - likely `medic`
* `<uuid>` - retrieved from `get-env` call above
* `<size>` - Size of original 3.x EBS volume, eg `100Mi` for 100 Megabytes or `100Gi` for 100 Gigabytes (_two occurrences_)
* `<toleration-value>` - For production use `prod-couchdb-only`, for dev use `dev-couchdb-only`
Expand Down
2 changes: 1 addition & 1 deletion content/en/hosting/4.x/_partial_values_explanation.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Be sure to update the following values in your YAML file:
* `<version>` - 4.x version you're upgrading to
* `<password>` - retrieved from `get-env` call above
* `<secret>` - retrieved from `get-env` call above
* `<admin_user>` - needs to be the same as used in 3.x - likely `medic`
* `<admin-user>` - needs to be the same as used in 3.x - likely `medic`
* `<uuid>` - retrieved from `get-env` call above
* `<url>` - the URL of your production instance goes here (eg `example.org`)
* `<path-to-tls>` - path to TLS files on disk
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,10 @@ cd cht-core/scripts/deploy

## Get Shard Distribution Instructions

Access the primary CouchDB pod:
Access the primary CouchDB pod, being sure to replace `<your-namespace>` with the name of your actual namespace:

```shell
kubectl exec -it -n your-namespace $(kubectl get pod -n your-namespace -l cht.service=couchdb-1 -o name) -- bash
kubectl exec -it -n <your-namespace> $(kubectl get pod -n <your-namespace> -l cht.service=couchdb-1 -o name) -- bash
```

Set up the migration tool:
Expand All @@ -90,8 +91,8 @@ npm ci --omit=dev
# Note: This may require sudo if npm's global directories aren't writable
npm link

export ADMIN_USER=<your-admin-user>
export ADMIN_PASSWORD=<your-admin-password>
export ADMIN_USER=<admin-user>
export ADMIN_PASSWORD=<password>
export COUCH_URL="http://${ADMIN_USER}:${ADMIN_PASSWORD}@localhost:5984"

# Get shard distribution instructions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,19 +59,18 @@ cd cht-core/scripts/deploy

## Run Migration Commands

First verify CouchDB is running:
First verify CouchDB is running by getting the pod status and running `curl` inside the couchdb service to see if `localhost` is accessible. Be sure to replace `<your-namespace>` with your actual namespace:

```shell
# Check pod status
kubectl get pods -n your-namespace-name
kubectl get pods -n <your-namespace>

# Check CouchDB is up
kubectl exec -it -n your-namespace-name $(kubectl get pod -n your-namespace-name -l cht.service=couchdb -o name) -- \
kubectl exec -it -n <your-namespace> $(kubectl get pod -n <your-namespace> -l cht.service=couchdb -o name) -- \
curl -s http://localhost:5984/_up
```

Access the CouchDB pod:
```shell
kubectl exec -it -n your-namespace-name $(kubectl get pod -n your-namespace-name -l cht.service=couchdb -o name) -- bash
kubectl exec -it -n <your-namespace> $(kubectl get pod -n <your-namespace> -l cht.service=couchdb -o name) -- bash
```

Set up migration tool in pod:
Expand All @@ -86,8 +85,8 @@ npm ci --omit=dev
# Note: This may require sudo if npm's global directories aren't writable
npm link

export ADMIN_USER=<your-admin-user>
export ADMIN_PASSWORD=<your-admin-password>
export ADMIN_USER=<admin-user>
export ADMIN_PASSWORD=<password>
export COUCH_URL="http://${ADMIN_USER}:${ADMIN_PASSWORD}@localhost:5984"

# Verify CouchDB is up and responding
Expand Down

0 comments on commit bcf4325

Please sign in to comment.