Documentation ¶
Index ¶
- Constants
- func CreateStackName(stackType StackType, names ...string) string
- func GetStackOverrides(stackName string) interface{}
- func GetVersion() string
- func MapApply(dest, src interface{})
- func SetVersion(v string)
- func SetupLogging(verbosity int)
- type ClusterInstanceLister
- type ClusterManager
- type Config
- type Context
- type DockerImageBuilder
- type DockerImagePusher
- type DockerManager
- type ElbManager
- type ElbRuleLister
- type Environment
- type ImageFinder
- type Pipeline
- type PipelineManager
- type PipelineStateLister
- type RepositoryAuthenticator
- type Service
- type Stack
- type StackDeleter
- type StackGetter
- type StackLister
- type StackManager
- type StackType
- type StackUpserter
- type StackWaiter
Constants ¶
const ( StackTypeVpc StackType = "vpc" StackTypeTarget = "target" StackTypeCluster = "cluster" StackTypeRepo = "repo" StackTypeService = "service" StackTypePipeline = "pipeline" StackTypeBucket = "bucket" )
List of valid stack types
Variables ¶
This section is empty.
Functions ¶
func CreateStackName ¶
CreateStackName will create a name for a stack
func GetStackOverrides ¶ added in v0.1.8
func GetStackOverrides(stackName string) interface{}
GetStackOverrides will get the overrides from the config
func MapApply ¶ added in v0.1.8
func MapApply(dest, src interface{})
MapApply recursively applies map values from source to destination
func SetVersion ¶ added in v0.1.3
func SetVersion(v string)
SetVersion returns the current version of the app
func SetupLogging ¶
func SetupLogging(verbosity int)
SetupLogging - verbosity 0=error, 1=info, 2=debug
Types ¶
type ClusterInstanceLister ¶
type ClusterInstanceLister interface {
ListInstances(clusterName string) ([]*ecs.ContainerInstance, error)
}
ClusterInstanceLister for getting cluster instances
type ClusterManager ¶
type ClusterManager interface { ClusterInstanceLister RepositoryAuthenticator }
ClusterManager composite of all cluster capabilities
type Config ¶
type Config struct { Environments []Environment `yaml:"environments,omitempty"` Service Service `yaml:"service,omitempty"` Basedir string `yaml:"-"` Repo struct { Name string Slug string Revision string } `yaml:"-"` Templates map[string]interface{} `yaml:"templates,omitempty"` }
Config defines the structure of the yml file for the mu config
type Context ¶
type Context struct { Config Config StackManager StackManager ClusterManager ClusterManager ElbManager ElbManager PipelineManager PipelineManager DockerManager DockerManager DockerOut io.Writer }
Context defines the context object passed around
func (*Context) InitializeConfig ¶ added in v0.1.7
InitializeConfig loads config object
func (*Context) InitializeConfigFromFile ¶ added in v0.1.7
InitializeConfigFromFile loads config from file
type DockerImageBuilder ¶ added in v0.1.3
type DockerImageBuilder interface {
ImageBuild(contextDir string, relDockerfile string, tags []string, dockerOut io.Writer) error
}
DockerImageBuilder for creating docker images
type DockerImagePusher ¶ added in v0.1.3
type DockerImagePusher interface {
ImagePush(image string, registryAuth string, dockerOut io.Writer) error
}
DockerImagePusher for pushing docker images
type DockerManager ¶ added in v0.1.3
type DockerManager interface { DockerImageBuilder DockerImagePusher }
DockerManager composite of all cluster capabilities
type ElbManager ¶ added in v0.1.7
type ElbManager interface { ElbRuleLister }
ElbManager composite of all cluster capabilities
type ElbRuleLister ¶ added in v0.1.7
ElbRuleLister for getting cluster instances
type Environment ¶
type Environment struct { Name string `yaml:"name,omitempty"` Loadbalancer struct { HostedZone string `yaml:"hostedzone,omitempty"` Name string `yaml:"name,omitempty"` Certificate string `yaml:"certificate,omitempty"` Internal bool `yaml:"internal,omitempty"` } `yaml:"loadbalancer,omitempty"` Cluster struct { InstanceType string `yaml:"instanceType,omitempty"` ImageID string `yaml:"imageId,omitempty"` InstanceTenancy string `yaml:"instanceTenancy,omitempty"` DesiredCapacity int `yaml:"desiredCapacity,omitempty"` MaxSize int `yaml:"maxSize,omitempty"` KeyName string `yaml:"keyName,omitempty"` SSHAllow string `yaml:"sshAllow,omitempty"` ScaleOutThreshold int `yaml:"scaleOutThreshold,omitempty"` ScaleInThreshold int `yaml:"scaleInThreshold,omitempty"` HTTPProxy string `yaml:"httpProxy,omitempty"` } `yaml:"cluster,omitempty"` VpcTarget struct { VpcID string `yaml:"vpcId,omitempty"` EcsSubnetIds []string `yaml:"ecsSubnetIds,omitempty"` ElbSubnetIds []string `yaml:"elbSubnetIds,omitempty"` } `yaml:"vpcTarget,omitempty"` }
Environment defines the structure of the yml file for an environment
type ImageFinder ¶
ImageFinder for finding latest image
type Pipeline ¶ added in v0.1.5
type Pipeline struct { Source struct { Repo string `yaml:"repo,omitempty"` Branch string `yaml:"branch,omitempty"` } `yaml:"source,omitempty"` Build struct { Type string `yaml:"type,omitempty"` ComputeType string `yaml:"computeType,omitempty"` Image string `yaml:"image,omitempty"` } `yaml:"build,omitempty"` Acceptance struct { Environment string `yaml:"environment,omitempty"` Type string `yaml:"type,omitempty"` ComputeType string `yaml:"computeType,omitempty"` Image string `yaml:"image,omitempty"` } `yaml:"acceptance,omitempty"` Production struct { Environment string `yaml:"environment,omitempty"` } `yaml:"production,omitempty"` MuBaseurl string `yaml:"muBaseurl,omitempty"` MuVersion string `yaml:"muVersion,omitempty"` }
Pipeline definition
type PipelineManager ¶ added in v0.1.5
type PipelineManager interface { PipelineStateLister }
PipelineManager composite of all cluster capabilities
type PipelineStateLister ¶ added in v0.1.5
type PipelineStateLister interface {
ListState(pipelineName string) ([]*codepipeline.StageState, error)
}
PipelineStateLister for getting cluster instances
type RepositoryAuthenticator ¶ added in v0.1.3
RepositoryAuthenticator auths for a repo
type Service ¶
type Service struct { Name string `yaml:"name,omitempty"` DesiredCount int `yaml:"desiredCount,omitempty"` Dockerfile string `yaml:"dockerfile,omitempty"` ImageRepository string `yaml:"imageRepository,omitempty"` Port int `yaml:"port,omitempty"` HealthEndpoint string `yaml:"healthEndpoint,omitempty"` CPU int `yaml:"cpu,omitempty"` Memory int `yaml:"memory,omitempty"` Environment map[string]interface{} `yaml:"environment,omitempty"` PathPatterns []string `yaml:"pathPatterns,omitempty"` Priority int `yaml:"priority,omitempty"` Pipeline Pipeline `yaml:"pipeline,omitempty"` }
Service defines the structure of the yml file for a service
type Stack ¶
type Stack struct { ID string Name string Status string StatusReason string LastUpdateTime time.Time Tags map[string]string Outputs map[string]string Parameters map[string]string }
Stack summary
type StackDeleter ¶
StackDeleter for deleting stacks
type StackGetter ¶
StackGetter for getting stacks
type StackLister ¶
StackLister for listing stacks
type StackManager ¶
type StackManager interface { StackUpserter StackWaiter StackLister StackGetter StackDeleter ImageFinder }
StackManager composite of all stack capabilities
type StackUpserter ¶
type StackUpserter interface {
UpsertStack(stackName string, templateBodyReader io.Reader, parameters map[string]string, tags map[string]string) error
}
StackUpserter for applying changes to a stack
type StackWaiter ¶
StackWaiter for waiting on stack status to be final