deploy

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2019 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// RedeployMetaKey ...
	RedeployMetaKey = "nomadctl_redeploy"
)

Variables

This section is empty.

Functions

func ReDeploy

func ReDeploy(i *RedeploymentInput) (bool, error)

ReDeploy redeploys an existing remote job

Types

type Deployment

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

Deployment is the internal representation of a Nomadctl deployment

func NewDeployment

func NewDeployment(i *NewDeploymentInput) (d *Deployment, err error)

NewDeployment generates a new deployment

func (*Deployment) Deploy

func (d *Deployment) Deploy() (success bool, err error)

Deploy performs a deployment

func (*Deployment) Plan

func (d *Deployment) Plan(quiet, verbose, diff, noColor bool) (bool, error)

Plan executes a Nomad plan, writes the output to standard out, and returns whether any allocations will be created/destroyed

type NewDeploymentInput

type NewDeploymentInput struct {
	Job              *api.Job // the Nomad Job to deploy
	Jobspec          *[]byte  // the nomad job spec to be converted to a Nomad Job
	EnforceIndex     bool     // job will only be registered if JobModifyIndex matches the current job's index
	JobModifyIndex   uint64   // index to enforce job state
	UseTemplateCount bool     // whether the job will get its group counts from template rather than remote job
	AutoPromote      bool     // whether a canary job should be automatically promoted
	Verbose          bool     // whether long UUIDs should be logged
}

NewDeploymentInput represents the input for a new deployment

type RedeploymentInput

type RedeploymentInput struct {
	JobName        string
	TaskGroupNames []string
	AutoPromote    bool
	Verbose        bool
}

RedeploymentInput represents the input for a redeployment

Jump to

Keyboard shortcuts

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