Skip to content

Commit

Permalink
Merge pull request #40 from Kong/support/0.12.1
Browse files Browse the repository at this point in the history
Kong v0.12.x support
  • Loading branch information
shashi ranjan authored Jan 19, 2018
2 parents ef5d3b6 + 95ad087 commit 105b1bb
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 38 deletions.
10 changes: 6 additions & 4 deletions templates/kong-elb-cassandra-user-vpc-optional-hvm.template
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@
"SecurityGroups" : [ { "Ref" : "LoadBalancerSecurityGroup" } ],
"Subnets" : [
{ "Ref" : "SubnetId1" }, { "Ref" : "SubnetId2" }
],
],
"CrossZone" : "true",
"Listeners": [
{
Expand Down Expand Up @@ -337,11 +337,11 @@
"Properties" : {
"GroupDescription" : "Enable HTTP access on port 8000 and 8001",
"VpcId" : { "Fn::If" : [ "CreateVpcResources", { "Ref" : "VPC" }, { "Ref" : "VpcId" } ] },
"SecurityGroupIngress" : [
"SecurityGroupIngress" : [
{ "IpProtocol" : "tcp", "FromPort" : "8000", "ToPort" : "8000", "CidrIp" : { "Ref" : "KongProxyAccess" } },
{ "IpProtocol" : "tcp", "FromPort" : "8001", "ToPort" : "8001", "CidrIp" : { "Ref" : "KongAdminAccess" } }
],
"SecurityGroupEgress" : [
"SecurityGroupEgress" : [
{ "IpProtocol" : "tcp", "FromPort" : "1", "ToPort" : "65535", "CidrIp" : "0.0.0.0/0" }
]
}
Expand Down Expand Up @@ -483,6 +483,8 @@
"export KONG_DATABASE=cassandra\n",
"export KONG_CASSANDRA_CONTACT_POINTS\n",
"export KONG_CASSANDRA_PORT=", {"Ref": "CassandraPort"}, "\n",
"export KONG_ADMIN_LISTEN=0.0.0.0:8001\n",
"export KONG_ADMIN_LISTEN_SSL=0.0.0.0:8444\n",
"echo \"[kong] installing Kong with following environments:\" \n",
"env\n",
"mkdir \/usr\/local\/kong && chown ec2-user \/usr\/local\/kong \n",
Expand Down Expand Up @@ -533,7 +535,7 @@
{ "IpProtocol" : "tcp", "FromPort" : "8000", "ToPort" : "8001", "SourceSecurityGroupId" : { "Ref" : "LoadBalancerSecurityGroup" } },
{ "IpProtocol" : "tcp", "FromPort" : "22", "ToPort" : "22", "CidrIp" : { "Ref" : "SSHLocation" } }
],
"SecurityGroupEgress" : [
"SecurityGroupEgress" : [
{ "IpProtocol" : "tcp", "FromPort" : "1", "ToPort" : "65535", "CidrIp" : "0.0.0.0/0" }
]
}
Expand Down
12 changes: 7 additions & 5 deletions templates/kong-elb-cassandra-user-vpc-optional-pv.template
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@
"SecurityGroups" : [ { "Ref" : "LoadBalancerSecurityGroup" } ],
"Subnets" : [
{ "Ref" : "SubnetId1" }, { "Ref" : "SubnetId2" }
],
],
"CrossZone" : "true",
"Listeners": [
{
Expand Down Expand Up @@ -323,11 +323,11 @@
"Properties" : {
"GroupDescription" : "Enable HTTP access on port 8000 and 8001",
"VpcId" : { "Fn::If" : [ "CreateVpcResources", { "Ref" : "VPC" }, { "Ref" : "VpcId" } ] },
"SecurityGroupIngress" : [
"SecurityGroupIngress" : [
{ "IpProtocol" : "tcp", "FromPort" : "8000", "ToPort" : "8000", "CidrIp" : { "Ref" : "KongProxyAccess" } },
{ "IpProtocol" : "tcp", "FromPort" : "8001", "ToPort" : "8001", "CidrIp" : { "Ref" : "KongAdminAccess" } }
],
"SecurityGroupEgress" : [
"SecurityGroupEgress" : [
{ "IpProtocol" : "tcp", "FromPort" : "1", "ToPort" : "65535", "CidrIp" : "0.0.0.0/0" }
]
}
Expand Down Expand Up @@ -469,6 +469,8 @@
"export KONG_DATABASE=cassandra\n",
"export KONG_CASSANDRA_CONTACT_POINTS\n",
"export KONG_CASSANDRA_PORT=", {"Ref": "CassandraPort"}, "\n",
"export KONG_ADMIN_LISTEN=0.0.0.0:8001\n",
"export KONG_ADMIN_LISTEN_SSL=0.0.0.0:8444\n",
"echo \"[kong] installing Kong with following environments:\" \n",
"env\n",
"mkdir \/usr\/local\/kong && chown ec2-user \/usr\/local\/kong \n",
Expand Down Expand Up @@ -519,7 +521,7 @@
{ "IpProtocol" : "tcp", "FromPort" : "8000", "ToPort" : "8001", "SourceSecurityGroupId" : { "Ref" : "LoadBalancerSecurityGroup" } },
{ "IpProtocol" : "tcp", "FromPort" : "22", "ToPort" : "22", "CidrIp" : { "Ref" : "SSHLocation" } }
],
"SecurityGroupEgress" : [
"SecurityGroupEgress" : [
{ "IpProtocol" : "tcp", "FromPort" : "1", "ToPort" : "65535", "CidrIp" : "0.0.0.0/0" }
]
}
Expand All @@ -530,7 +532,7 @@
"GroupId" : {
"Fn::GetAtt" : [ "KongSecurityGroup", "GroupId" ]
},
"IpProtocol": "tcp", "FromPort": "7946", "ToPort": "7946",
"IpProtocol": "tcp", "FromPort": "7946", "ToPort": "7946",
"SourceSecurityGroupId": {
"Fn::GetAtt" : [ "KongSecurityGroup", "GroupId" ]
}
Expand Down
16 changes: 9 additions & 7 deletions templates/kong-elb-postgres-optional-vpc-new-hvm.template
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@
"Conditions" : {
"CreateRDS" : {
"Fn::Equals" : [
{"Ref" : "DBHost"},
{"Ref" : "DBHost"},
""
]
},
Expand Down Expand Up @@ -363,11 +363,11 @@
"Properties" : {
"GroupDescription" : "Enable HTTP access on port 8000 and 8001",
"VpcId" : { "Ref" : "VPC" },
"SecurityGroupIngress" : [
"SecurityGroupIngress" : [
{ "IpProtocol" : "tcp", "FromPort" : "8000", "ToPort" : "8000", "CidrIp" : { "Ref" : "KongProxyAccess" } },
{ "IpProtocol" : "tcp", "FromPort" : "8001", "ToPort" : "8001", "CidrIp" : { "Ref" : "KongAdminAccess" } }
],
"SecurityGroupEgress" : [
"SecurityGroupEgress" : [
{ "IpProtocol" : "tcp", "FromPort" : "1", "ToPort" : "65535", "CidrIp" : "0.0.0.0/0" }
]
}
Expand Down Expand Up @@ -506,6 +506,8 @@
"export KONG_PG_USER=", { "Ref" : "DBUsername" }, "\n",
"export KONG_PG_DATABASE=", { "Ref" : "DBName" }, "\n",
"export KONG_PG_PASSWORD=", { "Ref" : "DBPassword" }, "\n",
"export KONG_ADMIN_LISTEN=0.0.0.0:8001\n",
"export KONG_ADMIN_LISTEN_SSL=0.0.0.0:8444\n",
"echo \"[kong] installing Kong with following environments:\" \n",
"env\n",
"mkdir \/usr\/local\/kong && chown ec2-user \/usr\/local\/kong \n",
Expand Down Expand Up @@ -556,7 +558,7 @@
{ "IpProtocol" : "tcp", "FromPort" : "8000", "ToPort" : "8001", "SourceSecurityGroupId" : { "Ref" : "LoadBalancerSecurityGroup" } },
{ "IpProtocol" : "tcp", "FromPort" : "22", "ToPort" : "22", "CidrIp" : { "Ref" : "SSHLocation" } }
],
"SecurityGroupEgress" : [
"SecurityGroupEgress" : [
{ "IpProtocol" : "tcp", "FromPort" : "1", "ToPort" : "65535", "CidrIp" : "0.0.0.0/0" }
]
}
Expand All @@ -567,7 +569,7 @@
"GroupId" : {
"Fn::GetAtt" : [ "KongSecurityGroup", "GroupId" ]
},
"IpProtocol": "tcp", "FromPort": "7946", "ToPort": "7946",
"IpProtocol": "tcp", "FromPort": "7946", "ToPort": "7946",
"SourceSecurityGroupId": {
"Fn::GetAtt" : [ "KongSecurityGroup", "GroupId" ]
}
Expand Down Expand Up @@ -623,12 +625,12 @@
{ "IpProtocol" : "tcp", "FromPort": 5432, "ToPort" : "5432", "SourceSecurityGroupId": {"Ref" : "KongSecurityGroup"}},
{ "IpProtocol" : "tcp", "FromPort" : "22", "ToPort" : "22", "CidrIp" : { "Ref" : "SSHLocation" } }
],
"SecurityGroupEgress" : [
"SecurityGroupEgress" : [
{ "IpProtocol" : "tcp", "FromPort" : "1", "ToPort" : "65535", "CidrIp" : "0.0.0.0/0" }
],
"VpcId" : { "Ref" : "VPC" }
}
}
}
},
"Outputs": {
"ProxyURL": {
Expand Down
24 changes: 13 additions & 11 deletions templates/kong-elb-postgres-optional-vpc-optional-hvm.template
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,14 @@
"Default" : "db.m4.large",
"Description" : "Database instance class",
"Type" : "String",
"AllowedValues" : [
"AllowedValues" : [
"db.t2.micro",
"db.t2.small",
"db.t2.medium",
"db.t2.large",
"db.m1.small",
"db.m1.large",
"db.m1.xlarge",
"db.m1.small",
"db.m1.large",
"db.m1.xlarge",
"db.m2.xlarge",
"db.m4.large",
"db.m4.xlarge",
Expand Down Expand Up @@ -423,7 +423,7 @@
"SecurityGroups" : [ { "Ref" : "LoadBalancerSecurityGroup" } ],
"Subnets" : [
{ "Ref" : "SubnetId1" }, { "Ref" : "SubnetId2" }
],
],
"CrossZone" : "true",
"Listeners": [
{
Expand Down Expand Up @@ -451,11 +451,11 @@
"Properties" : {
"GroupDescription" : "Enable HTTP access on port 8000 and 8001",
"VpcId" : { "Fn::If" : [ "CreateVpcResources", { "Ref" : "VPC" }, { "Ref" : "VpcId" } ] },
"SecurityGroupIngress" : [
"SecurityGroupIngress" : [
{ "IpProtocol" : "tcp", "FromPort" : "8000", "ToPort" : "8000", "CidrIp" : { "Ref" : "KongProxyAccess" } },
{ "IpProtocol" : "tcp", "FromPort" : "8001", "ToPort" : "8001", "CidrIp" : { "Ref" : "KongAdminAccess" } }
],
"SecurityGroupEgress" : [
"SecurityGroupEgress" : [
{ "IpProtocol" : "tcp", "FromPort" : "1", "ToPort" : "65535", "CidrIp" : "0.0.0.0/0" }
]
}
Expand Down Expand Up @@ -594,6 +594,8 @@
"export KONG_PG_USER=", { "Ref" : "DBUsername" }, "\n",
"export KONG_PG_DATABASE=", { "Ref" : "DBName" }, "\n",
"export KONG_PG_PASSWORD=", { "Ref" : "DBPassword" }, "\n",
"export KONG_ADMIN_LISTEN=0.0.0.0:8001\n",
"export KONG_ADMIN_LISTEN_SSL=0.0.0.0:8444\n",
"echo \"[kong] installing Kong with following environments:\" \n",
"env\n",
"mkdir \/usr\/local\/kong && chown ec2-user \/usr\/local\/kong \n",
Expand Down Expand Up @@ -644,7 +646,7 @@
{ "IpProtocol" : "tcp", "FromPort" : "8000", "ToPort" : "8001", "SourceSecurityGroupId" : { "Ref" : "LoadBalancerSecurityGroup" } },
{ "IpProtocol" : "tcp", "FromPort" : "22", "ToPort" : "22", "CidrIp" : { "Ref" : "SSHLocation" } }
],
"SecurityGroupEgress" : [
"SecurityGroupEgress" : [
{ "IpProtocol" : "tcp", "FromPort" : "1", "ToPort" : "65535", "CidrIp" : "0.0.0.0/0" }
]
}
Expand All @@ -655,7 +657,7 @@
"GroupId" : {
"Fn::GetAtt" : [ "KongSecurityGroup", "GroupId" ]
},
"IpProtocol": "tcp", "FromPort": "7946", "ToPort": "7946",
"IpProtocol": "tcp", "FromPort": "7946", "ToPort": "7946",
"SourceSecurityGroupId": {
"Fn::GetAtt" : [ "KongSecurityGroup", "GroupId" ]
}
Expand Down Expand Up @@ -709,12 +711,12 @@
{ "IpProtocol" : "tcp", "FromPort": 5432, "ToPort" : "5432", "SourceSecurityGroupId": {"Ref" : "KongSecurityGroup"}},
{ "IpProtocol" : "tcp", "FromPort" : "22", "ToPort" : "22", "CidrIp" : { "Ref" : "SSHLocation" } }
],
"SecurityGroupEgress" : [
"SecurityGroupEgress" : [
{ "IpProtocol" : "tcp", "FromPort" : "1", "ToPort" : "65535", "CidrIp" : "0.0.0.0/0" }
],
"VpcId" : { "Fn::If" : [ "CreateVpcResources", { "Ref" : "VPC" }, { "Ref" : "VpcId" } ] }
}
}
}
},
"Outputs": {
"ProxyURL": {
Expand Down
24 changes: 13 additions & 11 deletions templates/kong-elb-postgres-optional-vpc-optional-pv.template
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,14 @@
"Default" : "db.t2.micro",
"Description" : "Database instance class",
"Type" : "String",
"AllowedValues" : [
"AllowedValues" : [
"db.t2.micro",
"db.t2.small",
"db.t2.medium",
"db.t2.large",
"db.m1.small",
"db.m1.large",
"db.m1.xlarge",
"db.m1.small",
"db.m1.large",
"db.m1.xlarge",
"db.m2.xlarge",
"db.m4.large",
"db.m4.xlarge",
Expand Down Expand Up @@ -409,7 +409,7 @@
"SecurityGroups" : [ { "Ref" : "LoadBalancerSecurityGroup" } ],
"Subnets" : [
{ "Ref" : "SubnetId1" }, { "Ref" : "SubnetId2" }
],
],
"CrossZone" : "true",
"Listeners": [
{
Expand Down Expand Up @@ -437,11 +437,11 @@
"Properties" : {
"GroupDescription" : "Enable HTTP access on port 8000 and 8001",
"VpcId" : { "Fn::If" : [ "CreateVpcResources", { "Ref" : "VPC" }, { "Ref" : "VpcId" } ] },
"SecurityGroupIngress" : [
"SecurityGroupIngress" : [
{ "IpProtocol" : "tcp", "FromPort" : "8000", "ToPort" : "8000", "CidrIp" : { "Ref" : "KongProxyAccess" } },
{ "IpProtocol" : "tcp", "FromPort" : "8001", "ToPort" : "8001", "CidrIp" : { "Ref" : "KongAdminAccess" } }
],
"SecurityGroupEgress" : [
"SecurityGroupEgress" : [
{ "IpProtocol" : "tcp", "FromPort" : "1", "ToPort" : "65535", "CidrIp" : "0.0.0.0/0" }
]
}
Expand Down Expand Up @@ -521,6 +521,8 @@
"export KONG_PG_USER=", { "Ref" : "DBUsername" }, "\n",
"export KONG_PG_DATABASE=", { "Ref" : "DBName" }, "\n",
"export KONG_PG_PASSWORD=", { "Ref" : "DBPassword" }, "\n",
"export KONG_ADMIN_LISTEN=0.0.0.0:8001\n",
"export KONG_ADMIN_LISTEN_SSL=0.0.0.0:8444\n",
"echo \"[kong] installing Kong with following environments:\" \n",
"env\n",
"mkdir \/usr\/local\/kong && chown ec2-user \/usr\/local\/kong \n",
Expand Down Expand Up @@ -630,7 +632,7 @@
{ "IpProtocol" : "tcp", "FromPort" : "8000", "ToPort" : "8001", "SourceSecurityGroupId" : { "Ref" : "LoadBalancerSecurityGroup" } },
{ "IpProtocol" : "tcp", "FromPort" : "22", "ToPort" : "22", "CidrIp" : { "Ref" : "SSHLocation" } }
],
"SecurityGroupEgress" : [
"SecurityGroupEgress" : [
{ "IpProtocol" : "tcp", "FromPort" : "1", "ToPort" : "65535", "CidrIp" : "0.0.0.0/0" }
]
}
Expand All @@ -655,7 +657,7 @@
"MasterUserPassword" : { "Ref" : "DBPassword" },
"DBSubnetGroupName" : { "Ref" : "DBSubnetGroup" },
"PubliclyAccessible" : {"Ref": "DBPublicAccess"},
"EngineVersion" : {"Ref" : "DBVersion"},
"EngineVersion" : {"Ref" : "DBVersion"},
"DBSnapshotIdentifier" : {
"Fn::If" : [
"UseDbSnapshot",
Expand Down Expand Up @@ -683,12 +685,12 @@
{ "IpProtocol" : "tcp", "FromPort": 5432, "ToPort" : "5432", "SourceSecurityGroupId": {"Ref" : "KongSecurityGroup"}},
{ "IpProtocol" : "tcp", "FromPort" : "22", "ToPort" : "22", "CidrIp" : { "Ref" : "SSHLocation" } }
],
"SecurityGroupEgress" : [
"SecurityGroupEgress" : [
{ "IpProtocol" : "tcp", "FromPort" : "1", "ToPort" : "65535", "CidrIp" : "0.0.0.0/0" }
],
"VpcId" : { "Fn::If" : [ "CreateVpcResources", { "Ref" : "VPC" }, { "Ref" : "VpcId" } ] }
}
}
}
},
"Outputs": {
"ProxyURL": {
Expand Down

0 comments on commit 105b1bb

Please sign in to comment.