Documentation
¶
Overview ¶
Package vmexec implements the cloudlist `vm` capability for GCP via the metadata startup-script + reboot path (PLAN.md decision T2.2/Task 10).
GCP has no managed exec service equivalent to AWS SSM RunCommand or alibaba CloudAssistant. The portable management-plane approach is:
- instance.get to read current metadata + fingerprint
- instance.setMetadata to add a `startup-script` key with the command
- instance.reset to trigger the startup script on next boot
We do NOT capture stdout — startup-script output goes to the serial console which requires a separate IAM permission to read. The instance-cmd payload surfaces "command queued" with a clear note. Operators should follow up with `gcloud compute instances get-serial-port-output` to read the result. This is documented in the demo replay.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Driver ¶
func (*Driver) Execute ¶
func (d *Driver) Execute(ctx context.Context, instanceID, command string) (schema.CommandResult, error)
Execute writes a startup-script and reboots `instanceID`. instanceID may be `<zone>/<instance>` (preferred) or just `<instance>` (driver scans the first configured project's zones for a matching instance).