Feature: gcp
Description
A platform feature that builds a Garden Linux image for Google Cloud Platform (GCP). Artifacts are delivered as .raw files packaged in a .gcpimage.tar.gz tarball for GCP import.
What it does
Installs Google Cloud guest packages (google-guest-agent, google-compute-engine-oslogin, google-compute-engine) and configures platform-specific settings:
- Time synchronization: configures
systemd-timesyncdwith the GCP NTP endpoint (metadata.google.internal). - Timezone: sets the default timezone to UTC.
- SSH: appends the Google OS Login
AuthorizedKeysCommanddirectives tosshd_configto enable OS Login-based SSH key management. - Guest agent: enables
google-guest-agent.serviceand masksgoogle-guest-agent-manager.service. - Kernel command line: sets console and GCP-specific kernel parameters.
- udev: adds a rule to remove stale GCE disk symlinks.
- Image conversion:
convert.gcpimage.tar.gzproduces the GCP-compatible tarball format.
Files
Files present in this feature and their purpose. See the feature file reference for the semantics of each file type.
| File | Purpose |
|---|---|
convert.gcpimage.tar.gz (ref) | Packages the .raw artifact into a disk.raw-named tarball in the format expected by the GCP gcloud compute images create command. |
exec.config (ref) | Sets the timezone to UTC, configures the instance configs run directory, appends Google OS Login SSH directives, enables google-guest-agent, and masks google-guest-agent-manager. |
file.include.markers.yaml (ref) | Maps files to test-coverage marker IDs. |
info.yaml (ref) | Declares type: platform and included/excluded features. |
pkg.exclude (ref) | Prevents installation of irqbalance (GCP manages CPU affinity externally). |
pkg.include (ref) | Installs google-compute-engine-oslogin, google-compute-engine, and google-guest-agent. |
file.include/etc/kernel/cmdline.d/00-cmdline.cfg (file.include) | Sets GCP-specific kernel boot parameters. |
file.include/etc/kernel/cmdline.d/10-console.cfg (file.include) | Sets the kernel console parameter for the GCP serial console. |
file.include/etc/systemd/timesyncd.conf.d/00-gardenlinux-gcp.conf (file.include) | Configures systemd-timesyncd to use the GCP metadata NTP server. |
file.include/usr/lib/udev/rules.d/64-gce-disk-removal.rules (file.include) | Removes stale GCE persistent disk symlinks when a disk is detached. |
Related features
Includes:
cloud— provides common cloud-init integration and base cloud configuration shared across cloud platforms.