workflows

package
v1.5.10 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2018 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Zero                   = 0
	FirstValueIndex        = 0
	PollDelay              = 5
	LineChar               = "-"
	NewLine                = "\n"
	NA                     = "N/A"
	UnknownValue           = "???"
	JSON                   = "json"
	SHELL                  = "shell"
	LastUpdateTime         = "2006-01-02 15:04:05"
	CPU                    = "CPU"
	MEMORY                 = "MEMORY"
	AMI                    = "AMI"
	PrivateIP              = "IP Address"
	AZ                     = "AZ"
	BoolStringFormat       = "%v"
	IntStringFormat        = "%d"
	HeaderValueFormat      = "%s:\t%s\n"
	SvcPipelineFormat      = HeaderValueFormat
	HeadNewlineHeader      = "%s:\n"
	SvcDeploymentsFormat   = HeadNewlineHeader
	SvcContainersFormat    = "\n%s for %s:\n"
	KeyValueFormat         = "%s %s"
	StackFormat            = "%s:\t%s (%s)\n"
	UnmanagedStackFormat   = "%s:\tunmanaged\n"
	BaseURLKey             = "BASE_URL"
	BaseURLValueKey        = "BaseUrl"
	SvcPipelineURLLabel    = "Pipeline URL"
	SvcDeploymentsLabel    = "Deployments"
	SvcContainersLabel     = "Containers"
	BaseURLHeader          = "Base URL"
	EnvTagKey              = "environment"
	SvcTagKey              = "service"
	SvcCodePipelineURLKey  = "CodePipelineUrl"
	SvcVersionKey          = "version"
	SvcCodePipelineNameKey = "PipelineName"
	ECSClusterKey          = "EcsCluster"
	EC2Instance            = "EC2 Instance"
	VPCStack               = "VPC Stack"
	ContainerInstances     = "Container Instances"
	BastionHost            = "Bastion Host"
	BastionHostKey         = "BastionHost"
	ClusterStack           = "Cluster Stack"
	TypeHeader             = "Type"
	ConnectedHeader        = "Connected"
	CPUAvail               = "CPU Avail"
	MEMAvail               = "Mem Avail"
	NumTasks               = "# Tasks"
	SvcImageURLKey         = "ImageUrl"
	SvcStageHeader         = "Stage"
	SvcServiceHeader       = "Service"
	ServicesHeader         = "Services"
	SvcActionHeader        = "Action"
	SvcStatusHeader        = "Status"
	SvcRevisionHeader      = "Revision"
	SvcImageHeader         = "Image"
	EnvironmentHeader      = "Environment"
	SvcStackHeader         = "Stack"
	SvcLastUpdateHeader    = "Last Update"
	SvcCmdTaskExecutingLog = "Creating service executor...\n"
	SvcCmdTaskResultLog    = "Service executor complete with result:\n%s\n"
	SvcCmdTaskErrorLog     = "The following error has occurred executing the command:  '%v'"
	ECSAvailabilityZoneKey = "ecs.availability-zone"
	ECSInstanceTypeKey     = "ecs.instance-type"
	ECSAMIKey              = "ecs.ami-id"
)

Constants to prevent multiple updates when making changes.

View Source
const (
	TestEnv = "fooenv"
	TestSvc = "foosvc"
	TestCmd = "foocmd"
)

Constants used during testing

Variables

View Source
var Bold = color.New(color.Bold).SprintFunc()

Bold is the specifier for bold formatted text values

EnvironmentAMITableHeader is the header for the instance details

EnvironmentShowHeader is the header for the environment table

PipeLineServiceHeader is the header for the pipeline service table

ServiceTableHeader is the header for the service table

SvcEnvironmentTableHeader is the header array for the environment table

SvcPipelineTableHeader is the header array for the pipeline table

View Source
var SvcTaskContainerHeader = []string{"Environment", "Container", "Task", "Instance"}

SvcTaskContainerHeader is the header for container task detail

Functions

func CreateTableSection added in v0.2.1

func CreateTableSection(writer io.Writer, header []string) *tablewriter.Table

CreateTableSection creates the standard output table used

func PipelineParams added in v1.5.2

func PipelineParams(pipelineConfig *common.Pipeline, namespace string, serviceName string, codeBranch string, muFile string, params map[string]string) error

PipelineParams adds params to send to the CFN pipeline template

Types

type CatalogTags added in v1.5.9

type CatalogTags struct {
	Type string `tag:"type"`
}

CatalogTags used to set defaults

type Conditional added in v0.2.1

type Conditional func() bool

Conditional define contract for the conditional predicate

type DatabaseTags added in v1.0.1

type DatabaseTags struct {
	Environment string `tag:"environment"`
	Type        string `tag:"type"`
	Service     string `tag:"service"`
	Revision    string `tag:"revision"`
	Repo        string `tag:"repo"`
}

DatabaseTags used to set defaults

type EnvironmentTags added in v1.0.1

type EnvironmentTags struct {
	Environment string `tag:"environment"`
	Type        string `tag:"type"`
	Provider    string `tag:"provider"`
	Revision    string `tag:"revision"`
	Repo        string `tag:"repo"`
}

EnvironmentTags used to set defaults

type Executor

type Executor func() error

Executor define contract for the steps of a workflow

func DatabaseGetPassword added in v1.0.1

func DatabaseGetPassword(ctx *common.Context, environmentName string, serviceName string) Executor

DatabaseGetPassword gets a database password for an environment

func DatabaseSetPassword added in v1.0.1

func DatabaseSetPassword(ctx *common.Context, environmentName string, serviceName string, newPassword string) Executor

DatabaseSetPassword sets a database password for an environment

