-
Notifications
You must be signed in to change notification settings - Fork 3
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
Kingfisher Process Docker app deploy #418
Conversation
…ze from polluting syslog, #250
Rename: - ocdskfs: collect (to match registry, in order to avoid confusion) - ocdskfp: summarize - collect: incremental - ocdskingfishercollect: kingfisher-collect (directory) or kingfisher_collect (database) - ocdskingfisherprocess: kingfisher_process - ocdskingfisherscrape: kingfisher-collect - ocdskingfisherviews: kingfisher-summarize - OCDS_KINGFISHER_SCRAPE_*: OCDS_KINGFISHER_COLLECT_* Salt/Pillar: - Move data support-related commands, Python packages, SQL extensions and reference schema to kingfisher/init.sls - Create individual users, and remove access to general user #142 - Create .pgpass files for the individual users - collect: Give deployer user access to the FILES_STORE directory - process: Set ENABLE_CHECKER - summarize: Change .env to world-readable (contains no secrets) - summarize: Set KINGFISHER_SUMMARIZE_LOGGING_JSON in .env - summarize: summary_view_1_2_research schema was deleted - Use contents key for .pgpass files Docs: - Remove Kingfisher Process v1-specific documentation
@RobHooper I've made the changes I wanted to make. There is a corresponding PR for private Pillar. |
|
To help reduce the risks with Ubuntu end of life we can install Ubuntu Pro on ocp05. https://ubuntu.com/pro This would be best for if the plan is for ocp05 to be an online "archived" database. Alternatively, we can turn off the server but keep it available, then we are one server boot away from accessing the data.
I can create the new stanza and update everywhere. |
For Ubuntu Pro, the only server option seems to be "Physical servers with unlimited VMs" (we have no VMs). Would we need to go with that one, or is "Desktop" the option to take? I'm happy with either kingfisher-2023 or kingfisherv15. We can go with kingfisher-2023 :) |
The "Ubuntu Pro Server with unlimited VMs" option is indeed the best option for us because it is a physical server. It should cost $500 for the year. |
Okay, I'll get that approved, but let's go ahead with that as the plan. |
95f4053
to
62998ee
Compare
Happy being led by you if we bring the replica online now or later. We will loose the failover / disaster recovery that the replica server currently provides. I am also conscious that the new server is smaller so this is another factor to consider around load. If we are not starting the replica now I will configure pgbackrest before this is merged. |
Let's start without the replica. |
…e current user's role. Allow all users to access user's directory.
# Daily incremental backup | ||
15 05 * * 0-2,4-6 postgres pgbackrest backup --stanza=kingfisher-2023 | ||
# Weekly full backup | ||
15 05 * * 3 postgres pgbackrest backup --stanza=kingfisher-2023 --type=full 2>&1 | grep -v "unable to remove file.*We encountered an internal error\. Please try again\.\|expire command encountered 1 error.s., check the log file for details" |
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 added some comments to the file to help check whether this grep still matches text.
I think the 1
needs to be changed to \d+
(in which case grep
needs a -E
option)
I couldn't find what outputs We encountered an internal error\. Please try again\.
Is the \|
meant to match a literal pipe character? (I'm not sure how pgbackrest concatenates messages).
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.
\|
is an OR operator for grep, we are using this to ignore multiple lines we have seen are false positives.
Checking our records, "expire command encountered" has only ever reported "1" error.
I would like to know when multiple files fail so \d+
would be too greedy from this point of view.
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.
Aha, sounds good!
@RobHooper This PR is good to go. I added one comment, but it can be looked into separately. |
closes #200, addresses #402, closes #427
Main:
ocdskingfishercollect
DB (to be renamedkingfisher_collect
) and/home/collect/data
directory (to be moved to/home/incremental/data
). We would need to comment-out the cron jobs until those two have been moved.kingfisher_collect
database and/home/incremental/data
directory are populated, changecron.absent
tocron.present
inincremental.sls
set -euo pipefail
forfirewall_reset.sh
Kingfisher Process Docker app deploy #418 (comment)Notes:
postgres.backup
in Pillar,salt/postgres/files/pgbackrest
, etc. Do we need to change the pgbackrest configuration (kingfishser_common.sls) to avoid conflict with the old DB backups?create_server.rst
under "5. Migrate from the old server" once clarified whether neededOnce main server is online:
Update firewall IPs in pillar/kingfisher_replica.slsOnce replica server is online:
Update replica_ipv4 (and replica_ipv6) in pillar/kingfisher_main.slsOne either server is online: