Skip to content

Commit

Permalink
Fix kie-issues-apache#830 - Make Images Reproducible (apache#1741)
Browse files Browse the repository at this point in the history
  • Loading branch information
ricardozanini authored and rgdoliveira committed Mar 11, 2024
1 parent b746cec commit 4cbe1ac
Show file tree
Hide file tree
Showing 42 changed files with 92 additions and 178 deletions.
9 changes: 1 addition & 8 deletions kogito-data-index-ephemeral-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ schema_version: 1

name: "quay.io/kiegroup/kogito-data-index-ephemeral"
version: "999-SNAPSHOT"
from: "registry.access.redhat.com/ubi8/ubi-minimal:latest"
from: "registry.access.redhat.com/ubi8/openjdk-17-runtime:1.18"
description: "Runtime image for Kogito Data Index Service for ephemeral PostgreSQL persistence provider"

labels:
Expand All @@ -45,18 +45,12 @@ envs:
value: "http-events-support"
description: "Allows to change the event connection type. The possible values are :`kafka-events-support` or `http-events-support`(default)"

packages:
manager: microdnf

modules:
repositories:
- path: modules
install:
- name: org.kie.kogito.image.dependencies
- name: org.kie.kogito.system.user
- name: org.kie.kogito.logging
- name: org.kie.kogito.openjdk.headless
version: "17"
- name: org.kie.kogito.dynamic.resources
- name: org.kie.kogito.launch.scripts
- name: org.kie.kogito.dataindex.community.ephemeral
Expand All @@ -71,4 +65,3 @@ run:
user: 1001
cmd:
- "/home/kogito/kogito-app-launch.sh"

9 changes: 1 addition & 8 deletions kogito-data-index-postgresql-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ schema_version: 1

name: "quay.io/kiegroup/kogito-data-index-postgresql"
version: "999-SNAPSHOT"
from: "registry.access.redhat.com/ubi8/ubi-minimal:latest"
from: "registry.access.redhat.com/ubi8/openjdk-17-runtime:1.18"
description: "Runtime image for Kogito Data Index Service for PostgreSQL persistence provider"


Expand All @@ -43,21 +43,15 @@ envs:
example: "true"
description: "If set to true, ensures that the bash scripts are executed with the -x option, printing the commands and their arguments as they are executed. Also debug JVM initialization."

packages:
manager: microdnf

ports:
- value: 8080

modules:
repositories:
- path: modules
install:
- name: org.kie.kogito.image.dependencies
- name: org.kie.kogito.system.user
- name: org.kie.kogito.logging
- name: org.kie.kogito.openjdk.headless
version: "17"
- name: org.kie.kogito.dynamic.resources
- name: org.kie.kogito.launch.scripts
- name: org.kie.kogito.dataindex.postgresql
Expand All @@ -69,4 +63,3 @@ run:
user: 1001
cmd:
- "/home/kogito/kogito-app-launch.sh"

8 changes: 1 addition & 7 deletions kogito-jit-runner-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ schema_version: 1

name: "quay.io/kiegroup/kogito-jit-runner"
version: "999-SNAPSHOT"
from: "registry.access.redhat.com/ubi8/ubi-minimal:latest"
from: "registry.access.redhat.com/ubi8/openjdk-17-runtime:1.18"
description: "Runtime image for Kogito JIT Runner"

labels:
Expand All @@ -42,18 +42,12 @@ envs:
example: "true"
description: "If set to true, ensures that the bash scripts are executed with the -x option, printing the commands and their arguments as they are executed. Also debug JVM initialization."

packages:
manager: microdnf

modules:
repositories:
- path: modules
install:
- name: org.kie.kogito.image.dependencies
- name: org.kie.kogito.system.user
- name: org.kie.kogito.logging
- name: org.kie.kogito.openjdk.headless
version: "17"
- name: org.kie.kogito.dynamic.resources
- name: org.kie.kogito.launch.scripts
- name: org.kie.kogito.jit-runner
Expand Down
8 changes: 1 addition & 7 deletions kogito-jobs-service-allinone-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ schema_version: 1

name: "quay.io/kiegroup/kogito-jobs-service-allinone"
version: "999-SNAPSHOT"
from: "registry.access.redhat.com/ubi8/ubi-minimal:latest"
from: "registry.access.redhat.com/ubi8/openjdk-17-runtime:1.18"
description: "Runtime image for Kogito Jobs Service with all available jdbc providers"

labels:
Expand Down Expand Up @@ -48,18 +48,12 @@ envs:
example: "postgresql"
description: "The all in one image contains all the supported jdbc plugins for Jobs Service, ephemeral and postgresql, if empty, defaults to ephemeral"

packages:
manager: microdnf

modules:
repositories:
- path: modules
install:
- name: org.kie.kogito.image.dependencies
- name: org.kie.kogito.system.user
- name: org.kie.kogito.logging
- name: org.kie.kogito.openjdk.headless
version: "17"
- name: org.kie.kogito.dynamic.resources
- name: org.kie.kogito.launch.scripts
- name: org.kie.kogito.jobs.service.allinone
Expand Down
8 changes: 1 addition & 7 deletions kogito-jobs-service-ephemeral-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ schema_version: 1

name: "quay.io/kiegroup/kogito-jobs-service-ephemeral"
version: "999-SNAPSHOT"
from: "registry.access.redhat.com/ubi8/ubi-minimal:latest"
from: "registry.access.redhat.com/ubi8/openjdk-17-runtime:1.18"
description: "Runtime image for Kogito in memory Jobs Service"

labels:
Expand All @@ -45,18 +45,12 @@ envs:
example: "true"
description: "By default Jobs Service doesn't integrate with message systems (e.g. Kafka). Set this variable to true to enable the events add-on."

packages:
manager: microdnf

modules:
repositories:
- path: modules
install:
- name: org.kie.kogito.image.dependencies
- name: org.kie.kogito.system.user
- name: org.kie.kogito.logging
- name: org.kie.kogito.openjdk.headless
version: "17"
- name: org.kie.kogito.dynamic.resources
- name: org.kie.kogito.launch.scripts
- name: org.kie.kogito.jobs.service.ephemeral
Expand Down
8 changes: 1 addition & 7 deletions kogito-jobs-service-postgresql-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ schema_version: 1

name: "quay.io/kiegroup/kogito-jobs-service-postgresql"
version: "999-SNAPSHOT"
from: "registry.access.redhat.com/ubi8/ubi-minimal:latest"
from: "registry.access.redhat.com/ubi8/openjdk-17-runtime:1.18"
description: "Runtime image for Kogito Jobs Service based on Postgresql"

labels:
Expand All @@ -45,18 +45,12 @@ envs:
example: "true"
description: "By default Jobs Service doesn't integrate with message systems (e.g. Kafka). Set this variable to true to enable the events add-on."

packages:
manager: microdnf

modules:
repositories:
- path: modules
install:
- name: org.kie.kogito.image.dependencies
- name: org.kie.kogito.system.user
- name: org.kie.kogito.logging
- name: org.kie.kogito.openjdk.headless
version: "17"
- name: org.kie.kogito.dynamic.resources
- name: org.kie.kogito.launch.scripts
- name: org.kie.kogito.jobs.service.postgresql
Expand Down
8 changes: 1 addition & 7 deletions kogito-management-console-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ schema_version: 1

name: "quay.io/kiegroup/kogito-management-console"
version: "999-SNAPSHOT"
from: "registry.access.redhat.com/ubi8/ubi-minimal:latest"
from: "registry.access.redhat.com/ubi8/openjdk-17-runtime:1.18"
description: "Runtime image for Kogito Management Console"

labels:
Expand All @@ -45,18 +45,12 @@ envs:
example: "http://data-index.service:8080"
description: "Data Index service address, defaults to http://localhost:8180."

packages:
manager: microdnf

modules:
repositories:
- path: modules
install:
- name: org.kie.kogito.image.dependencies
- name: org.kie.kogito.system.user
- name: org.kie.kogito.logging
- name: org.kie.kogito.openjdk.headless
version: "17"
- name: org.kie.kogito.dynamic.resources
- name: org.kie.kogito.launch.scripts
- name: org.kie.kogito.management.console
Expand Down
20 changes: 2 additions & 18 deletions kogito-swf-builder-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,32 +17,24 @@
# under the License.
#
- name: builder
from: "registry.access.redhat.com/ubi8/ubi-minimal:latest"
from: "registry.access.redhat.com/ubi8/openjdk-17:1.18"
version: "999-SNAPSHOT"
modules:
repositories:
- path: modules
install:
- name: org.kie.kogito.image.dependencies
- name: org.kie.kogito.system.user
- name: org.kie.kogito.logging
- name: org.kie.kogito.launch.scripts
- name: org.kie.kogito.openjdk
version: "17"
- name: org.kie.kogito.dynamic.resources
- name: org.kie.kogito.maven
version: "3.9.3"
- name: org.kie.kogito.maven.common
- name: org.kie.kogito.project.versions
- name: org.kie.kogito.swf.common.scripts
- name: org.kie.kogito.swf.builder.build-config
- name: org.kie.kogito.swf.common.build

packages:
manager: microdnf

- name: "quay.io/kiegroup/kogito-swf-builder"
from: "registry.access.redhat.com/ubi8/ubi-minimal:latest"
from: "registry.access.redhat.com/ubi8/openjdk-17:1.18"
version: "999-SNAPSHOT"
description: "Kogito Serverless Workflow base builder with Quarkus extensions libraries preinstalled"

Expand All @@ -64,22 +56,14 @@
- name: "io.openshift.tags"
value: "kogito,builder,serverless,workflow"

packages:
manager: microdnf

