go4.org: go4.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.


Package Files


type Config Uses

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 Uses

func (c *Config) MaybeDeploy()

type RestartPolicy Uses

type RestartPolicy int

RestartPolicy controls whether the binary automatically restarts.

const (
    RestartOnUpdates RestartPolicy = iota

Package cloudlaunch imports 23 packages (graph) and is imported by 12 packages. Updated 2018-01-09. Refresh now. Tools for package owners.