Skip to content

Add teardown script for POC cost-incurring resources#63

Merged
shlbatra merged 2 commits into
mainfrom
feat/destroy-resources-script
Jul 4, 2026
Merged

Add teardown script for POC cost-incurring resources#63
shlbatra merged 2 commits into
mainfrom
feat/destroy-resources-script

Conversation

@shlbatra

@shlbatra shlbatra commented Jul 4, 2026

Copy link
Copy Markdown
Owner

Summary

Adds scripts/destroy_resources.sh to tear down the three always-on resources that drive the ongoing cost of these POC projects:

  • Cloud Composer 2 environment ml-pipelines-composer (GKE + Airflow, 24/7 — the biggest cost) plus its leftover DAGs bucket
  • Vertex AI Feature Store — feature view iris_features then online store ml_online_store (Bigtable node billed per node-hour)
  • Artifact Registry repo sahil-experiment-docker-images and all images

It mirrors the existing setup_* scripts so everything can be recreated later. BigQuery, GCS (sb-vertex), Pub/Sub and the kfp-mlops@ service account are intentionally left untouched, since the setup scripts depend on them.

Behavior / safety

  • Deletes the feature view before the online store (dependency order)
  • Captures the Composer DAGs bucket before deleting the env, then removes it
  • Idempotent — skips resources that are already gone
  • Flags: --dry-run, --yes, --skip-composer, --skip-feature-store, --skip-artifact-registry, --keep-bucket
  • Confirmation prompt (type destroy) unless --yes

Recreate path

  1. ./scripts/setup_artifact_registry.sh → push to main / re-run CI to rebuild images
  2. ./scripts/setup_feature_store.sh
  3. ./scripts/setup_composer.sh./scripts/sync_dags.sh

Note: setup_composer.sh pins composer-2.17.3-airflow-2.10.5; that image version may need bumping if recreated much later.

Testing

  • bash -n syntax check passes
  • --dry-run verified end-to-end (prints delete commands, deletes nothing)

🤖 Generated with Claude Code

shlbatra and others added 2 commits July 4, 2026 11:53
Adds scripts/destroy_resources.sh to tear down the three always-on
resources that drive POC cost: the Cloud Composer 2 environment (GKE +
Airflow), the Vertex AI Feature Store online store (Bigtable), and the
Artifact Registry repository.

Mirrors the existing setup scripts. Deletes the feature view before the
online store, captures and removes the leftover Composer DAGs bucket, and
leaves BigQuery, GCS, Pub/Sub and the kfp-mlops@ service account untouched
so the setup scripts can recreate everything.

Safety: confirmation prompt, --dry-run, per-resource --skip-* flags,
--keep-bucket, and --yes for automation.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Two consistency fixes to support rebuilding images after an Artifact
Registry teardown:

- Add workflow_dispatch so the pipeline can be triggered manually from the
  Actions UI without pushing a commit (previously only push/PR triggered it).
- Tag and push ml-pipelines-kfp-image with :latest in addition to the
  branch tag, matching the fastapi and beam images.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@shlbatra shlbatra merged commit 2950d8f into main Jul 4, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant