Skip to content

Commit 4be6676

Browse files
committed
update CHANGELOG date and document v0.4 prod migration steps
1 parent e3c58bb commit 4be6676

2 files changed

Lines changed: 50 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ See also:
1414
- [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
1515
- [Semantic Versioning](https://semver.org/spec/v2.0.0.html)
1616

17-
## [0.4.0] - 2021-10-12
17+
18+
## [0.4.0] - 2021-10-14
1819

1920
Includes small API and SQL schema changes; see
2021
`./proposals/20211012_v04_schema_tweaks.md`. Old database dumps may not work
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
2+
Primary Deployment Steps:
3+
- halt all importers on prod1
4+
- take full private database snapshot (version used for upgrades)
5+
- merge branch to master
6+
- git pull
7+
- run diesel SQL migration: time diesel migration run
8+
- cargo build: time cargo build --release
9+
- restart fatcat-api
10+
- pipenv update: time pipenv install --dev --deploy
11+
- restart fatcat-web
12+
- restart importers
13+
14+
Commands and status:
15+
16+
sudo systemctl stop fatcat-import-*
17+
18+
# expecting ~3 hours for dump to complete on fatcat-prod1
19+
export DATESLUG="`date +%Y-%m-%d.%H%M%S`"
20+
time sudo -u postgres pg_dump --verbose --format=tar fatcat_prod | pigz > /srv/fatcat/snapshots/fatcat_full_dbdump_${DATESLUG}.tar.gz
21+
22+
real 176m4.992s
23+
user 729m44.161s
24+
sys 56m41.694s
25+
26+
fatcat@wbgrp-svc502:/srv/fatcat/src/rust$ time diesel migration run
27+
Running migration 2021-10-12-215817_v0.4
28+
29+
real 0m1.518s
30+
user 0m0.054s
31+
sys 0m0.024s
32+
33+
34+
fatcat@wbgrp-svc502:/srv/fatcat/src/rust$ time cargo build --release
35+
Compiling fatcat-openapi v0.4.0 (/srv/fatcat/src/rust/fatcat-openapi)
36+
Compiling fatcat v0.4.0 (/srv/fatcat/src/rust)
37+
Building [=====================================================> ] 353/354: fatcatd(bin)
38+
Finished release [optimized] target(s) in 3m 13s
39+
40+
real 3m13.627s
41+
user 8m28.880s
42+
sys 0m12.591s
43+
44+
Cleanup:
45+
- deploy to other nodes, following same re-compile / pipenv steps
46+
- update CHANGELOG date, this file, tag a release, and push
47+
- push pipy package update (need account recovery!)
48+
- merge fatcat-cli changes, push a release

0 commit comments

Comments
 (0)