kong icon indicating copy to clipboard operation
kong copied to clipboard

chore(ci): add s390x arch support

Open Repana-Chowdappa opened this issue 1 year ago • 11 comments

Summary

Checklist

  • [ ] The Pull Request has tests
  • [ ] A changelog file has been created under changelog/unreleased/kong or skip-changelog label added on PR if changelog is unnecessary. README.md
  • [ ] There is a user-facing docs PR against https://github.com/Kong/docs.konghq.com - PUT DOCS PR HERE

Issue reference

Fix #[issue number]

Repana-Chowdappa avatar Mar 18 '24 10:03 Repana-Chowdappa

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Mar 18 '24 10:03 CLAassistant

Thank you for this contribution! Please address the failures found the in the check run. We're going to provide additional feedback once we have reviewed.

hanshuebner avatar Mar 18 '24 10:03 hanshuebner

It feels easier to do with a cross-compile, then you don't need to wait for nfpm etc to release s390x artifacts. Just duplicate what exist for aarch64 to s390x would work.

I created a WIP at s390x branch. You will then do

$ sudo apt install crossbuild-essential-s390x
$ bazel build //build:kong --platforms=//:generic-crossbuild-s390x --//:wasmx=False

$ file bazel-bin/external/openssl/openssl/lib/libssl.so.3
bazel-bin/external/openssl/openssl/lib/libssl.so.3: ELF 64-bit MSB shared object, IBM S/390, version 1 (SYSV), dynamically linked, BuildID[sha1]=118e62dcbce58617a9d64728959e15294b2937de, with debug_info, not stripped

$ file bazel-out/k8-fastbuild/bin/build/kong-dev/openresty/nginx/sbin/nginx
bazel-out/k8-fastbuild/bin/build/kong-dev/openresty/nginx/sbin/nginx: ELF 64-bit MSB pie executable, IBM S/390, version 1 (SYSV), dynamically linked, interpreter /lib/ld64.so.1, BuildID[sha1]=8754d1623249bf073dc0fabde5555bd3769fc18d, for GNU/Linux 3.2.0, with debug_info, not stripped

fffonion avatar Mar 18 '24 11:03 fffonion

Internal discussion is ongoing, I converted this to a draft until we make a decision.

ADD-SP avatar Mar 19 '24 05:03 ADD-SP

At this point, we do not have the hardware to verify that the changes actually work. @Repana-Chowdappa Are you running this anywhere? Do you have any idea how we could include the architecture into our CI testing?

hanshuebner avatar Mar 19 '24 16:03 hanshuebner

At this point, we do not have the hardware to verify that the changes actually work. @Repana-Chowdappa Are you running this anywhere?

@hanshuebner , with the changes @Repana-Chowdappa has proposed, we have been able to build kong on s390x VM and we have been able to get it up and running.

Do you have any idea how we could include the architecture into our CI testing?

There is a process through which we can extend a s390x VM instance installed with Linux which can then be plugged into the community CI testing. I can share more details regarding this. Meanwhile, Could you please share info or point me to details of the community CI/CD and what would be the minimum requirement for a build node (presumably Linux) to include it into community CI/CD ?

SriramaSharma avatar Mar 26 '24 06:03 SriramaSharma

Could you please share info or point me to details of the community CI/CD and what would be the minimum requirement for a build node (presumably Linux) to include it into community CI/CD ?

Our basic concern is that we don't have in-house knowledge or experience with s390x. For the mainstream architectures, we're confident enough that the CI testing based on ubuntu-22.04 on amd64 for the open source version of Kong Gateway sufficiently covers testing requirements for ARM based systems as well. In our enterprise offering, we're also running CI tests with arm64.

Given our lack of experience, we're not going to be able to provide s390x platform support for the community, but we may be able to include the platform as community supported. For that, we'll need to have a separate README markdown file that describes the status of support and contains any additional information that'd be useful to people using that platform. The document should also describe how the CI test suite can be run manually to verify that s390x support works. The basic prerequisite for making that work is that GitHub Action runners based on the s390x platform will be needed.

We're open to discussing other approaches. Basically, we don't have commercial interest in the port so the amount of resources that we can put into supporting it is limited. At this point, we like the idea of having s390x support for its geek value.

hanshuebner avatar Apr 02 '24 04:04 hanshuebner

This PR is marked as stale because it has been open for 14 days with no activity.

github-actions[bot] avatar May 28 '24 01:05 github-actions[bot]

@hanshuebner - We are working on bazel team to get dependency Buildifier binary for s390x. Once this available this CI failures will get resolve. Then we will try to provide s390x Infra (VM) to get tested on platform.

Repana-Chowdappa avatar May 28 '24 04:05 Repana-Chowdappa

This PR is marked as stale because it has been open for 14 days with no activity.

github-actions[bot] avatar Jul 12 '24 01:07 github-actions[bot]

This PR is marked as stale because it has been open for 14 days with no activity.

github-actions[bot] avatar Aug 20 '24 01:08 github-actions[bot]