gce

package
v0.0.0-...-4b25d55 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2024 License: Apache-2.0 Imports: 20 Imported by: 21

Documentation

Overview

Package gce allows to use Google Compute Engine (GCE) virtual machines as VMs. It is assumed that syz-manager also runs on GCE as VMs are created in the current project/zone.

See https://cloud.google.com/compute/docs for details. In particular, how to build GCE-compatible images: https://cloud.google.com/compute/docs/tutorials/building-images Working with serial console: https://cloud.google.com/compute/docs/instances/interacting-with-serial-console

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Count         int    `json:"count"`          // number of VMs to use
	ZoneID        string `json:"zone_id"`        // GCE zone (if it's different from that of syz-manager)
	MachineType   string `json:"machine_type"`   // GCE machine type (e.g. "n1-highcpu-2")
	GCSPath       string `json:"gcs_path"`       // GCS path to upload image
	GCEImage      string `json:"gce_image"`      // pre-created GCE image to use
	Preemptible   bool   `json:"preemptible"`    // use preemptible VMs if available (defaults to true)
	DisplayDevice bool   `json:"display_device"` // enable a virtual display device
	// Username to connect to ssh-serialport.googleapis.com.
	// Leave empty for non-OS Login GCP projects.
	// Otherwise take the user from `gcloud compute connect-to-serial-port --dry-run`.
	SerialPortUser string `json:"serial_port_user"`
	// A private key to connect to ssh-serialport.googleapis.com.
	// Leave empty for non-OS Login GCP projects.
	// Otherwise generate one and upload it:
	// `gcloud compute os-login ssh-keys add --key-file some-key.pub`.
	SerialPortKey string `json:"serial_port_key"`
}

type Pool

type Pool struct {
	GCE *gce.Context
	// contains filtered or unexported fields
}

func Ctor

func Ctor(env *vmimpl.Env, consoleReadCmd string) (*Pool, error)

func (*Pool) Count

func (pool *Pool) Count() int

func (*Pool) Create

func (pool *Pool) Create(workdir string, index int) (vmimpl.Instance, error)

Jump to

Keyboard shortcuts

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