Public | Automated Build

Last pushed: 8 days ago
Short Description
Api router based on kong
Full Description


This repository provides Kong - an HTTP API router
based on Nginx/

Vicampo uses Kong to manage access to the different services. The APIs are
configured in Kong and Kong restricts access to these for each request.

The API router Kong is deployed as an ECS Service. Its ECS service and task
live in routers/wms/. The service connects to a
target group of the load balancer, which is required if you want to load
balance traffic to an ECS service, seeeu-west-1
ecs_service.json file

.. note::

It was intended to have more than one router configuration in the routers/
folder. But as of now, there is only the need for one (wms).

Kong Development Setup

In this section: For development, the Docker compose utility can be used to run
the Vicampo Kong setup to a great extend in an automated manner.

Configure Platform local.php


return [
    'resources' => [
        'variables' => [
            # ...
            'kong_api_url_dev' => '',
            'kong_api_key' => '9a41392542074ee4991d01fe798d888d',
            'auth_access_token' => 'eeg2Doo2yighahlegohs7eewee0uoqu0oTh',
            # ...
            # 'static_cdn_domain' => '',

Don't forget to clean the cache (e. g. vagrant ssh -c vic-cache-clean).

Development Installation Script

To install Kong execute the install script:

$ ./

Consider that the test request at the end of the script is expected to get a 400 Bad Request Response.

Verify the Installation

Fire an exemplary request against Kong (400 Bad Request expected):

$ curl -i -k -X POST -H 'host:' https://localhost:8443/v1/auth/login

In case of any issues, double check the configuration and re-run the installation from scratch:

$ ./ && ./

Kong Usage

In the kong/ folder lives the Dockerfile that defines the image that
will be run as ECS service. If you want to change the way Kong works change this
image. E.g., if you want to change configuration of either Nginx or Kong itself
see custom_nginx.template or
kong.production.conf respectively.

After you have made your changes you need to build and publish the image using

make kong-release

The resulting image is pushed to ER (which is why you might need to login to
ECR first using the command

aws ecr login

After you have build the image you can deploy the new version using the script. It requires a single parameter
which is the name of the folder in routers/ you want to update. wms

That will deploy the task definition and inactivate all others of the same
family. It will also restart the service.


Docker Pull Command
Source Repository