Documentation ¶
Index ¶
- Constants
- Variables
- func BlueGreenStrategy(md *machineDeployment, blueMachines []*machineUpdateEntry) *blueGreen
- func DeployWithConfig(ctx context.Context, appConfig *appconfig.Config, forceYes bool, ...) (err error)
- func New() (cmd *cobra.Command)
- type MachineDeployment
- type MachineDeploymentArgs
- type ProcessGroupsDiff
Constants ¶
Variables ¶
View Source
var ( ErrAborted = errors.New("deployment aborted by user") ErrWaitTimeout = errors.New("wait timeout") ErrCreateGreenMachine = errors.New("failed to create green machines") ErrWaitForStartedState = errors.New("could not get all green machines into started state") ErrWaitForHealthy = errors.New("could not get all green machines to be healthy") ErrMarkReadyForTraffic = errors.New("failed to mark green machines as ready") ErrDestroyBlueMachines = errors.New("failed to destroy previous deployment") ErrValidationError = errors.New("app not in valid state for bluegreen deployments") ErrOrgLimit = errors.New("app can't undergo bluegreen deployment due to org limits") )
View Source
var CommonFlags = flag.Set{ flag.Region(), flag.Image(), flag.Now(), flag.RemoteOnly(false), flag.LocalOnly(), flag.Push(), flag.Detach(), flag.Strategy(), flag.Dockerfile(), flag.Ignorefile(), flag.ImageLabel(), flag.BuildArg(), flag.BuildSecret(), flag.BuildTarget(), flag.NoCache(), flag.Nixpacks(), flag.BuildOnly(), flag.Bool{ Name: "provision-extensions", Description: "Provision any extensions assigned as a default to first deployments", }, flag.StringArray{ Name: "env", Shorthand: "e", Description: "Set of environment variables in the form of NAME=VALUE pairs. Can be specified multiple times.", }, flag.Yes(), flag.String{ Name: "wait-timeout", Description: "Time duration to wait for individual machines to transition states and become healthy.", Default: DefaultWaitTimeout.String(), }, flag.String{ Name: "release-command-timeout", Description: "Time duration to wait for a release command finish running, or 'none' to disable.", Default: DefaultReleaseCommandTimeout.String(), }, flag.String{ Name: "lease-timeout", Description: "Time duration to lease individual machines while running deployment." + " All machines are leased at the beginning and released at the end." + "The lease is refreshed periodically for this same time, which is why it is short." + "flyctl releases leases in most cases.", Default: DefaultLeaseTtl.String(), }, flag.Bool{ Name: "force-nomad", Description: "(Deprecated) Use the Apps v1 platform built with Nomad", Default: false, Hidden: true, }, flag.Bool{ Name: "force-machines", Description: "Use the Apps v2 platform built with Machines", Default: false, Hidden: true, }, flag.Bool{ Name: "ha", Description: "Create spare machines that increases app availability", Default: true, }, flag.Bool{ Name: "smoke-checks", Description: "Perform smoke checks during deployment", Default: true, }, flag.Float64{ Name: "max-unavailable", Description: "Max number of unavailable machines during rolling updates. A number between 0 and 1 means percent of total machines", Default: DefaultMaxUnavailable, }, flag.Bool{ Name: "no-public-ips", Description: "Do not allocate any new public IP addresses", }, flag.StringArray{ Name: "file-local", Description: "Set of files in the form of /path/inside/machine=<local/path> pairs. Can be specified multiple times.", }, flag.StringArray{ Name: "file-literal", Description: "Set of literals in the form of /path/inside/machine=VALUE pairs where VALUE is the content. Can be specified multiple times.", }, flag.StringArray{ Name: "file-secret", Description: "Set of secrets in the form of /path/inside/machine=SECRET pairs where SECRET is the name of the secret. Can be specified multiple times.", }, flag.StringSlice{ Name: "exclude-regions", Description: "Deploy to all machines except machines in these regions. Multiple regions can be specified with comma separated values or by providing the flag multiple times. --exclude-regions iad,sea --exclude-regions syd will exclude all three iad, sea, and syd regions. Applied after --only-regions. V2 machines platform only.", }, flag.StringSlice{ Name: "only-regions", Description: "Deploy to machines only in these regions. Multiple regions can be specified with comma separated values or by providing the flag multiple times. --only-regions iad,sea --only-regions syd will deploy to all three iad, sea, and syd regions. Applied before --exclude-regions. V2 machines platform only.", }, flag.StringArray{ Name: "label", Description: "Add custom metadata to an image via docker labels", }, flag.Int{ Name: "immediate-max-concurrent", Description: "Maximum number of machines to update concurrently when using the immediate deployment strategy.", Default: 16, }, flag.Int{ Name: "volume-initial-size", Description: "The initial size in GB for volumes created on first deploy", }, flag.VMSizeFlags, flag.StringSlice{ Name: "process-groups", Description: "Deploy to machines only in these process groups", }, }
Functions ¶
func BlueGreenStrategy ¶ added in v0.1.40
func BlueGreenStrategy(md *machineDeployment, blueMachines []*machineUpdateEntry) *blueGreen
func DeployWithConfig ¶ added in v0.0.337
Types ¶
type MachineDeployment ¶ added in v0.0.452
func NewMachineDeployment ¶ added in v0.0.452
func NewMachineDeployment(ctx context.Context, args MachineDeploymentArgs) (MachineDeployment, error)
type MachineDeploymentArgs ¶ added in v0.0.452
type MachineDeploymentArgs struct { AppCompact *api.AppCompact DeploymentImage string Strategy string EnvFromFlags []string PrimaryRegionFlag string SkipSmokeChecks bool SkipHealthChecks bool RestartOnly bool WaitTimeout *time.Duration LeaseTimeout *time.Duration ReleaseCmdTimeout *time.Duration Guest *api.MachineGuest IncreasedAvailability bool AllocPublicIP bool UpdateOnly bool Files []*api.File ExcludeRegions map[string]interface{} OnlyRegions map[string]interface{} ImmediateMaxConcurrent int VolumeInitialSize int ProcessGroups map[string]interface{} }
type ProcessGroupsDiff ¶ added in v0.0.490
type ProcessGroupsDiff struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.