deploy

package
v1.33.3 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: Apache-2.0 Imports: 65 Imported by: 0

Documentation

Overview

Package deploy holds the structures to deploy a workload.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildContainerImages added in v1.30.0

func BuildContainerImages(in *ImageActionInput, out *UploadArtifactsOutput) error

BuildContainerImages builds the all the images given the build arguments

func NewBackendDeployer

func NewBackendDeployer(in *WorkloadDeployerInput) (*backendSvcDeployer, error)

NewBackendDeployer is the constructor for backendSvcDeployer.

func NewEnvDeployer added in v1.20.0

func NewEnvDeployer(in *NewEnvDeployerInput) (*envDeployer, error)

NewEnvDeployer constructs an environment deployer.

func NewJobDeployer

func NewJobDeployer(in *WorkloadDeployerInput) (*jobDeployer, error)

NewJobDeployer is the constructor for jobDeployer.

func NewLBWSDeployer added in v1.20.0

func NewLBWSDeployer(in *WorkloadDeployerInput) (*lbWebSvcDeployer, error)

NewLBWSDeployer is the constructor for lbWebSvcDeployer.

func NewRDWSDeployer

func NewRDWSDeployer(in *WorkloadDeployerInput) (*rdwsDeployer, error)

NewRDWSDeployer is the constructor for RDWSDeployer.

func NewStaticSiteDeployer added in v1.27.0

func NewStaticSiteDeployer(in *WorkloadDeployerInput) (*staticSiteDeployer, error)

NewStaticSiteDeployer is the constructor for staticSiteDeployer.

func NewWorkerSvcDeployer

func NewWorkerSvcDeployer(in *WorkloadDeployerInput) (*workerSvcDeployer, error)

NewWorkerSvcDeployer is the constructor for workerSvcDeployer.

func RepoName added in v1.29.0

func RepoName(app, workload string) string

RepoName returns the name of a Copilot-managed ECR repository given an application and workload.

Types

type ActionRecommender

type ActionRecommender interface {
	RecommendedActions() []string
}

ActionRecommender contains methods that output action recommendation.

type ContainerImageIdentifier added in v1.27.0

type ContainerImageIdentifier struct {
	Digest            string
	CustomTag         string
	GitShortCommitTag string
	RepoTags          []string
}

ContainerImageIdentifier is the configuration of the image digest and tags of an ECR image.

func (ContainerImageIdentifier) Tag added in v1.27.0

func (img ContainerImageIdentifier) Tag() string

Tag returns the tag that should be used to reference the image. If the user provided their own tag then just use that Otherwise, return git short commit id.

type DeployEnvironmentInput added in v1.19.0

type DeployEnvironmentInput struct {
	RootUserARN         string
	AddonsURL           string
	CustomResourcesURLs map[string]string
	Manifest            *manifest.Environment
	ForceNewUpdate      bool
	RawManifest         string
	PermissionsBoundary string
	DisableRollback     bool
	Version             string
	Detach              bool
}

DeployEnvironmentInput contains information used to deploy the environment.

type DeployWorkloadInput

type DeployWorkloadInput struct {
	StackRuntimeConfiguration
	Options
}

DeployWorkloadInput is the input of DeployWorkload.

type GenerateCloudFormationTemplateInput added in v1.16.0

type GenerateCloudFormationTemplateInput struct {
	StackRuntimeConfiguration
}

GenerateCloudFormationTemplateInput is the input of GenerateCloudFormationTemplate.

type GenerateCloudFormationTemplateOutput added in v1.16.0

type GenerateCloudFormationTemplateOutput struct {
	Template   string
	Parameters string
}

GenerateCloudFormationTemplateOutput is the output of GenerateCloudFormationTemplate.

type ImageActionInput added in v1.30.0

