Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

s390x support documentation #2108

Open
jdao-rh opened this issue Mar 28, 2022 · 0 comments
Open

s390x support documentation #2108

jdao-rh opened this issue Mar 28, 2022 · 0 comments

Comments

@jdao-rh
Copy link

jdao-rh commented Mar 28, 2022

Description

This is and archival documentation of the work done so far or enabling kogito on s390x.

Buling and running tests

Build is successful on a RHEL8 s390x machine

Install Dependencies

  1. sudo dnf in net-tools java-11-openjdk-devel.s390x

  2. install maven 3.8.4 from https://maven.apache.org/download.cgi

  3. Install docker
    rhel8 instructions https://docs.docker.com/engine/install/rhel/

$ sudo yum remove docker \
                  docker-client \
                  docker-client-latest \
                  docker-common \
                  docker-latest \
                  docker-latest-logrotate \
                  docker-logrotate \
                  docker-engine \
                  podman \
                  runc
$ sudo yum install -y yum-utils

$ sudo yum-config-manager \
    --add-repo \
    https://download.docker.com/linux/rhel/docker-ce.repo
    
$ sudo yum install docker-ce docker-ce-cli containerd.io

$ sudo systemctl start docker

$ docker login docker.io
  1. Clone repo
    git clone https://github.com/kiegroup/kogito-runtimes.git
    git checkout 1.11.1.Final

  2. Quarkus needs port 8081 for tests
    Kill process using it

netstat -tunlp | grep "8081"
kill -9 pid

Building Kafka image for Z

Building base image

  1. Clone repo
git clone https://github.com/confluentinc/common-docker
cd common-docker/base
  1. Apply patch for s390x support https://gist.github.com/jdao-rh/30fb79b7628894cccbb16ee7b26da5d3
    Build image dependencies (can ignore errors)
mvn clean package -Ddocker.registry="" -Ddocker.upstream-tag=6.0.5 -DCONFLUENT_PACKAGES_REPO=https://packages.confluent.io/rpm/6.0 -DCONFLUENT_VERSION=6.0.5 -Pdocker -DskipTests
  1. build base image
docker build -f Dockerfile.ubi8 -t confluentinc/cp-base-new:6.0.5 .

Build kafka image

  1. Clone repos
    https://github.com/confluentinc/kafka-images
  2. Go to kafka-image/kafka , update the dockerfile : Dockerfile.ubi8 with this patch https://gist.github.com/jdao-rh/2c5fb5f6a88d456553360cb920c2ee05
  3. Build rocksdbjni-6.19.3-linux64.jar by following instruction
    4 .Build zstd-jni-1.5.1-1.jar from repo with installing sbt
  4. Build kafka image
docker build -f Dockerfile.ubi8 -t confluentinc/cp-kafka:6.0.5 . 

Building image + run tests

Build and run tests for Kogito Runtimes with
mvn clean install -fn -Dproductized

Tests cases fail because of missing images

  1. confluentinc/cp-kafka 5.4.3
    Can be built from source
    See above
  2. infinispan/server 12.1.7.Final
    Working with downstream Redhat Datagrid s390x image
  3. vectorized/redpanda v21.5.5
    No image available, and unable to build due to seastar and V8 dependencies

After resolving missing images, 2 tests fail dues to missing vectorized/redpanda image

[INFO] Kogito :: Add-Ons :: Messaging :: Quarkus (ITs) .... FAILURE [ 24.667 s]
[INFO] Kogito :: Integration Tests :: Quarkus :: Processes  FAILURE [ 57.133 s]

Related Projects

optaplanner

Build and tests all pass
See build instructions at https://github.com/kiegroup/optaplanner#quick-development-start

Download Maven and follow the installation instructions
https://maven.apache.org/download.cgi

Build and run tests

mvn clean install

Tests summary

[INFO] Reactor Summary for OptaPlanner multiproject parent 8.19.0-SNAPSHOT:
[INFO] 
[INFO] OptaPlanner multiproject parent .................... SUCCESS [  0.682 s]
[INFO] OptaPlanner BOM (Bill Of Materials) ................ SUCCESS [  0.023 s]
[INFO] OptaPlanner IDE Configuration ...................... SUCCESS [  0.429 s]
[INFO] OptaPlanner build parent ........................... SUCCESS [  0.561 s]
[INFO] OptaPlanner core parent ............................ SUCCESS [  0.015 s]
[INFO] OptaPlanner core implementation .................... SUCCESS [ 32.325 s]
[INFO] OptaPlanner constraints: Constraint streams ........ SUCCESS [ 48.232 s]
[INFO] OptaPlanner constraints: DRL ....................... SUCCESS [  5.823 s]
[INFO] OptaPlanner core ................................... SUCCESS [  0.038 s]
[INFO] OptaPlanner persistence ............................ SUCCESS [  0.008 s]
[INFO] OptaPlanner persistence common ..................... SUCCESS [  0.156 s]
[INFO] OptaPlanner persistence XStream .................... SUCCESS [  1.456 s]
[INFO] OptaPlanner persistence JAXB ....................... SUCCESS [  1.484 s]
[INFO] OptaPlanner persistence Jackson .................... SUCCESS [  1.192 s]
[INFO] OptaPlanner persistence JPA ........................ SUCCESS [  8.097 s]
[INFO] OptaPlanner persistence JSON-B ..................... SUCCESS [  1.093 s]
[INFO] OptaPlanner benchmark .............................. SUCCESS [ 19.636 s]
[INFO] OptaPlanner test ................................... SUCCESS [  5.539 s]
[INFO] OptaPlanner Spring integration ..................... SUCCESS [  0.022 s]
[INFO] OptaPlanner Spring Boot autoconfigure .............. SUCCESS [ 10.432 s]
[INFO] OptaPlanner Spring Boot starter .................... SUCCESS [  0.072 s]
[INFO] OptaPlanner Quarkus integration .................... SUCCESS [  0.013 s]
[INFO] OptaPlanner Quarkus ................................ SUCCESS [  0.009 s]
[INFO] OptaPlanner Quarkus - Runtime ...................... SUCCESS [  1.533 s]
[INFO] OptaPlanner Quarkus - Deployment ................... SUCCESS [ 38.806 s]
[INFO] OptaPlanner Quarkus - Integration tests ............ SUCCESS [  8.336 s]
[INFO] OptaPlanner Quarkus - Dev UI Integration tests ..... SUCCESS [ 14.815 s]
[INFO] OptaPlanner Quarkus - Drools Integration tests ..... SUCCESS [  8.627 s]
[INFO] OptaPlanner Quarkus Benchmark ...................... SUCCESS [  0.009 s]
[INFO] OptaPlanner Quarkus Benchmark - Runtime ............ SUCCESS [  0.725 s]
[INFO] OptaPlanner Quarkus Benchmark - Deployment ......... SUCCESS [ 29.043 s]
[INFO] OptaPlanner Quarkus Benchmark - Integration tests .. SUCCESS [ 12.434 s]
[INFO] OptaPlanner Quarkus Jackson ........................ SUCCESS [  0.007 s]
[INFO] OptaPlanner Quarkus Jackson - Runtime .............. SUCCESS [  0.849 s]
[INFO] OptaPlanner Quarkus Jackson - Deployment ........... SUCCESS [  0.280 s]
[INFO] OptaPlanner Quarkus Jackson - Integration tests .... SUCCESS [  9.657 s]
[INFO] OptaPlanner Quarkus JSON-B ......................... SUCCESS [  0.097 s]
[INFO] OptaPlanner Quarkus JSON-B - Runtime ............... SUCCESS [  0.776 s]
[INFO] OptaPlanner Quarkus JSON-B - Deployment ............ SUCCESS [  0.281 s]
[INFO] OptaPlanner Quarkus JSON-B - Integration tests ..... SUCCESS [  9.508 s]
[INFO] OptaPlanner examples ............................... SUCCESS [08:16 min]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS

kie-cloud-operator

dependencies

  • go v1.16.x
  • operator-sdk v0.19.2
  • docker
  • opm
  • podman
  • cekit

Build is successful with command

make

tests Pass but some tests cases have no files

?   	github.com/kiegroup/kie-cloud-operator	[no test files]
?   	github.com/kiegroup/kie-cloud-operator/cmd/manager	[no test files]
?   	github.com/kiegroup/kie-cloud-operator/cmd/ui	[no test files]
?   	github.com/kiegroup/kie-cloud-operator/pkg/apis	[no test files]
?   	github.com/kiegroup/kie-cloud-operator/pkg/apis/app	[no test files]
?   	github.com/kiegroup/kie-cloud-operator/pkg/apis/app/v2	[no test files]
?   	github.com/kiegroup/kie-cloud-operator/pkg/components	[no test files]
?   	github.com/kiegroup/kie-cloud-operator/pkg/controller	[no test files]
ok  	github.com/kiegroup/kie-cloud-operator/pkg/controller/kieapp	15.491s
?   	github.com/kiegroup/kie-cloud-operator/pkg/controller/kieapp/constants	[no test files]
ok  	github.com/kiegroup/kie-cloud-operator/pkg/controller/kieapp/defaults	3.059s
?   	github.com/kiegroup/kie-cloud-operator/pkg/controller/kieapp/defaults/packrd	[no test files]
?   	github.com/kiegroup/kie-cloud-operator/pkg/controller/kieapp/packrd	[no test files]
ok  	github.com/kiegroup/kie-cloud-operator/pkg/controller/kieapp/shared	0.369s
ok  	github.com/kiegroup/kie-cloud-operator/pkg/controller/kieapp/status	0.020s
ok  	github.com/kiegroup/kie-cloud-operator/pkg/controller/kieapp/test	0.843s
ok  	github.com/kiegroup/kie-cloud-operator/pkg/ui	0.143s
?   	github.com/kiegroup/kie-cloud-operator/pkg/ui/packrd	[no test files]
?   	github.com/kiegroup/kie-cloud-operator/tools/csv-gen	[no test files]
?   	github.com/kiegroup/kie-cloud-operator/tools/util	[no test files]
?   	github.com/kiegroup/kie-cloud-operator/version	[no test files]

kogito-operator

Build is successful.

$ make
....
Successfully tagged localhost/operator-runtime:1.0.0
Successfully tagged localhost/operator-runtime:latest
ae63df3b7352039b50c2fe4e31b7a278824f4cbd5b6e5e7e936539d820bc12ab
2022-02-28 10:39:04,107 podman.py:61         INFO  Image built and available under following tags: operator-runtime:1.0.0, operator-runtime:latest
2022-02-28 10:39:04,107 cli.py:343        INFO  Finished!
podman tag operator-runtime quay.io/kiegroup/kogito-operator:2.0.0-snapshot

Tests cases fail to run due to kogito bundle failing to install on Openshift

$ make run-tests
...
DEBUG=false go test ../hack/../test -v -timeout "240m" --godog.tags=""  
I0302 14:26:18.500662  382783 request.go:655] Throttling request took 1.036550007s, request: GET:https://api.qe2-crw-s390x.s390g.lab.eng.rdu2.redhat.com:6443/apis/security.openshift.io/v1?timeout=32s
{"level":"info","T":"2022-03-02T14:26:20.404-0500","logger":"bdd-b5a9","msg":"Scenario Configure GitHub webhook trigger in remote S2I using KogitoBuild"}
{"level":"info","T":"2022-03-02T14:26:20.404-0500","logger":"bdd-b5a9","msg":"Step","stepText":"Namespace is created"}
{"level":"info","T":"2022-03-02T14:26:20.404-0500","logger":"bdd-b5a9","msg":"Creating namespace","namespace":"bdd-b5a9"}
{"level":"info","T":"2022-03-02T14:26:20.413-0500","logger":"bdd-b5a9","msg":"Step","stepText":"Kogito Operator is deployed"}
{"level":"info","T":"2022-03-02T14:26:20.413-0500","logger":"main","msg":"Installing Kogito operator using community catalog."}
{"level":"info","T":"2022-03-02T14:26:20.434-0500","logger":"openshift-operators","msg":"Subscribing to operator","subscriptionName":"kogito-operator","catalogSource":"community-operators","channel":"alpha","namespace":"openshift-operators"}
{"level":"info","T":"2022-03-02T14:26:20.434-0500","logger":"kubernetes_client","msg":"Create resource if not exists","kind":"","name":"kogito-operator","namespace":"openshift-operators"}
{"level":"info","T":"2022-03-02T14:26:20.449-0500","logger":"kubernetes_client","msg":"Skip creating - object already exists"}
{"level":"info","T":"2022-03-02T14:26:20.454-0500","logger":"openshift-operators","msg":"Wait 5m0s for kogito-operator operator running"}
{"level":"error","T":"2022-03-02T14:31:20.454-0500","logger":"bdd-b5a9","msg":"Error in step","step":"Kogito Operator is deployed","error":"Timeout waiting for kogito-operator operator running"}
{"level":"info","T":"2022-03-02T14:31:20.454-0500","logger":"bdd-b5a9","msg":"Step","stepText":"Build quarkus example service \"process-quarkus-example\" with configuration:"}
{"level":"info","T":"2022-03-02T14:31:20.454-0500","logger":"bdd-b5a9","msg":"Step","stepText":"BuildConfig \"process-quarkus-example\" is created with webhooks within 2 minutes"}
{"level":"error","T":"2022-03-02T14:31:20.504-0500","logger":"bdd-b5a9","msg":"Error in scenario","scenarioName":"Configure GitHub webhook trigger in remote S2I using KogitoBuild","error":"Timeout waiting for kogito-operator operator running"}
{"level":"info","T":"2022-03-02T14:31:20.504-0500","logger":"bdd-b5a9","msg":"Scenario duration","duration":"5m0.10050625s"}
{"level":"info","T":"2022-03-02T14:31:20.513-0500","logger":"bdd-b5a9","msg":"Wait 1m0s for Removal of all related CRs for service kogito-operator"}
{"level":"info","T":"2022-03-02T14:31:21.573-0500","logger":"bdd-b5a9","msg":"'Removal of all related CRs for service kogito-operator' is successful"}
{"level":"info","T":"2022-03-02T14:31:21.579-0500","logger":"bdd-b5a9","msg":"Delete created namespace","namespace":"bdd-b5a9"}
{"level":"info","T":"2022-03-02T14:31:21.579-0500","logger":"bdd-b5a9","msg":"Deleting namespace","namespace":"bdd-b5a9"}
{"level":"info","T":"2022-03-02T14:31:21.628-0500","logger":"bdd-dc40","msg":"Scenario Build quarkus binary build with native disabled using KogitoBuild"}
{"level":"info","T":"2022-03-02T14:31:21.628-0500","logger":"bdd-dc40","msg":"Step","stepText":"Namespace is created"}
{"level":"info","T":"2022-03-02T14:31:21.628-0500","logger":"bdd-dc40","msg":"Creating namespace","namespace":"bdd-dc40"}
{"level":"info","T":"2022-03-02T14:31:21.679-0500","logger":"bdd-dc40","msg":"Step","stepText":"Kogito Operator is deployed"}
{"level":"info","T":"2022-03-02T14:31:21.679-0500","logger":"main","msg":"Installing Kogito operator using community catalog."}
{"level":"info","T":"2022-03-02T14:31:21.741-0500","logger":"openshift-operators","msg":"Wait 5m0s for kogito-operator operator running"}

kogito-apps

see issue https://github.com/kiegroup/kogito-apps/issues/1285

kogito-examples

see issue https://github.com/kiegroup/kogito-examples/issues/1200

drools

The project is able to be built, but 1 test fail due to missing dependencies on s390x
Build commands

$ git clone [email protected]:kiegroup/drools.git
$ cd drools
$ mvn clean install

failed tests: Impact Analysis Graph : Graphviz:
Test dependency of j2v8 is not available for Z

[INFO] -------------------------------------------------------
[INFO]  T E S T S
[INFO] -------------------------------------------------------
[INFO] Running org.drools.impact.analysis.graph.graphviz.GraphvizOutputTest
17:40:30.331 [main] INFO guru.nidi.graphviz.engine.AbstractGraphvizEngine - Could not initialize guru.nidi.graphviz.engine.GraphvizCmdLineEngine
guru.nidi.graphviz.engine.GraphvizException: [dot] command not found
17:40:30.334 [main] INFO guru.nidi.graphviz.engine.V8JavascriptEngine - Starting V8 runtime...
17:40:30.354 [main] INFO guru.nidi.graphviz.engine.AbstractGraphvizEngine - Could not initialize guru.nidi.graphviz.engine.GraphvizV8Engine
java.lang.IllegalStateException: J2V8 native library not loaded
        at com.eclipsesource.v8.V8.checkNativeLibraryLoaded(V8.java:195)
.....
 
        at com.eclipsesource.v8.V8.createV8Runtime(V8.java:145)
        ... 46 common frames omitted
Warning: Nashorn engine is planned to be removed from a future JDK release
17:40:37.062 [Thread-3] INFO guru.nidi.graphviz.engine.AbstractGraphvizEngine - Could not initialize guru.nidi.graphviz.engine.GraphvizJdkEngine
guru.nidi.graphviz.engine.GraphvizException: Runtime error: expected the system to be little-endian!
        at guru.nidi.graphviz.engine.ResultHandler.waitFor(ResultHandler.java:42)

Implementation ideas

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 📋 Backlog
Development

No branches or pull requests

1 participant