From e2049b7ce7a93dd9dccc7f55a840381f318d5312 Mon Sep 17 00:00:00 2001 From: Kevin Lyda Date: Thu, 26 Mar 2015 11:35:46 +0000 Subject: [PATCH 1/3] Fixing issues with VPC. One part of a fix to get this working on AWS VPCs. --- docs/getting-started-guides/aws/cloudformation-template.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/getting-started-guides/aws/cloudformation-template.json b/docs/getting-started-guides/aws/cloudformation-template.json index e2682f8e077..f5a7dd264f4 100644 --- a/docs/getting-started-guides/aws/cloudformation-template.json +++ b/docs/getting-started-guides/aws/cloudformation-template.json @@ -130,7 +130,7 @@ "ImageId": {"Fn::FindInMap" : ["RegionMap", {"Ref": "AWS::Region" }, "AMI"]}, "InstanceType": {"Ref": "InstanceType"}, "KeyName": {"Ref": "KeyPair"}, - "SecurityGroups": [{"Ref": "KubernetesSecurityGroup"}], + "SecurityGroups": [{"Fn::GetAtt": ["KubernetesSecurityGroup", "GroupId"]}], "UserData": { "Fn::Base64": {"Fn::Join" : ["", [ "#cloud-config\n\n", "---\n", @@ -300,7 +300,7 @@ "ImageId": {"Fn::FindInMap" : ["RegionMap", {"Ref": "AWS::Region" }, "AMI" ]}, "InstanceType": {"Ref": "InstanceType"}, "KeyName": {"Ref": "KeyPair"}, - "SecurityGroups": [{"Ref": "KubernetesSecurityGroup"}], + "SecurityGroups": [{"Fn::GetAtt": ["KubernetesSecurityGroup", "GroupId"]}], "UserData": { "Fn::Base64": {"Fn::Join" : ["", [ "#cloud-config\n\n", "coreos:\n", From 32aad891efafe5362a7189d189036853242c8bae Mon Sep 17 00:00:00 2001 From: Kevin Lyda Date: Thu, 26 Mar 2015 13:49:43 +0000 Subject: [PATCH 2/3] Fix SecurityGroups/SecurityGroupIds issue. --- .../aws/cloudformation-template.json | 22 +++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/docs/getting-started-guides/aws/cloudformation-template.json b/docs/getting-started-guides/aws/cloudformation-template.json index f5a7dd264f4..cf6262d81d2 100644 --- a/docs/getting-started-guides/aws/cloudformation-template.json +++ b/docs/getting-started-guides/aws/cloudformation-template.json @@ -130,7 +130,16 @@ "ImageId": {"Fn::FindInMap" : ["RegionMap", {"Ref": "AWS::Region" }, "AMI"]}, "InstanceType": {"Ref": "InstanceType"}, "KeyName": {"Ref": "KeyPair"}, - "SecurityGroups": [{"Fn::GetAtt": ["KubernetesSecurityGroup", "GroupId"]}], + "SecurityGroups": [{"Fn::If": [ + "UseEC2Classic", + {"Ref": "KubernetesSecurityGroup"}, + {"Ref": "AWS::NoValue"}] + }], + "SecurityGroupIds": [{"Fn::If": [ + "UseEC2Classic", + {"Ref": "AWS::NoValue"}, + {"Fn::GetAtt": ["KubernetesSecurityGroup", "GroupId"]}] + }], "UserData": { "Fn::Base64": {"Fn::Join" : ["", [ "#cloud-config\n\n", "---\n", @@ -300,7 +309,16 @@ "ImageId": {"Fn::FindInMap" : ["RegionMap", {"Ref": "AWS::Region" }, "AMI" ]}, "InstanceType": {"Ref": "InstanceType"}, "KeyName": {"Ref": "KeyPair"}, - "SecurityGroups": [{"Fn::GetAtt": ["KubernetesSecurityGroup", "GroupId"]}], + "SecurityGroups": [{"Fn::If": [ + "UseEC2Classic", + {"Ref": "KubernetesSecurityGroup"}, + {"Ref": "AWS::NoValue"}] + }], + "SecurityGroupIds": [{"Fn::If": [ + "UseEC2Classic", + {"Ref": "AWS::NoValue"}, + {"Fn::GetAtt": ["KubernetesSecurityGroup", "GroupId"]}] + }], "UserData": { "Fn::Base64": {"Fn::Join" : ["", [ "#cloud-config\n\n", "coreos:\n", From f3c775ae191b67ea197ff42d5ea274dccfea3745 Mon Sep 17 00:00:00 2001 From: Kevin Lyda Date: Thu, 26 Mar 2015 14:26:08 +0000 Subject: [PATCH 3/3] Fix AWS::AutoScaling::LaunchConfiguration. This only supports SecurityGroups; I'm assuming I need to use the GroupId for the SecurityGroup with VPCs. In addition this doesn't support SubnetId. --- .../getting-started-guides/aws/cloudformation-template.json | 6 ------ 1 file changed, 6 deletions(-) diff --git a/docs/getting-started-guides/aws/cloudformation-template.json b/docs/getting-started-guides/aws/cloudformation-template.json index cf6262d81d2..f6ddb28f9b3 100644 --- a/docs/getting-started-guides/aws/cloudformation-template.json +++ b/docs/getting-started-guides/aws/cloudformation-template.json @@ -305,18 +305,12 @@ "KubernetesNodeLaunchConfig": { "Type": "AWS::AutoScaling::LaunchConfiguration", "Properties": { - "SubnetId": {"Fn::If": ["UseEC2Classic", {"Ref": "AWS::NoValue"}, {"Ref": "SubnetId"}]}, "ImageId": {"Fn::FindInMap" : ["RegionMap", {"Ref": "AWS::Region" }, "AMI" ]}, "InstanceType": {"Ref": "InstanceType"}, "KeyName": {"Ref": "KeyPair"}, "SecurityGroups": [{"Fn::If": [ "UseEC2Classic", {"Ref": "KubernetesSecurityGroup"}, - {"Ref": "AWS::NoValue"}] - }], - "SecurityGroupIds": [{"Fn::If": [ - "UseEC2Classic", - {"Ref": "AWS::NoValue"}, {"Fn::GetAtt": ["KubernetesSecurityGroup", "GroupId"]}] }], "UserData": { "Fn::Base64": {"Fn::Join" : ["", [