I’m currently searching for a Api Management Solution & I’ve found Kong. Kong is built on top of reliable technologies like NGINX and Apache Cassandra, and provides you with an easy to use RESTful API to operate and configure the system. It was developed by The Mashape Team and used internally. Then they decided to propose this solution on GitHub as an Open-Source Api Management.
Kong is scalable, modular (with plugin development) and can run on any infrastructure.
At this time the Azure Deployment was not provided so I decided to create a Azure Resource Template to deploy an Test Environment of Kong with one Linux Ubuntu Server and a local installation of Kong & Cassandra on this server. (A standard A2 virtual Machine, 2 core, 3,5 Go RAM)
The Azure Resource Manager provide a way to deploy, manage and monitor Azure Resource in a Logical Resource Group. You can use template to deploy a large number of assets using the ARM. (more info on the Microsoft Azure Web Site)
Starting the Environment
Then clone the following Git Hub Repository :
$ git clone https://github.com/jdevillard/kong-azure
In this repository, you will have :
- azuredeploy.json : the azure template file
- azuredeploy.parameters.json : the azure template parameter file in which we’ll put value regarding our environment
- kongscript.sh : this script will install the necessary software arount kong (JAVA, Cassandra etc…)
- deploy.ps1 : powershell script to deploy the azure template.
With all of this, you need to customize :
- azuredeploy.parameters.json with :
- an Azure Storage Account
- a Admin User Name (used to ssh to the Linux)
- an SSH Key : you can follow this tutorial if necessary
- dns Name for the public Ip to reach the Kong Gateway
- the os of ubuntu (don’t change for latest version supported in azure)
- the location of the Virtual Machine
- the name of the Network Security Group (don’t change if you don’t know what it is)
- deploy.ps1 with :
- $resourceGroupName : the name of the new resource group where you want to create the Kong Virtual Machine
- $subscriptionId : the id of your Azure Subscription to deploy the resource group.
Then you can place your prompt in the script directory and execute the deploy.ps1 script.
The script will ask you your Microsoft Account that allow you to access to your Azure Subscription.
After few minutes, you will have all you assets deployed in a single virtual machine on Microsoft Azure.
This template deploy :
The port 8000 (for proxy) and 8001 (for admin) are opened in the VNET (and also the 22 for the SSH).
Once it is deploy, you can test using Fiddler or Curl with the following url :
for me (with default value) :
you will have the default response with the plugin available on the Gateway :
This Virtual Machine is good to test the Kong Gateway on a single instance.
I will see in the futur if I can deploy a cluster of Kong with Cassandra cluster for the configuration repository.
Hope This Help!