Documentation ¶
Overview ¶
Package deploy contains information about all of the deployed instances, and how they are organized across accounts, apps, regions, clusters, and autoscaling groups.
Index ¶
- type ASG
- func (a *ASG) AccountName() string
- func (a *ASG) AppName() string
- func (a *ASG) CloudProvider() string
- func (a *ASG) ClusterName() string
- func (a *ASG) DetailName() string
- func (a *ASG) Empty() bool
- func (a *ASG) Instances() []*Instance
- func (a *ASG) Name() string
- func (a *ASG) RegionName() string
- func (a *ASG) StackName() string
- type ASGName
- type Account
- type AccountInfo
- type AccountName
- type App
- type AppMap
- type Cluster
- type ClusterMap
- type ClusterName
- type Deployment
- type Instance
- func (i *Instance) ASGName() string
- func (i *Instance) AccountName() string
- func (i *Instance) AppName() string
- func (i *Instance) CloudProvider() string
- func (i *Instance) ClusterName() string
- func (i *Instance) ID() string
- func (i *Instance) RegionName() string
- func (i *Instance) StackName() string
- func (i *Instance) String() string
- type InstanceID
- type RegionName
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ASG ¶
type ASG struct {
// contains filtered or unexported fields
}
ASG identifies an autoscaling group in the deployment
func (*ASG) AccountName ¶
AccountName returns the name of the AWS account associated with the ASG
func (*ASG) CloudProvider ¶
CloudProvider returns the cloud provider (e.g., "aws")
func (*ASG) ClusterName ¶
ClusterName returns the name of the cluster associated with the ASG
func (*ASG) DetailName ¶
DetailName returns the name of the detail field associated with the ASG
func (*ASG) RegionName ¶
RegionName returns the name of the region associated with the ASG
type Account ¶
type Account struct {
// contains filtered or unexported fields
}
Account represents the set of clusters associated with an App that reside in one AWS account (e.g., "prod", "test").
func (*Account) CloudProvider ¶
CloudProvider returns the cloud provider (e.g., "aws")
func (*Account) RegionNames ¶
RegionNames returns the name of the regions that clusters in this account are running in
func (*Account) StackNames ¶
StackNames returns the names of the stacks associated with this account
type AccountInfo ¶
type AccountInfo struct { CloudProvider string Clusters ClusterMap }
AccountInfo tracks the provider and the clusters
type App ¶
type App struct {
// contains filtered or unexported fields
}
App represents an application
func (*App) EligibleInstanceGroups ¶
func (app *App) EligibleInstanceGroups(cfg chaosmonkey.AppConfig) []grp.InstanceGroup
EligibleInstanceGroups returns a slice of InstanceGroups that represent groups of instances that are eligible for termination.
Note that this code does not check for violations of mininum time between terminations. Chaos Monkey checks that precondition immediately before termination, not when considering groups of eligible instances.
The way instances are divided into group will depend on
- the grouping configuration for the app (cluster, stack, app)
- whether regions are independent
The returned InstanceGroups are guaranteed to contain at least one instance each
Preconditions:
- app is enabled for Chaos Monkey
type Cluster ¶
type Cluster struct {
// contains filtered or unexported fields
}
Cluster represents what Spinnaker refers to as a "cluster", which contains app-stack-detail. Every ASG is associated with exactly one cluster. Note that clusters can span regions
func (*Cluster) AccountName ¶
AccountName returns the name of the account associated with this cluster
func (*Cluster) CloudProvider ¶
CloudProvider returns the cloud provider (e.g., "aws")
func (*Cluster) RegionNames ¶
RegionNames returns the name of the region that this cluster runs in
type ClusterMap ¶
type ClusterMap map[ClusterName]map[RegionName]map[ASGName][]InstanceID
ClusterMap maps cluster name to information about instances by region and ASG
type Deployment ¶
type Deployment interface { // Apps sends App objects over a channel Apps(c chan<- *App, appNames []string) // GetApp retrieves a single App GetApp(name string) (*App, error) // AppNames returns the names of all apps AppNames() ([]string, error) }
Deployment contains information about how apps are deployed
type Instance ¶
type Instance struct {
// contains filtered or unexported fields
}
Instance implements instance.Instance
func (*Instance) AccountName ¶
AccountName returns the name of the AWS account associated with the instance
func (*Instance) CloudProvider ¶
CloudProvider returns the cloud provider (e.g., "aws")
func (*Instance) ClusterName ¶
ClusterName returns the name of the cluster associated with the instance
func (*Instance) RegionName ¶
RegionName returns the name of the region associated with the instance
type InstanceID ¶
type InstanceID string
InstanceID is the i-xxxxxx name of an AWS instance or uuid of a container