Skip to content

Instantly share code, notes, and snippets.

@jmelloy
Created August 2, 2013 00:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jmelloy/6136504 to your computer and use it in GitHub Desktop.
Save jmelloy/6136504 to your computer and use it in GitHub Desktop.
{
"Outputs": {
"AWSEBLoadBalancerURL": {
"Description": "The ElasticBeanstalk ELB URL of the website",
"Value": {
"Fn::Join": ["", ["http:\/\/",
{
"Fn::GetAtt": ["AWSEBLoadBalancer", "DNSName"]
}]]
}
}
},
"Parameters": {
"LogPublicationControl": {
"Default": "false",
"AllowedValues": ["true", "false"],
"Description": "If true customer service logs will be published to S3.",
"Type": "String",
"ConstraintDescription": "must be Boolean."
},
"AWSEBReferrerId": {
"Default": "",
"Type": "String"
},
"InstancePort": {
"Default": "80",
"Description": "Listen Port",
"Type": "String"
},
"AWSEBEnvironmentId": {
"Type": "String"
},
"TargetRuntime": {
"Default": "4.0",
"AllowedValues": ["4.0", "2.0"],
"Description": "Target .NET Runtime",
"Type": "String"
},
"AWSEBAgentId": {
"Default": "",
"Type": "String"
},
"AWSEBEnvironmentName": {
"Type": "String"
},
"AWSEBEnvironmentBucket": {
"Type": "String"
},
"AppSource": {
"Default": "https:\/\/elasticbeanstalk-samples-us-east-1.s3.amazonaws.com\/FirstSample.zip",
"Description": "Application Source",
"Type": "String"
},
"Allow32BitApplications": {
"Default": "False",
"AllowedValues": ["True", "False"],
"Description": "Enable 32-bit Applications",
"Type": "String"
},
"EnvironmentVariables": {
"Default": "AWS_ACCESS_KEY_ID=,AWS_SECRET_KEY=,PARAM1=,PARAM2=,PARAM3=,PARAM4=,PARAM5=",
"Description": "Program environment variables.",
"Type": "CommaDelimitedList"
},
"InstanceType": {
"Default": "t1.micro",
"AllowedValues": ["t1.micro", "m1.small", "m1.medium", "m1.large", "m1.xlarge", "c1.medium", "c1.xlarge", "m2.xlarge", "m2.2xlarge", "m2.4xlarge"],
"Description": "WebServer EC2 instance type",
"Type": "String",
"ConstraintDescription": "must be a valid EC2 instance type."
}
},
"Mappings": {
"EnvironmentInfoTasks": {
"systemtail": {
"AutoClean": "true",
"CommandName": "CMD-SystemTailLogs",
"LocationPrefix": "resources\/environments\/logs\/systemtail\/"
},
"bundle": {
"CommandName": "CMD-BundleLogs",
"LocationPrefix": "resources\/environments\/logs\/bundle\/"
},
"publish": {
"LocationPrefix": "resources\/environments\/logs\/publish\/"
},
"tail": {
"AutoClean": "true",
"CommandName": "CMD-TailLogs",
"LocationPrefix": "resources\/environments\/logs\/tail\/"
}
},
"AWSEBOptions": {
"options": {
"UserDataScript": "https:\/\/s3-us-west-2.amazonaws.com\/elasticbeanstalk-env-resources-us-west-2\/stalks\/eb_iis_1.0\/lib\/Bootstrap.ps1",
"nodeploymentOnStartup": "true",
"ebpatchscripturl": ["https:\/\/s3-us-west-2.amazonaws.com\/elasticbeanstalk-env-resources-us-west-2\/eb_patching_resources\/patch_win_instance.zip"],
"DefaultsScript": "c:\/Program Files\/Amazon\/ElasticBeanstalk\/Tools\/ContainerDefaults.exe",
"LeaderTestScript": "c:\/Program Files\/Amazon\/ElasticBeanstalk\/Tools\/LeaderTest.bat",
"ebrpm": "",
"LaunchType": "Migration",
"cfnrpm": "",
"DefaultSSHPort": "3389",
"OperatingSystem": "Windows",
"EmbeddedConfigsetsEnabled": "true"
}
},
"AWSEBAWSRegionArch2AMI": {
"sa-east-1": {
"64": "ami-118d570c"
},
"ap-northeast-1": {
"64": "ami-7e189b7f"
},
"eu-west-1": {
"64": "ami-642b3e10"
},
"us-east-1": {
"64": "ami-f494f19d"
},
"us-west-1": {
"64": "ami-0a7e524f"
},
"us-west-2": {
"64": "ami-6c1c885c"
},
"ap-southeast-2": {
"64": "ami-0ec25234"
},
"ap-southeast-1": {
"64": "ami-a4c68af6"
}
},
"AWSEBAWSInstanceType2Arch": {
"m2.xlarge": {
"Arch": "64"
},
"cg1.4xlarge": {
"Arch": "64cg"
},
"m1.large": {
"Arch": "64"
},
"m1.xlarge": {
"Arch": "64"
},
"m2.2xlarge": {
"Arch": "64"
},
"m1.medium": {
"Arch": "64"
},
"m3.xlarge": {
"Arch": "64"
},
"cc2.8xlarge": {
"Arch": "64cc"
},
"m2.4xlarge": {
"Arch": "64"
},
"m3.2xlarge": {
"Arch": "64"
},
"t1.micro": {
"Arch": "64"
},
"m1.small": {
"Arch": "64"
},
"cc1.4xlarge": {
"Arch": "64cc"
},
"c1.medium": {
"Arch": "64"
},
"c1.xlarge": {
"Arch": "64"
}
}
},
"AWSTemplateFormatVersion": "2010-09-09",
"Resources": {
"AWSEBLoadBalancer": {
"Type": "AWS::ElasticLoadBalancing::LoadBalancer",
"Properties": {
"AvailabilityZones": ["us-west-2b", "us-west-2c", "us-west-2a"],
"Listeners": [{
"LoadBalancerPort": "80",
"InstancePort": {
"Ref": "InstancePort"
},
"Protocol": "HTTP"
}],
"HealthCheck": {
"Timeout": "5",
"Target": {
"Fn::Join": ["", ["HTTP:",
{
"Ref": "InstancePort"
}, "\/"]]
},
"Interval": "30",
"HealthyThreshold": "3",
"UnhealthyThreshold": "5"
}
}
},
"AWSEBAutoScalingLaunchConfiguration": {
"Type": "AWS::AutoScaling::LaunchConfiguration",
"Properties": {
"IamInstanceProfile": "aws-elasticbeanstalk-ec2-role",
"ImageId": {
"Fn::FindInMap": ["AWSEBAWSRegionArch2AMI",
{
"Ref": "AWS::Region"
}, {
"Fn::FindInMap": ["AWSEBAWSInstanceType2Arch",
{
"Ref": "InstanceType"
}, "Arch"]
}]
},
"InstanceMonitoring": false,
"SecurityGroups": [{
"Ref": "AWSEBSecurityGroup"
}, "apfmdashboard-rds-associations"],
"UserData": {
"Fn::Base64": {
"Fn::Join": ["", ["<script>\n", "mkdir c:\\cfn\n", "mkdir c:\\cfn\\log\n", "mkdir \"c:\\Program Files\\Amazon\\ElasticBeanstalk\\Tools\"\n", "powershell.exe -Command \"(New-Object System.Net.WebClient).DownloadFile('",
{
"Fn::FindInMap": ["AWSEBOptions", "options", "UserDataScript"]
}, "', '", "c:\\Program Files\\Amazon\\ElasticBeanstalk\\Tools\\Bootstrap.ps1", "')\"\n", "powershell.exe -ExecutionPolicy Bypass -File ", "\"C:\\Program Files\\Amazon\\ElasticBeanstalk\\Tools\\Bootstrap.ps1\"", " ",
{
"Ref": "AWS::Region"
}, " ",
{
"Ref": "AWS::StackId"
}, " ", "AWSEBAutoScalingGroup", " \"",
{
"Ref": "AWSEBInstanceLaunchWaitHandle"
}, "\"\n", "set \/p HANDLE=<c:\\cfn\\wait-condition-handle.txt\n", "c:\\\"Program Files\"\\Amazon\\cfn-bootstrap\\cfn-signal -e 0 \"%HANDLE%\" > c:\\cfn\\log\\cfn-signal-call-log 2>&1\n", "<\/script>"]]
}
},
"KeyName": "dashboard-west2-or",
"InstanceType": {
"Ref": "InstanceType"
}
}
},
"AWSEBInstanceLaunchWaitCondition": {
"Type": "AWS::CloudFormation::WaitCondition",
"DependsOn": "AWSEBAutoScalingGroup",
"Properties": {
"Handle": {
"Ref": "AWSEBInstanceLaunchWaitHandle"
},
"Timeout": "900"
}
},
"AWSEBAutoScalingGroup": {
"Type": "AWS::AutoScaling::AutoScalingGroup",
"Metadata": {
"AWS::ElasticBeanstalk::Ext": {
"_EnvironmentInfoTaskMapping": "EnvironmentInfoTasks",
"_TriggersConfig": {
"applicationDeploy": {
"_Command": "CMD-AppDeploy",
"_WatchGroups": ["_TriggerAppDeployment"]
},
"configDeploy": {
"_Command": "CMD-ConfigDeploy",
"_WatchGroups": ["_TriggerConfigDeployment"]
}
},
"_ParameterTriggers": {
"_TriggerAppDeployment": ["AppSource"],
"_TriggerConfigDeployment": ["LogPublicationControl", "InstancePort", "TargetRuntime", "Allow32BitApplications", "EnvironmentVariables"]
},
"_ContainerConfigFileContent": {
"iis": {
"targetruntime": {
"Ref": "TargetRuntime"
},
"env": ["PARAM3=", "PARAM4=", "PARAM1=", "PARAM2=", "PARAM5=", "AWS_SECRET_KEY=", "AWS_ACCESS_KEY_ID="],
"allow32bitapps": {
"Ref": "Allow32BitApplications"
},
"instanceport": {
"Ref": "InstancePort"
}
},
"system": {
"LogPublicationControl": {
"Ref": "LogPublicationControl"
},
"AWSEBReferrerId": {
"Ref": "AWSEBReferrerId"
},
"AWSEBAgentId": {
"Ref": "AWSEBAgentId"
}
}
},
"_LaunchStage": "Running",
"_API": {
"_Commands": {
"CMD-BundleLogs": {
"_Stages": {
"01_enact": ["InfoTask-BundleLogs"]
}
},
"CMD-ConfigDeploy": {
"_Stages": {
"02_enact": ["Hook-EnactConfigDeploy", "Hook-PostConfigDeploy"],
"01_pre": ["Infra-WriteRuntimeConfig", "Hook-PreConfigDeploy"]
},
"_RunStaged": "false"
},
"CMD-SystemTailLogs": {
"_Stages": {
"01_enact": ["InfoTask-SystemTailLogs"]
}
},
"CMD-PatchInstance": {
"_Stages": {
"01_enact": ["_Infra-PatchInstance"]
}
},
"CMD-TailLogs": {
"_Stages": {
"01_enact": ["InfoTask-TailLogs"]
}
},
"CMD-RestartAppServer": {
"_Stages": {
"02_enact": ["Hook-EnactRestartAppServer", "Hook-PostRestartAppServer"],
"01_enact": ["Infra-WriteRuntimeConfig", "Hook-PreRestartAppServer"]
},
"_RunStaged": "false"
},
"CMD-Startup": {
"_Stages": {
"02_enact": ["Hook-EnactAppDeploy", "Infra-EmbeddedPostBuild", "Hook-PostAppDeploy", "Hook-PostInit", "Infra-WriteVersionOnStartup"],
"01_pre": ["Infra-EmbeddedPreBuild", "Hook-PreAppDeploy"]
},
"_RunStaged": "true"
},
"CMD-AppDeploy": {
"_Stages": {
"02_enact": ["Hook-EnactAppDeploy", "Infra-EmbeddedPostBuild", "Hook-PostAppDeploy"],
"01_pre": ["Infra-WriteRuntimeConfig", "Infra-WriteApplication1", "Infra-WriteApplication2", "Infra-EmbeddedPreBuild", "Hook-PreAppDeploy"]
},
"_RunStaged": "true"
}
}
},
"AvailabilityZoneCount": "Any",
"AWS::CloudFormation::Init": {
"configSets": {
"_OnInstanceBoot": []
}
},
"_AppSourceUrlFileContent": {
"url": {
"Ref": "AppSource"
}
}
},
"ForcingMetadataUpdate": "Changing something in the metadata will force re-compuation",
"AWS::CloudFormation::Init": {
"Infra-WriteApplication1": {},
"Infra-WriteBundleLogsConf": {},
"AWSEBTools": {
"files": {
"C:\\Windows\\System32\\inetsrv\\config\\schema\\ElasticBeanstalk_schema.xml": {
"content": {
"Fn::Join": ["", ["<configSchema>\r\n", " <sectionSchema name=\"ElasticBeanstalk\/environment\">\r\n", " <collection addElement=\"add\" removeElement=\"remove\" clearElement=\"clear\">\r\n", " <attribute name=\"key\" isUniqueKey=\"true\" type=\"string\" \/>\r\n", " <attribute name=\"value\" type=\"string\" \/>\r\n", " <\/collection>\r\n", " <\/sectionSchema>\r\n", "<\/configSchema>"]]
}
}
},
"packages": {
"msi": {
"aws-elasticbeanstalk-tools": "https:\/\/s3-us-west-2.amazonaws.com\/elasticbeanstalk-env-resources-us-west-2\/stalks\/eb_iis_1.0\/lib\/AWSBeanstalkCfnTools.msi"
}
},
"sources": {
"C:\/Program Files\/Amazon\/ElasticBeanstalk\/hooks\/": "https:\/\/s3-us-west-2.amazonaws.com\/elasticbeanstalk-env-resources-us-west-2\/stalks\/eb_iis_1.0\/lib\/hooks.zip"
}
},
"Hook-PostConfigDeploy": {
"commands": {
"hooks": {
"waitAfterCompletion": 0,
"command": "HooksExecutor.exe configdeploy\\post"
}
}
},
"Infra-WriteApplication2": {
"files": {
"c:\\cfn\\ebdata\\source_bundle.zip": {
"source": {
"Ref": "AppSource"
}
}
}
},
"Hook-EnactAppDeploy": {
"commands": {
"hooks": {
"waitAfterCompletion": 0,
"command": "HooksExecutor.exe appdeploy\\enact"
}
}
},
"Infra-WriteVersionOnStartup": {
"waitAfterCompletion": 0,
"command": {
"Fn::Join": ["", ["c:\\\"Program Files\"\\Amazon\\cfn-bootstrap\\cfn-get-metadata -v", " -r ", "AWSEBAutoScalingGroup", " -s ",
{
"Ref": "AWS::StackId"
}, " --region ",
{
"Ref": "AWS::Region"
}, " -k AWS::ElasticBeanstalk::Metadata.Version > c:\\\"Program Files\"\\Amazon\\ElasticBeanstalk\\config\\aws-eb-startup-version"]]
}
},
"Hook-PreAppDeploy": {
"commands": {
"hooks": {
"waitAfterCompletion": 0,
"command": "HooksExecutor.exe appdeploy\\pre"
}
}
},
"configSets": {
"Infra-WriteApplication1": ["Infra-WriteApplication1"],
"_OnInstanceBoot": ["AWSEBTools", "AWSEBBaseConfig", "AWSEBCfnHup", "Infra-WriteLeaderTestScript", "Infra-WriteRuntimeConfig", "Infra-WriteApplication1", "Infra-WriteApplication2", "Infra-WriteTailLogsConf", "Infra-WriteSystemTailLogsConf", "Infra-WriteBundleLogsConf", "Infra-WritePublishLogsConf", "Infra-WritePublishLogsCron"],
"_Infra-PatchInstance": ["Infra-PatchInstance"],
"Infra-WriteBundleLogsConf": ["Infra-WriteBundleLogsConf"],
"Infra-EmbeddedPostBuild": [],
"Hook-PostConfigDeploy": ["Hook-PostConfigDeploy"],
"Infra-WriteApplication2": ["Infra-WriteApplication2"],
"_AppInstall": ["Hook-PreInit", "Hook-PreConfigDeploy", "Hook-PreAppDeploy", "Hook-EnactConfigDeploy", "Hook-EnactAppDeploy", "Hook-PostConfigDeploy", "Hook-PostAppDeploy", "Hook-PostInit"],
"Hook-EnactAppDeploy": ["Hook-EnactAppDeploy"],
"Infra-EmbeddedPreBuild": [],
"Infra-WriteVersionOnStartup": ["Infra-WriteVersionOnStartup"],
"Hook-PreAppDeploy": ["Hook-PreAppDeploy"],
"Hook-PreRestartAppServer": ["Hook-PreRestartAppServer"],
"Hook-EnactRestartAppServer": ["Hook-EnactRestartAppServer"],
"Infra-WriteSystemTailLogsConf": ["Infra-WriteSystemTailLogsConf"],
"Hook-PostRestartAppServer": ["Hook-PostRestartAppServer"],
"Infra-WriteRuntimeConfig": ["Infra-WriteRuntimeConfig"],
"Hook-PreInit": ["Hook-PreInit"],
"Infra-WritePublishLogsCron": ["Infra-WritePublishLogsCron"],
"InfoTask-TailLogs": ["InfoTask-TailLogs"],
"_OnInstanceReboot": ["AWSEBTools", "AWSEBBaseConfig", "AWSEBCfnHup", "Infra-WriteRuntimeConfig", "Infra-WriteApplication1", "Infra-WriteApplication2"],
"Hook-EnactConfigDeploy": ["Hook-EnactConfigDeploy"],
"Hook-PreConfigDeploy": ["Hook-PreConfigDeploy"],
"InfoTask-BundleLogs": ["InfoTask-BundleLogs"],
"Hook-PostInit": ["Hook-PostInit"],
"Hook-PostAppDeploy": ["Hook-PostAppDeploy"],
"InfoTask-SystemTailLogs": ["InfoTask-SystemTailLogs"],
"Infra-WriteTailLogsConf": ["Infra-WriteTailLogsConf"],
"Infra-WritePublishLogsConf": ["Infra-WritePublishLogsConf"],
"_AppInstallReboot": ["Hook-PreAppDeploy"]
},
"Infra-WriteLeaderTestScript": {
"files": {
"c:\/Program Files\/Amazon\/ElasticBeanstalk\/Tools\/LeaderTest.bat": {
"content": "@ECHO OFF\r\nIF \"%EB_IS_COMMAND_LEADER%\" == \"true\" (EXIT \/b 0) ELSE (EXIT \/b 1)"
}
}
},
"Hook-PreRestartAppServer": {
"commands": {
"hooks": {
"waitAfterCompletion": 0,
"command": "HooksExecutor.exe restartappserver\\pre"
}
}
},
"Hook-EnactRestartAppServer": {
"commands": {
"hooks": {
"waitAfterCompletion": 0,
"command": "HooksExecutor.exe restartappserver\\enact"
}
}
},
"Infra-WriteSystemTailLogsConf": {},
"Infra-WriteRuntimeConfig": {
"commands": {
"02writeappsource": {
"waitAfterCompletion": 5,
"command": {
"Fn::Join": ["", ["c:\\\"Program Files\"\\Amazon\\cfn-bootstrap\\cfn-get-metadata -v", " -r ", "AWSEBAutoScalingGroup", " -s ",
{
"Ref": "AWS::StackId"
}, " --region ",
{
"Ref": "AWS::Region"
}, " -k AWS::ElasticBeanstalk::Ext._AppSourceUrlFileContent > c:\\\"Program Files\"\\Amazon\\ElasticBeanstalk\\config\\appsourceurl"]]
}
},
"03writeconfig": {
"waitAfterCompletion": 0,
"command": {
"Fn::Join": ["", ["c:\\\"Program Files\"\\Amazon\\cfn-bootstrap\\cfn-get-metadata -v", " -r ", "AWSEBAutoScalingGroup", " -s ",
{
"Ref": "AWS::StackId"
}, " --region ",
{
"Ref": "AWS::Region"
}, " -k AWS::ElasticBeanstalk::Ext._ContainerConfigFileContent > c:\\\"Program Files\"\\Amazon\\ElasticBeanstalk\\config\\containerconfiguration"]]
}
},
"01mkdir": {
"waitAfterCompletion": 0,
"command": "IF NOT EXIST c:\\\"Program Files\"\\Amazon\\ElasticBeanstalk\\config (mkdir c:\\\"Program Files\"\\Amazon\\ElasticBeanstalk\\config)"
}
}
},
"Hook-PostRestartAppServer": {
"commands": {
"hooks": {
"waitAfterCompletion": 0,
"command": "HooksExecutor.exe restartappserver\\post"
}
}
},
"Hook-PreInit": {
"commands": {
"hooks": {
"waitAfterCompletion": 0,
"command": "HooksExecutor.exe preinit"
}
}
},
"Infra-PatchInstance": {
"commands": {
"01executepatch": {
"command": "C:\\\"Program Files\"\\Amazon\\ElasticBeanstalk\\patch\\patch.bat"
}
},
"sources": {
"C:\/Program Files\/Amazon\/ElasticBeanstalk\/patch\/": {
"Fn::Select": [0,
{
"Fn::FindInMap": ["AWSEBOptions", "options", "ebpatchscripturl"]
}]
}
}
},
"Infra-WritePublishLogsCron": {
"files": {
"C:\/Program Files\/Amazon\/ElasticBeanstalk\/config\/publishlogs.bat": {
"content": {
"Fn::Join": ["", ["\"C:\\Program Files\\Amazon\\ElasticBeanstalk\\Tools\\PublishLogs.exe\" ", "-c \"C:\\Program Files\\Amazon\\ElasticBeanstalk\\config\\publogs.d\" ", " --location-prefix ",
{
"Fn::FindInMap": ["EnvironmentInfoTasks", "publish", "LocationPrefix"]
}]]
}
}
},
"commands": {
"schedulepublishlogs": {
"waitAfterCompletion": 0,
"command": "schtasks \/create \/sc hourly \/ru System \/tn \"Publish Beanstalk Logs\" \/tr \"\\\"C:\\Program Files\\Amazon\\ElasticBeanstalk\\config\\publishlogs.bat\\\"\""
}
}
},
"AWSEBBaseConfig": {
"files": {
"c:\\cfn\\hooks.d\\aws-eb-command-handler.conf": {
"content": {
"Fn::Join": ["", ["[aws-eb-command-handler]", "\r\n", "triggers=on.command", "\r\n", "path=ElasticBeanstalkCommand-", "AWSEBAutoScalingGroup", "\r\n", "action=c:\/Program Files\/Amazon\/ElasticBeanstalk\/Tools\/CommandWrapper.exe", "\r\n"]]
}
},
"c:\\cfn\\aws-eb-stack.properties": {
"content": {
"Fn::Join": ["", ["environment_id=",
{
"Ref": "AWSEBEnvironmentId"
}, "\r\n", "environment_bucket=",
{
"Ref": "AWSEBEnvironmentBucket"
}, "\r\n", "stack_name=",
{
"Ref": "AWS::StackId"
}, "\r\n", "resource=", "AWSEBAutoScalingGroup", "\r\n", "region=",
{
"Ref": "AWS::Region"
}, "\r\n"]]
}
},
"c:\\cfn\\wait-condition-handle.txt": {
"content": {
"Ref": "AWSEBInstanceLaunchWaitHandle"
}
},
"c:\\cfn\\cfn-hup.conf": {
"content": {
"Fn::Join": ["", ["[main]", "\r\n", "stack=",
{
"Ref": "AWS::StackId"
}, "\r\n", "region=",
{
"Ref": "AWS::Region"
}, "\r\n"]]
}
}
}
},
"InfoTask-TailLogs": {
"commands": {
"taillogs": {
"waitAfterCompletion": 0,
"command": {
"Fn::Join": ["", ["TailLogs.exe -c \"c:\\Program Files\\Amazon\\ElasticBeanstalk\\config\\taillogs.d\"", " --location-prefix ",
{
"Fn::FindInMap": ["EnvironmentInfoTasks", "tail", "LocationPrefix"]
}]]
}
}
}
},
"Hook-EnactConfigDeploy": {
"commands": {
"hooks": {
"waitAfterCompletion": 0,
"command": "HooksExecutor.exe configdeploy\\enact"
}
}
},
"Hook-PreConfigDeploy": {
"commands": {
"hooks": {
"waitAfterCompletion": 0,
"command": "HooksExecutor.exe configdeploy\\pre"
}
}
},
"InfoTask-BundleLogs": {},
"Hook-PostInit": {
"commands": {
"hooks": {
"waitAfterCompletion": 0,
"command": "HooksExecutor.exe postinit"
}
}
},
"Hook-PostAppDeploy": {
"commands": {
"hooks": {
"waitAfterCompletion": 0,
"command": "HooksExecutor.exe appdeploy\\post"
}
}
},
"InfoTask-SystemTailLogs": {
"commands": {
"systemtaillogs": {
"waitAfterCompletion": 0,
"command": {
"Fn::Join": ["", ["TailLogs.exe -c \"c:\\Program Files\\Amazon\\ElasticBeanstalk\\config\\tailsyslogs.d\"", " --location-prefix ",
{
"Fn::FindInMap": ["EnvironmentInfoTasks", "systemtail", "LocationPrefix"]
}]]
}
}
}
},
"Infra-WriteTailLogsConf": {
"files": {
"C:\/Program Files\/Amazon\/ElasticBeanstalk\/config\/taillogs.d\/cfn-system.conf": {
"content": {
"Fn::Join": ["\r\n", ["c:\\cfn\\log\\cfn-hup.log", "c:\\cfn\\log\\cfn-init.log", ""]]
}
},
"C:\/Program Files\/Amazon\/ElasticBeanstalk\/config\/taillogs.d\/eb-system.conf": {
"content": {
"Fn::Join": ["\r\n", ["C:\\Program Files\\Amazon\\ElasticBeanstalk\\logs\\!TailLogs", "C:\\inetpub\\logs\\LogFiles\\W3SVC1\\", ""]]
}
}
}
},
"Infra-WritePublishLogsConf": {
"files": {
"C:\/Program Files\/Amazon\/ElasticBeanstalk\/config\/publogs.d\/eb-system.conf": {
"content": {
"Fn::Join": ["\r\n", ["C:\\Program Files\\Amazon\\ElasticBeanstalk\\logs\\!TailLogs", "C:\\inetpub\\logs\\LogFiles\\W3SVC1\\", ""]]
}
},
"C:\/Program Files\/Amazon\/ElasticBeanstalk\/config\/publogs.d\/cfn-system.conf": {
"content": {
"Fn::Join": ["\r\n", ["c:\\cfn\\log\\cfn-hup.log", "c:\\cfn\\log\\cfn-init.log", ""]]
}
}
}
},
"AWSEBCfnHup": {
"services": {
"windows": {
"cfn-hup": {
"ensureRunning": "true",
"enabled": "true"
}
}
}
}
}
},
"DependsOn": "AWSEBBeanstalkMetadata",
"Properties": {
"Tags": [{
"PropagateAtLaunch": true,
"Value": {
"Ref": "AWSEBEnvironmentName"
},
"Key": "elasticbeanstalk:environment-name"
}, {
"PropagateAtLaunch": true,
"Value": {
"Ref": "AWSEBEnvironmentName"
},
"Key": "Name"
}, {
"PropagateAtLaunch": true,
"Value": {
"Ref": "AWSEBEnvironmentId"
},
"Key": "elasticbeanstalk:environment-id"
}],
"LoadBalancerNames": [{
"Ref": "AWSEBLoadBalancer"
}],
"AvailabilityZones": ["us-west-2b", "us-west-2c", "us-west-2a"],
"MaxSize": "4",
"Cooldown": "360",
"MinSize": "1",
"LaunchConfigurationName": {
"Ref": "AWSEBAutoScalingLaunchConfiguration"
}
}
},
"AWSEBSecurityGroup": {
"Type": "AWS::EC2::SecurityGroup",
"Properties": {
"SecurityGroupIngress": [{
"IpProtocol": "tcp",
"SourceSecurityGroupName": {
"Fn::GetAtt": ["AWSEBLoadBalancer", "SourceSecurityGroup.GroupName"]
},
"ToPort": {
"Ref": "InstancePort"
},
"SourceSecurityGroupOwnerId": {
"Fn::GetAtt": ["AWSEBLoadBalancer", "SourceSecurityGroup.OwnerAlias"]
},
"FromPort": {
"Ref": "InstancePort"
}
}],
"GroupDescription": "SecurityGroup for ElasticBeanstalk environment."
}
},
"AWSEBInstanceLaunchWaitHandle": {
"Type": "AWS::CloudFormation::WaitConditionHandle"
},
"AWSEBCloudwatchAlarmHigh": {
"Type": "AWS::CloudWatch::Alarm",
"Properties": {
"Period": "300",
"AlarmActions": [{
"Ref": "AWSEBAutoScalingScaleUpPolicy"
}],
"Statistic": "Average",
"MetricName": "NetworkOut",
"Threshold": "6000000",
"EvaluationPeriods": "1",
"Dimensions": [{
"Name": "AutoScalingGroupName",
"Value": {
"Ref": "AWSEBAutoScalingGroup"
}
}],
"AlarmDescription": "ElasticBeanstalk Default Scale Up alarm",
"Namespace": "AWS\/EC2",
"ComparisonOperator": "GreaterThanThreshold"
}
},
"AWSEBCloudwatchAlarmLow": {
"Type": "AWS::CloudWatch::Alarm",
"Properties": {
"Period": "300",
"AlarmActions": [{
"Ref": "AWSEBAutoScalingScaleDownPolicy"
}],
"Statistic": "Average",
"MetricName": "NetworkOut",
"Threshold": "2000000",
"EvaluationPeriods": "1",
"Dimensions": [{
"Name": "AutoScalingGroupName",
"Value": {
"Ref": "AWSEBAutoScalingGroup"
}
}],
"AlarmDescription": "ElasticBeanstalk Default Scale Down alarm",
"Namespace": "AWS\/EC2",
"ComparisonOperator": "LessThanThreshold"
}
},
"AWSEBAutoScalingScaleDownPolicy": {
"Type": "AWS::AutoScaling::ScalingPolicy",
"Properties": {
"AutoScalingGroupName": {
"Ref": "AWSEBAutoScalingGroup"
},
"ScalingAdjustment": "-1",
"AdjustmentType": "ChangeInCapacity"
}
},
"AWSEBSecurityGroupSSHIngress": {
"Type": "AWS::EC2::SecurityGroupIngress",
"Properties": {
"IpProtocol": "tcp",
"GroupName": {
"Ref": "AWSEBSecurityGroup"
},
"ToPort": "3389",
"FromPort": "3389",
"CidrIp": "0.0.0.0\/0"
}
},
"AWSEBAutoScalingScaleUpPolicy": {
"Type": "AWS::AutoScaling::ScalingPolicy",
"Properties": {
"AutoScalingGroupName": {
"Ref": "AWSEBAutoScalingGroup"
},
"ScalingAdjustment": "1",
"AdjustmentType": "ChangeInCapacity"
}
},
"AWSEBBeanstalkMetadata": {
"Type": "AWS::CloudFormation::WaitConditionHandle",
"Metadata": {
"AWS::ElasticBeanstalk::Metadata": {
"Name": "e-tuaw3nmbmf",
"EnvironmentName": "apfmdashboard",
"Description": "TemplatePack for environment: apfmdashboard",
"DateCreated": "2013-05-31T19:57:42",
"DateUpdated": "2013-08-01T19:20:15",
"EnvironmentId": "e-tuaw3nmbmf",
"Version": "649df33c-fadf-11e2-92a7-add10bdac95d"
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment