deployment

package
v0.0.0-...-9d0dce2 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2018 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ESC = 27
)

ESC is the ASCII code for escape character

Variables

This section is empty.

Functions

func InterruptibleSleep

func InterruptibleSleep(messages chan string, duration time.Duration, message string)

InterruptibleSleep holds execution for a given duration, or until an interrupt signal is received.

Types

type Deployment

type Deployment struct {
	DeploymentDelays
	// contains filtered or unexported fields
}

func NewDeployment

func NewDeployment(orchestrator extpoints.Orchestrator, job jobs.Job, cluster cluster.Cluster, groupSelection TaskGroupSelection,
	scalingGroupSelection ScalingGroupSelection, force, autoContinue, verbose bool, delays DeploymentDelays,
	renderContext RenderContext) (*Deployment, error)

NewDeployment creates a new Deployment instances and generates all unit files for the given job.

func (*Deployment) Destroy

func (d *Deployment) Destroy() error

Destroy removes all unit files that belong to the configured job from the configured cluster.

func (*Deployment) DryRun

func (d *Deployment) DryRun() error

DryRun creates all unit files it will deploy during a normal `Run` and present them to the user.

func (*Deployment) Run

func (d *Deployment) Run() error

Run creates all applicable unit files and deploys them onto the configured cluster.

type DeploymentDelays

type DeploymentDelays struct {
	StopDelay    time.Duration
	DestroyDelay time.Duration
	SliceDelay   time.Duration
}

type RenderContext

type RenderContext interface {
	ProjectName() string
	ProjectVersion() string
	ProjectBuild() string

	ImageVaultMonkey() string // Docker image name of vault-monkey
	ImageWormhole() string    // Docker image name of wormhole
	ImageAlpine() string      // Docker image name of alpine linux
	ImageCephVolume() string  // Docker image name of ceph-volume
}

type ScalingGroupSelection

type ScalingGroupSelection uint

ScalingGroupSelection is a number indicating which scaling group (1...) to include in the deployment operation. Value 0 means include all.

func (ScalingGroupSelection) IncludeAll

func (sgs ScalingGroupSelection) IncludeAll() bool

IncludeAll returns true if the given selection is empty, false otherwise.

func (ScalingGroupSelection) Includes

func (sgs ScalingGroupSelection) Includes(scalingGroup uint) bool

Includes returns true if the given scaling is included in the given selection, or false otherwise. If the selection is empty, this will always return true.

type TaskGroupSelection

type TaskGroupSelection []jobs.TaskGroupName

TaskGroupSelection is a list of groups to include in the deployment. If empty, all groups are included.

func (TaskGroupSelection) IncludeAll

func (tgs TaskGroupSelection) IncludeAll() bool

IncludeAll returns true if the given selection is empty, false otherwise.

func (TaskGroupSelection) Includes

func (tgs TaskGroupSelection) Includes(name jobs.TaskGroupName) bool

Includes returns true if the given name is included in the given selection, or false otherwise. If the selection is empty, this will always return true.

Jump to

Keyboard shortcuts

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