modules:
repositories:
- path: modules
install:
- name: org.kie.kogito.image.dependencies
- name: org.kie.kogito.system.user
- name: org.kie.kogito.logging
- name: org.kie.kogito.launch.scripts
- name: org.kie.kogito.openjdk
version: "17"
- name: org.kie.kogito.dynamic.resources
- name: org.kie.kogito.maven
version: "3.9.3"
- name: org.kie.kogito.maven.common
- name: org.kie.kogito.project.versions
- name: org.kie.kogito.swf.common.scripts
Expand Down
14 changes: 2 additions & 12 deletions kogito-swf-devmode-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,16 @@
# under the License.
#
- name: builder
from: "registry.access.redhat.com/ubi8/ubi-minimal:latest"
from: "registry.access.redhat.com/ubi8/openjdk-17:1.18"
version: "999-SNAPSHOT"
modules:
repositories:
- path: modules
install:
- name: org.kie.kogito.image.dependencies
- name: org.kie.kogito.system.user
- name: org.kie.kogito.logging
- name: org.kie.kogito.launch.scripts
- name: org.kie.kogito.openjdk
version: "17"
- name: org.kie.kogito.dynamic.resources
- name: org.kie.kogito.maven
version: "3.9.3"
- name: org.kie.kogito.maven.common
- name: org.kie.kogito.project.versions
- name: org.kie.kogito.swf.common.scripts
Expand All @@ -42,7 +37,7 @@
manager: microdnf

- name: "quay.io/kiegroup/kogito-swf-devmode"
from: "registry.access.redhat.com/ubi8/ubi-minimal:latest"
from: "registry.access.redhat.com/ubi8/openjdk-17:1.18"
version: "999-SNAPSHOT"
description: "Kogito Serverless Workflow development mode with Quarkus extensions libraries preinstalled"

Expand All @@ -69,15 +64,10 @@
repositories:
- path: modules
install:
- name: org.kie.kogito.image.dependencies
- name: org.kie.kogito.system.user
- name: org.kie.kogito.logging
- name: org.kie.kogito.launch.scripts
- name: org.kie.kogito.openjdk
version: "17"
- name: org.kie.kogito.dynamic.resources
- name: org.kie.kogito.maven
version: "3.9.3"
- name: org.kie.kogito.maven.common
- name: org.kie.kogito.project.versions
- name: org.kie.kogito.swf.common.scripts
Expand Down
9 changes: 1 addition & 8 deletions kogito-task-console-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ schema_version: 1

name: "quay.io/kiegroup/kogito-task-console"
version: "999-SNAPSHOT"
from: "registry.access.redhat.com/ubi8/ubi-minimal:latest"
from: "registry.access.redhat.com/ubi8/openjdk-17-runtime:1.18"
description: "Runtime image for Kogito Task Console"

labels:
Expand All @@ -45,18 +45,12 @@ envs:
example: "http://data-index.service:8080"
description: "Data Index service address, defaults to http://localhost:8180."

packages:
manager: microdnf

modules:
repositories:
- path: modules
install:
- name: org.kie.kogito.image.dependencies
- name: org.kie.kogito.system.user
- name: org.kie.kogito.logging
- name: org.kie.kogito.openjdk.headless
version: "17"
- name: org.kie.kogito.dynamic.resources
- name: org.kie.kogito.launch.scripts
- name: org.kie.kogito.task.console
Expand All @@ -70,4 +64,3 @@ run:
user: 1001
cmd:
- "/home/kogito/kogito-app-launch.sh"

4 changes: 0 additions & 4 deletions modules/kogito-data-index-ephemeral/community/configure
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,8 @@
#
set -e

SOURCES_DIR=/tmp/artifacts
SCRIPT_DIR=$(dirname "${0}")
ADDED_DIR="${SCRIPT_DIR}"/added

unzip "${SOURCES_DIR}"/data-index-service-inmemory-quarkus-app.zip -d "${KOGITO_HOME}"/bin/

cp -v "${ADDED_DIR}"/kogito-app-launch.sh "${KOGITO_HOME}"
chmod +x-w "${KOGITO_HOME}"/kogito-app-launch.sh

10 changes: 3 additions & 7 deletions modules/kogito-data-index-ephemeral/community/module.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,9 @@ version: "999-SNAPSHOT"
# see build-kogito-apps-components.sh script, responsible for build it.
# called by the Makefile before builds
artifacts:
- path: /tmp/build/data-index-service-inmemory/data-index-service-inmemory-quarkus-app.zip
name: data-index-service-inmemory-quarkus-app.zip
- path: /tmp/build/data-index-service-inmemory
dest: /home/kogito/bin
name: quarkus-app

execute:
- script: configure

packages:
install:
- pam

4 changes: 0 additions & 4 deletions modules/kogito-data-index-postgresql/configure
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,8 @@
#
set -e

SOURCES_DIR=/tmp/artifacts
SCRIPT_DIR=$(dirname "${0}")
ADDED_DIR="${SCRIPT_DIR}"/added

unzip "${SOURCES_DIR}"/data-index-service-postgresql-quarkus-app.zip -d "${KOGITO_HOME}"/bin/

cp -v "${ADDED_DIR}"/kogito-app-launch.sh "${KOGITO_HOME}"
chmod +x-w "${KOGITO_HOME}"/kogito-app-launch.sh

Loading

0 comments on commit 4cbe1ac

Please sign in to comment.