Apache Knox
<In-Progress>
Apache Knox gateway is a specialised reverse proxy gateway for various Hadoop REST APIs. However, the gateway is built entirely upon a fairly generic framework. This framework is used to “plug-in” all of the behaviour that makes it specific to Hadoop in general and any particular Hadoop REST API. It would be equally as possible to create a customised reverse proxy for other non-Hadoop HTTP endpoints. This approach is taken to ensure that the Apache Knox gateway can scale with the rapidly evolving Hadoop ecosystem.
Throughout this guide we will be using a publicly available REST API to demonstrate the development of various extension mechanisms. http://openweathermap.org/
Build pre-requisites
- OpenJDK8
- knox
- git
- maven@v3.3.9
- docker
- docker i.o
Install OpenJDK
$ sudo apt-get install openjdk-8-jdk |
Make sure you have the right OpenJDK version
|
It should display 1.8.0_111
Set JAVA_HOME
|
Building Apache Knox
|
Building Docker Image
Apache Knox ships with a docker
Maven module that will build a Docker image. To build the Knox Docker image, you must have Docker running on your machine. The following Maven command will build Knox and package it into a Docker image.
|
This will build 2 Docker images:
apache/knox:gateway-1.3.0
apache/knox:ldap-1.3.0
The gateway
image will use an entry point to start Knox Gateway. The ldap
image will use an entry point to start Knox Demo LDAP.
An example of using the Docker images would be the following:
|
Using docker-compose that would look like this:
|
The images are designed to be a base that can be built on to add your own providers, descriptors, and topologies as necessary.
References
The reference documentation here