Documentation ¶
Index ¶
- Constants
- func CreateStackName(stackType StackType, names ...string) string
- func GetVersion() string
- func SetVersion(v string)
- func SetupLogging(verbosity int)
- type ClusterInstanceLister
- type ClusterManager
- type Config
- type Context
- type DockerImageBuilder
- type DockerImagePusher
- type DockerManager
- type Environment
- type ImageFinder
- 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" StackTypeCluster = "cluster" StackTypeRepo = "repo" StackTypeService = "service" StackTypePipeline = "pipeline" )
List of valid stack types
Variables ¶
This section is empty.
Functions ¶
func CreateStackName ¶
CreateStackName will create a name for a stack
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 { Basedir string Region string Environments []Environment Service Service }
Config defines the structure of the yml file for the mu config
type Context ¶
type Context struct { Config Config Repo struct { Name string Revision string } StackManager StackManager ClusterManager ClusterManager DockerManager DockerManager }
Context defines the context object passed around
func (*Context) Initialize ¶
Initialize loads config object
func (*Context) InitializeFromFile ¶ added in v0.1.3
InitializeFromFile 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 Environment ¶
type Environment struct { Name string Loadbalancer struct { Hostname string } Cluster struct { ImageID string `yaml:"imageId"` InstanceTenancy string `yaml:"instanceTenancy"` DesiredCapacity int `yaml:"desiredCapacity"` MaxSize int `yaml:"maxSize"` KeyName string `yaml:"keyName"` SSHAllow string `yaml:"sshAllow"` ScaleOutThreshold int `yaml:"scaleOutThreshold"` ScaleInThreshold int `yaml:"scaleInThreshold"` } VpcTarget struct { VpcID string `yaml:"vpcId"` PublicSubnetIds []string `yaml:"publicSubnetIds"` } `yaml:"vpcTarget,omitempty"` }
Environment defines the structure of the yml file for an environment
type ImageFinder ¶
ImageFinder for finding latest image
type RepositoryAuthenticator ¶ added in v0.1.3
RepositoryAuthenticator auths for a repo
type Service ¶
type Service struct { Name string `yaml:"name"` DesiredCount int `yaml:"desiredCount"` Dockerfile string `yaml:"dockerfile"` ImageRepository string `yaml:"imageRepository"` Port int `yaml:"port"` HealthEndpoint string `yaml:"healthEndpoint"` CPU int `yaml:"cpu"` Memory int `yaml:"memory"` PathPatterns []string `yaml:"pathPatterns"` Pipeline struct { } }
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