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 /notes/migrations/2021-10-14_prod_v0.4.txt | |
parent | e3c58bb0c254fd70c8fd8ae9402452b463597638 (diff) | |
download | fatcat-4be667616ae209fa0efaaa2350c1b75eacf0e344.tar.gz fatcat-4be667616ae209fa0efaaa2350c1b75eacf0e344.zip |
update CHANGELOG date and document v0.4 prod migration stepsv0.4.0
Diffstat (limited to 'notes/migrations/2021-10-14_prod_v0.4.txt')
-rw-r--r-- | notes/migrations/2021-10-14_prod_v0.4.txt | 48 |
1 files changed, 48 insertions, 0 deletions
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 |