-
Notifications
You must be signed in to change notification settings - Fork 12
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
[SERVER-2273] Migrate 3.4 to a new 4.0 instance #37
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5c24257
to
5f2ff50
Compare
jbialy
reviewed
Feb 27, 2023
atulsingh0
reviewed
Mar 1, 2023
* server-2042 | add root readme file * Trigger Build, Empty commit
86b74b5
to
496ada3
Compare
ryanwohara
reviewed
Mar 2, 2023
Co-authored-by: Ryan William O'Hara <[email protected]>
atulsingh0
approved these changes
Mar 2, 2023
soulchips
reviewed
Mar 9, 2023
TEMP_DIR="/bitnami/circle-mongo" | ||
kubectl -n "$namespace" exec -it "$MONGO_POD" -- bash -c "mkdir $TEMP_DIR" | ||
kubectl -n "$namespace" exec -it "$MONGO_POD" -- bash -c "mongodump -u '$MONGODB_USERNAME' -p '$MONGODB_PASSWORD' --authenticationDatabase admin --db=circle_ghe --out=$TEMP_DIR" | ||
kubectl -n "$namespace" cp $MONGO_POD:$TEMP_DIR ${BACKUP_DIR}/circle-mongo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could we include a step here to remove the /bitnami/circle-mongo/ backup directory
just in case the script needs to be rerun and the local mongobackup was deleted. not a blocker, just a thought
soulchips
approved these changes
Mar 10, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
⚙️ Issue
Sometimes KOTS does not have the expected helm application installed. In this case we need to do the migration to 4.0 a different way.
✅ Fix
Migrate from 3.4 to 4.0 with database migrations between 2 separate installations.
Very little of this is net new work. It is mostly copy pasted from the 2.19 migration scripts.
I prioritized minimizing changes over beautiful and concise code. Also, this is currently to solve a problem for one customer and is unlikely to see use beyond that.
To make your review easier, consider reviewing each commit individually, or comparing the files to what they were copied from:
migrate-3-to-4/exporter.sh - kots-exporter/kots-exporter.sh
migrate-3-to-4/bottoken.sh - migrate/3.0-bottoken.sh
migrate-3-to-4/key.sh - migrate/3.0-key.sh
migrate-3-to-4/mongo.sh - migrate/3.0-mongo.sh
migrate-3-to-4/postgres.sh - migrate/3.0-postgres.sh
migrate-3-to-4/prefligh.sh - migrate/3.0-preflight.sh
migrate-3-to-4/scale.sh - migrate/3.0-scale.sh
migrate-3-to-4/vault.sh - migrate/3.0-vault.sh
migrate-3-to-4/restore.sh - migrate/3.0-restore.sh
❓ Tests