Skip to content

Commit 4724e18

Browse files
committed
mildly clean up api configs
1 parent e0e5dd3 commit 4724e18

File tree

6 files changed

+15
-151
lines changed

6 files changed

+15
-151
lines changed

deployment/api/oss-vdb/api_config_staging.yaml

Lines changed: 0 additions & 32 deletions
This file was deleted.

deployment/staging.yaml

Lines changed: 0 additions & 50 deletions
This file was deleted.

gcp/api/README.md

Lines changed: 4 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,34 +2,14 @@
22

33
The API server runs on Cloud Run with Cloud Endpoints.
44

5-
# API server updates (backend)
5+
The Cloud Endpoints configuration is managed through terraform.
66

7-
If the backend code (i.e. server.py) code is changed, follow these steps:
8-
9-
Pick a TAG to use for the build (base this on the date. e.g. date +"%Y%m%d")).
10-
11-
Note: You may need to run `gcloud auth configure-docker` the first time you run
12-
this. See also
13-
https://cloud.google.com/container-registry/docs/advanced-authentication#gcloud-helper
14-
15-
## Staging
16-
17-
```
18-
./deploy_backend oss-vdb $(date +"%Y%m%d") osv-grpc-backend-staging
19-
```
20-
21-
## Production
22-
23-
```
24-
./deploy_backend oss-vdb $(date +"%Y%m%d") osv-grpc-backend
25-
```
26-
27-
## oss-vdb-test Project
28-
29-
Automatically built and deployed on pushes to master branch.
7+
Deployments of API backend is done through Cloud Deploy (`deployment/clouddeploy/osv-api`).
308

319
# Contributing:
3210

11+
Note: Running the API locally (via `make run-api-server` and `make api-server-tests`) requires GCP authentication to fetch the configuration from the `oss-vdb` project. See also `v1/README.md`.
12+
3313
## Writing tests
3414
To speed up running tests:
3515

gcp/api/deploy_service_proxy

Lines changed: 0 additions & 27 deletions
This file was deleted.

gcp/api/v1/README.md

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -25,29 +25,22 @@ python3 -m grpc_tools.protoc \
2525
```
2626

2727
## Deploy service proxy
28-
To deploy the service proxy,
2928

30-
### Test
31-
```
32-
../deploy_service_proxy oss-vdb api-test.osv.dev osv-grpc-v1-test /path/to/api_config_test.yaml
33-
```
29+
Deployment is handled through terraform.
3430

35-
### Staging
36-
```
37-
../deploy_service_proxy oss-vdb api-staging.osv.dev osv-grpc-v1-staging /path/to/api_config_staging.yaml
38-
```
31+
`api_descriptor.pb` is symlinked to inside `deployment/terraform/environments/oss-vdb[-test]/api/`,
32+
Make any desired changes to `api_config.tftpl` in same folder.
3933

40-
### Production
34+
`terraform plan` and `terraform apply` are automatically run on `oss-vdb-test` on pushes to the master branch.
4135

42-
```
43-
../deploy_service_proxy oss-vdb api.osv.dev osv-grpc-v1 /path/to/api_config.yaml
44-
```
36+
For `oss-vdb`, terraform is run as part of the weekly release process.
4537

46-
### oss-vdb-test Project
38+
## Deploy endpoints configuration for integration tests
4739

48-
Deployment is handled through terraform.
40+
The Cloud Endpoints service that is required for the unit tests to run is **not** automatically deployed (to allow for testing of proto changes). The testing service is `api-test.osv.dev` on the `oss-vdb` project.
4941

50-
`api_descriptor.pb` is symlinked to inside `deployment/terraform/environments/oss-vdb-test/api/`,
51-
Make any desired changes to `api_config.tftpl` in same folder.
42+
The configuration for this service is located in this directory `api_config_test.yaml`. To deploy changes, use the following command:
5243

53-
`terraform plan` and `terraform apply` are automatically run on pushes to the master branch.
44+
```sh
45+
gcloud endpoints services deploy api_descriptor.pb api_config_test.yaml --project=oss-vdb
46+
```
File renamed without changes.

0 commit comments

Comments
 (0)