From 3187b0d8d61edb3b9f44fdeb0cc4d5a1d27e6694 Mon Sep 17 00:00:00 2001 From: datianshi Date: Mon, 16 May 2016 10:42:12 -0500 Subject: [PATCH] Add 3 routers --- deployment.yml | 4 +- ert.yml | 4 +- installation-aws-1.7.yml | 2 +- pcf_1_7_cloudformation.json | 106 ++++++++++++++++++++++++++++++++++-- 4 files changed, 105 insertions(+), 11 deletions(-) diff --git a/deployment.yml b/deployment.yml index 6ef8761..befbabf 100644 --- a/deployment.yml +++ b/deployment.yml @@ -1,10 +1,10 @@ -PIVNET_TOKEN: +PIVNET_TOKEN: 8nPkshy6rsrJsUNr1p-1 __PREPARED__: true date: 2016-05-11 15:56:34.506636 domain: pcf.cf.shaozhenpcf.com elastic-runtime: beta-ok: false - cloudformation-template: /Users/sding/work/source/cloudformation-template/pcf_1_7_cloudformation.json + cloudformation-template: pcf_1_7_cloudformation.json cloudformation-template-url: https://network.pivotal.io/api/v2/products/elastic-runtime/releases/1730/product_files/4060/download cloudformation-template-version: 1.7.1 image-build: 1.7.1-build.3 diff --git a/ert.yml b/ert.yml index 4fb307e..785afdf 100644 --- a/ert.yml +++ b/ert.yml @@ -6,7 +6,7 @@ products: - az-(( PcfPrivateSubnet2AvailabilityZone )) - az-(( PcfPrivateSubnet3AvailabilityZone )) singleton_availability_zone_reference: az-(( PcfPrivateSubnetAvailabilityZone )) - network_reference: (( PcfInfrastructureSubnet )) + network_reference: network-(( PcfPrivateSubnetId )) properties: - identifier: logger_endpoint_port value: 4443 @@ -79,7 +79,7 @@ products: elb_names: (( Opts_stack-name ))-pcf-elb,(( Opts_stack-name ))-pcf-elb-in instance: identifier: instances - value: 2 + value: 3 - identifier: diego_brain elb_names: (( Opts_stack-name ))-pcf-ssh-elb,(( Opts_stack-name ))-pcf-ssh-elb-in - identifier: nfs_server diff --git a/installation-aws-1.7.yml b/installation-aws-1.7.yml index da6d2e1..9e6d145 100644 --- a/installation-aws-1.7.yml +++ b/installation-aws-1.7.yml @@ -63,7 +63,7 @@ infrastructure: gateway: 10.0.0.1 reserved_ip_ranges: 10.0.0.1-10.0.0.9 availability_zone_references: - - az-(( PcfInfrastructureSubnetAvailabilityZone )) + - az-(( PcfInfrastructureSubnetAvailabilityZone )) iaas_configuration: region: (( v.region )) access_key_id: (( PcfIamUserAccessKey )) diff --git a/pcf_1_7_cloudformation.json b/pcf_1_7_cloudformation.json index 4cee066..d3a8e5b 100644 --- a/pcf_1_7_cloudformation.json +++ b/pcf_1_7_cloudformation.json @@ -45,12 +45,12 @@ }, "13PublicSubnet": { "Type": "String", - "Default": "10.0.0.0/24", + "Default": "10.0.0.0/26", "Description": "Infrastructure Subnet CIDR" }, "14InfrastructureSubnet": { "Type": "String", - "Default": "10.0.1.0/24", + "Default": "10.0.0.192/26", "Description": "Infrastructure Subnet CIDR" }, "15PrivateSubnet1": { @@ -77,6 +77,16 @@ "Type": "String", "Default": "10.0.6.0/24", "Description": "Rds Subnet2" + }, + "20PublicSubnet2": { + "Type": "String", + "Default": "10.0.0.64/26", + "Description": "Public Subnet2 CIDR" + }, + "21PublicSubnet3": { + "Type": "String", + "Default": "10.0.0.128/26", + "Description": "Public Subnet3 CIDR" } }, "Conditions": { @@ -160,6 +170,48 @@ ] } }, + "PcfPublicSubnet2": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "AvailabilityZone": { + "Fn::Select": [ + "1", + {"Fn::GetAZs": {"Ref": "AWS::Region"}} + ] + }, + "CidrBlock": {"Ref": "20PublicSubnet2"}, + "VpcId": { + "Ref": "PcfVpc" + }, + "Tags": [ + { + "Key": "Name", + "Value": "pcf-public-subnet2" + } + ] + } + }, + "PcfPublicSubnet3": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "AvailabilityZone": { + "Fn::Select": [ + "2", + {"Fn::GetAZs": {"Ref": "AWS::Region"}} + ] + }, + "CidrBlock": {"Ref": "21PublicSubnet3"}, + "VpcId": { + "Ref": "PcfVpc" + }, + "Tags": [ + { + "Key": "Name", + "Value": "pcf-public-subnet3" + } + ] + } + }, "PcfInfrastructureSubnet": { "Type": "AWS::EC2::Subnet", "Properties": { @@ -615,6 +667,28 @@ } } }, + "PcfPublicSubnet2RouteTableAssociation": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "PcfPublicRouteTable" + }, + "SubnetId": { + "Ref": "PcfPublicSubnet2" + } + } + }, + "PcfPublicSubnet3RouteTableAssociation": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "PcfPublicRouteTable" + }, + "SubnetId": { + "Ref": "PcfPublicSubnet3" + } + } + }, "PcfInfrastructureRouteTable": { "Type": "AWS::EC2::RouteTable", "Properties": { @@ -858,7 +932,9 @@ } ], "Subnets": [ - {"Ref": "PcfPublicSubnet"} + {"Ref": "PcfPublicSubnet"}, + {"Ref": "PcfPublicSubnet2"}, + {"Ref": "PcfPublicSubnet3"} ] } }, @@ -918,7 +994,9 @@ } ], "Subnets": [ - {"Ref": "PcfPublicSubnet"} + {"Ref": "PcfPublicSubnet"}, + {"Ref": "PcfPublicSubnet2"}, + {"Ref": "PcfPublicSubnet3"} ] } }, @@ -993,7 +1071,9 @@ } ], "Subnets": [ - {"Ref": "PcfInfrastructureSubnet"} + {"Ref": "PcfPublicSubnet"}, + {"Ref": "PcfPublicSubnet2"}, + {"Ref": "PcfPublicSubnet3"} ] } }, @@ -1038,7 +1118,9 @@ } ], "Subnets": [ - {"Ref": "PcfInfrastructureSubnet"} + {"Ref": "PcfPublicSubnet"}, + {"Ref": "PcfPublicSubnet2"}, + {"Ref": "PcfPublicSubnet3"} ] } }, @@ -1252,9 +1334,21 @@ "PcfPublicSubnetId": { "Value": {"Ref": "PcfPublicSubnet"} }, + "PcfPublicSubnet2Id": { + "Value": {"Ref": "PcfPublicSubnet2"} + }, + "PcfPublicSubnet3Id": { + "Value": {"Ref": "PcfPublicSubnet3"} + }, "PcfPublicSubnetAvailabilityZone": { "Value": { "Fn::GetAtt" : [ "PcfPublicSubnet", "AvailabilityZone" ] } }, + "PcfPublicSubnet2AvailabilityZone": { + "Value": { "Fn::GetAtt" : [ "PcfPublicSubnet2", "AvailabilityZone" ] } + }, + "PcfPublicSubnet3AvailabilityZone": { + "Value": { "Fn::GetAtt" : [ "PcfPublicSubnet3", "AvailabilityZone" ] } + }, "PcfInfrastructureSubnetId": { "Value": {"Ref": "PcfInfrastructureSubnet"} },