Skip to content

Commit 69d3016

Browse files
authored
Merge pull request #29 from GNS-Science/chore/update_weka_api_components
update components associated with the weka stack; standardise the component pages for: - nshm_toshi_api - nshm_model_graphl_api - nzshm_model
2 parents 629043f + f068677 commit 69d3016

File tree

9 files changed

+1074
-917
lines changed

9 files changed

+1074
-917
lines changed

docs/architecture/api_gateway_deployments.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ graph TD
99
1010
K["Kororaa web app
1111
nshm-test.gns.cri.nz"]:::nshm
12-
NB["https://nshm-api-test.gns.cri.nz/kororaa-app-api/graphql"]:::note
12+
NB["HTTPS: nshm-api-test.gns.cri.nz/kororaa-app-api/graphql"]:::note
1313
1414
W["Weka web app
1515
weka-test.gns.cri.nz"]:::nshm
16-
NB3["https://nshm-api-test.gns.cri.nz/weka-app-api/graphql"]:::note
16+
NB3["HTTPS: nshm-api-test.gns.cri.nz//weka-app-api/graphql"]:::note
1717
1818
subgraph GW["API Gateway layer"]
1919

docs/architecture/common_infrastructure.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ graph
3030
```
3131
## Python libraries for Science
3232

33-
These are the main python libraries used commonly throughtout science application code.
33+
These are the main python libraries used commonly in our science application code.
3434

3535
```mermaid
3636
graph

docs/architecture/weka_deployment_stack.md

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,11 @@ These components are developed and supported by the Compute Working Group team.
1616

1717
**Github:** [GNS-Science/nshm-weka-apigw](https://github.com/GNS-Science/nshm-weka-apigw).
1818

19-
- [solvis-graphql-api](/nzshm-documentation/components/solvis_graphql_api) is a graphql API wrapping the [solvis](https://github.com/GNS-Science/solvis) library.
20-
21-
**Github:** [GNS-Science/solvis-graphql-api](https://github.com/GNS-Science/solvis-graphql-api). Used by the Rupture Map explorer UI component.
22-
23-
- [nshm-model-graphql-api](/nzshm-documentation/components/nshm-model-graphql-api) is a graphql API wrapping the nzshm-model library.
19+
- [nshm-model-graphql-api](/nzshm-documentation/components/nshm_model_graphql_api/) is a graphql API wrapping the nzshm-model library.
2420

2521
**Github:** [GNS-Science/nshm-model-graphql-api](https://github.com/GNS-Science/nshm-model-graphql-api).
2622

27-
- [nshm-toshi-api](/nzshm-documentation/components/nshm_toshi_api) is a graphql API managing the NSHM experimental artefacts.
23+
- [nshm-toshi-api](/nzshm-documentation/components/nshm_toshi_api/) is a graphql API managing the NSHM experimental artefacts.
2824

2925
**Github:** [GNS-Science/nshm-toshi-api](https://github.com/GNS-Science/nshm-toshi-api).
3026

@@ -92,18 +88,9 @@ graph TD
9288
ES_API[elastic-search-api]:::AWS
9389
S-API[nshm-model-graphql-api]:::nshm
9490
T-API[nshm-toshi-api]:::nshm
95-
M-API[nshm-model-api]:::nshm
96-
97-
end
98-
99-
subgraph DEP["unused microservices"]
100-
direction TB
10191
102-
H-API[nshm-hazard-api]:::nshm-deprecated
103-
Q-API[nshm-search-api]:::nshm-deprecated
10492
end
10593
10694
F2 -.-> SUP
107-
SUP ---> DEP
10895
10996
```

docs/components/nshm_model_graphql_api.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,20 @@
22

33
## NSHM Model Graphql API
44

5-
A graphql API graphql API wrapping the nzshm-model library.
5+
A graphql API wrapping the [nzshm-model](/nzshm-documentation/components/nzshm_model/) library.
6+
7+
[![Build Status](https://github.com/GNS-Science/nshm-model-graphql-api/actions/workflows/dev.yml/badge.svg)](https://github.com/GNS-Science/nshm-model-graphql-api/actions/workflows/dev.yml)
8+
[![codecov](https://codecov.io/gh/GNS-Science/nshm-model-graphql-api/branch/main/graphs/badge.svg)](https://codecov.io/github/GNS-Science/nshm-model-graphql-api)
9+
10+
## Links
11+
12+
- [Github: GNS-Science/nshm-model-graphql-api](https://github.com/GNS-Science/nshm-model-graphql-api)
13+
- [Dependent projects](https://github.com/GNS-Science/nshm-model-graphql-api/network/dependents)
614

7-
**Github:** [GNS-Science/nshm-model-graphql-api](https://github.com/GNS-Science/nshm-model-graphql-api)
815

916
## Deployments
1017

11-
Note that the both TEST and PROD share the same GITHUB environmemt because `serverless.yml` handles any stage specifics internally.
18+
Note that the both TEST and PROD share the same GITHUB environment because `serverless.yml` handles any stage specifics internally.
1219

1320
-----
1421
### PROD

docs/components/nshm_toshi_api.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
1-
## Toshi Graphql API
1+
## NSHM Toshi API
2+
3+
[![Build Status](https://github.com/GNS-Science/nshm-toshi-api/actions/workflows/run-tests-on-pull-request.yaml/badge.svg)](https://github.com/GNS-Science/nshm-toshi-api/actions/workflows/run-tests-on-pull-request.yaml)
4+
[![codecov](https://codecov.io/gh/GNS-Science/nshm-toshi-api/branch/main/graphs/badge.svg)](https://codecov.io/github/GNS-Science/nshm-toshi-api)
25

36
A graphql API for managing experimental metadata and artefacts of the NZ NSHM project.
47

5-
Provides analytical services to help explore and analyse key components of the NSHM source rate model.
8+
## Links
69

7-
- [on github](https://github.com/GNS-Science/nshm-toshi-api)
10+
- [Github: GNS-Science/nshm-toshi-api](https://github.com/GNS-Science/nshm-toshi-api)
11+
- [Dependent projects](https://github.com/GNS-Science/nshm-toshi-api/network/dependents)
812

913
## Deployments
1014

docs/components/nshm_weka_apigw.md

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,13 @@
1-
# Weka Application API Gateway
1+
## Weka Application API Gateway
22

3-
A stitched graphql API for the NSHM Weka web app (aka Weka).
3+
A graphql API Gateway for the NSHM Weka web app (aka Weka).
44

55
- [Weka Deployment Stack](/nzshm-documentation/architecture/weka_deployment_stack/) describes the complete Weka stack.
66
- **Github:** [GNS-Science/nshm-weka-apigw](https://github.com/GNS-Science/nshm-weka-apigw)
77
- [Api Gateway Pattern](/nzshm-documentation/architecture/api_gateway_pattern/) describes the pattern used by the Weka and Kororaa stacks.
88

99
## Deployments
1010

11-
Deployment environments AWS_TEST and AWS_PROD each define the following variables:
12-
13-
### Environment variables
14-
15-
```
16-
NZSHM22_HAZARD_API_KEY
17-
NZSHM22_HAZARD_API_URL
18-
NZSHM22_SOLVIS_API_KEY
19-
NZSHM22_SOLVIS_API_URL
20-
NZSHM22_TOSHI_API_KEY
21-
NZSHM22_TOSHI_API_URL
22-
NZSHM22_SEARCH_API_KEY
23-
NZSHM22_SEARCH_API_URL
24-
NZSHM22_NSHM_MODEL_API_URL
25-
NZSHM22_NSHM_MODEL_API_KEY
26-
```
27-
2811
-----
2912
### TEST
3013
-----
@@ -34,7 +17,7 @@ NZSHM22_NSHM_MODEL_API_KEY
3417
| -------------------------------------- | ------------------ | ------------ |
3518
| test-nshm-weka-apigw (3ksmpv8l4i) | | deploy-test |
3619

37-
#### Lambda
20+
#### Lambda functions
3821
| AWS lambda function name | Github Environment | Branch |
3922
| ----------------------------------------------------------- | ------------------ | ------------ |
4023
| nshm-weka-apigw-test-app | AWS_TEST | deploy-test |
@@ -71,7 +54,7 @@ Serverless Domain Manager:
7154
| -------------------------------------- | ------------------ | ------------ |
7255
| prod-nshm-weka-apigw (NONE) | | main |
7356

74-
#### Lambda
57+
#### Lambda functions
7558
| AWS lambda function name | Github Environment | Branch |
7659
| ----------------------------------------------------------- | ------------------ | ------------ |
7760
| nshm-weka-apigw-prod-app | AWS_PROD | main |

docs/components/solvis_graphql_api.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
1-
# solvis-graphql-api
1+
## Solvis graphql API
2+
3+
[![Build Status](https://github.com/GNS-Science/solvis-graphql-api/actions/workflows/dev.yml/badge.svg)](https://github.com/GNS-Science/solvis-graphql-api/actions/workflows/dev.yml)
4+
[![codecov](https://codecov.io/gh/GNS-Science/solvis-graphql-api/branch/main/graphs/badge.svg)](https://codecov.io/github/GNS-Science/solvis-graphql-api)
25

36
A graphql API wrapping the [solvis library](./solvis.md) for analysis of opensha modular Inversion Solutions.
47

58
Provides analytical services to help explore and analyse key components of the NSHM source rate model.
69

7-
- [on github](https://github.com/GNS-Science/solvis-graphql-api)
8-
- [Technical Docs](https://github.com/GNS-Science/solvis-graphql-api)
10+
## Links
11+
12+
- [Github: GNS-Science/solvis-graphql-api](https://github.com/GNS-Science/solvis-graphql-api)
13+
- [Dependent projects](https://github.com/GNS-Science/solvis-graphql-api/network/dependents)
14+
915

1016
## Deployments
1117

docs/guidelines/api_devops_training.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,15 @@ Then:
2626
- check it out locally.
2727
- follow the readme/docs to install & test.
2828
- run the service locally.
29-
- test the service locally via its graphql web UI.
29+
- test the service locally via the igraphql web UI.
3030

3131
Finally, demonstrate to the team:
3232

3333
- accessing the web UI locally with a web browser.
34-
- using a `query` provided by the API to retrieve something
34+
- using a `query` provided by the API to retrieve something
3535
relevant to the NSHM project. (e.g. a map, a rupture, a standardised location).
36-
36+
NB finding an example client graphql query in one of the cleint projects.
37+
3738
## Exercise 1A - manually deploy a serverless service
3839

3940
## Caution:
@@ -70,22 +71,20 @@ browser to reproduce the results from Exercise 1 above.
7071
fix: Ask for these permissions in AWS account.
7172

7273
- `Resource handler returned message: "Unzipped size must be smaller than 262144000 bytes ....`
73-
74-
74+
7575
As python packages versions change sometimes this limit may be exceeded,
7676

7777
Various techniques for addressing this, ask for help.
7878

7979

80-
8180
## Exercise 2 - Use the weka graphql API gateway service.
8281

8382
**Instructions:**
8483

8584
- check it out locally https://github.com/GNS-Science/nshm-kororaa-apigw
8685
- follow the readme / docs
8786
- run the service locally, using remote PROD schemas.
88-
- test the service locally vi its graphql when UI
87+
- test the service locally using the igraphql web UI.
8988

9089
**Demo**
9190

0 commit comments

Comments
 (0)