Documentation
¶
Index ¶
- Variables
- type ALBConfig
- type Config
- type ContainerConfig
- type Deployment
- func (*Deployment) Descriptor() ([]byte, []int)deprecated
- func (x *Deployment) GetCluster() string
- func (x *Deployment) GetLoadBalancerArn() string
- func (x *Deployment) GetServiceArn() string
- func (x *Deployment) GetTargetGroupArn() string
- func (x *Deployment) GetTaskArn() string
- func (x *Deployment) GetUrl() string
- func (*Deployment) ProtoMessage()
- func (x *Deployment) ProtoReflect() protoreflect.Message
- func (x *Deployment) Reset()
- func (x *Deployment) String() string
- type HealthCheckConfig
- type Lifecycle
- type LifecycleStatus
- type Logging
- type Platform
- func (p *Platform) Auth() error
- func (p *Platform) AuthFunc() interface{}
- func (p *Platform) Config() (interface{}, error)
- func (p *Platform) DefaultReleaserFunc() interface{}
- func (p *Platform) Deploy(ctx context.Context, log hclog.Logger, src *component.Source, ...) (*Deployment, error)
- func (p *Platform) DeployFunc() interface{}
- func (p *Platform) Destroy(ctx context.Context, log hclog.Logger, deployment *Deployment, ui terminal.UI) error
- func (p *Platform) DestroyFunc() interface{}
- func (p *Platform) Documentation() (*docs.Documentation, error)
- func (p *Platform) Launch(ctx context.Context, s LifecycleStatus, L hclog.Logger, ui terminal.UI, ...) (*Deployment, error)
- func (p *Platform) SetupCluster(ctx context.Context, s LifecycleStatus, sess *session.Session) (string, error)
- func (p *Platform) SetupExecutionRole(ctx context.Context, s LifecycleStatus, L hclog.Logger, sess *session.Session, ...) (string, error)
- func (p *Platform) SetupLogs(ctx context.Context, s LifecycleStatus, L hclog.Logger, sess *session.Session) (string, error)
- func (p *Platform) SetupTaskRole(ctx context.Context, s LifecycleStatus, L hclog.Logger, sess *session.Session, ...) (string, error)
- func (p *Platform) ValidateAuth() error
- func (p *Platform) ValidateAuthFunc() interface{}
- type Release
- func (*Release) Descriptor() ([]byte, []int)deprecated
- func (x *Release) GetLoadBalancerArn() string
- func (x *Release) GetUrl() string
- func (*Release) ProtoMessage()
- func (x *Release) ProtoReflect() protoreflect.Message
- func (x *Release) Reset()
- func (x *Release) String() string
- func (r *Release) URL() string
- type Releaser
- type ReleaserConfig
Constants ¶
This section is empty.
Variables ¶
var File_waypoint_builtin_aws_ecs_plugin_proto protoreflect.FileDescriptor
var Options = []sdk.Option{
sdk.WithComponents(&Platform{}),
}
Options are the SDK options to use for instantiation.
Functions ¶
This section is empty.
Types ¶
type ALBConfig ¶
type ALBConfig struct {
// Certificate ARN to attach to the load balancer
CertificateId string `hcl:"certificate"`
// Route53 Zone to setup record in
ZoneId string `hcl:"zone_id"`
// Fully qualified domain name of the record to create in the target zone id
FQDN string `hcl:"domain_name"`
// When set, waypoint will configure the target group into the specified
// ALB Listener ARN. This allows for usage of existing ALBs.
ListenerARN string `hcl:"listener_arn,optional"`
}
type Config ¶
type Config struct {
// AWS Region to deploy into
Region string `hcl:"region"`
// Name of the Log Group to store logs into
LogGroup string `hcl:"log_group,optional"`
// Name of the ECS cluster to install the service into
Cluster string `hcl:"cluster,optional"`
// Name of the execution task IAM Role to associate with the ECS Service
ExecutionRoleName string `hcl:"execution_role_name,optional"`
// Name of the task IAM role to associate with the ECS service
TaskRoleName string `hcl:"task_role_name,optional"`
// Subnets to place the service into. Defaults to the subnets in the default VPC.
Subnets []string `hcl:"subnets,optional"`
// How many tasks of the service to run. Default 1.
Count int `hcl:"count,optional"`
// How much memory to assign to the containers
Memory int `hcl:"memory"`
// How much CPU to assign to the containers
CPU int `hcl:"cpu,optional"`
// The environment variables to pass to the main container
Environment map[string]string `hcl:"static_environment,optional"`
// The secrets to pass to to the main container
Secrets map[string]string `hcl:"secrets,optional"`
// Port that your service is running on within the actual container.
// Defaults to port 3000.
ServicePort int64 `hcl:"service_port,optional"`
// Indicate that service should be deployed on an EC2 cluster.
EC2Cluster bool `hcl:"ec2_cluster,optional"`
// If set to true, do not create a load balancer assigned to the service
DisableALB bool `hcl:"disable_alb,optional"`
// Configuration options for how the ALB will be configured.
ALB *ALBConfig `hcl:"alb,block"`
// Configuration options for additional containers
ContainersConfig []*ContainerConfig `hcl:"sidecar,block"`
Logging *Logging `hcl:"logging,block"`
}
type ContainerConfig ¶ added in v0.1.3
type ContainerConfig struct {
// The name of a container
Name string `hcl:"name"`
// The image used to start a container
Image string `hcl:"image"`
// The amount (in MiB) of memory to present to the container
Memory string `hcl:"memory,optional"`
// The soft limit (in MiB) of memory to reserve for the container
MemoryReservation string `hcl:"memory_reservation,optional"`
// The port number on the container
ContainerPort int64 `hcl:"container_port,optional"`
// The port number on the container instance to reserve for your container
HostPort int64 `hcl:"host_port,optional"`
// The protocol used for the port mapping
Protocol string `hcl:"protocol,optional"`
// The container health check command
HealthCheck *HealthCheckConfig `hcl:"health_check,block"`
// The environment variables to pass to a container
Environment map[string]string `hcl:"static_environment,optional"`
// The secrets to pass to a container
Secrets map[string]string `hcl:"secrets,optional"`
}
type Deployment ¶
type Deployment struct {
Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"`
TaskArn string `protobuf:"bytes,2,opt,name=task_arn,json=taskArn,proto3" json:"task_arn,omitempty"`
ServiceArn string `protobuf:"bytes,3,opt,name=service_arn,json=serviceArn,proto3" json:"service_arn,omitempty"`
TargetGroupArn string `protobuf:"bytes,4,opt,name=target_group_arn,json=targetGroupArn,proto3" json:"target_group_arn,omitempty"`
LoadBalancerArn string `protobuf:"bytes,5,opt,name=load_balancer_arn,json=loadBalancerArn,proto3" json:"load_balancer_arn,omitempty"`
Cluster string `protobuf:"bytes,6,opt,name=cluster,proto3" json:"cluster,omitempty"`
// contains filtered or unexported fields
}
func (*Deployment) Descriptor
deprecated
func (*Deployment) Descriptor() ([]byte, []int)
Deprecated: Use Deployment.ProtoReflect.Descriptor instead.
func (*Deployment) GetCluster ¶
func (x *Deployment) GetCluster() string
func (*Deployment) GetLoadBalancerArn ¶
func (x *Deployment) GetLoadBalancerArn() string
func (*Deployment) GetServiceArn ¶
func (x *Deployment) GetServiceArn() string
func (*Deployment) GetTargetGroupArn ¶
func (x *Deployment) GetTargetGroupArn() string
func (*Deployment) GetTaskArn ¶
func (x *Deployment) GetTaskArn() string
func (*Deployment) ProtoMessage ¶
func (*Deployment) ProtoMessage()
func (*Deployment) ProtoReflect ¶
func (x *Deployment) ProtoReflect() protoreflect.Message
type HealthCheckConfig ¶ added in v0.1.3
type HealthCheckConfig struct {
// A string array representing the command that the container runs to determine if it is healthy
Command []string `hcl:"command"`
// The time period in seconds between each health check execution
Interval int64 `hcl:"interval,optional"`
// The time period in seconds to wait for a health check to succeed before it is considered a failure
Timeout int64 `hcl:"timeout,optional"`
// The number of times to retry a failed health check before the container is considered unhealthy
Retries int64 `hcl:"retries,optional"`
// The optional grace period within which to provide containers time to bootstrap before failed health checks count towards the maximum number of retries
StartPeriod int64 `hcl:"start_period,optional"`
}
type Lifecycle ¶
type Lifecycle struct {
Init func(LifecycleStatus) error
Run func(LifecycleStatus) error
Cleanup func(LifecycleStatus) error
}
type LifecycleStatus ¶
type LifecycleStatus interface {
Status(str string, args ...interface{})
Update(str string, args ...interface{})
Error(str string, args ...interface{})
}
type Logging ¶ added in v0.2.2
type Logging struct {
CreateGroup bool `hcl:"create_group,optional"`
StreamPrefix string `hcl:"stream_prefix,optional"`
DateTimeFormat string `hcl:"datetime_format,optional"`
MultilinePattern string `hcl:"multiline_pattern,optional"`
Mode string `hcl:"mode,optional"`
MaxBufferSize string `hcl:"max_buffer_size,optional"`
}
type Platform ¶
type Platform struct {
// contains filtered or unexported fields
}
func (*Platform) AuthFunc ¶
func (p *Platform) AuthFunc() interface{}
AuthFunc implements component.Authenticator
func (*Platform) Config ¶
func (p *Platform) Config() (interface{}, error)
Config implements Configurable
func (*Platform) DefaultReleaserFunc ¶
func (p *Platform) DefaultReleaserFunc() interface{}
DefaultReleaserFunc implements component.PlatformReleaser
func (*Platform) Deploy ¶
func (p *Platform) Deploy(
ctx context.Context,
log hclog.Logger,
src *component.Source,
img *docker.Image,
deployConfig *component.DeploymentConfig,
ui terminal.UI,
) (*Deployment, error)
func (*Platform) DeployFunc ¶
func (p *Platform) DeployFunc() interface{}
DeployFunc implements component.Platform
func (*Platform) Destroy ¶
func (p *Platform) Destroy(
ctx context.Context,
log hclog.Logger,
deployment *Deployment,
ui terminal.UI,
) error
func (*Platform) DestroyFunc ¶
func (p *Platform) DestroyFunc() interface{}
DestroyFunc implements component.Destroyer
func (*Platform) Documentation ¶
func (p *Platform) Documentation() (*docs.Documentation, error)
func (*Platform) Launch ¶
func (p *Platform) Launch(
ctx context.Context,
s LifecycleStatus,
L hclog.Logger,
ui terminal.UI,
sess *session.Session,
app *component.Source,
img *docker.Image,
deployConfig *component.DeploymentConfig,
executionRoleArn, taskRoleArn, clusterName, logGroup string,
) (*Deployment, error)
func (*Platform) SetupCluster ¶
func (p *Platform) SetupCluster(ctx context.Context, s LifecycleStatus, sess *session.Session) (string, error)
func (*Platform) SetupExecutionRole ¶ added in v0.1.5
func (p *Platform) SetupExecutionRole(ctx context.Context, s LifecycleStatus, L hclog.Logger, sess *session.Session, app *component.Source) (string, error)
func (*Platform) SetupLogs ¶
func (p *Platform) SetupLogs(ctx context.Context, s LifecycleStatus, L hclog.Logger, sess *session.Session) (string, error)
func (*Platform) SetupTaskRole ¶ added in v0.1.5
func (p *Platform) SetupTaskRole(ctx context.Context, s LifecycleStatus, L hclog.Logger, sess *session.Session, app *component.Source) (string, error)
func (*Platform) ValidateAuth ¶
func (p *Platform) ValidateAuth() error
func (*Platform) ValidateAuthFunc ¶
func (p *Platform) ValidateAuthFunc() interface{}
ValidateAuthFunc implements component.Authenticator
type Release ¶
type Release struct {
Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"`
LoadBalancerArn string `protobuf:"bytes,2,opt,name=load_balancer_arn,json=loadBalancerArn,proto3" json:"load_balancer_arn,omitempty"`
// contains filtered or unexported fields
}
func (*Release) Descriptor
deprecated
func (*Release) Descriptor() ([]byte, []int)
Deprecated: Use Release.ProtoReflect.Descriptor instead.
func (*Release) GetLoadBalancerArn ¶
func (x *Release) GetLoadBalancerArn() string
func (*Release) ProtoMessage ¶
func (*Release) ProtoMessage()
func (*Release) ProtoReflect ¶
func (x *Release) ProtoReflect() protoreflect.Message
type Releaser ¶
type Releaser struct {
// contains filtered or unexported fields
}
Releaser is the ReleaseManager implementation for Amazon ECS.
func (*Releaser) Config ¶
func (r *Releaser) Config() (interface{}, error)
Config implements Configurable
func (*Releaser) Documentation ¶
func (r *Releaser) Documentation() (*docs.Documentation, error)
func (*Releaser) Release ¶
func (r *Releaser) Release(
ctx context.Context,
log hclog.Logger,
src *component.Source,
ui terminal.UI,
target *Deployment,
) (*Release, error)
Release updates the load balancer for the ECS deployment
func (*Releaser) ReleaseFunc ¶
func (r *Releaser) ReleaseFunc() interface{}
ReleaseFunc implements component.ReleaseManager
type ReleaserConfig ¶
type ReleaserConfig struct{}
ReleaserConfig is the configuration structure for the Releaser.