You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Docs closeout for the scheduled-deploy parity. The bash deploy and Terraform
both now support schema-derived mode (#289-#291); document it as the simple
rename-free production path, with the explicit ontology/binding (migration-v5
compiled) path as the advanced override.
- Deployment README: new 'Schema-derived deploy (--property-graph)' section
after the deploy command -- one-artifact flow (point --property-graph at a
placeholdered property_graph.sql with a sibling table_ddl.sql), the
placeholder + no-compiled-only requirements, the read-only-events /
writable-graph split, and an advanced note for explicit ontology+binding.
- Terraform README: property_graph = true subsection (build with
build_image.sh --property-graph; sets BQAA_PROPERTY_GRAPH; plan-time
precondition vs compiled-only), plus tfvars override, the env-var list, and
the build-image note.
Docs only; no code change. This is the last PR for #286.
| Graph dataset |`google_bigquery_dataset`| §1 — `bq mk` (pre-create so the runtime SA never needs `bigquery.datasets.create`) |
12
12
| Runtime SA + scheduler-caller SA |`google_service_account` ×2 | §2 — `_ensure_sa` (split by default; `single_sa = true` collapses to one) |
13
13
| Project + dataset IAM grants |`google_project_iam_member`, `google_bigquery_dataset_iam_member`| §3 — `_retry_iam gcloud projects add-iam-policy-binding` and the dataset-level grant block. Terraform's dependency graph handles the IAM-propagation race declaratively (the `depends_on` on the Cloud Run Job resource ensures grants land before the first invocation) |
14
-
| Cloud Run v2 Job |`google_cloud_run_v2_job`| §4 — `gcloud run jobs deploy`. Same env-var set the bash deploy wires (`BQAA_PROJECT_ID`, `BQAA_EVENTS_DATASET_ID`, `BQAA_GRAPH_DATASET_ID`, `BQAA_LOCATION`, `BQAA_LOOKBACK_HOURS`, `BQAA_OVERLAP_MINUTES`, `BQAA_EXTRACTION_MODE`, `BQAA_MAX_RETRIES`, conditionally `BQAA_MAX_SESSIONS`, `BQAA_MAX_SESSION_AGE_HOURS`, `BQAA_REFERENCE_EXTRACTORS_MODULE`) |
14
+
| Cloud Run v2 Job |`google_cloud_run_v2_job`| §4 — `gcloud run jobs deploy`. Same env-var set the bash deploy wires (`BQAA_PROJECT_ID`, `BQAA_EVENTS_DATASET_ID`, `BQAA_GRAPH_DATASET_ID`, `BQAA_LOCATION`, `BQAA_LOOKBACK_HOURS`, `BQAA_OVERLAP_MINUTES`, `BQAA_EXTRACTION_MODE`, `BQAA_MAX_RETRIES`, conditionally `BQAA_MAX_SESSIONS`, `BQAA_MAX_SESSION_AGE_HOURS`, `BQAA_REFERENCE_EXTRACTORS_MODULE`, and `BQAA_PROPERTY_GRAPH` when `property_graph = true`) |
15
15
|`roles/run.invoker` on the job → scheduler SA |`google_cloud_run_v2_job_iam_member`| §5 — `_retry_iam gcloud run jobs add-iam-policy-binding`|
16
16
| Cloud Scheduler trigger |`google_cloud_scheduler_job`| §6 — `gcloud scheduler jobs create http` with `--oauth-service-account-email` pointing at the scheduler SA |
17
17
18
18
## What's intentionally outside the module
19
19
20
20
**Container image build + publish.** The bash deploy builds the image from local sources via Cloud Buildpacks (`gcloud run jobs deploy --source $STAGING`), assembling a staging directory with `run_job.py` + `reference_extractor.py` + the demo artifacts + the vendored SDK source + `Procfile` + `requirements.txt` before invoking the build. That staging step is non-trivial — pointing `gcloud builds submit` directly at the `periodic_materialization/` directory would build an image that's missing the SDK source, the demo artifacts, and the Procfile.
21
21
22
-
The module takes the **published** image URI as the required `image_uri` variable. To produce a Terraform-compatible image, use the bundled [`../build_image.sh`](../build_image.sh) helper — it stages the exact layout `deploy_cloud_run_job.sh` produces in its temp dir, then runs `gcloud builds submit` against that staging dir. Same image contents either way; Terraform just consumes the publish artifact instead of doing the build inline.
22
+
The module takes the **published** image URI as the required `image_uri` variable. To produce a Terraform-compatible image, use the bundled [`../build_image.sh`](../build_image.sh) helper — it stages the exact layout `deploy_cloud_run_job.sh` produces in its temp dir, then runs `gcloud builds submit` against that staging dir. Same image contents either way; Terraform just consumes the publish artifact instead of doing the build inline. For schema-derived deploys (`property_graph = true`), build the image with `build_image.sh --property-graph path/to/property_graph.sql` so the placeholdered `property_graph.sql` + `table_ddl.sql` are staged instead of `ontology.yaml`/`binding.yaml`.
0 commit comments