forked from apache/incubator-kie-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[kie-tools#2571] [sonataflow-management-console] Convert Containerfil…
…es to Cekit (apache#2573) Signed-off-by: Ricardo Zanini <ricardozanini@gmail.com>
- Loading branch information
1 parent
6f15810
commit daebcf8
Showing
13 changed files
with
197 additions
and
206 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,3 +31,5 @@ envs: | |
value: "/home/kogito" | ||
- name: "USER" | ||
value: "kogito" | ||
- name: "USER_ID" | ||
value: 1001 |
51 changes: 0 additions & 51 deletions
51
packages/sonataflow-management-console-image/Containerfile
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
62 changes: 62 additions & 0 deletions
62
...management-console-image/resources/incubator-kie-sonataflow-management-console-image.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
# | ||
# Licensed to the Apache Software Foundation (ASF) under one | ||
# or more contributor license agreements. See the NOTICE file | ||
# distributed with this work for additional information | ||
# regarding copyright ownership. The ASF licenses this file | ||
# to you under the Apache License, Version 2.0 (the | ||
# "License"); you may not use this file except in compliance | ||
# with the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, | ||
# software distributed under the License is distributed on an | ||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
# KIND, either express or implied. See the License for the | ||
# specific language governing permissions and limitations | ||
# under the License. | ||
# | ||
- name: "docker.io/apache/incubator-kie-sonataflow-devmode" | ||
from: "registry.access.redhat.com/ubi9/httpd-24:1-336.1725850633" | ||
version: "0.0.0" | ||
description: "SonataFlow Management Console Image" | ||
|
||
labels: | ||
- name: "io.quarkus.platform.version" | ||
value: "### SET ME DURING BUILD PROCESS ###" | ||
- name: "org.kie.kogito.version" | ||
value: "### SET ME DURING BUILD PROCESS ###" | ||
- name: "maintainer" | ||
value: "Apache KIE <dev@kie.apache.org>" | ||
- name: "io.k8s.description" | ||
value: "SonataFlow Management Console Image." | ||
- name: "io.k8s.display-name" | ||
value: "Sonataflow Management Console" | ||
- name: "io.openshift.tags" | ||
value: "sonataflow,serverless,workflow" | ||
- name: "io.openshift.expose-services" | ||
value: "8080:http" | ||
|
||
modules: | ||
repositories: | ||
- path: modules | ||
install: | ||
- name: org.kie.kogito.system.user | ||
- name: org.kie.kogito.logging | ||
- name: org.kie.kogito.project.versions | ||
- name: org.kie.sonataflow.management.console | ||
|
||
ports: | ||
- value: 8080 | ||
|
||
envs: | ||
- name: SONATAFLOW_MANAGEMENT_CONSOLE_KOGITO_ENV_MODE | ||
value: PROD | ||
- name: SUMMARY | ||
value: "SonataFlow Management Console Image" | ||
|
||
run: | ||
workdir: "/home/kogito/management-console" | ||
user: 1001 | ||
cmd: | ||
- "/home/kogito/management-console/launch/entrypoint.sh" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
...nagement-console-image/resources/modules/sonataflow/management-console/configure-httpd.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
#!/bin/bash | ||
# | ||
# Licensed to the Apache Software Foundation (ASF) under one | ||
# or more contributor license agreements. See the NOTICE file | ||
# distributed with this work for additional information | ||
# regarding copyright ownership. The ASF licenses this file | ||
# to you under the Apache License, Version 2.0 (the | ||
# "License"); you may not use this file except in compliance | ||
# with the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, | ||
# software distributed under the License is distributed on an | ||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
# KIND, either express or implied. See the License for the | ||
# specific language governing permissions and limitations | ||
# under the License. | ||
# | ||
set -e | ||
|
||
SOURCES_DIR=/tmp/artifacts | ||
SCRIPT_DIR=$(dirname "${0}") | ||
MGMT_CONSOLE_HOME="${KOGITO_HOME}/management-console" | ||
|
||
# Configure the default httpd conf | ||
echo "Mutex posixsem" >> "${HTTPD_MAIN_CONF_PATH}/httpd.conf" | ||
sed -i -e "/#ServerName www.example.com:80/aHeader set Content-Security-Policy \"frame-ancestors 'self';\"" "${HTTPD_MAIN_CONF_PATH}/httpd.conf" | ||
sed -i -e 's/Options Indexes FollowSymLinks/Options -Indexes +FollowSymLinks/' "${HTTPD_MAIN_CONF_PATH}/httpd.conf" | ||
sed -i "s/Listen 80/Listen ${SONATAFLOW_MANAGEMENT_CONSOLE_PORT}/g" "${HTTPD_MAIN_CONF_PATH}/httpd.conf" | ||
sed -i "s/#ServerName www.example.com:80/ServerName 127.0.0.1:${SONATAFLOW_MANAGEMENT_CONSOLE_PORT}/g" "${HTTPD_MAIN_CONF_PATH}/httpd.conf" | ||
sed -i '$ a ServerTokens Prod' "${HTTPD_MAIN_CONF_PATH}/httpd.conf" | ||
sed -i '$ a ServerSignature Off' "${HTTPD_MAIN_CONF_PATH}/httpd.conf" | ||
sed -i -e '/<Directory "\/var\/www\/html">/a RewriteEngine on\n RewriteCond %{REQUEST_FILENAME} -f [OR]\n RewriteCond %{REQUEST_FILENAME} -d\n RewriteRule ^ - [L]\n RewriteRule ^ index.html [L]' "${HTTPD_MAIN_CONF_PATH}/httpd.conf" | ||
|
||
|
||
# Set the required paths | ||
mkdir -p "${MGMT_CONSOLE_HOME}/launch" | ||
|
||
# Copy the entrypoint and other init scripts | ||
cp -v "${SCRIPT_DIR}"/added/* "${MGMT_CONSOLE_HOME}"/launch | ||
|
||
# Fixing permissions | ||
chmod +x "${MGMT_CONSOLE_HOME}/launch/entrypoint.sh" "${MGMT_CONSOLE_HOME}/image-env-to-json-standalone" | ||
chown -R "${USER_ID}" "${MGMT_CONSOLE_HOME}" | ||
|
||
if [ -f "${MGMT_CONSOLE_HOME}/app/env.json" ]; then chmod a+w "${MGMT_CONSOLE_HOME}/app/env.json"; fi |
41 changes: 41 additions & 0 deletions
41
...flow-management-console-image/resources/modules/sonataflow/management-console/module.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# | ||
# Licensed to the Apache Software Foundation (ASF) under one | ||
# or more contributor license agreements. See the NOTICE file | ||
# distributed with this work for additional information | ||
# regarding copyright ownership. The ASF licenses this file | ||
# to you under the Apache License, Version 2.0 (the | ||
# "License"); you may not use this file except in compliance | ||
# with the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, | ||
# software distributed under the License is distributed on an | ||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
# KIND, either express or implied. See the License for the | ||
# specific language governing permissions and limitations | ||
# under the License. | ||
# | ||
schema_version: 1 | ||
name: org.kie.sonataflow.management.console | ||
version: "0.0.0" | ||
description: "SonataFlow Management Console Launch Scripts and Configurations" | ||
|
||
execute: | ||
- script: configure-httpd.sh | ||
|
||
envs: | ||
- name: SONATAFLOW_MANAGEMENT_CONSOLE_PORT | ||
value: 8080 | ||
|
||
artifacts: | ||
- name: sonataflow-management-console-webapp | ||
path: "../../../../../sonataflow-management-console-webapp/" | ||
dest: /home/kogito/management-console/app | ||
target: app | ||
- name: image-env-to-json-standalone | ||
path: "../../../../../image-env-to-json-standalone" | ||
dest: /home/kogito/management-console | ||
- name: EnvJson.schema.json | ||
path: "../../../../../EnvJson.schema.json" | ||
dest: /home/kogito/management-console |
Oops, something went wrong.