vmexec

package
v0.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 6, 2026 License: MIT Imports: 9 Imported by: 0

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:

  1. instance.get to read current metadata + fingerprint
  2. instance.setMetadata to add a `startup-script` key with the command
  3. 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

type Driver struct {
	Projects []string
	Client   *api.Client
}

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).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL