Documentation ¶
Overview ¶
Changing configuration fields or semantics? Make sure to update commands/help/files/config.go as well
Copyright 2016 Adobe Systems Incorporated. All rights reserved.
This file is licensed to you under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. You may obtain a copy
of the License at http://www.apache.org/licenses/LICENSE-2.0 *
Unless required by applicable law or agreed to in writing, software distributed under
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
OF ANY KIND, either express or implied. See the License for the specific language
governing permissions and limitations under the License.
Copyright 2016 Adobe Systems Incorporated. All rights reserved.
This file is licensed to you under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. You may obtain a copy
of the License at http://www.apache.org/licenses/LICENSE-2.0 *
Unless required by applicable law or agreed to in writing, software distributed under
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
OF ANY KIND, either express or implied. See the License for the specific language
governing permissions and limitations under the License.
Copyright 2016 Adobe Systems Incorporated. All rights reserved.
This file is licensed to you under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. You may obtain a copy
of the License at http://www.apache.org/licenses/LICENSE-2.0 *
Unless required by applicable law or agreed to in writing, software distributed under
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
OF ANY KIND, either express or implied. See the License for the specific language
governing permissions and limitations under the License.
Index ¶
- Constants
- func ValidateRegion(region *Region, validateRoleArn bool) error
- type AutoScalingGroup
- type AvailabilityZone
- type BlackoutWindow
- type Config
- func (recv *Config) GetEnvironment(envName string) (*Environment, error)
- func (recv *Config) Print()
- func (recv *Config) SetDefaults()
- func (recv *Config) Validate() (err error)
- func (recv *Config) ValidateEnvironments() error
- func (recv *Config) ValidateHooks() (err error)
- func (recv *Config) ValidateRegistryConfig() error
- func (recv *Config) ValidateTopLevelKeys() error
- type Container
- type ELB
- type Environment
- func (recv *Environment) GetELBForRegion(reg string, elb string) (string, error)
- func (recv *Environment) GetRegion(regionName string) (*Region, error)
- func (recv *Environment) GetRoleARN(regionName string) (string, error)
- func (recv *Environment) GetStackDefinitionPath(regionName string) (string, error)
- func (recv *Environment) IsWithinBlackoutWindow() error
- type HealthCheck
- type Hook
- type Region
- type SecurityGroupEgress
- type Slack
- type SrcEnvFile
Constants ¶
const ( Topology_Inet = "inet" Topology_Worker = "worker" Topology_Cron = "cron" )
Variables ¶
This section is empty.
Functions ¶
func ValidateRegion ¶
Types ¶
type AutoScalingGroup ¶
type AutoScalingGroup struct { SecurityGroupEgress []SecurityGroupEgress `yaml:"security_group_egress"` SecretsExecName string `yaml:"secrets_exec_name"` SecretsExecArgs []string `yaml:"secrets_exec_args"` }
type AvailabilityZone ¶
type BlackoutWindow ¶
type Config ¶
type Config struct { ServiceName string `yaml:"service_name"` ServiceVersion string PorterVersion string `yaml:"porter_version"` Environments []*Environment `yaml:"environments"` Slack Slack `yaml:"slack"` Hooks map[string][]Hook `yaml:"hooks"` }
Config supports multi-container deployments
func (*Config) GetEnvironment ¶
func (recv *Config) GetEnvironment(envName string) (*Environment, error)
func (*Config) ValidateEnvironments ¶
func (*Config) ValidateHooks ¶
func (*Config) ValidateRegistryConfig ¶
func (*Config) ValidateTopLevelKeys ¶
type Container ¶
type Container struct { Name string `yaml:"name"` OriginalName string Topology string `yaml:"topology"` InetPort int `yaml:"inet_port"` Uid *int `yaml:"uid"` ReadOnly *bool `yaml:"read_only"` Dockerfile string `yaml:"dockerfile"` DockerfileBuild string `yaml:"dockerfile_build"` HealthCheck *HealthCheck `yaml:"health_check"` SrcEnvFile *SrcEnvFile `yaml:"src_env_file"` }
type Environment ¶
type Environment struct { Name string `yaml:"name"` StackDefinitionPath string `yaml:"stack_definition_path"` RoleARN string `yaml:"role_arn"` Hotswap bool `yaml:"hot_swap"` InstanceCount uint `yaml:"instance_count"` InstanceType string `yaml:"instance_type"` BlackoutWindows []BlackoutWindow `yaml:"blackout_windows"` Regions []*Region `yaml:"regions"` }
func (*Environment) GetELBForRegion ¶
func (recv *Environment) GetELBForRegion(reg string, elb string) (string, error)
func (*Environment) GetRegion ¶
func (recv *Environment) GetRegion(regionName string) (*Region, error)
func (*Environment) GetRoleARN ¶
func (recv *Environment) GetRoleARN(regionName string) (string, error)
func (*Environment) GetStackDefinitionPath ¶
func (recv *Environment) GetStackDefinitionPath(regionName string) (string, error)
func (*Environment) IsWithinBlackoutWindow ¶
func (recv *Environment) IsWithinBlackoutWindow() error
type HealthCheck ¶
type Region ¶
type Region struct { Name string `yaml:"name"` StackDefinitionPath string `yaml:"stack_definition_path"` VpcId string `yaml:"vpc_id"` AZs []AvailabilityZone `yaml:"azs"` ELBs []*ELB `yaml:"elbs"` ELB string `yaml:"elb"` RoleARN string `yaml:"role_arn"` AutoScalingGroup *AutoScalingGroup `yaml:"auto_scaling_group"` SSLCertARN string `yaml:"ssl_cert_arn"` HostedZoneName string `yaml:"hosted_zone_name"` KeyPairName string `yaml:"key_pair_name"` S3Bucket string `yaml:"s3_bucket"` SSEKMSKeyId *string `yaml:"sse_kms_key_id"` Containers []*Container `yaml:"containers"` }
func (*Region) HealthCheckMethod ¶
func (*Region) HealthCheckPath ¶
func (*Region) PrimaryTopology ¶
inet is a superset of worker which are almost identical to cron
func (*Region) ValidateContainers ¶
type SecurityGroupEgress ¶
type SecurityGroupEgress struct { CidrIp string `yaml:"cidr_ip" json:"CidrIp,omitempty"` FromPort int `yaml:"from_port" json:"FromPort"` IpProtocol string `yaml:"ip_protocol" json:"IpProtocol,omitempty"` DestinationSecurityGroupId string `yaml:"destination_security_group_id" json:"DestinationSecurityGroupId,omitempty"` ToPort int `yaml:"to_port" json:"ToPort"` }
type Slack ¶
type Slack struct { PackSuccessHook string `yaml:"pack_success_webhook_url"` PackFailureHook string `yaml:"pack_failure_webhook_url"` ProvisionSuccessHook string `yaml:"provision_success_webhook_url"` ProvisionFailureHook string `yaml:"provision_failure_webhook_url"` PromoteSuccessHook string `yaml:"promote_success_webhook_url"` PromoteFailureHook string `yaml:"promote_failure_webhook_url"` }