type ImageActionInput struct {
	Name              string
	WorkspacePath     string
	Image             ContainerImageIdentifier
	Builder           repositoryService
	CustomTag         string
	GitShortCommitTag string
	Mft               interface{}

	Login              func() (string, error)
	CheckDockerEngine  func() error
	LabeledTermPrinter func(fw syncbuffer.FileWriter, bufs []*syncbuffer.LabeledSyncBuffer, opts ...syncbuffer.LabeledTermPrinterOption) LabeledTermPrinter
}

ImageActionInput represent the input parameters for building and uploading container images.

type ImagePerContainer added in v1.30.0

type ImagePerContainer struct {
	ContainerName string
	ImageURI      string
}

ImagePerContainer contains the contains name and its ImageURI

type LabeledTermPrinter added in v1.30.0

type LabeledTermPrinter interface {
	IsDone() bool
	Print()
}

LabeledTermPrinter is an interface for printing and managing labeled log outputs.

type NewEnvDeployerInput added in v1.20.0

type NewEnvDeployerInput struct {
	App             *config.Application
	Env             *config.Environment
	SessionProvider *sessions.Provider
	ConfigStore     describe.ConfigStoreSvc
	Workspace       WorkspaceAddonsReaderPathGetter
	Overrider       Overrider
}

NewEnvDeployerInput contains information needed to construct an environment deployer.

type Options added in v1.16.0

type Options struct {
	ForceNewUpdate  bool
	DisableRollback bool
	Detach          bool
}

Options specifies options for the deployment.

type Overrider added in v1.26.0

type Overrider interface {
	Override(body []byte) (out []byte, err error)
}

An Overrider transforms the content in body to out.

func NewOverrider added in v1.26.0

func NewOverrider(pathToOverridesDir, app, env string, fs afero.Fs, sess UserAgentAdder) (Overrider, error)

NewOverrider looks up if a CDK or YAMLPatch Overrider exists at pathsToOverriderDir and initializes the respective Overrider. If the directory is empty, then returns a noop Overrider.

type StackRuntimeConfiguration added in v1.16.0

type StackRuntimeConfiguration struct {
	ImageDigests              map[string]ContainerImageIdentifier // Container name to image.
	EnvFileARNs               map[string]string
	AddonsURL                 string
	RootUserARN               string
	Tags                      map[string]string
	CustomResourceURLs        map[string]string
	StaticSiteAssetMappingURL string
	Version                   string
}

StackRuntimeConfiguration contains runtime configuration for a workload CloudFormation stack.

type UploadArtifactsOutput

type UploadArtifactsOutput struct {
	ImageDigests                   map[string]ContainerImageIdentifier // Container name to image.
	EnvFileARNs                    map[string]string                   // map[container name]envFileARN
	AddonsURL                      string
	CustomResourceURLs             map[string]string
	StaticSiteAssetMappingLocation string
}

UploadArtifactsOutput is the output of UploadArtifacts.

type UploadEnvArtifactsOutput added in v1.25.0

type UploadEnvArtifactsOutput struct {
	AddonsURL          string
	CustomResourceURLs map[string]string
}

UploadEnvArtifactsOutput holds URLs of artifacts pushed to S3 buckets.

type UserAgentAdder added in v1.26.0

type UserAgentAdder interface {
	UserAgentExtras(extras ...string)
}

UserAgentAdder is the interface that adds values to the User-Agent HTTP request header.

type WorkloadDeployerInput

type WorkloadDeployerInput struct {
	SessionProvider  *sessions.Provider
	Name             string
	App              *config.Application
	Env              *config.Environment
	Image            ContainerImageIdentifier
	Mft              interface{} // Interpolated, applied, and unmarshaled manifest.
	RawMft           string      // With env var interpolation only.
	EnvVersionGetter versionGetter
	Overrider        Overrider
	// contains filtered or unexported fields
}

WorkloadDeployerInput is the input to for workloadDeployer constructor.

type WorkspaceAddonsReaderPathGetter added in v1.25.0

type WorkspaceAddonsReaderPathGetter interface {
	addon.WorkspaceAddonsReader
	Path() string
}

WorkspaceAddonsReaderPathGetter reads addons from a workspace and the path of a workspace.

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.
mocks
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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