-
Notifications
You must be signed in to change notification settings - Fork 29
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
[GOVCMSD8-556]: Add read replica access. #83
Conversation
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.
I can test if a get read replica on one of my projects. Looks pretty sane to me.
Updated the PR to include the replica configuration for the default database service, this allows us to use the Drupal will round robin all configured replicas when it is making this connection. |
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.
Approved pending common_deploy
suggestion
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.
- Bail early if valid env var not present
- Redirect sterr
- Consider some output so we know which db is being used for sync
- Unsure why drush alias changed?
- Typos in read replica
@SRowlands could you please re-review this one. thanks |
# This is the 1st commit message: Add read replica access. Updates govcms-deploy to use the read replica for Adds database config for the read replica Introduces MARIADB_HOST_READREPLICA environment variable to control the mysql host. # This is the commit message #2: Add replicas to the default connection. # This is the commit message #3: Update .docker/images/govcms8/scripts/govcms-deploy
Updates govcms-deploy to use the read replica for Adds database config for the read replica Introduces MARIADB_HOST_READREPLICA environment variable to control the mysql host. Add replicas to the default connection. Update .docker/images/govcms8/scripts/govcms-deploy Code review updates. - Return early if host is unavailable. - Updated db_conf settings for reusability. - Redirect show tables to stderr. - Reverted alias change. - Added output when script is using the reader. Update the hosts usage. - Lagoon has updated to use a comma separated list of host names. Add a condition to make sure trim didn't remove empty. Update govcms-deploy to check HOSTS.
22884f9
to
710663c
Compare
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.
@steveworley shouldn't the variable name be MARIADB_READ_REPLICA_HOSTS
?
@AlexSkrypnyk as far as I know the Lagoon broker will be exposing it as |
I have cross-checked requested changes by @SRowlands with the latest changes in code - all points were addressed. This is ready to be merged. |
Similar PR is coming for |
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.
Found several issues while porting to scaffold-tooling
. Will raise a PR against this PR with fixes. Please do not merge this PR yet.
@steveworley this is ready to be merged. please merge at your earliest convenience |
govcms-deploy
to use the read replica forMARIADB_HOST_READREPLICA
environment variable to control the mysql host.amazeeio/dbaas-mariadb-apb#5 (comment)