Skip to content

saferrer/docker-kong

 
 

Repository files navigation

Docker-Kong

This is a collection of Docker containers with the appropriate docker images, docker-compose scaffolding and scripts to get Kong, the API management tool, up and running. It is NOT for PRODUCTION use!

What it does

It creates 4 docker containers and runs them in your docker environment to enable docker-based testing of Kong. The containers are

To install

You really need to use docker-compose to orchestrate the building and running of each of the 4 images. YMMV if you install each box separately.

Pre-requisites

  • Docker version 1.11.1 or higher
  • Docker-compose 1.7.0 or higher

I used the Docker Toolbox on Windows 10 to get this working. YMMV on other OSs but it should work with a bit of tweaking.

Installation Procecure

git clone https://github.com/bradwood/docker-kong.git
cd ./Compose/Kong_test_suite/
  • once in ./Compose/Kong_test_suite/ edit docker-compose.yml and set the volumes: sections to point to your local machine mount points. There are 2:
    • ubuntu:/root/mnt - this is so that any kong or other scripts you need to run on the ubuntu box can live outside of the container.
    • wiremock:/home/wiremock - this maps to a filesystem that the standalone wiremock system uses to hold your JSON stubs and mapping files. See the Wiremock site for more details on this.
  • once you've set the mountpoints, then create the images, install the containers and bring them up by typing...
docker-compose up -d

To use

  • Connect to the shell on the ubuntu box
docker exec -ti kongtestsuite_ubuntu-dev_1 bash
  • at this shell you can cd /root/mnt and execute your kong shell scripts from there; and as they're mounted to the host machine, you can edit them in your favourite host-based editor.
  • set up your JSON mocks in the wiremock mountpoint and save as needed.
  • See under Mountpoints for samples of both Kong and JSON stubs

About

used for setting up a load of docker containers to test kong

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%