improve docs

This commit is contained in:
deityhub 2021-09-01 10:59:12 +01:00
parent 726ff011fb
commit 9f1f43d3bf
3 changed files with 17 additions and 16 deletions

View File

@ -2,6 +2,15 @@
Please run these commands from `root` Please run these commands from `root`
Make sure to use the right kubernetes context before making any changes
```
kubectl config get-contexts
# replace NAME with the context name
kubectl config use-context NAME
```
### Lint chart ### Lint chart
``` ```
@ -31,7 +40,7 @@ helm install -f ./helm-chart/public/fyipe/values.yaml -f ./kubernetes/values-saa
Staging: Staging:
``` ```
kubectl config set-context do-nyc1-fyipe-staging kubectl config use-context arn:aws:eks:us-east-2:972164494713:cluster/fyipe-staging
helm upgrade -f ./helm-chart/public/fyipe/values.yaml -f ./kubernetes/values-saas-staging.yaml fi ./helm-chart/public/fyipe helm upgrade -f ./helm-chart/public/fyipe/values.yaml -f ./kubernetes/values-saas-staging.yaml fi ./helm-chart/public/fyipe
``` ```
@ -40,7 +49,7 @@ Use default values first and then use staging values.
Production: Production:
``` ```
kubectl config set-context do-nyc3-fyipe-production kubectl config use-context arn:aws:eks:us-east-2:972164494713:cluster/fyipe-production
helm upgrade -f ./helm-chart/public/fyipe/values.yaml -f ./kubernetes/values-saas-production.yaml fi ./helm-chart/public/fyipe helm upgrade -f ./helm-chart/public/fyipe/values.yaml -f ./kubernetes/values-saas-production.yaml fi ./helm-chart/public/fyipe
``` ```

View File

@ -4,7 +4,7 @@
``` ```
sudo kubectl config get-contexts sudo kubectl config get-contexts
sudo kubectl config use-context do-nyc1-fyipe-staging sudo kubectl config use-context arn:aws:eks:us-east-2:972164494713:cluster/fyipe-staging
``` ```
# Pods # Pods

View File

@ -12,7 +12,7 @@ Admin mongodb username is: `root`
## MongoDB common issues. ## MongoDB common issues.
MongoDB has will give you a lot of issues like: MongoDB will give you a lot of issues like:
#### MongoDB Crashloop Backoff #### MongoDB Crashloop Backoff
@ -27,7 +27,7 @@ Important: Backup surving member. See backup section in this document for more i
Resolution: Delete all statefulset and start again. Resolution: Delete all statefulset and start again.
``` ```
kubectl delete pvc datadir-fi-mongodb-0 datadir-fi-mongodb-0 kubectl delete pvc datadir-fi-mongodb-0 datadir-fi-mongodb-1
# If staging # If staging
sudo helm upgrade -f ./helm-chart/public/fyipe/values.yaml -f ./kubernetes/values-saas-staging.yaml fi ./helm-chart/public/fyipe sudo helm upgrade -f ./helm-chart/public/fyipe/values.yaml -f ./kubernetes/values-saas-staging.yaml fi ./helm-chart/public/fyipe
@ -49,16 +49,8 @@ Run these on source cluster:
Example: Example:
``` ```
# Delete audit logs (optional, but recommended)
sudo kubectl exec -it fi-mongodb-0 -- bash
mongo
use fyipedb
db.auth('fyipe', 'password')
db.auditlogs.remove({})
# Open MongoDB to the internet. # Open MongoDB to the internet.
# Only run this when MongoDB is not open to the internet
sudo kubectl delete job fi-init-script sudo kubectl delete job fi-init-script
@ -78,7 +70,7 @@ On the destination cluster:
``` ```
kubectl exec -it fi-mongodb-0 -- bash kubectl exec -it fi-mongodb-0 -- bash
mongodump --uri="mongodb://fyipe:password@<EXTERNAL-IP-ADDRESS-FROM-STEP-1>:27017/fyipedb" --archive="/bitnami/mongodb/fyipedata.archive" mongodump --uri="mongodb://fyipe:password@<EXTERNAL-IP-ADDRESS-FROM-STEP-1>:27017/fyipedb" --archive="/bitnami/mongodb/fyipedata.archive" --excludeCollection=auditlogs --excludeCollection=monitorlogs
mongorestore --uri="mongodb://fyipe:password@localhost:27017/fyipedb" --archive="/bitnami/mongodb/fyipedata.archive" mongorestore --uri="mongodb://fyipe:password@localhost:27017/fyipedb" --archive="/bitnami/mongodb/fyipedata.archive"
``` ```
@ -103,7 +95,7 @@ sudo helm upgrade -f ./kubernetes/values-saas-staging.yaml --set mongodb.externa
Syntax: Syntax:
`sudo kubectl exec <pod> -- mongodump --uri="mongodb://<mongousername>:<mongopassword>@localhost:27017/<databasename>" --archive="<export-filepath>"` `sudo kubectl exec <pod> -- mongodump --uri="mongodb://<mongousername>:<mongopassword>@localhost:27017/<databasename>" --archive="<export-filepath>" --excludeCollection=auditlogs --excludeCollection=monitorlogs`
Example: Example: