constants

package
v2.4.3+incompatible Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2016 License: Apache-2.0 Imports: 2 Imported by: 21

Documentation

Overview

* 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

View Source
const (
	ProgramName = "porter"

	TempDir                    = ".porter-tmp"
	PorterDir                  = ".porter"
	ConfigPath                 = ".porter/config"
	PayloadWorkingDir          = TempDir + "/payload"
	PayloadPath                = TempDir + "/payload.tar.gz"
	PackOutputPath             = TempDir + "/pack_output.json"
	ProvisionOutputPath        = TempDir + "/provision_output.json"
	CreateStackOutputPath      = TempDir + "/create_stack_output.json"
	CloudFormationTemplatePath = TempDir + "/CloudFormationTemplate.json"
	EnvFile                    = "/dockerfile.env"

	// Debug/config
	EnvConfig                    = "DEBUG_CONFIG"
	EnvDebugAws                  = "DEBUG_AWS"
	EnvLogDebug                  = "LOG_DEBUG"
	EnvLogColor                  = "LOG_COLOR"
	EnvStackCreation             = "STACK_CREATION_TIMEOUT"
	EnvStackCreationPollInterval = "STACK_CREATION_POLL_INTERVAL"
	EnvDevMode                   = "DEV_MODE"

	// Registry-based deployment
	EnvDockerRegistry         = "DOCKER_REGISTRY"
	EnvDockerInsecureRegistry = "DOCKER_INSECURE_REGISTRY"
	EnvDockerRepository       = "DOCKER_REPOSITORY"
	EnvDockerPullUsername     = "DOCKER_PULL_USERNAME"
	EnvDockerPullPassword     = "DOCKER_PULL_PASSWORD"
	EnvDockerPushUsername     = "DOCKER_PUSH_USERNAME"
	EnvDockerPushPassword     = "DOCKER_PUSH_PASSWORD"

	HookPrePack       = "pre_pack"
	HookPostPack      = "post_pack"
	HookPreProvision  = "pre_provision"
	HookPostProvision = "post_provision"
	HookPrePromote    = "pre_promote"
	HookPostPromote   = "post_promote"
	HookPrePrune      = "pre_prune"
	HookPostPrune     = "post_prune"
	HookEC2Bootstrap  = "ec2_bootstrap"

	HRC_Pass   = "pass"
	HRC_Fail   = "fail"
	HRC_Always = "always"

	// The relative path from the service payload to the serialized *conf.Config
	ServicePayloadConfigPath = "config.yaml"

	// The relative path from the repo root to the serialized *conf.Config
	AlteredConfigPath     = TempDir + "/" + ServicePayloadConfigPath
	PackPayloadConfigPath = PayloadWorkingDir + "/" + ServicePayloadConfigPath

	EC2MetadataURL  = "http://169.254.169.254/latest/meta-data"
	AmazonLinuxUser = "ec2-user"

	HAProxyConfigPath      = "/etc/haproxy/haproxy.cfg"
	HAProxyConfigPerms     = 0644
	HAProxyStatsUsername   = "da05bb59715c617c8cb48666975307ed"
	HAProxyStatsPassword   = "17ece40f81292b2dfd8afe1a6990a506"
	HAProxyStatsUri        = "/admin?stats"
	HAProxyStatsUrl        = "http://localhost" + HAProxyStatsUri
	HAProxyIpBlacklistPath = "/var/lib/haproxy/ip_blacklist.txt"

	PorterDaemonInitPath   = "/etc/init/porterd.conf"
	PorterDaemonInitPerms  = 0644
	PorterDaemonBindPort   = "3001"
	PorterDaemonHealthPath = "/health"

	RsyslogConfigPath       = "/etc/rsyslog.conf"
	RsyslogPorterConfigPath = "/etc/rsyslog.d/21-porter.conf"
	RsyslogConfigPerms      = 0644

	// Porter tags used to follow the AWS colon-delimited convention but this
	// doesn't work well in Datadog because everything is flattened under the
	// top-level key. Use hyphen-delimited keys for tags we care about so
	// they're properly parsed by Datadog
	AwsCfnLogicalIdTag                    = "aws:cloudformation:logical-id"
	AwsCfnStackIdTag                      = "aws:cloudformation:stack-id"
	PorterWaitConditionHandleLogicalIdTag = "porter:aws:cloudformation:waitconditionhandle:logical-id"
	PorterEnvironmentTag                  = "porter-config-environment"
	PorterServiceNameTag                  = "porter-service-name"

	// This is different than AwsCfnStackIdTag. Porter tags the elb into which a
	// stack is promoted. This is different than the use of AwsCfnStackIdTag
	// which is provided automatically and tied to a provisioned stack.
	PorterStackIdTag = "porter-aws-cloudformation-stack-id"

	// Replaced by the release_porter script.
	//
	// Don't change this.
	Version   = "%%VERSION%%"
	BinaryUrl = "%%BINARY_URL%%"

	ParameterServiceName = "PorterServiceName"
	ParameterEnvironment = "PorterEnvironment"
	ParameterStackName   = "PorterStackName"
	ParameterSecretsKey  = "PorterSecretsKey"
	ParameterSecretsLoc  = "PorterSecretsLoc"
	MappingRegionToAMI   = "RegionToAMI"

	HC_HealthyThreshold   = 3
	HC_Interval           = 5
	HC_Timeout            = HC_Interval - 2
	HC_UnhealthyThreshold = 2

	// A key in resource metadata to tag security groups that should be
	// associated with a AWS::ElasticLoadBalancing::LoadBalancer
	MetadataElb = "elb-lb-sg"

	// A key in resource metadata to tag security groups that should be
	// associated with a AWS::AutoScaling::LaunchConfiguration
	MetadataAsLc = "as-lc-sg"

	ElbSgLogicalName = "InetToElb"

	// http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-hup.html#cfn-hup-config-file
	CfnHupPollIntervalMinutes = 1

	DstELBSecurityGroup = "DestinationELBToInstance"

	ContainerUserUid = "1001"
)

Variables

View Source
var (
	InetBindPorts    []uint16
	AwsRegions       map[string]interface{}
	AwsInstanceTypes map[string]interface{}
)

Functions

func StackCreationPollInterval added in v1.0.4

func StackCreationPollInterval() time.Duration

func StackCreationTimeout

func StackCreationTimeout() time.Duration

Types

This section is empty.

Jump to

Keyboard shortcuts

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