func NewCatalogTerminator added in v1.5.9

func NewCatalogTerminator(ctx *common.Context) Executor

NewCatalogTerminator create a new workflow for terminating a catalog

func NewCatalogUpserter added in v1.5.9

func NewCatalogUpserter(ctx *common.Context) Executor

NewCatalogUpserter create a new workflow for upserting a catalog

func NewConfigInitializer added in v0.1.8

func NewConfigInitializer(ctx *common.Context, createEnvironment bool, listenPort int, forceOverwrite bool) Executor

NewConfigInitializer create a new mu.yml file

func NewDatabaseLister added in v0.1.12

func NewDatabaseLister(ctx *common.Context, writer io.Writer) Executor

NewDatabaseLister create a new workflow for listing databases

func NewDatabaseTerminator added in v0.1.12

func NewDatabaseTerminator(ctx *common.Context, serviceName string, environmentName string) Executor

NewDatabaseTerminator create a new workflow for terminating a database in an environment

func NewDatabaseUpserter added in v0.1.12

func NewDatabaseUpserter(ctx *common.Context, environmentName string) Executor

NewDatabaseUpserter create a new workflow for deploying a database in an environment

func NewEnvironmentLister

func NewEnvironmentLister(ctx *common.Context, writer io.Writer) Executor

NewEnvironmentLister create a new workflow for listing environments

func NewEnvironmentLogViewer added in v0.1.10

func NewEnvironmentLogViewer(ctx *common.Context, searchDuration time.Duration, follow bool, environmentName string, writer io.Writer, filter string) Executor

NewEnvironmentLogViewer create a new workflow for following logs environments

func NewEnvironmentViewer

func NewEnvironmentViewer(ctx *common.Context, format string, environmentName string, writer io.Writer) Executor

NewEnvironmentViewer create a new workflow for showing an environment

func NewEnvironmentsTerminator added in v1.5.6

func NewEnvironmentsTerminator(ctx *common.Context, environmentNames []string) Executor

NewEnvironmentsTerminator create a new workflow for terminating an environment

func NewEnvironmentsUpserter added in v1.5.6

func NewEnvironmentsUpserter(ctx *common.Context, environmentNames []string) Executor

NewEnvironmentsUpserter create a new workflow for upserting n environments

func NewPipelineLister added in v0.1.5

func NewPipelineLister(ctx *common.Context, writer io.Writer) Executor

NewPipelineLister create a new workflow for listing environments

func NewPipelineLogViewer added in v0.1.10

func NewPipelineLogViewer(ctx *common.Context, searchDuration time.Duration, follow bool, serviceName string, writer io.Writer, filter string) Executor

NewPipelineLogViewer create a new workflow for following logs for pipelines

func NewPipelineTerminator added in v0.1.5

func NewPipelineTerminator(ctx *common.Context, serviceName string) Executor

NewPipelineTerminator create a new workflow for terminating a pipeline

func NewPipelineUpserter added in v0.1.5

func NewPipelineUpserter(ctx *common.Context, tokenProvider func(bool) string) Executor

NewPipelineUpserter create a new workflow for upserting a pipeline

func NewPurge added in v1.5.6

func NewPurge(ctx *common.Context) Executor

NewPurge create a new workflow for purging mu resources

func NewServiceDeployer added in v0.1.3

func NewServiceDeployer(ctx *common.Context, environmentName string, tag string) Executor

NewServiceDeployer create a new workflow for deploying a service in an environment

func NewServiceExecutor added in v0.1.13

func NewServiceExecutor(ctx *common.Context, task common.Task) Executor

NewServiceExecutor create a new workflow for executing a command in an environment

func NewServiceLogViewer added in v0.1.10

func NewServiceLogViewer(ctx *common.Context, searchDuration time.Duration, follow bool, environmentName string, serviceName string, writer io.Writer, filter string) Executor

NewServiceLogViewer create a new workflow for following logs for services

func NewServicePusher added in v0.1.3

func NewServicePusher(ctx *common.Context, tag string, provider string, kmsKey string, dockerWriter io.Writer) Executor

NewServicePusher create a new workflow for pushing a service to a repo

func NewServiceRestarter added in v1.0.1

func NewServiceRestarter(ctx *common.Context, environmentName string, serviceName string, batchSize int) Executor

NewServiceRestarter create a new workflow for a rolling restart

func NewServiceUndeployer added in v0.1.3

func NewServiceUndeployer(ctx *common.Context, serviceName string, environmentName string) Executor

NewServiceUndeployer create a new workflow for undeploying a service in an environment

func NewServiceViewer added in v0.1.3

func NewServiceViewer(ctx *common.Context, serviceName string, writer io.Writer, showTasks bool) Executor

NewServiceViewer create a new workflow for showing an environment

type PipelineTags added in v1.0.1

type PipelineTags struct {
	Type     string `tag:"type"`
	Service  string `tag:"service"`
	Revision string `tag:"revision"`
	Repo     string `tag:"repo"`
}

PipelineTags used to set defaults

type ScheduleTags added in v1.1.1

type ScheduleTags struct {
	Service     string `tag:"service"`
	Environment string `tag:"environment"`
	Type        string `tag:"type"`
}

ScheduleTags used to set defaults

type ServiceTags added in v1.0.1

type ServiceTags struct {
	Service     string `tag:"service"`
	Environment string `tag:"environment"`
	Type        string `tag:"type"`
	Provider    string `tag:"provider"`
	Revision    string `tag:"revision"`
	Repo        string `tag:"repo"`
}

ServiceTags used to set defaults

type TagInterface added in v1.0.1

type TagInterface interface{}

TagInterface used to conform tag structs

Jump to

Keyboard shortcuts

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