Skip to content

Commit

Permalink
Merge pull request #38 from Mashape/support/0.11.0
Browse files Browse the repository at this point in the history
update(templates, docs) support for Kong v0.11.x
  • Loading branch information
shashiranjan84 authored Aug 16, 2017
2 parents 7bbb9a3 + 1c15028 commit ef5d3b6
Show file tree
Hide file tree
Showing 8 changed files with 717 additions and 2,074 deletions.
77 changes: 22 additions & 55 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,32 +7,20 @@

[![][kong-logo]][website-url]

This CloudFormation template helps you model and set up Kong's resources in AWS easily.
This CloudFormation template helps you model and set up Kong's
resources in AWS easily.

Note: For Kong's version 0.8.x use the tag 3.0.0.
Note: For Kong's 0.10.x and older versions template please
check out the 4.0.0 or older tags.

## Summary

You have option to chose between two templates:

### 1) Kong with Cassandra DB(Deprecated)
### 1) Kong with Cassandra DB (you need to bring yours own Cassandra cluster)

Provision Kong resources along with a new [Cassandra cluster](http://cassandra.apache.org/), using The [Datastax Cassandra](http://docs.datastax.com/en/cassandra/2.2/cassandra/install/installAMI.html) AMI in a new VPC or existing VPC.

| Region | HVM AMIs | PV AMIs |
| ----------------: | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- |
| `us-east-1` | [![Kong Stack launch][stack-badge]][us-east-1-caas-hvm-stack-url] | [![Kong Stack launch][stack-badge]][us-east-1-caas-pv-stack-url] |
| `us-west-1` | [![Kong Stack launch][stack-badge]][us-west-1-caas-hvm-stack-url] | [![Kong Stack launch][stack-badge]][us-west-1-caas-pv-stack-url] |
| `us-west-2` | [![Kong Stack launch][stack-badge]][us-west-2-caas-hvm-stack-url] | [![Kong Stack launch][stack-badge]][us-west-2-caas-pv-stack-url] |
| `eu-west-1` | [![Kong Stack launch][stack-badge]][eu-west-1-caas-hvm-stack-url] | [![Kong Stack launch][stack-badge]][eu-west-1-caas-pv-stack-url] |
| `ap-northeast-1` | [![Kong Stack launch][stack-badge]][ap-northeast-1-caas-hvm-stack-url] | [![Kong Stack launch][stack-badge]][ap-northeast-1-caas-pv-stack-url] |
| `ap-southeast-1` | [![Kong Stack launch][stack-badge]][ap-southeast-1-caas-hvm-stack-url] | [![Kong Stack launch][stack-badge]][ap-southeast-1-caas-pv-stack-url] |
| `ap-southeast-2` | [![Kong Stack launch][stack-badge]][ap-southeast-2-caas-hvm-stack-url] | [![Kong Stack launch][stack-badge]][ap-southeast-2-caas-pv-stack-url] |
| `sa-east-1` | [![Kong Stack launch][stack-badge]][sa-east-1-caas-hvm-stack-url] | [![Kong Stack launch][stack-badge]][sa-east-1-caas-pv-stack-url] |

### 2) Kong without Cassandra DB (you need to bring yours)

Provisions Kong resources with user provided Cassandra seed nodes in a new VPC or existing VPC.
Provisions Kong resources with user provided Cassandra seed nodes
in a new VPC or existing VPC.

| Region | HVM AMIs | PV AMIs |
| ----------------: | ------------------------------------------------------------------ | ---------------------------------------------------------------- |
Expand All @@ -45,9 +33,10 @@ Provisions Kong resources with user provided Cassandra seed nodes in a new VPC o
| `ap-southeast-2` | [![Kong Stack launch][stack-badge]][ap-southeast-2-hvm-stack-url] | [![Kong Stack launch][stack-badge]][ap-southeast-2-pv-stack-url] |
| `sa-east-1` | [![Kong Stack launch][stack-badge]][sa-east-1-hvm-stack-url] | [![Kong Stack launch][stack-badge]][sa-east-1-pv-stack-url] |

### 3) Kong with Postgres DB
### 2) Kong with Postgres DB

Provisions Kong resources with user provided Cassandra seed nodes in a new VPC or existing VPC.
Provisions Kong resources with user provided Cassandra seed nodes
in a new VPC or existing VPC.

| Region | HVM AMIs | PV AMIs |
| ----------------: | ------------------------------------------------------------------ | ---------------------------------------------------------------- |
Expand All @@ -63,7 +52,8 @@ Provisions Kong resources with user provided Cassandra seed nodes in a new VPC o

### Parameters

<B>Recommended usage: use this cloud formation as basis for your own, adjust the variables and template to better suite your needs.</B>
<B>Recommended usage: use this cloud formation as basis for your
own, adjust the variables and template to better suite your needs.</B>

#### Cassandra

Expand All @@ -76,7 +66,9 @@ Provisions Kong resources with user provided Cassandra seed nodes in a new VPC o
| `KongFleetMaxSize` | `2` | Max Number of Kong instances *(Min: `1`)* |
| `KongFleetDesiredSize` | `2` | Desired Number of Kong instances *(Min: `1`)* |
| `KongInstanceType` | `c3.2xlarge` | EC2 instance type for Kong. Note: T2 instance is not supported on the EC2-Classic platform |
| `KongVersion` | `-` | Kong version to be deployed |
| `KongVersion` | `-` | Kong version to be deployed. Leave it blank to install latest version. |
| `KongMigration ` | `true` | Select `false` to not run the Kong migrations while Kong starts |
| `KongConfigs` | `` | Comma separated Kong configurations in KONG_<SUPPORTED_CONFIG>=Val format |
| `CassandraKeyName` | `-` | Existing EC2 KeyPair to enable SSH access to the instances for Cassandra |
| `CassandraFleetSize` | `1` | Number of nodes in cluster. *(Min: `1`)* |
| `CassandraInstanceType` | `c3.2xlarge` | EC2 instance type for Cassandra |
Expand All @@ -103,15 +95,17 @@ Provisions Kong resources with user provided Cassandra seed nodes in a new VPC o
| `KongFleetMaxSize` | `2` | Max Number of Kong instances *(Min: `1`)* |
| `KongFleetDesiredSize` | `2` | Desired Number of Kong instances *(Min: `1`)* |
| `KongInstanceType` | `c3.2xlarge` | EC2 instance type for Kong. Note: T2 instance is not supported on the EC2-Classic platform |
| `KongVersion` | `-` | Kong version to be deployed |
| `KongVersion` | `-` | Kong version to be deployed. Leave it blank to install latest version. |
| `KongMigration ` | `true` | Select `false` to not run the Kong migrations when Kong starts |
| `KongConfigs` | `` | Comma separated Kong configurations in KONG_<SUPPORTED_CONFIG>=Val format |
| `DBName` | `Kong` | Database name |
| `DBHost` | `-` | The database host dns/ip address, leave blank to start a new RDS instance |
| `DBPort` | `5432` | The database port, leave blank to start a new RDS instance |
| `DBUsername` | `kong` | The database admin account username |
| `DBPassword` | `changeit` | The database admin account password |
| `DBClass` | `db.m1.large` | Database instance class |
| `DBPublicAccess` | `false` | Database public access |
| `DBVersion` | `9.4.7` | Postgres version |
| `DBVersion` | `9.4.7` | Postgres version |
| `DBAllocatedStorage` | `5` | The size of the database (Gb) |
| `DBSnapshotIdentifier` | `-` | The RDS snapshot name to restore to the new DB instance. |
| `VpcId` | `-` | Optional- VPC Id of existing VPC. Leave blank to have a new VPC created |
Expand Down Expand Up @@ -161,13 +155,13 @@ Provisions Kong resources with user provided Cassandra seed nodes in a new VPC o

#### SSL Support

You can install SSL Certificate on the Kong Load Balancer or use the SSL plugin on Kong to enable HTTPS support.
You can install SSL Certificate on the Kong Load Balancer.

##### 1) [SSL Certificate for Kong Load Balancer](http://docs.aws.amazon.com/ElasticLoadBalancing/latest/DeveloperGuide/ssl-server-cert.html)
##### [SSL Certificate for Kong Load Balancer](http://docs.aws.amazon.com/ElasticLoadBalancing/latest/DeveloperGuide/ssl-server-cert.html)

1. Obtain the Kong Load Balancer `id` from the *"Resources tab"*.
2. Find the matching Kong Load Balancer instance.
3. Edit Listeners from the bottom pane, click Add.
3. Edit Listeners from the bottom pane, click Add.
4. In the Load Balancer Protocol column, select HTTPS (Secure HTTP). This updates the Load Balancer Port, Instance Protocol, and Instance Port columns. In the Instance Protocol column, select HTTP and update the Instance port to 8000.
5. By default, Elastic Load Balancing selects the current predefined security policy, ELBSecurityPolicy-2015-05, for your HTTPS/SSL listener. This is the recommended setting.
6. In the SSL Certificate column, click Change, and then you either upload a new certificate or choose an existing Certificate.
Expand All @@ -178,15 +172,6 @@ You can install SSL Certificate on the Kong Load Balancer or use the SSL plugin
11. Click Edit.
12. Add Load Balancer Port for the HTTPS to the list and save.

##### 2) [Using Kong SSL Plugin](https://getkong.org/plugins/ssl/)

1. SSH on each Kong node, upload the Certificate.
2. Update Kong node Security Group to open TCP port 8443.
3. Add HTTPS listener on Kong Load Balancer forwarding request to 8443 Instance port.
4. Open HTTPS listener port in Kong Load Balancer security group.
5. Enable the Kong [SSL plugin](https://getkong.org/plugins/ssl/).


#### Important Note

1. The security configuration on the templates opens up all externally accessible ports to incoming traffic from any IP address if default is chosen *(`0.0.0.0/0`)*
Expand All @@ -210,24 +195,6 @@ Support, Demo, Training, API Certifications and Consulting available at http://g
[mailing-list-url]: https://groups.google.com/forum/#!forum/konglayer


[us-east-1-caas-hvm-stack-url]: https://console.aws.amazon.com/cloudformation/home?region=us-east-1#/stacks/new?stackName=kong-elb-cassandra-hvm&templateURL=https:%2F%2Fs3.amazonaws.com%2Fkong-cf-templates%2Flatest%2Fkong-elb-cassandra-new-vpc-optional-hvm.template
[us-west-1-caas-hvm-stack-url]: https://console.aws.amazon.com/cloudformation/home?region=us-west-1#/stacks/new?stackName=kong-elb-cassandra-hvm&templateURL=https:%2F%2Fs3.amazonaws.com%2Fkong-cf-templates%2Flatest%2Fkong-elb-cassandra-new-vpc-optional-hvm.template
[us-west-2-caas-hvm-stack-url]: https://console.aws.amazon.com/cloudformation/home?region=us-west-2#/stacks/new?stackName=kong-elb-cassandra-hvm&templateURL=https:%2F%2Fs3.amazonaws.com%2Fkong-cf-templates%2Flatest%2Fkong-elb-cassandra-new-vpc-optional-hvm.template
[eu-west-1-caas-hvm-stack-url]: https://console.aws.amazon.com/cloudformation/home?region=eu-west-1#/stacks/new?stackName=kong-elb-cassandra-hvm&templateURL=https:%2F%2Fs3.amazonaws.com%2Fkong-cf-templates%2Flatest%2Fkong-elb-cassandra-new-vpc-optional-hvm.template
[ap-northeast-1-caas-hvm-stack-url]: https://console.aws.amazon.com/cloudformation/home?region=ap-northeast-1#/stacks/new?stackName=kong-elb-cassandra-hvm&templateURL=https:%2F%2Fs3.amazonaws.com%2Fkong-cf-templates%2Flatest%2Fkong-elb-cassandra-new-vpc-optional-hvm.template
[ap-southeast-1-caas-hvm-stack-url]: https://console.aws.amazon.com/cloudformation/home?region=ap-southeast-1#/stacks/new?stackName=kong-elb-cassandra-hvm&templateURL=https:%2F%2Fs3.amazonaws.com%2Fkong-cf-templates%2Flatest%2Fkong-elb-cassandra-new-vpc-optional-hvm.template
[ap-southeast-2-caas-hvm-stack-url]: https://console.aws.amazon.com/cloudformation/home?region=ap-southeast-2#/stacks/new?stackName=kong-elb-cassandra-hvm&templateURL=https:%2F%2Fs3.amazonaws.com%2Fkong-cf-templates%2Flatest%2Fkong-elb-cassandra-new-vpc-optional-hvm.template
[sa-east-1-caas-hvm-stack-url]: https://console.aws.amazon.com/cloudformation/home?region=sa-east-1#/stacks/new?stackName=kong-elb-cassandra-hvm&templateURL=https:%2F%2Fs3.amazonaws.com%2Fkong-cf-templates%2Flatest%2Fkong-elb-cassandra-new-vpc-optional-hvm.template

[us-east-1-caas-pv-stack-url]: https://console.aws.amazon.com/cloudformation/home?region=us-east-1#/stacks/new?stackName=kong-elb-cassandra-pv&templateURL=https:%2F%2Fs3.amazonaws.com%2Fkong-cf-templates%2Flatest%2Fkong-elb-cassandra-new-vpc-optional-pv.template
[us-west-1-caas-pv-stack-url]: https://console.aws.amazon.com/cloudformation/home?region=us-west-1#/stacks/new?stackName=kong-elb-cassandra-pv&templateURL=https:%2F%2Fs3.amazonaws.com%2Fkong-cf-templates%2Flatest%2Fkong-elb-cassandra-new-vpc-optional-pv.template
[us-west-2-caas-pv-stack-url]: https://console.aws.amazon.com/cloudformation/home?region=us-west-2#/stacks/new?stackName=kong-elb-cassandra-pv&templateURL=https:%2F%2Fs3.amazonaws.com%2Fkong-cf-templates%2Flatest%2Fkong-elb-cassandra-new-vpc-optional-pv.template
[eu-west-1-caas-pv-stack-url]: https://console.aws.amazon.com/cloudformation/home?region=eu-west-1#/stacks/new?stackName=kong-elb-cassandra-pv&templateURL=https:%2F%2Fs3.amazonaws.com%2Fkong-cf-templates%2Flatest%2Fkong-elb-cassandra-new-vpc-optional-pv.template
[ap-northeast-1-caas-pv-stack-url]: https://console.aws.amazon.com/cloudformation/home?region=ap-northeast-1#/stacks/new?stackName=kong-elb-cassandra-pv&templateURL=https:%2F%2Fs3.amazonaws.com%2Fkong-cf-templates%2Flatest%2Fkong-elb-cassandra-new-vpc-optional-pv.template
[ap-southeast-1-caas-pv-stack-url]: https://console.aws.amazon.com/cloudformation/home?region=ap-southeast-1#/stacks/new?stackName=kong-elb-cassandra-pv&templateURL=https:%2F%2Fs3.amazonaws.com%2Fkong-cf-templates%2Flatest%2Fkong-elb-cassandra-new-vpc-optional-pv.template
[ap-southeast-2-caas-pv-stack-url]: https://console.aws.amazon.com/cloudformation/home?region=ap-southeast-2#/stacks/new?stackName=kong-elb-cassandra-pv&templateURL=https:%2F%2Fs3.amazonaws.com%2Fkong-cf-templates%2Flatest%2Fkong-elb-cassandra-new-vpc-optional-pv.template
[sa-east-1-caas-pv-stack-url]: https://console.aws.amazon.com/cloudformation/home?region=sa-east-1#/stacks/new?stackName=kong-elb-cassandra-pv&templateURL=https:%2F%2Fs3.amazonaws.com%2Fkong-cf-templates%2Flatest%2Fkong-elb-cassandra-new-vpc-optional-pv.template

[us-east-1-hvm-stack-url]: https://console.aws.amazon.com/cloudformation/home?region=us-east-1#/stacks/new?stackName=kong-elb-hvm&templateURL=https:%2F%2Fs3.amazonaws.com%2Fkong-cf-templates%2Flatest%2Fkong-elb-cassandra-user-vpc-optional-hvm.template
[us-west-1-hvm-stack-url]: https://console.aws.amazon.com/cloudformation/home?region=us-west-1#/stacks/new?stackName=kong-elb-hvm&templateURL=https:%2F%2Fs3.amazonaws.com%2Fkong-cf-templates%2Flatest%2Fkong-elb-cassandra-user-vpc-optional-hvm.template
[us-west-2-hvm-stack-url]: https://console.aws.amazon.com/cloudformation/home?region=us-west-2#/stacks/new?stackName=kong-elb-hvm&templateURL=https:%2F%2Fs3.amazonaws.com%2Fkong-cf-templates%2Flatest%2Fkong-elb-cassandra-user-vpc-optional-hvm.template
Expand Down
Loading

0 comments on commit ef5d3b6

Please sign in to comment.