Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- "AWSTemplateFormatVersion": "2010-09-09",
- "Parameters": {
- "KeyPairName": {
- "Description": "You must have your public key on your aws - ec2 - network & security - key pairs section",
- "Type" : "AWS::EC2::KeyPair::KeyName"
- },
- "ResourceNameTag" : {
- "Type" : "String",
- "Default" : { "Ref" : "AWS::StackName" },
- "Description" : "Name your resources"
- }
- },
- "Resources": {
- "vpcd3adf3aa": {
- "Type": "AWS::EC2::VPC",
- "Properties": {
- "CidrBlock": "10.99.0.0/16",
- "InstanceTenancy": "default",
- "EnableDnsSupport": "true",
- "EnableDnsHostnames": "false",
- "Tags": [
- {
- "Key": "Name",
- "Value": { "Ref" : "ResourceNameTag" }
- }
- ]
- },
- "Metadata": {
- "AWS::CloudFormation::Designer": {
- "id": "100906b8-589d-45d3-9633-4eb9e44ddbaf"
- }
- }
- },
- "subnet1b9e3a50": {
- "Type": "AWS::EC2::Subnet",
- "Properties": {
- "CidrBlock": "10.99.0.0/24",
- "AvailabilityZone": "us-west-2b",
- "VpcId": {
- "Ref": "vpcd3adf3aa"
- },
- "Tags": [
- {
- "Key": "Name",
- "Value": { "Ref" : "ResourceNameTag" }
- }
- ]
- },
- "Metadata": {
- "AWS::CloudFormation::Designer": {
- "id": "80af6f4c-1d4d-4f66-8237-11fbaa5d8061"
- }
- }
- },
- "igw14057072": {
- "Type": "AWS::EC2::InternetGateway",
- "Properties": {
- "Tags": [
- {
- "Key": "Name",
- "Value": { "Ref" : "ResourceNameTag" }
- }
- ]
- },
- "Metadata": {
- "AWS::CloudFormation::Designer": {
- "id": "6c215780-cc5d-4f7c-9029-f833506b0ab6"
- }
- }
- },
- "acl80f553f8": {
- "Type": "AWS::EC2::NetworkAcl",
- "Properties": {
- "VpcId": {
- "Ref": "vpcd3adf3aa"
- },
- "Tags": [
- {
- "Key": "Name",
- "Value": { "Ref" : "ResourceNameTag" }
- }
- ]
- },
- "Metadata": {
- "AWS::CloudFormation::Designer": {
- "id": "cda52d9d-e7bd-468e-91d9-d51ffa33abd1"
- }
- }
- },
- "rtb41104239": {
- "Type": "AWS::EC2::RouteTable",
- "Properties": {
- "VpcId": {
- "Ref": "vpcd3adf3aa"
- },
- "Tags": [
- {
- "Key": "Name",
- "Value": {"Fn::Join" : [ "", [ { "Ref" : "ResourceNameTag" }, "-public" ] ]}
- }
- ]
- },
- "Metadata": {
- "AWS::CloudFormation::Designer": {
- "id": "c93e3089-9729-4403-b730-6737ff99ad2a"
- }
- }
- },
- "instancei012c21b7d8e198887": {
- "Type": "AWS::EC2::Instance",
- "Properties": {
- "DisableApiTermination": "false",
- "InstanceInitiatedShutdownBehavior": "stop",
- "ImageId": "ami-223f945a",
- "InstanceType": "t2.medium",
- "KeyName": {
- "Ref": "KeyPairName"
- },
- "UserData": { "Fn::Base64" : { "Fn::Join" : ["", [
- "#!/bin/bash\n",
- "cd /home/ec2-user/\n",
- "sudo yum install -y wget\n",
- "wget --no-check-certificate --no-cookies --header \"Cookie: oraclelicense=accept-securebackup-cookie\" http://download.oracle.com/otn-pub/java/jdk/8u171-b11/512cd62ec5174c3487ac17c61aaa89e8/jdk-8u171-linux-x64.tar.gz\n",
- "tar -zxvf jdk-8u*-linux-x64.tar.gz\n",
- "sudo mv jdk1.8.*/ /usr/\n",
- "sudo alternatives --install /usr/bin/java java /usr/jdk1.8.*/bin/java 2\n",
- "yes 1 | sudo alternatives --config java\n",
- "java –version\n",
- "export JAVA_HOME=/usr/jdk1.8.0_171\n",
- "echo $JAVA_HOME\n",
- "export JRE_HOME=/usr/jdk1.8.0_171/jre/\n",
- "echo $JRE_HOME\n",
- "export PATH=$JAVA_HOME/bin:$PATH\n",
- "echo $PATH\n",
- "sudo -u ec2-user wget http://www-eu.apache.org/dist/tomcat/tomcat-8/v8.5.31/bin/apache-tomcat-8.5.31.tar.gz\n",
- "sudo -u ec2-user tar xzf apache-tomcat-8.5.31.tar.gz\n",
- "apache-tomcat-8.5.31/bin/startup.sh\n",
- "ps -ef | grep tomcat\n",
- "sudo yum install -y tree\n",
- "curl https://omnitruck.chef.io/install.sh | sudo bash -s -- -P chefdk -c stable -v 2.5.3\n",
- "sudo yum install -y git\n"
- ]]}},
- "Monitoring": "false",
- "Tags": [
- {
- "Key": "Name",
- "Value": { "Ref" : "ResourceNameTag" }
- }
- ],
- "NetworkInterfaces": [
- {
- "DeleteOnTermination": "true",
- "Description": "Primary network interface",
- "DeviceIndex": 0,
- "SubnetId": {
- "Ref": "subnet1b9e3a50"
- },
- "PrivateIpAddresses": [
- {
- "PrivateIpAddress": "10.99.0.151",
- "Primary": "true"
- }
- ],
- "GroupSet": [
- {
- "Ref": "sgstcloudformation"
- }
- ],
- "AssociatePublicIpAddress": "true"
- }
- ]
- },
- "Metadata": {
- "AWS::CloudFormation::Designer": {
- "id": "5467a301-e1f2-4320-93d1-c8c93b84306f"
- }
- }
- },
- "sgstcloudformation": {
- "Type": "AWS::EC2::SecurityGroup",
- "Properties": {
- "GroupDescription": "launch-wizard-37 created 2018-04-17T19:55:21.240+08:00",
- "VpcId": {
- "Ref": "vpcd3adf3aa"
- },
- "Tags": [
- {
- "Key": "Name",
- "Value": { "Ref" : "ResourceNameTag" }
- }
- ]
- },
- "Metadata": {
- "AWS::CloudFormation::Designer": {
- "id": "c8ac8be7-0b4a-4496-a8d3-1a54e2e42d5a"
- }
- }
- },
- "acl1": {
- "Type": "AWS::EC2::NetworkAclEntry",
- "Properties": {
- "CidrBlock": "0.0.0.0/0",
- "Egress": "true",
- "Protocol": "-1",
- "RuleAction": "allow",
- "RuleNumber": "100",
- "NetworkAclId": {
- "Ref": "acl80f553f8"
- }
- },
- "Metadata": {
- "AWS::CloudFormation::Designer": {
- "id": "811c3c9c-8e1d-413a-b908-22829b94aa85"
- }
- }
- },
- "acl2": {
- "Type": "AWS::EC2::NetworkAclEntry",
- "Properties": {
- "CidrBlock": "0.0.0.0/0",
- "Protocol": "-1",
- "RuleAction": "allow",
- "RuleNumber": "100",
- "NetworkAclId": {
- "Ref": "acl80f553f8"
- }
- },
- "Metadata": {
- "AWS::CloudFormation::Designer": {
- "id": "1b8e9c00-552b-421b-bbd6-3d8773821d7e"
- }
- }
- },
- "subnetacl1": {
- "Type": "AWS::EC2::SubnetNetworkAclAssociation",
- "Properties": {
- "NetworkAclId": {
- "Ref": "acl80f553f8"
- },
- "SubnetId": {
- "Ref": "subnet1b9e3a50"
- }
- },
- "Metadata": {
- "AWS::CloudFormation::Designer": {
- "id": "455b97eb-821c-4699-a909-5fd0b44cabbd"
- }
- }
- },
- "route1": {
- "Type": "AWS::EC2::Route",
- "Properties": {
- "DestinationCidrBlock": "0.0.0.0/0",
- "RouteTableId": {
- "Ref": "rtb41104239"
- },
- "GatewayId": {
- "Ref": "igw14057072"
- }
- },
- "Metadata": {
- "AWS::CloudFormation::Designer": {
- "id": "0b13684f-bf67-44c6-a0ce-d788f1544e49"
- }
- }
- },
- "SubnetRouteTableAssociation008": {
- "Type": "AWS::EC2::SubnetRouteTableAssociation",
- "Properties": {
- "RouteTableId": {
- "Ref": "rtb41104239"
- },
- "SubnetId": {
- "Ref": "subnet1b9e3a50"
- }
- },
- "Metadata": {
- "AWS::CloudFormation::Designer": {
- "id": "8db514ed-7e5f-42db-868e-e430d15b5bb8"
- }
- }
- },
- "ingress1": {
- "Type": "AWS::EC2::SecurityGroupIngress",
- "Properties": {
- "GroupId": {
- "Ref": "sgstcloudformation"
- },
- "IpProtocol": "tcp",
- "FromPort": "22",
- "ToPort": "22",
- "CidrIp": "0.0.0.0/0"
- }
- },
- "ingress2": {
- "Type": "AWS::EC2::SecurityGroupIngress",
- "Properties": {
- "GroupId": {
- "Ref": "sgstcloudformation"
- },
- "IpProtocol": "tcp",
- "FromPort": "80",
- "ToPort": "80",
- "CidrIp": "0.0.0.0/0"
- }
- },
- "ingress3": {
- "Type": "AWS::EC2::SecurityGroupIngress",
- "Properties": {
- "GroupId": {
- "Ref": "sgstcloudformation"
- },
- "IpProtocol": "tcp",
- "FromPort": "443",
- "ToPort": "443",
- "CidrIp": "0.0.0.0/0"
- }
- },
- "egress1": {
- "Type": "AWS::EC2::SecurityGroupEgress",
- "Properties": {
- "GroupId": {
- "Ref": "sgstcloudformation"
- },
- "IpProtocol": "-1",
- "CidrIp": "0.0.0.0/0"
- }
- },
- "EC2DHCP2HAZ9": {
- "Type": "AWS::EC2::DHCPOptions",
- "Properties": {
- "DomainName": "us-west-2.compute.internal",
- "DomainNameServers": [
- "AmazonProvidedDNS"
- ]
- },
- "Metadata": {
- "AWS::CloudFormation::Designer": {
- "id": "1f2155f4-d323-494e-b157-1e0a8c2f338c"
- }
- }
- },
- "EC2VPCD1WN10": {
- "Type": "AWS::EC2::VPCDHCPOptionsAssociation",
- "Properties": {
- "DhcpOptionsId": {
- "Ref": "EC2DHCP2HAZ9"
- },
- "VpcId": {
- "Ref": "vpcd3adf3aa"
- }
- },
- "Metadata": {
- "AWS::CloudFormation::Designer": {
- "id": "4e13c20d-0335-44e7-a6f4-d8a27ee8642c"
- }
- }
- },
- "EC2VPCG4ESOD": {
- "Type": "AWS::EC2::VPCGatewayAttachment",
- "Properties": {
- "VpcId": {
- "Ref": "vpcd3adf3aa"
- },
- "InternetGatewayId": {
- "Ref": "igw14057072"
- }
- },
- "Metadata": {
- "AWS::CloudFormation::Designer": {
- "id": "16e7a5e4-f13b-4591-b6c8-3722c22f229f"
- }
- }
- }
- },
- "Description": "st-formation",
- "Metadata": {
- "AWS::CloudFormation::Designer": {
- "6c215780-cc5d-4f7c-9029-f833506b0ab6": {
- "size": {
- "width": 60,
- "height": 60
- },
- "position": {
- "x": -130,
- "y": 240
- },
- "z": 0,
- "embeds": []
- },
- "100906b8-589d-45d3-9633-4eb9e44ddbaf": {
- "size": {
- "width": 690,
- "height": 690
- },
- "position": {
- "x": -10,
- "y": 80
- },
- "z": 1,
- "embeds": [
- "c93e3089-9729-4403-b730-6737ff99ad2a",
- "80af6f4c-1d4d-4f66-8237-11fbaa5d8061",
- "cda52d9d-e7bd-468e-91d9-d51ffa33abd1"
- ]
- },
- "c8ac8be7-0b4a-4496-a8d3-1a54e2e42d5a": {
- "size": {
- "width": 60,
- "height": 60
- },
- "position": {
- "x": -130,
- "y": 540
- },
- "z": 0,
- "embeds": [],
- "iscontainedinside": [
- "100906b8-589d-45d3-9633-4eb9e44ddbaf",
- "100906b8-589d-45d3-9633-4eb9e44ddbaf",
- "100906b8-589d-45d3-9633-4eb9e44ddbaf",
- "100906b8-589d-45d3-9633-4eb9e44ddbaf",
- "100906b8-589d-45d3-9633-4eb9e44ddbaf",
- "100906b8-589d-45d3-9633-4eb9e44ddbaf",
- "100906b8-589d-45d3-9633-4eb9e44ddbaf",
- "100906b8-589d-45d3-9633-4eb9e44ddbaf"
- ]
- },
- "c93e3089-9729-4403-b730-6737ff99ad2a": {
- "size": {
- "width": 240,
- "height": 240
- },
- "position": {
- "x": 400,
- "y": 160
- },
- "z": 2,
- "parent": "100906b8-589d-45d3-9633-4eb9e44ddbaf",
- "embeds": [
- "0b13684f-bf67-44c6-a0ce-d788f1544e49"
- ],
- "iscontainedinside": [
- "100906b8-589d-45d3-9633-4eb9e44ddbaf",
- "100906b8-589d-45d3-9633-4eb9e44ddbaf",
- "100906b8-589d-45d3-9633-4eb9e44ddbaf",
- "100906b8-589d-45d3-9633-4eb9e44ddbaf",
- "100906b8-589d-45d3-9633-4eb9e44ddbaf",
- "100906b8-589d-45d3-9633-4eb9e44ddbaf",
- "100906b8-589d-45d3-9633-4eb9e44ddbaf",
- "100906b8-589d-45d3-9633-4eb9e44ddbaf"
- ]
- },
- "0b13684f-bf67-44c6-a0ce-d788f1544e49": {
- "size": {
- "width": 60,
- "height": 60
- },
- "position": {
- "x": 520,
- "y": 170
- },
- "z": 3,
- "parent": "c93e3089-9729-4403-b730-6737ff99ad2a",
- "embeds": [],
- "isassociatedwith": [
- "6c215780-cc5d-4f7c-9029-f833506b0ab6"
- ],
- "iscontainedinside": [
- "c93e3089-9729-4403-b730-6737ff99ad2a",
- "c93e3089-9729-4403-b730-6737ff99ad2a",
- "c93e3089-9729-4403-b730-6737ff99ad2a",
- "c93e3089-9729-4403-b730-6737ff99ad2a",
- "c93e3089-9729-4403-b730-6737ff99ad2a",
- "c93e3089-9729-4403-b730-6737ff99ad2a",
- "c93e3089-9729-4403-b730-6737ff99ad2a",
- "c93e3089-9729-4403-b730-6737ff99ad2a"
- ]
- },
- "cda52d9d-e7bd-468e-91d9-d51ffa33abd1": {
- "size": {
- "width": 330,
- "height": 240
- },
- "position": {
- "x": 40,
- "y": 150
- },
- "z": 2,
- "parent": "100906b8-589d-45d3-9633-4eb9e44ddbaf",
- "embeds": [
- "1b8e9c00-552b-421b-bbd6-3d8773821d7e",
- "811c3c9c-8e1d-413a-b908-22829b94aa85"
- ],
- "iscontainedinside": [
- "100906b8-589d-45d3-9633-4eb9e44ddbaf",
- "100906b8-589d-45d3-9633-4eb9e44ddbaf",
- "100906b8-589d-45d3-9633-4eb9e44ddbaf",
- "100906b8-589d-45d3-9633-4eb9e44ddbaf",
- "100906b8-589d-45d3-9633-4eb9e44ddbaf",
- "100906b8-589d-45d3-9633-4eb9e44ddbaf",
- "100906b8-589d-45d3-9633-4eb9e44ddbaf",
- "100906b8-589d-45d3-9633-4eb9e44ddbaf"
- ]
- },
- "1b8e9c00-552b-421b-bbd6-3d8773821d7e": {
- "size": {
- "width": 60,
- "height": 60
- },
- "position": {
- "x": 70,
- "y": 210
- },
- "z": 3,
- "parent": "cda52d9d-e7bd-468e-91d9-d51ffa33abd1",
- "embeds": [],
- "iscontainedinside": [
- "cda52d9d-e7bd-468e-91d9-d51ffa33abd1",
- "cda52d9d-e7bd-468e-91d9-d51ffa33abd1",
- "cda52d9d-e7bd-468e-91d9-d51ffa33abd1",
- "cda52d9d-e7bd-468e-91d9-d51ffa33abd1",
- "cda52d9d-e7bd-468e-91d9-d51ffa33abd1",
- "cda52d9d-e7bd-468e-91d9-d51ffa33abd1",
- "cda52d9d-e7bd-468e-91d9-d51ffa33abd1",
- "cda52d9d-e7bd-468e-91d9-d51ffa33abd1"
- ]
- },
- "811c3c9c-8e1d-413a-b908-22829b94aa85": {
- "size": {
- "width": 60,
- "height": 60
- },
- "position": {
- "x": 190,
- "y": 210
- },
- "z": 3,
- "parent": "cda52d9d-e7bd-468e-91d9-d51ffa33abd1",
- "embeds": [],
- "iscontainedinside": [
- "cda52d9d-e7bd-468e-91d9-d51ffa33abd1",
- "cda52d9d-e7bd-468e-91d9-d51ffa33abd1",
- "cda52d9d-e7bd-468e-91d9-d51ffa33abd1",
- "cda52d9d-e7bd-468e-91d9-d51ffa33abd1",
- "cda52d9d-e7bd-468e-91d9-d51ffa33abd1",
- "cda52d9d-e7bd-468e-91d9-d51ffa33abd1",
- "cda52d9d-e7bd-468e-91d9-d51ffa33abd1",
- "cda52d9d-e7bd-468e-91d9-d51ffa33abd1"
- ]
- },
- "80af6f4c-1d4d-4f66-8237-11fbaa5d8061": {
- "size": {
- "width": 240,
- "height": 240
- },
- "position": {
- "x": 40,
- "y": 500
- },
- "z": 2,
- "parent": "100906b8-589d-45d3-9633-4eb9e44ddbaf",
- "embeds": [
- "5467a301-e1f2-4320-93d1-c8c93b84306f"
- ],
- "iscontainedinside": [
- "100906b8-589d-45d3-9633-4eb9e44ddbaf",
- "100906b8-589d-45d3-9633-4eb9e44ddbaf",
- "100906b8-589d-45d3-9633-4eb9e44ddbaf",
- "100906b8-589d-45d3-9633-4eb9e44ddbaf",
- "100906b8-589d-45d3-9633-4eb9e44ddbaf",
- "100906b8-589d-45d3-9633-4eb9e44ddbaf",
- "100906b8-589d-45d3-9633-4eb9e44ddbaf",
- "100906b8-589d-45d3-9633-4eb9e44ddbaf"
- ]
- },
- "8db514ed-7e5f-42db-868e-e430d15b5bb8": {
- "source": {
- "id": "c93e3089-9729-4403-b730-6737ff99ad2a"
- },
- "target": {
- "id": "80af6f4c-1d4d-4f66-8237-11fbaa5d8061"
- },
- "z": 2
- },
- "455b97eb-821c-4699-a909-5fd0b44cabbd": {
- "source": {
- "id": "cda52d9d-e7bd-468e-91d9-d51ffa33abd1"
- },
- "target": {
- "id": "80af6f4c-1d4d-4f66-8237-11fbaa5d8061"
- },
- "z": 2
- },
- "5467a301-e1f2-4320-93d1-c8c93b84306f": {
- "size": {
- "width": 60,
- "height": 60
- },
- "position": {
- "x": 70,
- "y": 560
- },
- "z": 3,
- "parent": "80af6f4c-1d4d-4f66-8237-11fbaa5d8061",
- "embeds": [],
- "iscontainedinside": [
- "80af6f4c-1d4d-4f66-8237-11fbaa5d8061",
- "80af6f4c-1d4d-4f66-8237-11fbaa5d8061",
- "80af6f4c-1d4d-4f66-8237-11fbaa5d8061",
- "80af6f4c-1d4d-4f66-8237-11fbaa5d8061",
- "80af6f4c-1d4d-4f66-8237-11fbaa5d8061",
- "80af6f4c-1d4d-4f66-8237-11fbaa5d8061",
- "80af6f4c-1d4d-4f66-8237-11fbaa5d8061",
- "80af6f4c-1d4d-4f66-8237-11fbaa5d8061"
- ]
- },
- "1f2155f4-d323-494e-b157-1e0a8c2f338c": {
- "size": {
- "width": 60,
- "height": 60
- },
- "position": {
- "x": -120,
- "y": 140
- },
- "z": 0,
- "embeds": []
- },
- "4e13c20d-0335-44e7-a6f4-d8a27ee8642c": {
- "source": {
- "id": "100906b8-589d-45d3-9633-4eb9e44ddbaf"
- },
- "target": {
- "id": "1f2155f4-d323-494e-b157-1e0a8c2f338c"
- },
- "z": 2
- },
- "16e7a5e4-f13b-4591-b6c8-3722c22f229f": {
- "source": {
- "id": "100906b8-589d-45d3-9633-4eb9e44ddbaf"
- },
- "target": {
- "id": "6c215780-cc5d-4f7c-9029-f833506b0ab6"
- },
- "z": 2
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement