Skip to content

Commit f913f62

Browse files
authored
Merge pull request #238 from OCHA-DAP/docs/HDX-10236-deployment-process
PR HDX-10236 deployment process doc
2 parents 539e2a0 + afba8e0 commit f913f62

File tree

2 files changed

+55
-0
lines changed

2 files changed

+55
-0
lines changed

DEPLOYMENT-PROCESS.md

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# HAPI COMPONENTS
2+
-----------------
3+
1) HAPI-SCHEMA release 0.8.17
4+
5+
2) HAPI-PIPELINES plays dev role: `main` branch is for (code) -> `db-export` branch (CSV daily depends on HAPI-SCHEMA release 0.8.17)
6+
7+
3) HAPI-PIPELINES-PROD plays prod role: `main` (code) <- PRs from HAPI-PIPELINES
8+
-> `db-export` (CSV daily depends on HAPI-SCHEMA release 0.8.17)
9+
10+
4) HWA 0.0.7 depends on HAPI-SCHEMA
11+
-> imports `db-export` (CSV daily depends on HAPI-SCHEMA release 0.8.17) from HAPI-PIPELINES-PROD / HAPI-PIPELINES -> postgres
12+
13+
5) HAPI API 0.7.0 depends on HAPI-SCHEMA release 0.8.17
14+
serves data from postgres
15+
16+
6) HAPI SMOKE TESTS depend on endpoint schema, which in turn, depends on HAPI SCHEMA
17+
18+
19+
# PROCESS:
20+
----------
21+
1) HAPI-SCHEMA has a new release ( ex: deletes a column from an existing table, adds a new table ), 0.9.0
22+
2) HAPI-PIPELINES use HAPI-SCHEMA 0.9.0 -> produces 0.9.0 CSVs
23+
3) [Ticket] HAPI API to use new 0.9.0 HAPI-SCHEMA
24+
4) [Ticket] HWA to use new 0.9.0 HAPI-SCHEMA. Special care need to be taken when creating **alembic revisions**
25+
- *Enum changes* are not automatically detected by alembic
26+
- `nullable=False` constraints can pose problems with existing data
27+
- changes to primary keys can pose problems to existing data
28+
29+
**NOTE**: 3 and 4 can be implemented in parallel
30+
5) Deploy on dev server:
31+
- Deploy [dev] HWA
32+
- Run in parallel:
33+
- Run HWA ingest
34+
- Deploy [dev] HAPI
35+
- Manual Testing
36+
1) [Ticket] HAPI SMOKE TESTS update
37+
2) Test HAPI SMOKE TESTS run successfully on dev server
38+
3) HWA new version 0.0.8
39+
- make sure to check for enum changes when creating alembic patch
40+
4) HAPI API new version 0.8.0
41+
5) PR from HAPI-PIPELINES to HAPI-PIPELINES-PROD -> generate new 0.9.0 CSVs
42+
6) Deploy on prod server:
43+
- Deploy [0.0.8] HWA
44+
- Run in parallel:
45+
- Run HWA ingest
46+
- Deploy [0.8.0] HAPI
47+
- Manual Testing
48+
- Run smoke tests on prod
49+
50+
51+
IDEAS FOR A BRIGHTER FUTURE:
52+
----------------------------
53+
- HWA to create a new postgres schema for each new HAPI SCHEMA release
54+
- Stop using postgres, use something that supports faceting out of the box (solr, elastic, mongo)

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ This project is currently in development and the outputs are not yet public exce
77
* HAPI documentation
88
* HAPI endpoint root
99
* [readthedocs](https://hdx-hapi.readthedocs.io/en/latest/)
10+
* HAPI [deployment process](/DEPLOYMENT-PROCESS.md)
1011

1112
# Related repositories
1213

0 commit comments

Comments
 (0)