diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2021-10-14 17:30:21 -0700 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2021-10-14 17:30:21 -0700 |
commit | 4be667616ae209fa0efaaa2350c1b75eacf0e344 (patch) | |
tree | 7fd3c755ff37b545ba349d2874a60fbb93629d60 | |
parent | e3c58bb0c254fd70c8fd8ae9402452b463597638 (diff) | |
download | fatcat-4be667616ae209fa0efaaa2350c1b75eacf0e344.tar.gz fatcat-4be667616ae209fa0efaaa2350c1b75eacf0e344.zip |
update CHANGELOG date and document v0.4 prod migration stepsv0.4.0
-rw-r--r-- | CHANGELOG.md | 3 | ||||
-rw-r--r-- | notes/migrations/2021-10-14_prod_v0.4.txt | 48 |
2 files changed, 50 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index c8636cca..5ae31d41 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,7 +14,8 @@ See also: - [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - [Semantic Versioning](https://semver.org/spec/v2.0.0.html) -## [0.4.0] - 2021-10-12 + +## [0.4.0] - 2021-10-14 Includes small API and SQL schema changes; see `./proposals/20211012_v04_schema_tweaks.md`. Old database dumps may not work diff --git a/notes/migrations/2021-10-14_prod_v0.4.txt b/notes/migrations/2021-10-14_prod_v0.4.txt new file mode 100644 index 00000000..ce878678 --- /dev/null +++ b/notes/migrations/2021-10-14_prod_v0.4.txt @@ -0,0 +1,48 @@ + +Primary Deployment Steps: +- halt all importers on prod1 +- take full private database snapshot (version used for upgrades) +- merge branch to master +- git pull +- run diesel SQL migration: time diesel migration run +- cargo build: time cargo build --release +- restart fatcat-api +- pipenv update: time pipenv install --dev --deploy +- restart fatcat-web +- restart importers + +Commands and status: + + sudo systemctl stop fatcat-import-* + + # expecting ~3 hours for dump to complete on fatcat-prod1 + export DATESLUG="`date +%Y-%m-%d.%H%M%S`" + time sudo -u postgres pg_dump --verbose --format=tar fatcat_prod | pigz > /srv/fatcat/snapshots/fatcat_full_dbdump_${DATESLUG}.tar.gz + + real 176m4.992s + user 729m44.161s + sys 56m41.694s + + fatcat@wbgrp-svc502:/srv/fatcat/src/rust$ time diesel migration run + Running migration 2021-10-12-215817_v0.4 + + real 0m1.518s + user 0m0.054s + sys 0m0.024s + + + fatcat@wbgrp-svc502:/srv/fatcat/src/rust$ time cargo build --release + Compiling fatcat-openapi v0.4.0 (/srv/fatcat/src/rust/fatcat-openapi) + Compiling fatcat v0.4.0 (/srv/fatcat/src/rust) + Building [=====================================================> ] 353/354: fatcatd(bin) + Finished release [optimized] target(s) in 3m 13s + + real 3m13.627s + user 8m28.880s + sys 0m12.591s + +Cleanup: +- deploy to other nodes, following same re-compile / pipenv steps +- update CHANGELOG date, this file, tag a release, and push +- push pipy package update (need account recovery!) +- merge fatcat-cli changes, push a release |