Skip to content
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

playbook / role to synchronize database and media data from production to qa or dev environment #65

Closed
rlskoeser opened this issue Apr 7, 2021 · 3 comments
Assignees
Labels
chore A task that doesn't require points tracking enhancement New feature or request

Comments

@rlskoeser
Copy link
Contributor

rlskoeser commented Apr 7, 2021

Is your feature request related to a problem? Please describe.
When we want to test against recent production data, we have to manually download sql dumps and media files, copy them, load them into the database or file system, set permissions, update django/wagtail site in the database. Because it's error prone and because we tend to be lazy, we don't always do always bother with refreshing data when we probably should.

Describe the solution you'd like
A script or playbook I can run that does all of this for me. For QA at least, but for local dev would be super.

general steps needed:

  • backup production db
  • sync db backup to staging postgres and restore
  • backup production site media (user uploaded content)
  • sync media backup to staging and restore
  • run django migrations (maybe? or could be out of scope) — needed when staging code differs from production
  • update django site in db to match environment
  • sync solr?
@rlskoeser rlskoeser added the enhancement New feature or request label Apr 7, 2021
@rlskoeser
Copy link
Contributor Author

rlskoeser commented Apr 5, 2022

related resources:

@acozine
Copy link
Collaborator

acozine commented Apr 5, 2022

Related to pulibrary/princeton_ansible#1522

@rlskoeser rlskoeser self-assigned this Apr 5, 2022
@rlskoeser
Copy link
Contributor Author

initial replicate playbook merged into main in #117 ; currently supports cdhweb and geniza, for db and media only (solr still tbd), and only supports prod to qa, no automated replication to dev environments yet

@rlskoeser rlskoeser added the chore A task that doesn't require points tracking label Jan 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore A task that doesn't require points tracking enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants