go4.orggo4.org/cloud/cloudlaunch Index | Files

package cloudlaunch

import "go4.org/cloud/cloudlaunch"

Package cloudlaunch helps binaries run themselves on The Cloud, copying themselves to GCE.

Index

Types

type Config

type Config struct {
	// Name is the name of a service to run.
	// This is the name of the systemd service (without .service)
	// and the name of the GCE instance.
	Name string

	// RestartPolicy controls whether the binary automatically restarts
	// on updates. The zero value means automatic.
	RestartPolicy RestartPolicy

	// UpdateStrategy sets the CoreOS automatic update strategy, and the
	// associated reboots. Possible values are "best-effort", "etcd-lock",
	// "reboot", "off", with "best-effort" being the default. See
	// https://coreos.com/os/docs/latest/update-strategies.html
	UpdateStrategy string

	// BinaryBucket and BinaryObject are the GCS bucket and object
	// within that bucket containing the Linux binary to download
	// on boot and occasionally run. This binary must be public
	// (at least for now).
	BinaryBucket string
	BinaryObject string // defaults to Name

	GCEProjectID string
	Zone         string // defaults to us-central1-f
	SSD          bool

	Scopes []string // any additional scopes

	MachineType  string
	InstanceName string
}

func (*Config) MaybeDeploy

func (c *Config) MaybeDeploy()

type RestartPolicy

type RestartPolicy int

RestartPolicy controls whether the binary automatically restarts.

const (
	RestartOnUpdates RestartPolicy = iota
	RestartNever
)

Source Files

cloudlaunch.go

Version
v0.0.0-20230225012048-214862532bf5 (latest)
Published
Feb 25, 2023
Platform
linux/amd64
Imports
23 packages
Last checked
1 month ago

Tools for package owners.