The shell scripts to configure Kong are now deprecated. Please only use the scripts
shown in the Mountpoints/ubuntu-dev/bprc-scripts/
folder of this repo.
You will need to install the tool bprc
to run these. Please see the github repo for details
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!
It creates 4 docker containers and runs them in your docker environment to enable docker-based testing of Kong. The containers are
- bradqwood/ubuntu basic ubuntu box with a load of RESTful dev/script tools installed
- bradqwood/postgres a basic postgres database needed by Kong
- bradqwood/kong the Kong box itself
- bradqwood/wiremock a boxed used as a basic RESTful JSON mocking server -- set up as the back-end behind Kong.
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.
- 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.
git clone https://github.com/bradwood/docker-kong.git
cd ./Compose/Kong_test_suite/
- once in
./Compose/Kong_test_suite/
editdocker-compose.yml
and set thevolumes:
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
- 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