Skip to content

tools: baseimage: Support -debs-dir, custom configs, and release image creation in gce_install_cuttlefish_packages - #3487

Open
rmuthiah wants to merge 3 commits into
google:mainfrom
rmuthiah:baseimage-final-image-workflow
Open

rmuthiah wants to merge 3 commits into
google:mainfrom
rmuthiah:baseimage-final-image-workflow

Conversation

@rmuthiah

@rmuthiah rmuthiah commented Oct 31, 2026 •

Copy link
Copy Markdown
Collaborator

Stacked on #3486 (part 3 of 3).

Replicate the release host image creation workflow inside gce_install_cuttlefish_packages in a single builder VM pass without requiring a second builder VM pass:

  • Add -debs-dir to auto-discover the 6 required Cuttlefish Debian packages (cuttlefish-base, cuttlefish-defaults, cuttlefish-integration, cuttlefish-metrics, cuttlefish-user, cuttlefish-orchestration), failing fast if any package is missing or duplicated, and rejecting simultaneous -debs-dir and -deb flags.
  • Add -use-gce-metadata (defaulting to true) to uncomment build_api_credentials_use_gce_metadata=true in-place in /etc/default/cuttlefish-host_orchestrator installed by cuttlefish-orchestration, plus optional -cuttlefish-ho-defaults-src to override that config from a local file using install -m 0644 -o root -g root.
  • Add -dest-image-project and attach the base_image=<source-image> label to the output GCE image.
  • Auto-generate cuttlefish-image-<YYYYMMDDHHMMSS>--cvd<major>-<minor> from the cuttlefish-base .deb filename when -image-name is omitted.

… checks in BuildImage

- Add CreateImageOpts (DestProject and Labels) to GceHelper.CreateImage and wait on the destination project's global operation.
- Add GetImage helper to GceHelper.
- Add DestImageProject and Labels fields to BuildImageOpts.
- Centralize pre-flight source and destination ImageExists checks in GceHelper.BuildImage so all image-building commands fail fast before creating builder instances or disks.
Add cmd/gce_resize_image to create a resized copy of a GCE image (defaulting to 160GB and <source-image>--<size-gb>gb) using GceHelper while preserving source image labels.
…e creation in gce_install_cuttlefish_packages

Replicate the release host image creation workflow inside
gce_install_cuttlefish_packages in a single builder VM pass without
requiring a second builder VM pass:

- Add -debs-dir to auto-discover the 6 required Cuttlefish Debian
  packages (cuttlefish-base, cuttlefish-defaults, cuttlefish-integration,
  cuttlefish-metrics, cuttlefish-user, cuttlefish-orchestration),
  failing fast if any package is missing or duplicated, and rejecting
  simultaneous -debs-dir and -deb flags.
- Add -use-gce-metadata (defaulting to true) to uncomment
  build_api_credentials_use_gce_metadata=true in-place in
  /etc/default/cuttlefish-host_orchestrator installed by the
  cuttlefish-orchestration package, plus optional
  -cuttlefish-ho-defaults-src to override that config from a local file
  using install -m 0644 -o root -g root.
- Add -dest-image-project and attach the base_image=<source-image> label
  to the output GCE image.
- Auto-generate cuttlefish-image-<YYYYMMDDHHMMSS>--cvd<major>-<minor>
  from the cuttlefish-base .deb filename when -image-name is omitted.
@rmuthiah
rmuthiah force-pushed the baseimage-final-image-workflow branch from 631a0c7 to 068e2d8 Compare October 31, 2026 02:49

This branch has not been deployed

No deployments
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