Created
November 19, 2019 14:57
-
-
Save sshplendid/abaa6b6fc633b6bdccc11d85c38807fd to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Outputs: {} | |
| AWSTemplateFormatVersion: 2010-09-09 | |
| Parameters: | |
| InstanceTypeFamily: | |
| NoEcho: 'true' | |
| Type: String | |
| Description: WebServer EC2 instance type family | |
| Default: t2 | |
| LogPublicationControl: | |
| NoEcho: 'true' | |
| Type: String | |
| Description: If true customer service logs will be published to S3. | |
| AllowedValues: | |
| - 'true' | |
| - 'false' | |
| ConstraintDescription: must be Boolean. | |
| Default: 'false' | |
| InstancePort: | |
| NoEcho: 'true' | |
| Type: String | |
| Description: Listen Port | |
| Default: '80' | |
| XRayEnabled: | |
| NoEcho: 'true' | |
| Type: String | |
| Description: Enables AWS X-Ray for your environment. | |
| Default: 'false' | |
| AWSEBEnvironmentId: | |
| NoEcho: 'true' | |
| Type: String | |
| HooksPkgUrl: | |
| NoEcho: 'true' | |
| Type: String | |
| Description: URL to hooks package | |
| Default: >- | |
| https://s3.dualstack.ap-northeast-2.amazonaws.com/elasticbeanstalk-env-resources-ap-northeast-2/stalks/eb_node_js_4.0.1.203113.0_1570882957/lib/hooks.tar.gz | |
| AWSEBEnvironmentName: | |
| NoEcho: 'true' | |
| Type: String | |
| AWSEBReferrerId: | |
| NoEcho: 'true' | |
| Type: String | |
| Default: '' | |
| AppSource: | |
| NoEcho: 'true' | |
| Type: String | |
| Description: Application Source | |
| Default: >- | |
| http://s3.ap-northeast-2.amazonaws.com/elasticbeanstalk-samples-ap-northeast-2/nodejs-sample-v2.zip | |
| ProxyServer: | |
| NoEcho: 'true' | |
| Type: String | |
| Description: >- | |
| Specifies which proxy server to be used for client connections. Static | |
| file mappings and gzip compression will not take effect if the proxy | |
| server is set to "none". | |
| AllowedValues: | |
| - apache | |
| - nginx | |
| - none | |
| Default: nginx | |
| NodeVersion: | |
| NoEcho: 'true' | |
| Type: String | |
| Description: Version of Node.js. | |
| AllowedValues: | |
| - 4.8.7 | |
| - 4.9.1 | |
| - 5.12.0 | |
| - 6.15.1 | |
| - 6.16.0 | |
| - 6.17.0 | |
| - 6.17.1 | |
| - 7.10.1 | |
| - 8.14.0 | |
| - 8.15.0 | |
| - 8.15.1 | |
| - 8.16.0 | |
| - 8.16.1 | |
| - 8.16.2 | |
| - 10.14.1 | |
| - 10.15.0 | |
| - 10.15.1 | |
| - 10.15.3 | |
| - 10.16.0 | |
| - 10.16.1 | |
| - 10.16.2 | |
| - 10.16.3 | |
| Default: 10.16.3 | |
| NodeStaticFiles: | |
| NoEcho: 'true' | |
| Type: CommaDelimitedList | |
| Description: The directory to serve as static content. | |
| Default: '' | |
| EnvironmentVariables: | |
| NoEcho: 'true' | |
| Type: CommaDelimitedList | |
| Description: Program environment variables. | |
| Default: '' | |
| AWSEBAgentId: | |
| NoEcho: 'true' | |
| Type: String | |
| Default: '' | |
| NodeEnableGzip: | |
| NoEcho: 'true' | |
| Type: String | |
| Description: Specifies if gzip compression is enabled. | |
| AllowedValues: | |
| - 'true' | |
| - 'false' | |
| Default: 'true' | |
| InstanceType: | |
| NoEcho: 'true' | |
| Type: String | |
| Description: WebServer EC2 instance type | |
| AllowedValues: | |
| - t2.nano | |
| - t2.micro | |
| - t2.small | |
| - t2.medium | |
| - t2.large | |
| - t2.xlarge | |
| - t2.2xlarge | |
| - m4.large | |
| - m4.xlarge | |
| - m4.2xlarge | |
| - m4.4xlarge | |
| - m4.10xlarge | |
| - m4.16xlarge | |
| - r4.large | |
| - r4.xlarge | |
| - r4.2xlarge | |
| - r4.4xlarge | |
| - r4.8xlarge | |
| - r4.16xlarge | |
| - i2.xlarge | |
| - i2.2xlarge | |
| - i2.4xlarge | |
| - i2.8xlarge | |
| - i3.large | |
| - i3.xlarge | |
| - i3.2xlarge | |
| - i3.4xlarge | |
| - i3.8xlarge | |
| - i3.16xlarge | |
| - r3.large | |
| - r3.xlarge | |
| - r3.2xlarge | |
| - r3.4xlarge | |
| - r3.8xlarge | |
| - c4.large | |
| - c4.xlarge | |
| - c4.2xlarge | |
| - c4.4xlarge | |
| - c4.8xlarge | |
| - d2.xlarge | |
| - d2.2xlarge | |
| - d2.4xlarge | |
| - d2.8xlarge | |
| - x1.16xlarge | |
| - x1.32xlarge | |
| - x1e.xlarge | |
| - x1e.2xlarge | |
| - x1e.4xlarge | |
| - x1e.8xlarge | |
| - x1e.16xlarge | |
| - x1e.32xlarge | |
| - p2.xlarge | |
| - p2.8xlarge | |
| - p2.16xlarge | |
| - p3.2xlarge | |
| - p3.8xlarge | |
| - p3.16xlarge | |
| - m5.large | |
| - m5.xlarge | |
| - m5.2xlarge | |
| - m5.4xlarge | |
| - m5.8xlarge | |
| - m5.12xlarge | |
| - m5.16xlarge | |
| - m5.24xlarge | |
| - m5.metal | |
| - c5.large | |
| - c5.xlarge | |
| - c5.2xlarge | |
| - c5.4xlarge | |
| - c5.9xlarge | |
| - c5.18xlarge | |
| - c5d.large | |
| - c5d.xlarge | |
| - c5d.2xlarge | |
| - c5d.4xlarge | |
| - c5d.9xlarge | |
| - c5d.18xlarge | |
| - m5d.large | |
| - m5d.xlarge | |
| - m5d.2xlarge | |
| - m5d.4xlarge | |
| - m5d.8xlarge | |
| - m5d.12xlarge | |
| - m5d.16xlarge | |
| - m5d.24xlarge | |
| - m5d.metal | |
| - r5.large | |
| - r5.xlarge | |
| - r5.2xlarge | |
| - r5.4xlarge | |
| - r5.8xlarge | |
| - r5.12xlarge | |
| - r5.16xlarge | |
| - r5.24xlarge | |
| - r5.metal | |
| - r5d.large | |
| - r5d.xlarge | |
| - r5d.2xlarge | |
| - r5d.4xlarge | |
| - r5d.8xlarge | |
| - r5d.12xlarge | |
| - r5d.16xlarge | |
| - r5d.24xlarge | |
| - r5d.metal | |
| - t3.nano | |
| - t3.micro | |
| - t3.small | |
| - t3.medium | |
| - t3.large | |
| - t3.xlarge | |
| - t3.2xlarge | |
| ConstraintDescription: must be a valid EC2 instance type. | |
| Default: t2.micro | |
| AWSEBEnvironmentBucket: | |
| NoEcho: 'true' | |
| Type: String | |
| ServerPort: | |
| NoEcho: 'true' | |
| Type: String | |
| Description: Server Port | |
| Default: '8080' | |
| NodeCommand: | |
| NoEcho: 'true' | |
| Type: String | |
| Description: >- | |
| Command to start the Node.js application. If an empty string is specified, | |
| app.js is used, then server.js, then "npm start" in that order. | |
| Default: '' | |
| Resources: | |
| AWSEBAutoScalingLaunchConfiguration: | |
| Type: 'AWS::AutoScaling::LaunchConfiguration' | |
| Properties: | |
| SecurityGroups: | |
| - !Ref AWSEBSecurityGroup | |
| UserData: !Base64 | |
| 'Fn::Join': | |
| - '' | |
| - - >- | |
| Content-Type: multipart/mixed; | |
| boundary="===============5189065377222898407==" | |
| - |+ | |
| - 'MIME-Version: 1.0' | |
| - |+ | |
| - '' | |
| - |+ | |
| - '--===============5189065377222898407==' | |
| - |+ | |
| - 'Content-Type: text/cloud-config; charset="us-ascii"' | |
| - |+ | |
| - 'MIME-Version: 1.0' | |
| - |+ | |
| - 'Content-Transfer-Encoding: 7bit' | |
| - |+ | |
| - 'Content-Disposition: attachment; filename="cloud-config.txt"' | |
| - |+ | |
| - '' | |
| - |+ | |
| - '#cloud-config' | |
| - |+ | |
| - 'repo_upgrade: none' | |
| - |+ | |
| - 'repo_releasever: ' | |
| - !FindInMap | |
| - ContainerMeta | |
| - AMIMeta | |
| - RepoReleaseVersion | |
| - |+ | |
| - !FindInMap | |
| - AWSEBOptions | |
| - options | |
| - CloudConfigOptions | |
| - |+ | |
| - '' | |
| - |+ | |
| - '--===============5189065377222898407==' | |
| - |+ | |
| - 'Content-Type: text/x-shellscript; charset="us-ascii"' | |
| - |+ | |
| - 'MIME-Version: 1.0' | |
| - |+ | |
| - 'Content-Transfer-Encoding: 7bit' | |
| - |+ | |
| - 'Content-Disposition: attachment; filename="user-data.txt"' | |
| - |+ | |
| - '#!/bin/bash' | |
| - |+ | |
| - >- | |
| exec > >(tee -a /var/log/eb-cfn-init.log|logger -t [eb-cfn-init] | |
| -s 2>/dev/console) 2>&1 | |
| - |+ | |
| - 'echo [`date -u +"%Y-%m-%dT%H:%M:%SZ"`] Started EB User Data' | |
| - |+ | |
| - set -x | |
| - |+ | |
| - |+ | |
| - 'function sleep_delay ' | |
| - |+ | |
| - '{' | |
| - |+ | |
| - ' if (( $SLEEP_TIME < $SLEEP_TIME_MAX )); then ' | |
| - |+ | |
| - ' echo Sleeping $SLEEP_TIME' | |
| - |+ | |
| - ' sleep $SLEEP_TIME ' | |
| - |+ | |
| - ' SLEEP_TIME=$(($SLEEP_TIME * 2)) ' | |
| - |+ | |
| - ' else ' | |
| - |+ | |
| - ' echo Sleeping $SLEEP_TIME_MAX ' | |
| - |+ | |
| - ' sleep $SLEEP_TIME_MAX ' | |
| - |+ | |
| - ' fi' | |
| - |+ | |
| - '}' | |
| - |+ | |
| - '# Executing bootstrap script' | |
| - |+ | |
| - SLEEP_TIME=10 | |
| - |+ | |
| - SLEEP_TIME_MAX=3600 | |
| - |+ | |
| - 'while true; do ' | |
| - |+ | |
| - ' curl ' | |
| - !FindInMap | |
| - AWSEBOptions | |
| - options | |
| - UserDataScript | |
| - ' > /tmp/ebbootstrap.sh ' | |
| - |+ | |
| - ' RESULT=$?' | |
| - |+ | |
| - ' if [[ "$RESULT" -ne 0 ]]; then ' | |
| - |+ | |
| - ' sleep_delay ' | |
| - |+ | |
| - ' else' | |
| - |+ | |
| - ' /bin/bash /tmp/ebbootstrap.sh ' | |
| - ' ''' | |
| - !FindInMap | |
| - AWSEBOptions | |
| - options | |
| - rpms | |
| - '''' | |
| - ' ''' | |
| - !FindInMap | |
| - AWSEBOptions | |
| - options | |
| - tarballs | |
| - '''' | |
| - ' ''' | |
| - !FindInMap | |
| - AWSEBOptions | |
| - options | |
| - ebgems | |
| - '''' | |
| - ' ''' | |
| - !Ref AWSEBInstanceLaunchWaitHandle | |
| - '''' | |
| - ' ''' | |
| - !Ref 'AWS::StackId' | |
| - '''' | |
| - ' ''' | |
| - !Ref 'AWS::Region' | |
| - '''' | |
| - ' ''' | |
| - !FindInMap | |
| - AWSEBOptions | |
| - options | |
| - guid | |
| - '''' | |
| - ' ''' | |
| - !FindInMap | |
| - AWSEBOptions | |
| - options | |
| - AWSEBHealthdGroupId | |
| - '''' | |
| - ' ''' | |
| - !FindInMap | |
| - AWSEBOptions | |
| - options | |
| - AWSEBHealthdEndpoint | |
| - '''' | |
| - ' ''' | |
| - !FindInMap | |
| - AWSEBOptions | |
| - options | |
| - ProxyServer | |
| - '''' | |
| - ' ''' | |
| - !FindInMap | |
| - AWSEBOptions | |
| - options | |
| - HealthdProxyLogLocation | |
| - '''' | |
| - ' && ' | |
| - |+ | |
| - ' exit 0 ' | |
| - |+ | |
| - ' fi ' | |
| - |+ | |
| - done | |
| - |+ | |
| - '--===============5189065377222898407==-- ' | |
| ImageId: !FindInMap | |
| - AWSEBAWSRegionArch2AMI | |
| - !Ref 'AWS::Region' | |
| - !FindInMap | |
| - AWSEBAWSInstanceTypeFamily2Arch | |
| - !Ref InstanceTypeFamily | |
| - Arch | |
| IamInstanceProfile: aws-elasticbeanstalk-ec2-role | |
| InstanceType: !Ref InstanceType | |
| InstanceMonitoring: false | |
| Metadata: | |
| 'AWS::CloudFormation::Designer': | |
| id: b48bc52a-ee55-4559-af6a-5ded59acd49f | |
| AWSEBV2LoadBalancer: | |
| Properties: | |
| SecurityGroups: | |
| - !Ref AWSEBLoadBalancerSecurityGroup | |
| Subnets: | |
| - subnet-afd41fd4 | |
| - subnet-a5af4cce | |
| - subnet-bb085ff7 | |
| Type: 'AWS::ElasticLoadBalancingV2::LoadBalancer' | |
| Metadata: | |
| 'AWS::CloudFormation::Designer': | |
| id: 2ffeba1c-1361-4367-be92-2367298bdfde | |
| AWSEBV2LoadBalancerListener: | |
| Properties: | |
| LoadBalancerArn: !Ref AWSEBV2LoadBalancer | |
| DefaultActions: | |
| - TargetGroupArn: !Ref AWSEBV2LoadBalancerTargetGroup | |
| Type: forward | |
| Port: 80 | |
| Protocol: HTTP | |
| Type: 'AWS::ElasticLoadBalancingV2::Listener' | |
| Metadata: | |
| 'AWS::CloudFormation::Designer': | |
| id: 47f5afb5-242e-4eea-9536-04b077c97dba | |
| AWSEBLoadBalancerSecurityGroup: | |
| Properties: | |
| GroupDescription: >- | |
| Elastic Beanstalk created security group used when no ELB security | |
| groups are specified during ELB creation | |
| VpcId: vpc-0e609665 | |
| SecurityGroupIngress: | |
| - CidrIp: 0.0.0.0/0 | |
| FromPort: '80' | |
| ToPort: '80' | |
| IpProtocol: tcp | |
| SecurityGroupEgress: | |
| - CidrIp: 0.0.0.0/0 | |
| FromPort: '80' | |
| ToPort: '80' | |
| IpProtocol: tcp | |
| Type: 'AWS::EC2::SecurityGroup' | |
| Metadata: | |
| 'AWS::CloudFormation::Designer': | |
| id: e03965ce-3a25-4823-8cf5-eb36b9646fc6 | |
| AWSEBSecurityGroup: | |
| Properties: | |
| GroupDescription: SecurityGroup for ElasticBeanstalk environment. | |
| SecurityGroupIngress: | |
| - FromPort: '80' | |
| ToPort: '80' | |
| IpProtocol: tcp | |
| SourceSecurityGroupId: !Ref AWSEBLoadBalancerSecurityGroup | |
| Type: 'AWS::EC2::SecurityGroup' | |
| Metadata: | |
| 'AWS::CloudFormation::Designer': | |
| id: 153ca25b-bacb-4bc4-a382-461dd52fd396 | |
| AWSEBAutoScalingScaleDownPolicy: | |
| Properties: | |
| ScalingAdjustment: '-1' | |
| AutoScalingGroupName: !Ref AWSEBAutoScalingGroup | |
| AdjustmentType: ChangeInCapacity | |
| Type: 'AWS::AutoScaling::ScalingPolicy' | |
| Metadata: | |
| 'AWS::CloudFormation::Designer': | |
| id: 4146c6fd-7974-47cb-80ec-419824065a4c | |
| AWSEBInstanceLaunchWaitHandle: | |
| Type: 'AWS::CloudFormation::WaitConditionHandle' | |
| Metadata: | |
| 'AWS::CloudFormation::Designer': | |
| id: 85e1b63b-9003-4853-895d-462739740fd0 | |
| AWSEBAutoScalingGroup: | |
| Metadata: | |
| ForcingMetadataUpdate: Changing something in the metadata will force re-compuation | |
| 'AWS::CloudFormation::Init': | |
| Infra-WriteTailLogsConf: | |
| files: | |
| /opt/elasticbeanstalk/tasks/taillogs.d/eb-activity.conf: | |
| mode: '000644' | |
| content: !Join | |
| - |+ | |
| - - /var/log/eb-commandprocessor.log | |
| - /var/log/eb-activity.log | |
| - '' | |
| /opt/elasticbeanstalk/tasks/taillogs.d/eb-version-deployment.conf: | |
| content: !Join | |
| - |+ | |
| - - /var/log/eb-version-deployment.log | |
| - '' | |
| Infra-WriteBundleLogsConf: | |
| files: | |
| /opt/elasticbeanstalk/tasks/bundlelogs.d/eb-system.conf: | |
| mode: '000644' | |
| content: !Join | |
| - |+ | |
| - - /var/log/eb-cfn-init* | |
| - /var/log/eb-tools* | |
| - /var/log/eb-publish-logs* | |
| - /var/log/eb-commandprocessor* | |
| - /var/log/eb-activity* | |
| - '' | |
| /opt/elasticbeanstalk/tasks/bundlelogs.d/cfn-system.conf: | |
| mode: '000644' | |
| content: !Join | |
| - |+ | |
| - - /var/log/cfn-hup* | |
| - /var/log/cfn-init* | |
| - /var/log/cfn-wire* | |
| - '' | |
| /opt/elasticbeanstalk/tasks/bundlelogs.d/eb-version-deployment.conf: | |
| content: !Join | |
| - |+ | |
| - - /var/log/eb-version-deployment.log | |
| - '' | |
| /opt/elasticbeanstalk/tasks/bundlelogs.d/cloud-init-system.conf: | |
| mode: '000644' | |
| content: !Join | |
| - |+ | |
| - - /var/log/cloud-init* | |
| - '' | |
| /opt/elasticbeanstalk/tasks/bundlelogs.d/system.conf: | |
| mode: '000644' | |
| content: !Join | |
| - |+ | |
| - - /var/log/cron | |
| - /var/log/messages | |
| - /var/log/yum.log | |
| - '' | |
| InfoTask-TailLogs: | |
| commands: | |
| taillogs: | |
| command: !Join | |
| - '' | |
| - - >- | |
| tailLogs.py --concatenate --conf-path | |
| '/opt/elasticbeanstalk/tasks/taillogs.d/*' | |
| --location-prefix | |
| - !FindInMap | |
| - EnvironmentInfoTasks | |
| - tail | |
| - LocationPrefix | |
| Infra-WriteLeaderTestScript: | |
| files: | |
| /opt/elasticbeanstalk/bin/leader-test.sh: | |
| mode: '000755' | |
| content: !Join | |
| - '' | |
| - - '#!/bin/bash' | |
| - |+ | |
| - 'if [[ "$EB_IS_COMMAND_LEADER" == "true" ]]; then ' | |
| - |+ | |
| - ' exit 0 ' | |
| - |+ | |
| - 'else ' | |
| - |+ | |
| - ' exit 1 ' | |
| - |+ | |
| - 'fi ' | |
| - |+ | |
| InfoTask-BundleLogs: | |
| commands: | |
| bundlelogs: | |
| command: !Join | |
| - '' | |
| - - >- | |
| bundleLogs.py --conf-path | |
| '/opt/elasticbeanstalk/tasks/bundlelogs.d/*' | |
| --location-prefix | |
| - !FindInMap | |
| - EnvironmentInfoTasks | |
| - bundle | |
| - LocationPrefix | |
| AWSEBBaseConfig: | |
| files: | |
| /etc/cfn/cfn-hup.conf: | |
| mode: '000400' | |
| owner: root | |
| content: !Join | |
| - '' | |
| - - '[main]' | |
| - |+ | |
| - stack= | |
| - !Ref 'AWS::StackId' | |
| - |+ | |
| - region= | |
| - !Ref 'AWS::Region' | |
| - |+ | |
| - | | |
| verbose=true | |
| - | | |
| multi-threaded=false | |
| group: root | |
| /etc/elasticbeanstalk/.aws-eb-stack.properties: | |
| mode: '000440' | |
| owner: root | |
| content: !Join | |
| - '' | |
| - - environment_id= | |
| - !Ref AWSEBEnvironmentId | |
| - |+ | |
| - environment_bucket= | |
| - !Ref AWSEBEnvironmentBucket | |
| - |+ | |
| - stack_name= | |
| - !Ref 'AWS::StackId' | |
| - |+ | |
| - resource= | |
| - AWSEBAutoScalingGroup | |
| - |+ | |
| - region= | |
| - !Ref 'AWS::Region' | |
| - |+ | |
| group: root | |
| /etc/init/cfn-hup.conf: | |
| mode: '000400' | |
| owner: root | |
| content: !Join | |
| - |+ | |
| - - 'stop on runlevel [016]' | |
| - respawn | |
| - script | |
| - ' /opt/aws/bin/cfn-hup' | |
| - end script | |
| group: root | |
| /etc/cfn/hooks.d/aws-eb-command-handler.conf: | |
| content: !Join | |
| - '' | |
| - - '[aws-eb-command-handler]' | |
| - |+ | |
| - triggers=on.command | |
| - |+ | |
| - path=ElasticBeanstalkCommand- | |
| - AWSEBAutoScalingGroup | |
| - |+ | |
| - action=/opt/elasticbeanstalk/bin/command-processor | |
| - |+ | |
| commands: | |
| clearbackupfiles: | |
| command: rm -f /etc/cfn/hooks.d/*.bak | |
| Hook-PreAppDeploy: | |
| commands: | |
| hooks: | |
| command: echo place holder | |
| InfoTask-SystemTailLogs: | |
| commands: | |
| systemtaillogs: | |
| command: !Join | |
| - '' | |
| - - >- | |
| tailLogs.py --conf-path | |
| '/opt/elasticbeanstalk/tasks/systemtaillogs.d/*' | |
| --location-prefix | |
| - !FindInMap | |
| - EnvironmentInfoTasks | |
| - systemtail | |
| - LocationPrefix | |
| AWSEBMessageOfTheDay: | |
| files: | |
| /tmp/10eb-banner: | |
| mode: '000755' | |
| owner: root | |
| content: !Join | |
| - '' | |
| - - cat << EOF | |
| - |+ | |
| - ' _____ _ _ _ ____ _ _ _' | |
| - |+ | |
| - >- | |
| | ____| | __ _ ___| |_(_) ___| __ ) ___ __ _ _ __ ___| |_ | |
| __ _| | | __ | |
| - |+ | |
| - >- | |
| | _| | |/ _\` / __| __| |/ __| _ \ / _ \/ _\` | '_ \/ __| | |
| __/ _\` | | |/ / | |
| - |+ | |
| - >- | |
| | |___| | (_| \__ \ |_| | (__| |_) | __/ (_| | | | \__ \ || | |
| (_| | | < | |
| - |+ | |
| - >- | |
| |_____|_|\__,_|___/\__|_|\___|____/ \___|\__,_|_| | |
| |_|___/\__\__,_|_|_|\_\\ | |
| - |+ | |
| - ' Amazon Linux AMI' | |
| - |+ | |
| - |+ | |
| - >- | |
| This EC2 instance is managed by AWS Elastic Beanstalk. | |
| Changes made via SSH | |
| - |+ | |
| - >- | |
| WILL BE LOST if the instance is replaced by auto-scaling. | |
| For more information | |
| - |+ | |
| - >- | |
| on customizing your Elastic Beanstalk environment, see our | |
| documentation here: | |
| - |+ | |
| - >- | |
| http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/customize-containers-ec2.html | |
| - |+ | |
| - EOF | |
| - |+ | |
| group: root | |
| commands: | |
| 01clearoriginal: | |
| command: rm -f /etc/update-motd.d/* | |
| 02createbanner: | |
| command: mv /tmp/10eb-banner /etc/update-motd.d/10eb-banner | |
| 03updatebanner: | |
| command: /usr/sbin/update-motd | |
| Infra-WriteSystemTailLogsConf: | |
| files: | |
| /opt/elasticbeanstalk/tasks/systemtaillogs.d/eb-system.conf: | |
| mode: '000644' | |
| content: !Join | |
| - |+ | |
| - - /var/log/eb-cfn-init.log | |
| - /var/log/eb-tools.log | |
| - /var/log/eb-publish-logs.log | |
| - /var/log/eb-commandprocessor.log | |
| - /var/log/eb-activity.log | |
| - '' | |
| /opt/elasticbeanstalk/tasks/systemtaillogs.d/eb-version-deployment.conf: | |
| content: !Join | |
| - |+ | |
| - - /var/log/eb-version-deployment.log | |
| - '' | |
| /opt/elasticbeanstalk/tasks/systemtaillogs.d/cfn-system.conf: | |
| mode: '000644' | |
| content: !Join | |
| - |+ | |
| - - /var/log/cfn-hup.log | |
| - /var/log/cfn-init.log | |
| - '' | |
| /opt/elasticbeanstalk/tasks/systemtaillogs.d/system.conf: | |
| mode: '000644' | |
| content: !Join | |
| - |+ | |
| - - /var/log/cron | |
| - /var/log/messages | |
| - /var/log/yum.log | |
| - '' | |
| /opt/elasticbeanstalk/tasks/systemtaillogs.d/cloud-init-system.conf: | |
| mode: '000644' | |
| content: !Join | |
| - |+ | |
| - - /var/log/cloud-init.log | |
| - '' | |
| Infra-PatchInstance: | |
| files: | |
| /opt/elasticbeanstalk/bin/patch_instance: | |
| mode: '000750' | |
| owner: root | |
| source: !Select | |
| - 0 | |
| - !FindInMap | |
| - AWSEBOptions | |
| - options | |
| - ebpatchscripturl | |
| group: root | |
| commands: | |
| 01executepatch: | |
| command: /opt/elasticbeanstalk/bin/patch_instance | |
| prebuild_1_nodejs_app_lb: | |
| cron: | |
| - schedule: '* * * * *' | |
| name: task1 | |
| url: /scheduled | |
| version: 1 | |
| Infra-InstallContainerHooksPkg: | |
| commands: | |
| 01download_container_hooks: | |
| command: !Join | |
| - '' | |
| - - curl -sS --retry 3 ' | |
| - !Ref HooksPkgUrl | |
| - ''' -o /tmp/hooks.tar.gz' | |
| 03cleanup: | |
| command: rm -f /tmp/hooks.tar.gz | |
| 00mkdir: | |
| command: mkdir -p /opt/elasticbeanstalk | |
| 02install_container_hooks: | |
| command: >- | |
| tar zxf /tmp/hooks.tar.gz --no-same-owner --no-same-permission | |
| -C /opt/elasticbeanstalk | |
| Infra-WritePublishLogsCron: | |
| files: | |
| /etc/cron.d/publishlogs: | |
| mode: '000644' | |
| content: !Join | |
| - '' | |
| - - SHELL=/bin/bash | |
| - |+ | |
| - 'PATH=/sbin:/bin:/usr/sbin:/usr/bin' | |
| - |+ | |
| - MAILTO="" | |
| - |+ | |
| - HOME=/ | |
| - |+ | |
| - '10,30,50 * * * * root ' | |
| - >- | |
| publishLogs.py --de-dupe --conf-path | |
| '/opt/elasticbeanstalk/tasks/publishlogs.d/*' | |
| --location-prefix | |
| - !FindInMap | |
| - EnvironmentInfoTasks | |
| - publish | |
| - LocationPrefix | |
| - ' --num-concurrent 2' | |
| - |+ | |
| - '05,25,45 * * * * root ' | |
| - clearStaleLogPublishingRecords.py | |
| - |+ | |
| prebuild_0_nodejs_app_lb: | |
| files: | |
| /opt/elasticbeanstalk/tasks/taillogs.d/01-sample-app.conf: | |
| content: | | |
| /tmp/sample-app.log | |
| /opt/elasticbeanstalk/tasks/bundlelogs.d/01-sample-app.conf: | |
| content: | | |
| /tmp/sample-app* | |
| Infra-WriteApplication1: | |
| commands: | |
| 01mkdir: | |
| command: >- | |
| rm -rf /opt/elasticbeanstalk/deploy/appsource/; mkdir -p | |
| /opt/elasticbeanstalk/deploy/appsource/ | |
| configSets: | |
| Infra-WriteTailLogsConf: | |
| - Infra-WriteTailLogsConf | |
| Infra-WriteBundleLogsConf: | |
| - Infra-WriteBundleLogsConf | |
| InfoTask-TailLogs: | |
| - InfoTask-TailLogs | |
| InfoTask-BundleLogs: | |
| - InfoTask-BundleLogs | |
| _OnInstanceReboot: | |
| - AWSEBBaseConfig | |
| _AppInstall: | |
| - prebuild_0_nodejs_app_lb | |
| - prebuild_1_nodejs_app_lb | |
| - Hook-PreAppDeploy | |
| Infra-EmbeddedPreBuild: | |
| - prebuild_0_nodejs_app_lb | |
| - prebuild_1_nodejs_app_lb | |
| Hook-PreAppDeploy: | |
| - Hook-PreAppDeploy | |
| InfoTask-SystemTailLogs: | |
| - InfoTask-SystemTailLogs | |
| Infra-WriteSystemTailLogsConf: | |
| - Infra-WriteSystemTailLogsConf | |
| _OnInstanceBoot: | |
| - AWSEBBaseConfig | |
| - AWSEBMessageOfTheDay | |
| - AWSEBULimitConfig | |
| - Infra-InstallContainerHooksPkg | |
| - Infra-WriteLeaderTestScript | |
| - Infra-WriteTailLogsConf | |
| - Infra-WriteSystemTailLogsConf | |
| - Infra-WriteBundleLogsConf | |
| - Infra-WritePublishLogsConf | |
| - Infra-WritePublishLogsCron | |
| Infra-EmbeddedPostBuild: [] | |
| Infra-WritePublishLogsCron: | |
| - Infra-WritePublishLogsCron | |
| Infra-WriteApplication1: | |
| - Infra-WriteApplication1 | |
| Infra-WriteApplication2: | |
| - Infra-WriteApplication2 | |
| Infra-WritePublishLogsConf: | |
| - Infra-WritePublishLogsConf | |
| _Infra-PatchInstance: | |
| - Infra-PatchInstance | |
| Infra-WriteApplication2: | |
| files: | |
| /opt/elasticbeanstalk/bin/download_source_bundle: | |
| owner: root | |
| mode: '000750' | |
| source: !Select | |
| - 0 | |
| - !FindInMap | |
| - AWSEBOptions | |
| - options | |
| - downloadSourceBundleScriptLocation | |
| group: root | |
| commands: | |
| 01downloadVersion: | |
| command: /opt/elasticbeanstalk/bin/download_source_bundle | |
| 02deleteVersionDownloadScriptFile: | |
| command: rm /opt/elasticbeanstalk/bin/download_source_bundle | |
| Infra-WritePublishLogsConf: | |
| files: {} | |
| AWSEBULimitConfig: | |
| files: | |
| /etc/elasticbeanstalk/set-ulimit.sh: | |
| mode: '000755' | |
| owner: root | |
| content: !Join | |
| - '' | |
| - - '#!/bin/bash -xe' | |
| - |+ | |
| - '' | |
| - |+ | |
| - '# System imposed global limit' | |
| - |+ | |
| - FILES_MAX=$(cat /proc/sys/fs/file-max) | |
| - |+ | |
| - '' | |
| - |+ | |
| - 'if [[ ! $FILES_MAX =~ ^[0-9]+$ ]]; then' | |
| - |+ | |
| - ' echo WARNING: Unable to determine file max for this system' | |
| - |+ | |
| - ' exit 0' | |
| - |+ | |
| - fi | |
| - |+ | |
| - '' | |
| - |+ | |
| - '# Per user limit' | |
| - |+ | |
| - let "USER_LIMIT=$FILES_MAX/3" | |
| - |+ | |
| - '' | |
| - |+ | |
| - 'if [ $USER_LIMIT -lt 4096 ]; then' | |
| - |+ | |
| - ' USER_LIMIT=4096' | |
| - |+ | |
| - fi | |
| - |+ | |
| - '' | |
| - |+ | |
| - 'if [ $USER_LIMIT -gt 200000 ]; then' | |
| - |+ | |
| - ' USER_LIMIT=200000' | |
| - |+ | |
| - fi | |
| - |+ | |
| - '' | |
| - |+ | |
| - ulimit -n $USER_LIMIT | |
| - |+ | |
| group: root | |
| commands: | |
| 00removebackup: | |
| command: rm -f /etc/elasticbeanstalk/set-ulimit.sh.bak* | |
| 'AWS::ElasticBeanstalk::Ext': | |
| _AppSourceUrlFileContent: | |
| url: !Ref AppSource | |
| _TriggersConfig: | |
| configDeploy: | |
| _Command: CMD-ConfigDeploy | |
| _WatchGroups: | |
| - _TriggerConfigDeployment | |
| applicationDeploy: | |
| _Command: CMD-AppDeploy | |
| _WatchGroups: | |
| - _TriggerAppDeployment | |
| _ParameterTriggers: | |
| _TriggerConfigDeployment: | |
| - EnvironmentVariables | |
| - InstancePort | |
| - LogPublicationControl | |
| - InstancePort | |
| - ServerPort | |
| - NodeVersion | |
| - ProxyServer | |
| - NodeStaticFiles | |
| - EnvironmentVariables | |
| - NodeCommand | |
| - NodeEnableGzip | |
| - XRayEnabled | |
| _TriggerAppDeployment: | |
| - AppSource | |
| _ContainerConfigFileContent: | |
| container: | |
| config_staging_dir: /tmp/deployment/config | |
| nodejs_log_dir: /var/log/nodejs | |
| log_group_name_prefix: /aws/elasticbeanstalk | |
| app_base_dir: /var/app | |
| app_user_home: /tmp | |
| app_deploy_dir: /var/app/current | |
| eb_bundles_url: >- | |
| https://s3.dualstack.ap-northeast-2.amazonaws.com/elasticbeanstalk-env-resources-ap-northeast-2/stalks/eb_node_js_4.0.1.203113.0_1570882957/lib/ | |
| app_user: nodejs | |
| nodejs_download_url: !FindInMap | |
| - AWSEBOptions | |
| - options | |
| - NodeDownloadUrl | |
| nodejs_proxy_port: '8081' | |
| server_port: !Ref ServerPort | |
| app_staging_dir: /tmp/deployment/application | |
| nodejs_standalone_port: '8080' | |
| instance_port: !Ref InstancePort | |
| default_log_list: | |
| - /var/log/nodejs/nodejs.log | |
| - /var/log/nginx/error.log | |
| - /var/log/nginx/access.log | |
| - /var/log/httpd/error_log | |
| - /var/log/httpd/access_log | |
| xray_enabled: !Ref XRayEnabled | |
| nodejs_install_dir: /opt/elasticbeanstalk/node-install | |
| xray_rpm_location: !Join | |
| - '' | |
| - - 'https://aws-xray.' | |
| - !Ref 'AWS::Region' | |
| - .s3.amazonaws.com/daemon/ | |
| - !FindInMap | |
| - XRay | |
| - Configuration | |
| - Version | |
| - /linux/aws-xray-daemon.rpm | |
| source_bundle: /opt/elasticbeanstalk/deploy/appsource/source_bundle | |
| common_log_list: | |
| - /var/log/eb-activity.log | |
| environment_name: !Ref AWSEBEnvironmentName | |
| optionsettings: | |
| 'aws:elasticbeanstalk:container:nodejs': | |
| NodeVersion: !Ref NodeVersion | |
| GzipCompression: !Ref NodeEnableGzip | |
| NodeCommand: !Ref NodeCommand | |
| ProxyServer: !Ref ProxyServer | |
| 'aws:elasticbeanstalk:application:environment': !Ref EnvironmentVariables | |
| 'aws:elasticbeanstalk:hostmanager': | |
| LogPublicationControl: !Ref LogPublicationControl | |
| 'aws:elasticbeanstalk:container:nodejs:staticfiles': | |
| NodeStaticFiles: !Ref NodeStaticFiles | |
| system: | |
| LogPublicationControl: !Ref LogPublicationControl | |
| AWSEBAgentId: !Ref AWSEBAgentId | |
| AWSEBReferrerId: !Ref AWSEBReferrerId | |
| commands: | |
| CMD-TailLogs: | |
| persistent_configuration: true | |
| stages: | |
| - name: TailLogs | |
| actions: | |
| - name: TailLogs | |
| type: sh | |
| value: >- | |
| tailLogs.py --concatenate --conf-path | |
| '/opt/elasticbeanstalk/tasks/taillogs.d/*' | |
| --location-prefix 'resources/environments/logs/tail/' | |
| CMD-PreInit: | |
| refresh_manifest: true | |
| stages: | |
| - name: PreInitStage0 | |
| actions: | |
| - name: DownloadSourceBundle | |
| type: infra | |
| value: /opt/elasticbeanstalk/bin/download-source-bundle | |
| - name: PreInitHook | |
| type: hook | |
| value: preinit | |
| CMD-Startup: | |
| stages: | |
| - name: StartupStage0 | |
| actions: | |
| - name: HealthdLogRotation | |
| type: infra | |
| value: infra-healthd_log_rotation.rb | |
| - name: HealthdHTTPDLogging | |
| type: infra | |
| value: infra-healthd_httpd_logging.rb | |
| - name: HealthdNginxLogging | |
| type: infra | |
| value: infra-healthd_nginx_logging.rb | |
| - name: EbExtensionPreBuild | |
| type: infra | |
| value: infra-embedded_prebuild.rb | |
| - name: AppDeployPreHook | |
| type: hook | |
| value: appdeploy/pre | |
| - name: EbExtensionPostBuild | |
| type: infra | |
| value: infra-embedded_postbuild.rb | |
| - name: InfraCleanEbExtension | |
| type: infra | |
| value: infra-clean_ebextensions_dir.rb | |
| - name: StartupStage1 | |
| actions: | |
| - name: AppDeployEnactHook | |
| type: hook | |
| value: appdeploy/enact | |
| - name: AppDeployPostHook | |
| type: hook | |
| value: appdeploy/post | |
| - name: PostInitHook | |
| type: hook | |
| value: postinit | |
| CMD-PublishLogs: | |
| persistent_configuration: true | |
| stages: | |
| - name: PublishLogs | |
| actions: | |
| - name: PublishLogs | |
| type: sh | |
| value: >- | |
| publishLogs.py --de-dupe --conf-path | |
| '/opt/elasticbeanstalk/tasks/publishlogs.d/*' | |
| --location-prefix 'resources/environments/logs/publish/' | |
| --num-concurrent 2 | |
| CMD-ImmutableDeploymentFlip: | |
| persistent_configuration: true | |
| stages: | |
| - name: ImmutableDeploymentFlip | |
| actions: | |
| - name: FlipCommandRegistration | |
| type: infra | |
| value: infra-reregister-cfn-hup.rb | |
| CMD-AppDeploy: | |
| refresh_manifest: true | |
| stages: | |
| - name: AppDeployStage0 | |
| actions: | |
| - name: DownloadSourceBundle | |
| type: infra | |
| value: /opt/elasticbeanstalk/bin/download-source-bundle | |
| - name: EbExtensionPreBuild | |
| type: infra | |
| value: infra-embedded_prebuild.rb | |
| - name: AppDeployPreHook | |
| type: hook | |
| value: appdeploy/pre | |
| - name: EbExtensionPostBuild | |
| type: infra | |
| value: infra-embedded_postbuild.rb | |
| - name: InfraCleanEbextension | |
| type: infra | |
| value: infra-clean_ebextensions_dir.rb | |
| - name: AppDeployStage1 | |
| actions: | |
| - name: AppDeployEnactHook | |
| type: hook | |
| value: appdeploy/enact | |
| - name: AppDeployPostHook | |
| type: hook | |
| value: appdeploy/post | |
| CMD-BundleLogs: | |
| persistent_configuration: true | |
| stages: | |
| - name: BundleLogs | |
| actions: | |
| - name: BundleLogs | |
| type: sh | |
| value: >- | |
| bundleLogs.py --conf-path | |
| '/opt/elasticbeanstalk/tasks/bundlelogs.d/*' | |
| --location-prefix 'resources/environments/logs/bundle/' | |
| CMD-SelfStartup: | |
| stages: | |
| - name: StartupStage0 | |
| actions: | |
| - name: HealthdLogRotation | |
| type: infra | |
| value: infra-healthd_log_rotation.rb | |
| - name: HealthdHTTPDLogging | |
| type: infra | |
| value: infra-healthd_httpd_logging.rb | |
| - name: HealthdNginxLogging | |
| type: infra | |
| value: infra-healthd_nginx_logging.rb | |
| - name: EbExtensionPreBuild | |
| type: infra | |
| value: infra-embedded_prebuild.rb | |
| - name: AppDeployPreHook | |
| type: hook | |
| value: appdeploy/pre | |
| - name: EbExtensionPostBuild | |
| type: infra | |
| value: infra-embedded_postbuild.rb | |
| - name: InfraCleanEbextension | |
| type: infra | |
| value: infra-clean_ebextensions_dir.rb | |
| - name: StartupStage1 | |
| actions: | |
| - name: AppDeployEnactHook | |
| type: hook | |
| value: appdeploy/enact | |
| - name: AppDeployPostHook | |
| type: hook | |
| value: appdeploy/post | |
| - name: PostInitHook | |
| type: hook | |
| value: postinit | |
| CMD-SystemTailLogs: | |
| persistent_configuration: true | |
| stages: | |
| - name: SystemTailLogs | |
| actions: | |
| - name: SystemTailLogs | |
| type: sh | |
| value: >- | |
| tailLogs.py --concatenate --conf-path | |
| '/opt/elasticbeanstalk/tasks/systemtaillogs.d/*' | |
| --location-prefix | |
| 'resources/environments/logs/systemtail/' | |
| CMD-RestartAppServer: | |
| stages: | |
| - name: RestartAppServerStage0 | |
| actions: | |
| - name: RestartAppServerPreHook | |
| type: hook | |
| value: restartappserver/pre | |
| - name: RestartAppServerStage1 | |
| actions: | |
| - name: RestartAppServerEnactHook | |
| type: hook | |
| value: restartappserver/enact | |
| - name: RestartAppServerPostHook | |
| type: hook | |
| value: restartappserver/post | |
| CMD-ConfigDeploy: | |
| refresh_manifest: true | |
| stages: | |
| - name: ConfigDeployStage0 | |
| actions: | |
| - name: ConfigDeployPreHook | |
| type: hook | |
| value: configdeploy/pre | |
| - name: ConfigDeployStage1 | |
| actions: | |
| - name: ConfigDeployEnactHook | |
| type: hook | |
| value: configdeploy/enact | |
| - name: ConfigDeployPostHook | |
| type: hook | |
| value: configdeploy/post | |
| _LaunchS3URL: >- | |
| https://elasticbeanstalk-ap-northeast-2.s3.ap-northeast-2.amazonaws.com/environments/ab60b676-6b05-49cb-9a59-8a0407016364/launch_control?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20191119T143526Z&X-Amz-SignedHeaders=host&X-Amz-Expires=43200&X-Amz-Credential=AKIAJBFAR227J2OER4XA%2F20191119%2Fap-northeast-2%2Fs3%2Faws4_request&X-Amz-Signature=f79a7931e1093a7cfd920d7d6493184de1a3bf011458d6e333f96d94467d191a | |
| _EBExtensionFilePaths: | |
| prebuild_1_nodejs_app_lb: cron.yaml | |
| prebuild_0_nodejs_app_lb: .ebextensions/logging.config | |
| _API: | |
| _Commands: | |
| CMD-TailLogs: | |
| _Stages: | |
| 01_enact: | |
| - InfoTask-TailLogs | |
| CMD-Startup: | |
| _RunStaged: 'true' | |
| _Stages: | |
| 01_pre: [] | |
| 02_enact: [] | |
| CMD-AppDeploy: | |
| _RunStaged: 'true' | |
| _Stages: | |
| 01_pre: [] | |
| 02_enact: [] | |
| CMD-BundleLogs: | |
| _Stages: | |
| 01_enact: | |
| - InfoTask-BundleLogs | |
| CMD-SystemTailLogs: | |
| _Stages: | |
| 01_enact: | |
| - InfoTask-SystemTailLogs | |
| CMD-PatchInstance: | |
| _Stages: | |
| 01_enact: | |
| - _Infra-PatchInstance | |
| CMD-RestartAppServer: | |
| _RunStaged: 'false' | |
| _Stages: | |
| 01_enact: [] | |
| 02_enact: [] | |
| CMD-ConfigDeploy: | |
| _RunStaged: 'true' | |
| _Stages: | |
| 01_pre: [] | |
| 02_enact: [] | |
| AvailabilityZoneCount: Any | |
| InstanceSignalURL: !Ref AWSEBInstanceLaunchWaitHandle | |
| _EnvironmentInfoTaskMapping: EnvironmentInfoTasks | |
| 'AWS::CloudFormation::Designer': | |
| id: 2d058716-e90e-4de0-8f7c-3e141eedf825 | |
| Type: 'AWS::AutoScaling::AutoScalingGroup' | |
| DependsOn: AWSEBBeanstalkMetadata | |
| Properties: | |
| MinSize: '2' | |
| LaunchConfigurationName: !Ref AWSEBAutoScalingLaunchConfiguration | |
| TargetGroupARNs: | |
| - !Ref AWSEBV2LoadBalancerTargetGroup | |
| AvailabilityZones: | |
| - ap-northeast-2a | |
| - ap-northeast-2c | |
| Cooldown: '360' | |
| MaxSize: '3' | |
| Tags: | |
| - Value: !Ref AWSEBEnvironmentName | |
| Key: 'elasticbeanstalk:environment-name' | |
| PropagateAtLaunch: true | |
| - Value: !Ref AWSEBEnvironmentName | |
| Key: Name | |
| PropagateAtLaunch: true | |
| - Value: !Ref AWSEBEnvironmentId | |
| Key: 'elasticbeanstalk:environment-id' | |
| PropagateAtLaunch: true | |
| AWSEBInstanceLaunchWaitCondition: | |
| Type: 'AWS::CloudFormation::WaitCondition' | |
| DependsOn: AWSEBAutoScalingGroup | |
| Properties: | |
| Timeout: '900' | |
| Count: '2' | |
| Handle: !Ref AWSEBInstanceLaunchWaitHandle | |
| Metadata: | |
| 'AWS::CloudFormation::Designer': | |
| id: 9581cb3e-d8d1-4723-91ea-2f9a7c2e8045 | |
| AWSEBAutoScalingScaleUpPolicy: | |
| Properties: | |
| ScalingAdjustment: '1' | |
| AutoScalingGroupName: !Ref AWSEBAutoScalingGroup | |
| AdjustmentType: ChangeInCapacity | |
| Type: 'AWS::AutoScaling::ScalingPolicy' | |
| Metadata: | |
| 'AWS::CloudFormation::Designer': | |
| id: 2abfbe6f-9321-4ee0-97f6-d10d3cc1194f | |
| AWSEBCloudwatchAlarmHigh: | |
| Properties: | |
| AlarmActions: | |
| - !Ref AWSEBAutoScalingScaleUpPolicy | |
| MetricName: CPUUtilization | |
| ComparisonOperator: GreaterThanThreshold | |
| Statistic: Average | |
| AlarmDescription: ElasticBeanstalk Default Scale Up alarm | |
| Period: '300' | |
| Dimensions: | |
| - Value: !Ref AWSEBAutoScalingGroup | |
| Name: AutoScalingGroupName | |
| EvaluationPeriods: '1' | |
| Unit: Percent | |
| Namespace: AWS/EC2 | |
| Threshold: '95' | |
| Type: 'AWS::CloudWatch::Alarm' | |
| Metadata: | |
| 'AWS::CloudFormation::Designer': | |
| id: e5fec6f1-0328-43e7-a812-bcb2b0482c0d | |
| AWSEBBeanstalkMetadata: | |
| Metadata: | |
| 'AWS::ElasticBeanstalk::Ext': | |
| Parameters: | |
| InstanceTypeFamily: !Ref InstanceTypeFamily | |
| LogPublicationControl: !Ref LogPublicationControl | |
| InstancePort: !Ref InstancePort | |
| XRayEnabled: !Ref XRayEnabled | |
| AWSEBEnvironmentId: !Ref AWSEBEnvironmentId | |
| HooksPkgUrl: !Ref HooksPkgUrl | |
| AWSEBEnvironmentName: !Ref AWSEBEnvironmentName | |
| AWSEBReferrerId: !Ref AWSEBReferrerId | |
| AppSource: !Ref AppSource | |
| ProxyServer: !Ref ProxyServer | |
| NodeVersion: !Ref NodeVersion | |
| NodeStaticFiles: !Ref NodeStaticFiles | |
| EnvironmentVariables: !Ref EnvironmentVariables | |
| AWSEBAgentId: !Ref AWSEBAgentId | |
| NodeEnableGzip: !Ref NodeEnableGzip | |
| InstanceType: !Ref InstanceType | |
| AWSEBEnvironmentBucket: !Ref AWSEBEnvironmentBucket | |
| ServerPort: !Ref ServerPort | |
| NodeCommand: !Ref NodeCommand | |
| 'AWS::ElasticBeanstalk::Metadata': | |
| EnvironmentId: e-ycxksdm22v | |
| RequestId: 39a4003f-4201-4d4e-881d-fe24f889aef5 | |
| Version: 39a4003f-4201-4d4e-881d-fe24f889aef5 | |
| EnvironmentName: NodejsAppLb-PROD | |
| DateUpdated: '2019-11-19T14:35:21' | |
| DateCreated: '2019-11-19T14:35:21' | |
| DeploymentVersion: 2 | |
| DateLastModified: '2019-11-19T14:35:26' | |
| Name: e-ycxksdm22v | |
| 'AWS::CloudFormation::Designer': | |
| id: cb746d90-d37f-4109-ab44-8d3d2f671836 | |
| Type: 'AWS::CloudFormation::WaitConditionHandle' | |
| AWSEBV2LoadBalancerTargetGroup: | |
| Properties: | |
| HealthCheckIntervalSeconds: 15 | |
| VpcId: vpc-0e609665 | |
| HealthyThresholdCount: 3 | |
| HealthCheckPath: / | |
| Port: 80 | |
| TargetGroupAttributes: | |
| - Value: '20' | |
| Key: deregistration_delay.timeout_seconds | |
| Protocol: HTTP | |
| UnhealthyThresholdCount: 5 | |
| HealthCheckTimeoutSeconds: 5 | |
| Type: 'AWS::ElasticLoadBalancingV2::TargetGroup' | |
| Metadata: | |
| 'AWS::CloudFormation::Designer': | |
| id: 59b6a3f5-49d9-4b0a-8225-8aa933e25a99 | |
| AWSEBCloudwatchAlarmLow: | |
| Properties: | |
| AlarmActions: | |
| - !Ref AWSEBAutoScalingScaleDownPolicy | |
| MetricName: CPUUtilization | |
| ComparisonOperator: LessThanThreshold | |
| Statistic: Average | |
| AlarmDescription: ElasticBeanstalk Default Scale Down alarm | |
| Period: '300' | |
| Dimensions: | |
| - Value: !Ref AWSEBAutoScalingGroup | |
| Name: AutoScalingGroupName | |
| EvaluationPeriods: '1' | |
| Unit: Percent | |
| Namespace: AWS/EC2 | |
| Threshold: '70' | |
| Type: 'AWS::CloudWatch::Alarm' | |
| Metadata: | |
| 'AWS::CloudFormation::Designer': | |
| id: f8e166e2-8a11-40f6-a937-145497ec4eb7 | |
| Description: >- | |
| AWS Elastic Beanstalk environment (Name: 'NodejsAppLb-PROD' Id: | |
| 'e-ycxksdm22v') | |
| Mappings: | |
| AWSEBAWSRegionArch2AMIBase: | |
| ap-south-1: | |
| pv: '' | |
| graphics: '' | |
| gpu: '' | |
| hvm: ami-02913db388613c3e1 | |
| eu-west-3: | |
| pv: '' | |
| graphics: '' | |
| gpu: '' | |
| hvm: ami-0652eb0db9b20aeaf | |
| eu-north-1: | |
| pv: '' | |
| graphics: '' | |
| gpu: '' | |
| hvm: ami-6a1f9414 | |
| DEVO: | |
| pv: '' | |
| graphics: ami-09144ebbb8d7191e3 | |
| gpu: ami-8482c6ec | |
| hvm: ami-00eb20669e0990cb4 | |
| eu-west-2: | |
| pv: '' | |
| graphics: '' | |
| gpu: '' | |
| hvm: ami-04de2b60dd25fbb2e | |
| eu-west-1: | |
| pv: '' | |
| graphics: ami-052ab6144b7109942 | |
| gpu: ami-21ce4256 | |
| hvm: ami-028188d9b49b32a80 | |
| ap-northeast-3: | |
| pv: '' | |
| graphics: '' | |
| gpu: '' | |
| hvm: ami-0a76cf4bfbbc993fb | |
| ap-northeast-2: | |
| pv: '' | |
| graphics: '' | |
| gpu: '' | |
| hvm: ami-0e1e385b0a934254a | |
| ap-northeast-1: | |
| pv: '' | |
| graphics: ami-07d9abb2e4e558443 | |
| gpu: '' | |
| hvm: ami-0ab3e16f9c414dee7 | |
| us-gov-east-1: | |
| pv: '' | |
| graphics: '' | |
| gpu: '' | |
| hvm: ami-28ed0d59 | |
| me-south-1: | |
| pv: '' | |
| graphics: '' | |
| gpu: '' | |
| hvm: ami-07a246cb94128dd8f | |
| sa-east-1: | |
| pv: '' | |
| graphics: '' | |
| gpu: '' | |
| hvm: ami-0e2c2c29d8017dd99 | |
| ca-central-1: | |
| pv: '' | |
| graphics: '' | |
| gpu: '' | |
| hvm: ami-04070f04f450607dc | |
| ap-east-1: | |
| pv: '' | |
| graphics: '' | |
| gpu: '' | |
| hvm: ami-f8ee9589 | |
| cn-north-1: | |
| pv: '' | |
| graphics: '' | |
| gpu: '' | |
| hvm: ami-0a70df9d5c6955abf | |
| us-gov-west-1: | |
| pv: '' | |
| graphics: '' | |
| gpu: '' | |
| hvm: ami-6cfab40d | |
| ap-southeast-1: | |
| pv: '' | |
| graphics: ami-08f5f9e697fecc07f | |
| gpu: '' | |
| hvm: ami-05c859630889c79c8 | |
| ap-southeast-2: | |
| pv: '' | |
| graphics: ami-02a2862c8e4052671 | |
| gpu: '' | |
| hvm: ami-07cc15c3ba6f8e287 | |
| eu-central-1: | |
| pv: '' | |
| graphics: '' | |
| gpu: '' | |
| hvm: ami-010fae13a16763bb4 | |
| us-east-1: | |
| pv: '' | |
| graphics: ami-09144ebbb8d7191e3 | |
| gpu: ami-8482c6ec | |
| hvm: ami-00eb20669e0990cb4 | |
| us-east-2: | |
| pv: '' | |
| graphics: '' | |
| gpu: '' | |
| hvm: ami-0c64dd618a49aeee8 | |
| us-west-1: | |
| pv: '' | |
| graphics: ami-0411f4002ffdfc559 | |
| gpu: '' | |
| hvm: ami-0bce08e823ed38bdd | |
| cn-northwest-1: | |
| pv: '' | |
| graphics: '' | |
| gpu: '' | |
| hvm: ami-08af324f69cf03287 | |
| us-west-2: | |
| pv: '' | |
| graphics: ami-07a1d900a353e49dd | |
| gpu: '' | |
| hvm: ami-08d489468314a58df | |
| AWSEBOptions: | |
| options: | |
| OptionDefinitionOverrideEnabled: true | |
| AWSEBHealthdGroupId: d7966323-0dd7-4c97-b83b-65462238e167 | |
| NodeDownloadUrl: >- | |
| https://s3.dualstack.ap-northeast-2.amazonaws.com/elasticbeanstalk-env-resources-ap-northeast-2/stalks/eb_node_js_4.0.1.203113.0_1570882957/lib/64/ | |
| HaltStartupCommandsOnFailure: 'true' | |
| SystemType: enhanced | |
| UserDataScript: >- | |
| https://s3.dualstack.ap-northeast-2.amazonaws.com/elasticbeanstalk-env-resources-ap-northeast-2/stalks/eb_node_js_4.0.1.203113.0_1570882957/lib/UserDataScript.sh | |
| LaunchType: Migration | |
| ebgems: >- | |
| https://s3.dualstack.ap-northeast-2.amazonaws.com/elasticbeanstalk-env-resources-ap-northeast-2/stalks/eb_node_js_4.0.1.203113.0_1570882957/lib/beanstalk-core-2.12.gem | |
| https://s3.dualstack.ap-northeast-2.amazonaws.com/elasticbeanstalk-env-resources-ap-northeast-2/stalks/eb_node_js_4.0.1.203113.0_1570882957/lib/beanstalk-core-healthd-1.1.gem | |
| https://s3.dualstack.ap-northeast-2.amazonaws.com/elasticbeanstalk-env-resources-ap-northeast-2/stalks/eb_node_js_4.0.1.203113.0_1570882957/lib/executor-1.2.gem | |
| tarballs: >- | |
| https://s3.dualstack.ap-northeast-2.amazonaws.com/elasticbeanstalk-env-resources-ap-northeast-2/stalks/eb_node_js_4.0.1.203113.0_1570882957/lib/awseb-ruby-2.2.4-x86_64-20160503_1008.tar.gz | |
| https://s3.dualstack.ap-northeast-2.amazonaws.com/elasticbeanstalk-env-resources-ap-northeast-2/stalks/eb_node_js_4.0.1.203113.0_1570882957/lib/basehooks.tar.gz | |
| rpms: >- | |
| https://s3.dualstack.ap-northeast-2.amazonaws.com/elasticbeanstalk-env-resources-ap-northeast-2/stalks/eb_node_js_4.0.1.203113.0_1570882957/lib/aws-elasticbeanstalk-tools-1.20-1.noarch.rpm | |
| FastVersionDeployment: 'true' | |
| ServiceRole: 'arn:aws:iam::160770579176:role/aws-elasticbeanstalk-service-role' | |
| HealthdProxyLogLocation: '' | |
| CommandBasedLeaderElection: 'true' | |
| CloudConfigOptions: |- | |
| cloud_final_modules: | |
| - [scripts-user, always] | |
| DefaultsScript: /opt/elasticbeanstalk/containerfiles/containerdefaults.py | |
| LeaderTestScript: /opt/elasticbeanstalk/bin/leader-test.sh | |
| downloadSourceBundleScriptLocation: | |
| - >- | |
| https://s3.ap-northeast-2.amazonaws.com/elasticbeanstalk-env-resources-ap-northeast-2/eb_patching_resources/download_source_bundle.py | |
| DefaultSSHPort: '22' | |
| ProxyServer: nginx | |
| AWSEBHealthdEndpoint: '' | |
| EmbeddedConfigsetsEnabled: 'true' | |
| EBSNSTopicArn: '' | |
| guid: f5fc9bfd8c40 | |
| nodeploymentOnStartup: 'true' | |
| ebpatchscripturl: | |
| - >- | |
| https://s3.ap-northeast-2.amazonaws.com/elasticbeanstalk-env-resources-ap-northeast-2/eb_patching_resources/patch_instance.py | |
| AWSEBAWSRegionArch2AMI: | |
| ap-south-1: | |
| pv: '' | |
| graphics: '' | |
| gpu: '' | |
| hvm: ami-02913db388613c3e1 | |
| eu-west-3: | |
| pv: '' | |
| graphics: '' | |
| gpu: '' | |
| hvm: ami-0652eb0db9b20aeaf | |
| eu-north-1: | |
| pv: '' | |
| graphics: '' | |
| gpu: '' | |
| hvm: ami-6a1f9414 | |
| DEVO: | |
| pv: '' | |
| graphics: ami-09144ebbb8d7191e3 | |
| gpu: ami-8482c6ec | |
| hvm: ami-00eb20669e0990cb4 | |
| eu-west-2: | |
| pv: '' | |
| graphics: '' | |
| gpu: '' | |
| hvm: ami-04de2b60dd25fbb2e | |
| eu-west-1: | |
| pv: '' | |
| graphics: ami-052ab6144b7109942 | |
| gpu: ami-21ce4256 | |
| hvm: ami-028188d9b49b32a80 | |
| ap-northeast-3: | |
| pv: '' | |
| graphics: '' | |
| gpu: '' | |
| hvm: ami-0a76cf4bfbbc993fb | |
| ap-northeast-2: | |
| pv: '' | |
| graphics: '' | |
| gpu: '' | |
| hvm: ami-0a409fb882866cace | |
| ap-northeast-1: | |
| pv: '' | |
| graphics: ami-07d9abb2e4e558443 | |
| gpu: '' | |
| hvm: ami-0ab3e16f9c414dee7 | |
| us-gov-east-1: | |
| pv: '' | |
| graphics: '' | |
| gpu: '' | |
| hvm: ami-28ed0d59 | |
| me-south-1: | |
| pv: '' | |
| graphics: '' | |
| gpu: '' | |
| hvm: ami-07a246cb94128dd8f | |
| sa-east-1: | |
| pv: '' | |
| graphics: '' | |
| gpu: '' | |
| hvm: ami-0e2c2c29d8017dd99 | |
| ca-central-1: | |
| pv: '' | |
| graphics: '' | |
| gpu: '' | |
| hvm: ami-04070f04f450607dc | |
| ap-east-1: | |
| pv: '' | |
| graphics: '' | |
| gpu: '' | |
| hvm: ami-f8ee9589 | |
| cn-north-1: | |
| pv: '' | |
| graphics: '' | |
| gpu: '' | |
| hvm: ami-0a70df9d5c6955abf | |
| us-gov-west-1: | |
| pv: '' | |
| graphics: '' | |
| gpu: '' | |
| hvm: ami-6cfab40d | |
| ap-southeast-1: | |
| pv: '' | |
| graphics: ami-08f5f9e697fecc07f | |
| gpu: '' | |
| hvm: ami-05c859630889c79c8 | |
| ap-southeast-2: | |
| pv: '' | |
| graphics: ami-02a2862c8e4052671 | |
| gpu: '' | |
| hvm: ami-07cc15c3ba6f8e287 | |
| eu-central-1: | |
| pv: '' | |
| graphics: '' | |
| gpu: '' | |
| hvm: ami-010fae13a16763bb4 | |
| us-east-1: | |
| pv: '' | |
| graphics: ami-09144ebbb8d7191e3 | |
| gpu: ami-8482c6ec | |
| hvm: ami-00eb20669e0990cb4 | |
| us-east-2: | |
| pv: '' | |
| graphics: '' | |
| gpu: '' | |
| hvm: ami-0c64dd618a49aeee8 | |
| us-west-1: | |
| pv: '' | |
| graphics: ami-0411f4002ffdfc559 | |
| gpu: '' | |
| hvm: ami-0bce08e823ed38bdd | |
| cn-northwest-1: | |
| pv: '' | |
| graphics: '' | |
| gpu: '' | |
| hvm: ami-08af324f69cf03287 | |
| us-west-2: | |
| pv: '' | |
| graphics: ami-07a1d900a353e49dd | |
| gpu: '' | |
| hvm: ami-08d489468314a58df | |
| AWSEBAWSInstanceTypeFamily2Arch: | |
| r5d: | |
| Arch: hvm | |
| r3: | |
| Arch: hvm | |
| r4: | |
| Arch: hvm | |
| p2: | |
| Arch: hvm | |
| p3: | |
| Arch: hvm | |
| r5: | |
| Arch: hvm | |
| t3a: | |
| Arch: hvm | |
| g3s: | |
| Arch: hvm | |
| hs1: | |
| Arch: hvm | |
| h1: | |
| Arch: hvm | |
| f1: | |
| Arch: hvm | |
| cg1: | |
| Arch: hvm | |
| z1d: | |
| Arch: hvm | |
| x1e: | |
| Arch: hvm | |
| d2: | |
| Arch: hvm | |
| cc1: | |
| Arch: hvm | |
| hi1: | |
| Arch: hvm | |
| r5ad: | |
| Arch: hvm | |
| cc2: | |
| Arch: hvm | |
| cr1: | |
| Arch: hvm | |
| i3en: | |
| Arch: hvm | |
| m1: | |
| Arch: hvm | |
| m2: | |
| Arch: hvm | |
| m3: | |
| Arch: hvm | |
| m4: | |
| Arch: hvm | |
| m5: | |
| Arch: hvm | |
| i2: | |
| Arch: hvm | |
| i3: | |
| Arch: hvm | |
| g2: | |
| Arch: graphics | |
| g3: | |
| Arch: hvm | |
| c1: | |
| Arch: hvm | |
| c3: | |
| Arch: hvm | |
| c4: | |
| Arch: hvm | |
| c5: | |
| Arch: hvm | |
| c5d: | |
| Arch: hvm | |
| m5a: | |
| Arch: hvm | |
| x1: | |
| Arch: hvm | |
| m5ad: | |
| Arch: hvm | |
| t1: | |
| Arch: hvm | |
| m5d: | |
| Arch: hvm | |
| c5n: | |
| Arch: hvm | |
| t2: | |
| Arch: hvm | |
| t3: | |
| Arch: hvm | |
| r5a: | |
| Arch: hvm | |
| EnvironmentInfoTasks: | |
| systemtail: | |
| LocationPrefix: resources/environments/logs/systemtail/ | |
| AutoClean: 'true' | |
| CommandName: CMD-SystemTailLogs | |
| tail: | |
| LocationPrefix: resources/environments/logs/tail/ | |
| AutoClean: 'true' | |
| CommandName: CMD-TailLogs | |
| publish: | |
| LocationPrefix: resources/environments/logs/publish/ | |
| bundle: | |
| LocationPrefix: resources/environments/logs/bundle/ | |
| AutoClean: 'true' | |
| CommandName: CMD-BundleLogs | |
| XRay: | |
| Configuration: | |
| Version: v1.0 | |
| ContainerMeta: | |
| AMIMeta: | |
| RepoReleaseVersion: '2018.03' | |
| AMIVersion: 2018.03.0 | |
| Metadata: | |
| 'AWS::CloudFormation::Designer': | |
| 59b6a3f5-49d9-4b0a-8225-8aa933e25a99: | |
| size: | |
| width: 60 | |
| height: 60 | |
| position: | |
| x: 60 | |
| 'y': 90 | |
| z: 1 | |
| embeds: [] | |
| cb746d90-d37f-4109-ab44-8d3d2f671836: | |
| size: | |
| width: 60 | |
| height: 60 | |
| position: | |
| x: 180 | |
| 'y': 90 | |
| z: 1 | |
| embeds: [] | |
| 85e1b63b-9003-4853-895d-462739740fd0: | |
| size: | |
| width: 60 | |
| height: 60 | |
| position: | |
| x: 60 | |
| 'y': 210 | |
| z: 1 | |
| embeds: [] | |
| e03965ce-3a25-4823-8cf5-eb36b9646fc6: | |
| size: | |
| width: 60 | |
| height: 60 | |
| position: | |
| x: 180 | |
| 'y': 210 | |
| z: 1 | |
| embeds: [] | |
| 153ca25b-bacb-4bc4-a382-461dd52fd396: | |
| size: | |
| width: 60 | |
| height: 60 | |
| position: | |
| x: 300 | |
| 'y': 90 | |
| z: 1 | |
| embeds: [] | |
| 2ffeba1c-1361-4367-be92-2367298bdfde: | |
| size: | |
| width: 60 | |
| height: 60 | |
| position: | |
| x: 300 | |
| 'y': 210 | |
| z: 1 | |
| embeds: [] | |
| isassociatedwith: | |
| - e03965ce-3a25-4823-8cf5-eb36b9646fc6 | |
| 47f5afb5-242e-4eea-9536-04b077c97dba: | |
| size: | |
| width: 60 | |
| height: 60 | |
| position: | |
| x: 60 | |
| 'y': 330 | |
| z: 1 | |
| embeds: [] | |
| isassociatedwith: | |
| - 2ffeba1c-1361-4367-be92-2367298bdfde | |
| b48bc52a-ee55-4559-af6a-5ded59acd49f: | |
| size: | |
| width: 60 | |
| height: 60 | |
| position: | |
| x: 180 | |
| 'y': 330 | |
| z: 1 | |
| embeds: [] | |
| isassociatedwith: | |
| - 153ca25b-bacb-4bc4-a382-461dd52fd396 | |
| 2d058716-e90e-4de0-8f7c-3e141eedf825: | |
| size: | |
| width: 60 | |
| height: 60 | |
| position: | |
| x: 300 | |
| 'y': 330 | |
| z: 1 | |
| embeds: [] | |
| isassociatedwith: | |
| - b48bc52a-ee55-4559-af6a-5ded59acd49f | |
| - 59b6a3f5-49d9-4b0a-8225-8aa933e25a99 | |
| dependson: | |
| - cb746d90-d37f-4109-ab44-8d3d2f671836 | |
| 2abfbe6f-9321-4ee0-97f6-d10d3cc1194f: | |
| size: | |
| width: 60 | |
| height: 60 | |
| position: | |
| x: 420 | |
| 'y': 90 | |
| z: 1 | |
| embeds: [] | |
| isassociatedwith: | |
| - 2d058716-e90e-4de0-8f7c-3e141eedf825 | |
| e5fec6f1-0328-43e7-a812-bcb2b0482c0d: | |
| size: | |
| width: 60 | |
| height: 60 | |
| position: | |
| x: 420 | |
| 'y': 210 | |
| z: 1 | |
| embeds: [] | |
| 9581cb3e-d8d1-4723-91ea-2f9a7c2e8045: | |
| size: | |
| width: 60 | |
| height: 60 | |
| position: | |
| x: 420 | |
| 'y': 330 | |
| z: 1 | |
| embeds: [] | |
| isassociatedwith: | |
| - 85e1b63b-9003-4853-895d-462739740fd0 | |
| dependson: | |
| - 2d058716-e90e-4de0-8f7c-3e141eedf825 | |
| 4146c6fd-7974-47cb-80ec-419824065a4c: | |
| size: | |
| width: 60 | |
| height: 60 | |
| position: | |
| x: 60 | |
| 'y': 450 | |
| z: 1 | |
| embeds: [] | |
| isassociatedwith: | |
| - 2d058716-e90e-4de0-8f7c-3e141eedf825 | |
| f8e166e2-8a11-40f6-a937-145497ec4eb7: | |
| size: | |
| width: 60 | |
| height: 60 | |
| position: | |
| x: 180 | |
| 'y': 450 | |
| z: 1 | |
| embeds: [] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment