Skip to content

Building Kong on s390x

Carole Corley edited this page Oct 22, 2020 · 25 revisions

Building Kong on s390x

The instructions provided below specify the steps to build Kong version 2.1.4 or Kong 'next' on Linux on IBM Z for the following distributions:

  • Ubuntu (18.04)

If you do not need a custom build of Kong on s390x, you may opt for the multi-arch alpine docker image docker.io/linuxforhealth/kong:2.1.4 which supports amd64, arm64 and s390x.

Note: When following the steps below you will need access to the docker command and may therefore need to sudo su.

Step 1: Build Kong.

1.1) Set up your build repos

Clone the LinuxForHealth kong, kong-build-tools and docker-kong repositories:

git clone https://github.com/LinuxForHealth/kong.git
git clone https://github.com/LinuxForHealth/kong-build-tools.git
git clone https://github.com/LinuxForHealth/docker-kong.git

The kong-build-tools and docker-kong repos contain the s390x build modifications. The kong repo contains no modifications, but is at the current tested level of the Kong next branch for s390x builds. Clone the repos into the same directory, so kong, kong-build-tools and docker-kong are at the same directory level.

1.2) Choose your Kong branch

If you are building against Kong 2.1.4, check out the 2.1.4 tagged release:

cd kong
git checkout tags/2.1.4

If you are building against the Kong next branch, check out the next branch:

cd kong
git checkout next

1.3) Set the OpenResty version

Navigate to Dockerfile.openresty and set the correct Openresty version for your build.

cd kong-build-tools/dockerfiles

Edit Dockerfile.openresty and navigate to line 70.

If you are building against Kong 2.1.4, set ARG RESTY_VERSION=1.17.8.2

If you are building against Kong next, set ARG RESTY_VERSION=1.15.8.3

1.4) Set your docker repo

Navigate to the kong-build-tools Makefile and set your Docker Hub repository.

cd ../kong-build-tools

If you are building against Kong 2.1.4, navigate to line 95. If you are building against Kong next, navigate to line 79.

Set DOCKER_REPOSITORY to your docker repository, e.g. <your_id>/kong

1.5) Build Kong apk

1.6) Build Kong alpine image

Step 2: Test Kong (Optional)

2.1) Run all test cases

References:

Clone this wiki locally