diff --git a/dockerfiles/alpine/analytics/dashboard/Dockerfile b/dockerfiles/alpine/analytics/dashboard/Dockerfile index 9f5fb431..84572797 100644 --- a/dockerfiles/alpine/analytics/dashboard/Dockerfile +++ b/dockerfiles/alpine/analytics/dashboard/Dockerfile @@ -61,7 +61,7 @@ RUN echo Verifying install ... \ && echo Complete. LABEL maintainer="WSO2 Docker Maintainers " \ - com.wso2.docker.source="https://github.com/wso2/docker-ei/releases/tag/v6.6.0.7" + com.wso2.docker.source="https://github.com/wso2/docker-ei/releases/tag/v6.6.0.8" # set Docker image build arguments # build arguments for user/group configurations diff --git a/dockerfiles/alpine/analytics/worker/Dockerfile b/dockerfiles/alpine/analytics/worker/Dockerfile index 4091d76d..dd26e4f2 100644 --- a/dockerfiles/alpine/analytics/worker/Dockerfile +++ b/dockerfiles/alpine/analytics/worker/Dockerfile @@ -61,7 +61,7 @@ RUN echo Verifying install ... \ && echo Complete. LABEL maintainer="WSO2 Docker Maintainers " \ - com.wso2.docker.source="https://github.com/wso2/docker-ei/releases/tag/v6.6.0.7" + com.wso2.docker.source="https://github.com/wso2/docker-ei/releases/tag/v6.6.0.8" # set Docker image build arguments # build arguments for user/group configurations diff --git a/dockerfiles/alpine/broker/Dockerfile b/dockerfiles/alpine/broker/Dockerfile index 3def2490..f8ff4946 100644 --- a/dockerfiles/alpine/broker/Dockerfile +++ b/dockerfiles/alpine/broker/Dockerfile @@ -19,7 +19,7 @@ # set base Docker image to AdoptOpenJDK Alpine Docker image FROM adoptopenjdk/openjdk11:jdk-11.0.5_10-alpine LABEL maintainer="WSO2 Docker Maintainers " \ - com.wso2.docker.source="https://github.com/wso2/docker-ei/releases/tag/v6.6.0.7" + com.wso2.docker.source="https://github.com/wso2/docker-ei/releases/tag/v6.6.0.8" # set Docker image build arguments # build arguments for user/group configurations diff --git a/dockerfiles/alpine/business-process/Dockerfile b/dockerfiles/alpine/business-process/Dockerfile index ba4f653d..4faff33c 100644 --- a/dockerfiles/alpine/business-process/Dockerfile +++ b/dockerfiles/alpine/business-process/Dockerfile @@ -19,7 +19,7 @@ # set base Docker image to AdoptOpenJDK Alpine Docker image FROM adoptopenjdk/openjdk11:jdk-11.0.5_10-alpine LABEL maintainer="WSO2 Docker Maintainers " \ - com.wso2.docker.source="https://github.com/wso2/docker-ei/releases/tag/v6.6.0.7" + com.wso2.docker.source="https://github.com/wso2/docker-ei/releases/tag/v6.6.0.8" # set Docker image build arguments # build arguments for user/group configurations diff --git a/dockerfiles/alpine/integrator/Dockerfile b/dockerfiles/alpine/integrator/Dockerfile index d25c9918..c6e6befc 100644 --- a/dockerfiles/alpine/integrator/Dockerfile +++ b/dockerfiles/alpine/integrator/Dockerfile @@ -61,7 +61,7 @@ RUN echo Verifying install ... \ && echo Complete. LABEL maintainer="WSO2 Docker Maintainers " \ - com.wso2.docker.source="https://github.com/wso2/docker-ei/releases/tag/v6.6.0.7" + com.wso2.docker.source="https://github.com/wso2/docker-ei/releases/tag/v6.6.0.8" # set Docker image build arguments # build arguments for user/group configurations diff --git a/dockerfiles/rocky/analytics/dashboard/Dockerfile b/dockerfiles/rocky/analytics/dashboard/Dockerfile new file mode 100644 index 00000000..0fca803b --- /dev/null +++ b/dockerfiles/rocky/analytics/dashboard/Dockerfile @@ -0,0 +1,131 @@ +# ------------------------------------------------------------------------ +# +# Copyright 2024 WSO2, LLC. (http://wso2.com) +# +# Licensed 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 base Docker image to RockyLinux Docker image +FROM rockylinux/rockylinux:8.10 +LABEL maintainer="WSO2 Docker Maintainers " \ + com.wso2.docker.source="https://github.com/wso2/docker-ei/releases/tag/v6.6.0.8" + +# set Docker image build arguments +# build arguments for user/group configurations +ARG USER=wso2carbon +ARG USER_ID=802 +ARG USER_GROUP=wso2 +ARG USER_GROUP_ID=802 +ARG USER_HOME=/home/${USER} +# build arguments for WSO2 product installation +ARG WSO2_SERVER_NAME=wso2ei +ARG WSO2_SERVER_VERSION=6.6.0 +ARG WSO2_SERVER_PROFILE_NAME=analytics +ARG WSO2_SERVER_PROFILE_OPTIMIZER_NUMBER=2 +ARG WSO2_SERVER=${WSO2_SERVER_NAME}-${WSO2_SERVER_VERSION} +ARG WSO2_SERVER_HOME=${USER_HOME}/${WSO2_SERVER} +ARG WSO2_SERVER_DIST_URL=https://bintray.com/wso2/binaryGA/download_file?file_path=${WSO2_SERVER}.zip +# build argument for MOTD +ARG MOTD='printf "\n\ +Welcome to WSO2 Docker resources.\n\ +------------------------------------ \n\ +This Docker container comprises of a WSO2 product, running with its latest GA release \n\ +which is under the Apache License, Version 2.0. \n\ +Read more about Apache License, Version 2.0 here @ http://www.apache.org/licenses/LICENSE-2.0.\n\n"' + +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' +ENV JAVA_VERSION jdk-11.0.14+9 + +# create the non-root user and group and set MOTD login message +RUN \ + groupadd --system -g ${USER_GROUP_ID} ${USER_GROUP} \ + && useradd --system --create-home --home-dir ${USER_HOME} --no-log-init -g ${USER_GROUP_ID} -u ${USER_ID} ${USER} \ + && echo ${MOTD} > /etc/profile.d/motd.sh + +# copy init script to user home +COPY --chown=wso2carbon:wso2 docker-entrypoint.sh ${USER_HOME}/ + +# install required packages +RUN \ + yum -y update \ + && yum install -y \ + tzdata openssl ca-certificates fontconfig gzip tar \ + nc \ + unzip \ + wget \ + zip \ + && yum clean all \ + && rm -rf /var/cache/yum/* + +# install OpenJDK +RUN set -eux; \ + ARCH="$(objdump="$(command -v objdump)" && objdump --file-headers "$objdump" | awk -F '[:,]+[[:space:]]+' '$1 == "architecture" { print $2 }')"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='0ba188a2a739733163cd0049344429d2284867e04ca452879be24f3b54320c9a'; \ + BINARY_URL='https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.14%2B9/OpenJDK11U-jdk_aarch64_linux_hotspot_11.0.14_9.tar.gz'; \ + ;; \ + ppc64el|powerpc:common64) \ + ESUM='91c63331faba8c842aef312d415b3e67aecf4f662a36c275f5cb278f7bce1410'; \ + BINARY_URL='https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.14%2B9/OpenJDK11U-jdk_ppc64le_linux_hotspot_11.0.14_9.tar.gz'; \ + ;; \ + amd64|i386:x86-64) \ + ESUM='1189bee178d11402a690edf3fbba0c9f2ada1d3a36ff78929d81935842ef24a9'; \ + BINARY_URL='https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.14%2B9/OpenJDK11U-jdk_x64_linux_hotspot_11.0.14_9.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" + +# Verify Java installation +RUN echo Verifying install ... \ + && echo javac --version && javac --version \ + && echo java --version && java --version \ + && echo Complete. + +# add the WSO2 product distribution to user's home directory +RUN \ + wget -O ${WSO2_SERVER}.zip "${WSO2_SERVER_DIST_URL}" \ + && unzip -d ${USER_HOME} ${WSO2_SERVER}.zip \ + && rm -f ${WSO2_SERVER}.zip \ + && echo "${WSO2_SERVER_PROFILE_OPTIMIZER_NUMBER}" | bash ${WSO2_SERVER_HOME}/bin/profile-creator.sh \ + && rm -rf ${WSO2_SERVER_HOME} \ + && unzip -d ${USER_HOME} ${WSO2_SERVER_HOME}_${WSO2_SERVER_PROFILE_NAME}.zip \ + && chown wso2carbon:wso2 -R ${WSO2_SERVER_HOME} \ + && rm -f ${WSO2_SERVER_HOME}_${WSO2_SERVER_PROFILE_NAME}.zip + +# set the user and work directory +USER ${USER_ID} +WORKDIR ${USER_HOME} + +# set environment variables +ENV WORKING_DIRECTORY=${USER_HOME} \ + WSO2_SERVER_HOME=${WSO2_SERVER_HOME} + +# expose analytics ports +EXPOSE 9713 9643 9613 7713 7613 + +# initiate container and start WSO2 Carbon server +ENTRYPOINT ["/home/wso2carbon/docker-entrypoint.sh"] diff --git a/dockerfiles/rocky/analytics/dashboard/README.md b/dockerfiles/rocky/analytics/dashboard/README.md new file mode 100644 index 00000000..07eac8c8 --- /dev/null +++ b/dockerfiles/rocky/analytics/dashboard/README.md @@ -0,0 +1,81 @@ +# Dockerfile for Dashboard Profile of WSO2 Enterprise Integrator Analytics # + +This section defines the step-by-step instructions to build a [RockyLinux](https://hub.docker.com/_/rockylinux) based Docker images +for Dashboard Profile of WSO2 Enterprise Integrator 6.6.0. + +## Prerequisites + +* [Docker](https://www.docker.com/get-docker) v17.09.0 or above +* [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) client + +## How to build an image and run + +##### 1. Checkout this repository into your local machine using the following Git client command and checkout branch v6.6.0.1. + +``` +git clone https://github.com/wso2/docker-ei.git +git checkout v6.6.0.1 +``` + +>The local copy of the `dockerfile/ubuntu/analytics/dashboard` directory will be referred to as `ANALYTICS_DOCKERFILE_HOME` from this point onwards. + +##### 2. Build the Docker image. + +- Navigate to `` directory.
+ Execute `docker build` command as shown below. + + `docker build -t wso2ei-analytics-dashboard:6.6.0-rocky .` + +> By default, the Docker image will prepackage the General Availability (GA) release version of the relevant WSO2 product. + +##### 3. Running the Docker image. + +- `docker run -p 9643:9643 wso2ei-analytics-dashboard:6.6.0-rocky` + +> Here, only port 9643 has been mapped to a Docker host port. +You may map other container service ports, which have been exposed to Docker host ports, as desired. + +##### 4. Accessing the Dashboard portal. + +- For Analytics Dashboard, + + Business Rules:
+ `https://:9643/business-rules` + + Portal:
+ `https://:9643/portal` + + Monitoring:
+ `https://:9643/monitoring` + +>In here, refers to hostname or IP of the host machine on top of which containers are spawned. + +## How to update configurations + +Configurations would lie on the Docker host machine and they can be volume mounted to the container.
+As an example, steps required to change the port offset using `deployment.yaml` is as follows: + +##### 1. Stop the Enterprise Integrator Analytics container if it's already running. + +In Analytics Worker profile product distribution, `deployment.yaml` configuration file
+can be found at `/wso2/analytics/conf/worker`. Copy the file to some suitable location of the host machine,
+referred to as `/deployment.yaml` and increase the offset value under ports by 1. + +##### 2. Grant read permission to `other` users for `/deployment.yaml`. + +``` +chmod o+r /deployment.yaml +``` + +##### 3. Run the image by mounting the file to container as follows: + +``` +docker run +-p 9643:9643 +--volume /deployment.yaml:/deployment.yaml +wso2ei-analytics-dashboard:6.6.0-rocky +``` + +>In here, refers to /home/wso2carbon/wso2ei-6.6.0/wso2/analytics/conf/worker folder of the container. + +## Docker command usage references + +* [Docker build command reference](https://docs.docker.com/engine/reference/commandline/build/) +* [Docker run command reference](https://docs.docker.com/engine/reference/run/) +* [Dockerfile reference](https://docs.docker.com/engine/reference/builder/) diff --git a/dockerfiles/rocky/analytics/dashboard/docker-entrypoint.sh b/dockerfiles/rocky/analytics/dashboard/docker-entrypoint.sh new file mode 100755 index 00000000..28c6107f --- /dev/null +++ b/dockerfiles/rocky/analytics/dashboard/docker-entrypoint.sh @@ -0,0 +1,36 @@ +#!/bin/bash +# ------------------------------------------------------------------------ +# Copyright 2024 WSO2, LLC. (http://wso2.com) +# +# Licensed 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 + +# volume mounts +config_volume=${WORKING_DIRECTORY}/wso2-config-volume +artifact_volume=${WORKING_DIRECTORY}/wso2-artifact-volume + +# check if the WSO2 non-root user home exists +test ! -d ${WORKING_DIRECTORY} && echo "WSO2 Docker non-root user home does not exist" && exit 1 + +# check if the WSO2 product home exists +test ! -d ${WSO2_SERVER_HOME} && echo "WSO2 Docker product home does not exist" && exit 1 + +# copy any configuration changes mounted to config_volume +test -d ${config_volume} && [[ "$(ls -A ${config_volume})" ]] && cp -RL ${config_volume}/* ${WSO2_SERVER_HOME}/ +# copy any artifact changes mounted to artifact_volume +test -d ${artifact_volume} && [[ "$(ls -A ${artifact_volume})" ]] && cp -RL ${artifact_volume}/* ${WSO2_SERVER_HOME}/ + +# start WSO2 Carbon server +sh ${WSO2_SERVER_HOME}/bin/analytics-dashboard.sh "$@" diff --git a/dockerfiles/rocky/analytics/worker/Dockerfile b/dockerfiles/rocky/analytics/worker/Dockerfile new file mode 100644 index 00000000..ffc40611 --- /dev/null +++ b/dockerfiles/rocky/analytics/worker/Dockerfile @@ -0,0 +1,131 @@ +# ------------------------------------------------------------------------ +# +# Copyright 2024 WSO2, LLC. (http://wso2.com) +# +# Licensed 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 base Docker image to RockyLinux Docker image +FROM rockylinux/rockylinux:8.10 +LABEL maintainer="WSO2 Docker Maintainers " \ + com.wso2.docker.source="https://github.com/wso2/docker-ei/releases/tag/v6.6.0.8" + +# set Docker image build arguments +# build arguments for user/group configurations +ARG USER=wso2carbon +ARG USER_ID=802 +ARG USER_GROUP=wso2 +ARG USER_GROUP_ID=802 +ARG USER_HOME=/home/${USER} +# build arguments for WSO2 product installation +ARG WSO2_SERVER_NAME=wso2ei +ARG WSO2_SERVER_VERSION=6.6.0 +ARG WSO2_SERVER_PROFILE_NAME=analytics +ARG WSO2_SERVER_PROFILE_OPTIMIZER_NUMBER=2 +ARG WSO2_SERVER=${WSO2_SERVER_NAME}-${WSO2_SERVER_VERSION} +ARG WSO2_SERVER_HOME=${USER_HOME}/${WSO2_SERVER} +ARG WSO2_SERVER_DIST_URL=https://bintray.com/wso2/binaryGA/download_file?file_path=${WSO2_SERVER}.zip +# build argument for MOTD +ARG MOTD='printf "\n\ +Welcome to WSO2 Docker resources.\n\ +------------------------------------ \n\ +This Docker container comprises of a WSO2 product, running with its latest GA release \n\ +which is under the Apache License, Version 2.0. \n\ +Read more about Apache License, Version 2.0 here @ http://www.apache.org/licenses/LICENSE-2.0.\n\n"' + +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' +ENV JAVA_VERSION jdk-11.0.14+9 + +# create the non-root user and group and set MOTD login message +RUN \ + groupadd --system -g ${USER_GROUP_ID} ${USER_GROUP} \ + && useradd --system --create-home --home-dir ${USER_HOME} --no-log-init -g ${USER_GROUP_ID} -u ${USER_ID} ${USER} \ + && echo ${MOTD} > /etc/profile.d/motd.sh + +# copy init script to user home +COPY --chown=wso2carbon:wso2 docker-entrypoint.sh ${USER_HOME}/ + +# install required packages +RUN \ + yum -y update \ + && yum install -y \ + tzdata openssl ca-certificates fontconfig gzip tar \ + nc \ + unzip \ + wget \ + zip \ + && yum clean all \ + && rm -rf /var/cache/yum/* + +# install OpenJDK +RUN set -eux; \ + ARCH="$(objdump="$(command -v objdump)" && objdump --file-headers "$objdump" | awk -F '[:,]+[[:space:]]+' '$1 == "architecture" { print $2 }')"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='0ba188a2a739733163cd0049344429d2284867e04ca452879be24f3b54320c9a'; \ + BINARY_URL='https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.14%2B9/OpenJDK11U-jdk_aarch64_linux_hotspot_11.0.14_9.tar.gz'; \ + ;; \ + ppc64el|powerpc:common64) \ + ESUM='91c63331faba8c842aef312d415b3e67aecf4f662a36c275f5cb278f7bce1410'; \ + BINARY_URL='https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.14%2B9/OpenJDK11U-jdk_ppc64le_linux_hotspot_11.0.14_9.tar.gz'; \ + ;; \ + amd64|i386:x86-64) \ + ESUM='1189bee178d11402a690edf3fbba0c9f2ada1d3a36ff78929d81935842ef24a9'; \ + BINARY_URL='https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.14%2B9/OpenJDK11U-jdk_x64_linux_hotspot_11.0.14_9.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" + +# Verify Java installation +RUN echo Verifying install ... \ + && echo javac --version && javac --version \ + && echo java --version && java --version \ + && echo Complete. + +# add the WSO2 product distribution to user's home directory +RUN \ + wget -O ${WSO2_SERVER}.zip "${WSO2_SERVER_DIST_URL}" \ + && unzip -d ${USER_HOME} ${WSO2_SERVER}.zip \ + && rm -f ${WSO2_SERVER}.zip \ + && echo "${WSO2_SERVER_PROFILE_OPTIMIZER_NUMBER}" | bash ${WSO2_SERVER_HOME}/bin/profile-creator.sh \ + && rm -rf ${WSO2_SERVER_HOME} \ + && unzip -d ${USER_HOME} ${WSO2_SERVER_HOME}_${WSO2_SERVER_PROFILE_NAME}.zip \ + && chown wso2carbon:wso2 -R ${WSO2_SERVER_HOME} \ + && rm -f ${WSO2_SERVER_HOME}_${WSO2_SERVER_PROFILE_NAME}.zip + +# set the user and work directory +USER ${USER_ID} +WORKDIR ${USER_HOME} + +# set environment variables +ENV WORKING_DIRECTORY=${USER_HOME} \ + WSO2_SERVER_HOME=${WSO2_SERVER_HOME} + +# expose analytics ports +EXPOSE 9091 9444 9712 9612 7712 7612 7070 7443 + +# initiate container and start WSO2 Carbon server +ENTRYPOINT ["/home/wso2carbon/docker-entrypoint.sh"] diff --git a/dockerfiles/rocky/analytics/worker/README.md b/dockerfiles/rocky/analytics/worker/README.md new file mode 100644 index 00000000..b2a02778 --- /dev/null +++ b/dockerfiles/rocky/analytics/worker/README.md @@ -0,0 +1,69 @@ +# Dockerfile for Worker Profile of WSO2 Enterprise Integrator Analytics # + +This section defines the step-by-step instructions to build a [RockyLinux](https://hub.docker.com/_/rockylinux) based Docker images +for Worker Profile of WSO2 Enterprise Integrator 6.6.0. + +## Prerequisites + +* [Docker](https://www.docker.com/get-docker) v17.09.0 or above +* [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) client + +## How to build an image and run + +##### 1. Checkout this repository into your local machine using the following Git client command and checkout branch v6.6.0.1. + +``` +git clone https://github.com/wso2/docker-ei.git +git checkout v6.6.0.1 +``` + +>The local copy of the `dockerfile/ubuntu/analytics/worker` directory will be referred to as `ANALYTICS_DOCKERFILE_HOME` from this point onwards. + +##### 2. Build the Docker image. + +- Navigate to `` directory.
+ Execute `docker build` command as shown below. + + `docker build -t wso2ei-analytics-worker:6.6.0-rocky .` + +> By default, the Docker image will prepackage the General Availability (GA) release version of the relevant WSO2 product. + +##### 3. Running the Docker image. + +- `docker run -p 9444:9444 ...all-port-mappings-here... wso2ei-analytics-worker:6.6.0-rocky` + +> Here, only port 9444 has been mapped to a Docker host port. +You may map other container service ports, which have been exposed to Docker host ports, as desired. + +## How to update configurations + +Configurations would lie on the Docker host machine and they can be volume mounted to the container.
+As an example, steps required to change the port offset using `deployment.yaml` is as follows: + +##### 1. Stop the Enterprise Integrator Analytics container if it's already running. + +In Analytics Worker profile product distribution, `deployment.yaml` configuration file
+can be found at `/wso2/analytics/conf/worker`. Copy the file to some suitable location of the host machine,
+referred to as `/deployment.yaml` and increase the offset value under ports by 1. + +##### 2. Grant read permission to `other` users for `/deployment.yaml`. + +``` +chmod o+r /deployment.yaml +``` + +##### 3. Run the image by mounting the file to container as follows: + +``` +docker run +-p 9444:9444 +--volume /deployment.yaml:/deployment.yaml +wso2ei-analytics-worker:6.6.0-rocky +``` + +>In here, refers to /home/wso2carbon/wso2ei-6.6.0/wso2/analytics/conf/worker folder of the container. + +## Docker command usage references + +* [Docker build command reference](https://docs.docker.com/engine/reference/commandline/build/) +* [Docker run command reference](https://docs.docker.com/engine/reference/run/) +* [Dockerfile reference](https://docs.docker.com/engine/reference/builder/) diff --git a/dockerfiles/rocky/analytics/worker/docker-entrypoint.sh b/dockerfiles/rocky/analytics/worker/docker-entrypoint.sh new file mode 100755 index 00000000..23aba4d2 --- /dev/null +++ b/dockerfiles/rocky/analytics/worker/docker-entrypoint.sh @@ -0,0 +1,36 @@ +#!/bin/bash +# ------------------------------------------------------------------------ +# Copyright 2024 WSO2, LLC. (http://wso2.com) +# +# Licensed 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 + +# volume mounts +config_volume=${WORKING_DIRECTORY}/wso2-config-volume +artifact_volume=${WORKING_DIRECTORY}/wso2-artifact-volume + +# check if the WSO2 non-root user home exists +test ! -d ${WORKING_DIRECTORY} && echo "WSO2 Docker non-root user home does not exist" && exit 1 + +# check if the WSO2 product home exists +test ! -d ${WSO2_SERVER_HOME} && echo "WSO2 Docker product home does not exist" && exit 1 + +# copy any configuration changes mounted to config_volume +test -d ${config_volume} && [[ "$(ls -A ${config_volume})" ]] && cp -RL ${config_volume}/* ${WSO2_SERVER_HOME}/ +# copy any artifact changes mounted to artifact_volume +test -d ${artifact_volume} && [[ "$(ls -A ${artifact_volume})" ]] && cp -RL ${artifact_volume}/* ${WSO2_SERVER_HOME}/ + +# start WSO2 Carbon server +sh ${WSO2_SERVER_HOME}/bin/analytics-worker.sh "$@" diff --git a/dockerfiles/rocky/broker/Dockerfile b/dockerfiles/rocky/broker/Dockerfile new file mode 100644 index 00000000..99f4ed12 --- /dev/null +++ b/dockerfiles/rocky/broker/Dockerfile @@ -0,0 +1,105 @@ +# ------------------------------------------------------------------------ +# +# Copyright 2024 WSO2, LLC. (http://wso2.com) +# +# Licensed 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 base Docker image to RockyLinux Docker image +FROM rockylinux/rockylinux:8.10 +LABEL maintainer="WSO2 Docker Maintainers " \ + com.wso2.docker.source="https://github.com/wso2/docker-ei/releases/tag/v6.6.0.8" + +# set Docker image build arguments +# build arguments for user/group configurations +ARG USER=wso2carbon +ARG USER_ID=802 +ARG USER_GROUP=wso2 +ARG USER_GROUP_ID=802 +ARG USER_HOME=/home/${USER} +# set JDK configurations +ARG JAVA_HOME=${USER_HOME}/java +# build arguments for WSO2 product installation +ARG WSO2_SERVER_NAME=wso2ei +ARG WSO2_SERVER_VERSION=6.6.0 +ARG WSO2_SERVER_PROFILE_NAME=broker +ARG WSO2_SERVER_PROFILE_OPTIMIZER_NUMBER=4 +ARG WSO2_SERVER=${WSO2_SERVER_NAME}-${WSO2_SERVER_VERSION} +ARG WSO2_SERVER_HOME=${USER_HOME}/${WSO2_SERVER} +ARG WSO2_SERVER_DIST_URL=https://bintray.com/wso2/binaryGA/download_file?file_path=${WSO2_SERVER}.zip +# build arguments for external artifacts +ARG DNS_JAVA_VERSION=2.1.8 +ARG K8S_MEMBERSHIP_SCHEME_VERSION=1.0.11 +# build argument for MOTD +ARG MOTD='printf "\n\ +Welcome to WSO2 Docker resources.\n\ +------------------------------------ \n\ +This Docker container comprises of a WSO2 product, running with its latest GA release \n\ +which is under the Apache License, Version 2.0. \n\ +Read more about Apache License, Version 2.0 here @ http://www.apache.org/licenses/LICENSE-2.0.\n\n"' + +# create the non-root user and group and set MOTD login message +RUN \ + groupadd --system -g ${USER_GROUP_ID} ${USER_GROUP} \ + && useradd --system --create-home --home-dir ${USER_HOME} --no-log-init -g ${USER_GROUP_ID} -u ${USER_ID} ${USER} \ + && echo ${MOTD} > /etc/profile.d/motd.sh + +# copy init script to user home +COPY --chown=wso2carbon:wso2 docker-entrypoint.sh ${USER_HOME}/ +# install required packages +RUN \ + yum -y update \ + && yum install -y \ + nc \ + unzip \ + wget \ + zip \ + && rm -rf /var/cache/yum/* +# install AdoptOpenJDK HotSpot +RUN \ + mkdir -p ${JAVA_HOME} \ + && wget -O OpenJDK11U-jdk_x64_linux_11.0.5_10.tar.gz https://github.com/AdoptOpenJDK/openjdk11-upstream-binaries/releases/download/jdk-11.0.5%2B10/OpenJDK11U-jdk_x64_linux_11.0.5_10.tar.gz \ + && echo "ae050e35d7d769098c6f45a1c22f346cff883f117702e0fd7ce3661676ac0e84 OpenJDK11U-jdk_x64_linux_11.0.5_10.tar.gz" | sha256sum -c - \ + && tar -xf OpenJDK11U-jdk_x64_linux_11.0.5_10.tar.gz -C ${JAVA_HOME} --strip-components=1 \ + && chown wso2carbon:wso2 -R ${JAVA_HOME} \ + && rm -f OpenJDK11U-jdk_x64_linux_11.0.5_10.tar.gz +# add the WSO2 product distribution to user's home directory +RUN \ + wget -O ${WSO2_SERVER}.zip "${WSO2_SERVER_DIST_URL}" \ + && unzip -d ${USER_HOME} ${WSO2_SERVER}.zip \ + && rm -f ${WSO2_SERVER}.zip \ + && echo "${WSO2_SERVER_PROFILE_OPTIMIZER_NUMBER}" | bash ${WSO2_SERVER_HOME}/bin/profile-creator.sh \ + && rm -rf ${WSO2_SERVER_HOME} \ + && unzip -d ${USER_HOME} ${WSO2_SERVER_HOME}_${WSO2_SERVER_PROFILE_NAME}.zip \ + && chown wso2carbon:wso2 -R ${WSO2_SERVER_HOME} \ + && rm -f ${WSO2_SERVER_HOME}_${WSO2_SERVER_PROFILE_NAME}.zip +# add libraries for Kubernetes membership scheme based clustering +ADD --chown=wso2carbon:wso2 https://repo1.maven.org/maven2/dnsjava/dnsjava/${DNS_JAVA_VERSION}/dnsjava-${DNS_JAVA_VERSION}.jar ${WSO2_SERVER_HOME}/lib +ADD --chown=wso2carbon:wso2 http://maven.wso2.org/nexus/content/repositories/releases/org/wso2/carbon/kubernetes/artifacts/kubernetes-membership-scheme/${K8S_MEMBERSHIP_SCHEME_VERSION}/kubernetes-membership-scheme-${K8S_MEMBERSHIP_SCHEME_VERSION}.jar ${WSO2_SERVER_HOME}/lib + +# set the user and work directory +USER ${USER_ID} +WORKDIR ${USER_HOME} + +# set environment variables +ENV JAVA_HOME=${JAVA_HOME} \ + PATH=${JAVA_HOME}/bin:${PATH} \ + WORKING_DIRECTORY=${USER_HOME} \ + WSO2_SERVER_HOME=${WSO2_SERVER_HOME} + +# expose broker ports +EXPOSE 9446 9766 5675 8675 1886 8836 7614 4000 + +# initiate container and start WSO2 Carbon server +ENTRYPOINT ["/home/wso2carbon/docker-entrypoint.sh"] diff --git a/dockerfiles/rocky/broker/README.md b/dockerfiles/rocky/broker/README.md new file mode 100644 index 00000000..198b1ed1 --- /dev/null +++ b/dockerfiles/rocky/broker/README.md @@ -0,0 +1,76 @@ +# Dockerfile for Broker profile of WSO2 Enterprise Integrator # + +This section defines the step-by-step instructions to build a [RockyLinux](https://hub.docker.com/_/rockylinux) based Docker image +Broker profile for WSO2 Enterprise Integrator 6.6.0. + +## Prerequisites + +* [Docker](https://www.docker.com/get-docker) v17.09.0 or above +* [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) client + +## How to build an image and run + +##### 1. Checkout this repository into your local machine using the following Git client command and checkout branch v6.6.0.1. + +``` +git clone https://github.com/wso2/docker-ei.git +git checkout v6.6.0.1 +``` + +>The local copy of the `dockerfiles/ubuntu/broker` directory will be referred to as `BROKER_DOCKERFILE_HOME` from this point onwards. + +##### 2. Build the Docker image. + +- Navigate to `` directory.
+ Execute `docker build` command as shown below. + + `docker build -t wso2ei-broker:6.6.0-rocky .` + +> By default, the Docker image will prepackage the General Availability (GA) release version of the relevant WSO2 product. + +##### 3. Running the Docker image. + +- `docker run -p 9446:9446 ...all-port-mappings-here... wso2ei-broker:6.6.0-rocky` + +>Here, only port 9446 (HTTPS servlet transport) has been mapped to a Docker host port. +You may map other container service ports, which have been exposed to Docker host ports, as desired. + +##### 4. Accessing management console. + +- To access the management console, use the docker host IP and port 9446. + + `https::9446/carbon` + +>In here, refers to hostname or IP of the host machine on top of which containers are spawned. + +## How to update configurations + +Configurations would lie on the Docker host machine and they can be volume mounted to the container.
+As an example, steps required to change the port offset using `carbon.xml` is as follows: + +##### 1. Stop the Broker profile container if it's already running. + +In Broker profile product distribution, `carbon.xml` configuration file can be found at `/wso2/broker/conf`. +Copy the file to some suitable location of the host machine, referred to as `/carbon.xml` and +increase the offset value under ports by 1. + +##### 2. Grant read permission to `other` users for `/carbon.xml`. + +``` +chmod o+r /carbon.xml +``` + +##### 3. Run the image by mounting the file to container as follows: + +``` +docker run \ +-p 9446:9446 \ +--volume /carbon.xml:/carbon.xml \ +wso2ei-broker:6.6.0-rocky +``` + +>In here, refers to /home/wso2carbon/wso2ei-6.6.0/wso2/broker/conf folder of the container. + +## Docker command usage references + +* [Docker build command reference](https://docs.docker.com/engine/reference/commandline/build/) +* [Docker run command reference](https://docs.docker.com/engine/reference/run/) +* [Dockerfile reference](https://docs.docker.com/engine/reference/builder/) diff --git a/dockerfiles/rocky/broker/docker-entrypoint.sh b/dockerfiles/rocky/broker/docker-entrypoint.sh new file mode 100755 index 00000000..40ef0e37 --- /dev/null +++ b/dockerfiles/rocky/broker/docker-entrypoint.sh @@ -0,0 +1,36 @@ +#!/bin/bash +# ------------------------------------------------------------------------ +# Copyright 2024 WSO2, LLC. (http://wso2.com) +# +# Licensed 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 + +# volume mounts +config_volume=${WORKING_DIRECTORY}/wso2-config-volume +artifact_volume=${WORKING_DIRECTORY}/wso2-artifact-volume + +# check if the WSO2 non-root user home exists +test ! -d ${WORKING_DIRECTORY} && echo "WSO2 Docker non-root user home does not exist" && exit 1 + +# check if the WSO2 product home exists +test ! -d ${WSO2_SERVER_HOME} && echo "WSO2 Docker product home does not exist" && exit 1 + +# copy any configuration changes mounted to config_volume +test -d ${config_volume} && [[ "$(ls -A ${config_volume})" ]] && cp -RL ${config_volume}/* ${WSO2_SERVER_HOME}/ +# copy any artifact changes mounted to artifact_volume +test -d ${artifact_volume} && [[ "$(ls -A ${artifact_volume})" ]] && cp -RL ${artifact_volume}/* ${WSO2_SERVER_HOME}/ + +# start WSO2 Carbon server +sh ${WSO2_SERVER_HOME}/bin/broker.sh "$@" diff --git a/dockerfiles/rocky/business-process/Dockerfile b/dockerfiles/rocky/business-process/Dockerfile new file mode 100644 index 00000000..b5ca20d3 --- /dev/null +++ b/dockerfiles/rocky/business-process/Dockerfile @@ -0,0 +1,99 @@ +# ------------------------------------------------------------------------ +# +# Copyright 2024 WSO2, LLC. (http://wso2.com) +# +# Licensed 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 base Docker image to RockyLinux Docker image +FROM rockylinux/rockylinux:8.10 +LABEL maintainer="WSO2 Docker Maintainers " \ + com.wso2.docker.source="https://github.com/wso2/docker-ei/releases/tag/v6.6.0.8" + +# set Docker image build arguments +# build arguments for user/group configurations +ARG USER=wso2carbon +ARG USER_ID=802 +ARG USER_GROUP=wso2 +ARG USER_GROUP_ID=802 +ARG USER_HOME=/home/${USER} +# set JDK configurations +ARG JAVA_HOME=${USER_HOME}/java +# build arguments for WSO2 product installation +ARG WSO2_SERVER_NAME=wso2ei +ARG WSO2_SERVER_VERSION=6.6.0 +ARG WSO2_SERVER_PROFILE_NAME=businessprocess +ARG WSO2_SERVER_PROFILE_OPTIMIZER_NUMBER=3 +ARG WSO2_SERVER=${WSO2_SERVER_NAME}-${WSO2_SERVER_VERSION} +ARG WSO2_SERVER_HOME=${USER_HOME}/${WSO2_SERVER} +ARG WSO2_SERVER_DIST_URL=https://bintray.com/wso2/binaryGA/download_file?file_path=${WSO2_SERVER}.zip +# build argument for MOTD +ARG MOTD='printf "\n\ +Welcome to WSO2 Docker resources.\n\ +------------------------------------ \n\ +This Docker container comprises of a WSO2 product, running with its latest GA release \n\ +which is under the Apache License, Version 2.0. \n\ +Read more about Apache License, Version 2.0 here @ http://www.apache.org/licenses/LICENSE-2.0.\n\n"' + +# create the non-root user and group and set MOTD login message +RUN \ + groupadd --system -g ${USER_GROUP_ID} ${USER_GROUP} \ + && useradd --system --create-home --home-dir ${USER_HOME} --no-log-init -g ${USER_GROUP_ID} -u ${USER_ID} ${USER} \ + && echo ${MOTD} > /etc/profile.d/motd.sh + +# copy init script to user home +COPY --chown=wso2carbon:wso2 docker-entrypoint.sh ${USER_HOME}/ +# install required packages +RUN \ + yum -y update \ + && yum install -y \ + nc \ + unzip \ + wget \ + zip \ + && rm -rf /var/cache/yum/* +# install AdoptOpenJDK HotSpot +RUN \ + mkdir -p ${JAVA_HOME} \ + && wget -O OpenJDK11U-jdk_x64_linux_11.0.5_10.tar.gz https://github.com/AdoptOpenJDK/openjdk11-upstream-binaries/releases/download/jdk-11.0.5%2B10/OpenJDK11U-jdk_x64_linux_11.0.5_10.tar.gz \ + && echo "ae050e35d7d769098c6f45a1c22f346cff883f117702e0fd7ce3661676ac0e84 OpenJDK11U-jdk_x64_linux_11.0.5_10.tar.gz" | sha256sum -c - \ + && tar -xf OpenJDK11U-jdk_x64_linux_11.0.5_10.tar.gz -C ${JAVA_HOME} --strip-components=1 \ + && chown wso2carbon:wso2 -R ${JAVA_HOME} \ + && rm -f OpenJDK11U-jdk_x64_linux_11.0.5_10.tar.gz +# add the WSO2 product distribution to user's home directory +RUN \ + wget -O ${WSO2_SERVER}.zip "${WSO2_SERVER_DIST_URL}" \ + && unzip -d ${USER_HOME} ${WSO2_SERVER}.zip \ + && rm -f ${WSO2_SERVER}.zip \ + && echo "${WSO2_SERVER_PROFILE_OPTIMIZER_NUMBER}" | bash ${WSO2_SERVER_HOME}/bin/profile-creator.sh \ + && rm -rf ${WSO2_SERVER_HOME} \ + && unzip -d ${USER_HOME} ${WSO2_SERVER_HOME}_${WSO2_SERVER_PROFILE_NAME}.zip \ + && chown wso2carbon:wso2 -R ${WSO2_SERVER_HOME} \ + && rm -f ${WSO2_SERVER_HOME}_${WSO2_SERVER_PROFILE_NAME}.zip + +# set the user and work directory +USER ${USER_ID} +WORKDIR ${USER_HOME} + +# set environment variables +ENV JAVA_HOME=${JAVA_HOME} \ + PATH=${JAVA_HOME}/bin:${PATH} \ + WORKING_DIRECTORY=${USER_HOME} \ + WSO2_SERVER_HOME=${WSO2_SERVER_HOME} + +# expose business-process ports +EXPOSE 9445 9765 4000 + +# initiate container and start WSO2 Carbon server +ENTRYPOINT ["/home/wso2carbon/docker-entrypoint.sh"] diff --git a/dockerfiles/rocky/business-process/README.md b/dockerfiles/rocky/business-process/README.md new file mode 100644 index 00000000..dbe36cab --- /dev/null +++ b/dockerfiles/rocky/business-process/README.md @@ -0,0 +1,76 @@ +# Dockerfile for Business Process Server profile of WSO2 Enterprise Integrator # + +This section defines the step-by-step instructions to build a [RockyLinux](https://hub.docker.com/_/rockylinux) based Docker image +Business Process Server profile for WSO2 Enterprise Integrator 6.6.0. + +## Prerequisites + +* [Docker](https://www.docker.com/get-docker) v17.09.0 or above +* [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) client + +## How to build an image and run + +##### 1. Checkout this repository into your local machine using the following Git client command and checkout branch v6.6.0.1. + +``` +git clone https://github.com/wso2/docker-ei.git +git checkout v6.6.0.1 +``` + +>The local copy of the `dockerfiles/ubuntu/business-process` directory will be referred to as `BPS_DOCKERFILE_HOME` from this point onwards. + +##### 2. Build the Docker image. + +- Navigate to `` directory.
+ Execute `docker build` command as shown below. + + `docker build -t wso2ei-business-process:6.6.0-rocky .` + +> By default, the Docker image will prepackage the General Availability (GA) release version of the relevant WSO2 product. + +##### 3. Running the Docker image. + +- `docker run -p 9445:9445 ...all-port-mappings-here... wso2ei-business-process:6.6.0-rocky` + +>Here, only port 9445 (HTTPS servlet transport) has been mapped to a Docker host port. +You may map other container service ports, which have been exposed to Docker host ports, as desired. + +##### 4. Accessing management console. + +- To access the management console, use the docker host IP and port 9445. + + `https::9445/carbon` + +>In here, refers to hostname or IP of the host machine on top of which containers are spawned. + +## How to update configurations + +Configurations would lie on the Docker host machine and they can be volume mounted to the container.
+As an example, steps required to change the port offset using `carbon.xml` is as follows: + +##### 1. Stop the Business Process Server profile container if it's already running. + +In Business Process Server profile product distribution, `carbon.xml` configuration file can be found at `/wso2/business-process/conf`. +Copy the file to some suitable location of the host machine, referred to as `/carbon.xml` and +increase the offset value under ports by 1. + +##### 2. Grant read permission to `other` users for `/carbon.xml`. + +``` +chmod o+r /carbon.xml +``` + +##### 3. Run the image by mounting the file to container as follows: + +``` +docker run \ +-p 9445:9445 \ +--volume /carbon.xml:/carbon.xml \ +wso2ei-business-process:6.6.0-rocky +``` + +>In here, refers to /home/wso2carbon/wso2ei-6.6.0/wso2/business-process/conf folder of the container. + +## Docker command usage references + +* [Docker build command reference](https://docs.docker.com/engine/reference/commandline/build/) +* [Docker run command reference](https://docs.docker.com/engine/reference/run/) +* [Dockerfile reference](https://docs.docker.com/engine/reference/builder/) diff --git a/dockerfiles/rocky/business-process/docker-entrypoint.sh b/dockerfiles/rocky/business-process/docker-entrypoint.sh new file mode 100755 index 00000000..308abe56 --- /dev/null +++ b/dockerfiles/rocky/business-process/docker-entrypoint.sh @@ -0,0 +1,36 @@ +#!/bin/bash +# ------------------------------------------------------------------------ +# Copyright 2024 WSO2, LLC. (http://wso2.com) +# +# Licensed 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 + +# volume mounts +config_volume=${WORKING_DIRECTORY}/wso2-config-volume +artifact_volume=${WORKING_DIRECTORY}/wso2-artifact-volume + +# check if the WSO2 non-root user home exists +test ! -d ${WORKING_DIRECTORY} && echo "WSO2 Docker non-root user home does not exist" && exit 1 + +# check if the WSO2 product home exists +test ! -d ${WSO2_SERVER_HOME} && echo "WSO2 Docker product home does not exist" && exit 1 + +# copy any configuration changes mounted to config_volume +test -d ${config_volume} && [[ "$(ls -A ${config_volume})" ]] && cp -RL ${config_volume}/* ${WSO2_SERVER_HOME}/ +# copy any artifact changes mounted to artifact_volume +test -d ${artifact_volume} && [[ "$(ls -A ${artifact_volume})" ]] && cp -RL ${artifact_volume}/* ${WSO2_SERVER_HOME}/ + +# start WSO2 Carbon server +sh ${WSO2_SERVER_HOME}/bin/business-process.sh "$@" diff --git a/dockerfiles/rocky/integrator/Dockerfile b/dockerfiles/rocky/integrator/Dockerfile new file mode 100644 index 00000000..5825bb81 --- /dev/null +++ b/dockerfiles/rocky/integrator/Dockerfile @@ -0,0 +1,140 @@ +# ------------------------------------------------------------------------ +# +# Copyright 2024 WSO2, LLC. (http://wso2.com) +# +# Licensed 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 base Docker image to RockyLinux Docker image +FROM rockylinux/rockylinux:8.10 +LABEL maintainer="WSO2 Docker Maintainers " \ + com.wso2.docker.source="https://github.com/wso2/docker-ei/releases/tag/v6.6.0.8" + +# set Docker image build arguments +# build arguments for user/group configurations +ARG USER=wso2carbon +ARG USER_ID=802 +ARG USER_GROUP=wso2 +ARG USER_GROUP_ID=802 +ARG USER_HOME=/home/${USER} +# set JDK configurations +ARG JAVA_HOME=${USER_HOME}/java +# build arguments for WSO2 product installation +ARG WSO2_SERVER_NAME=wso2ei +ARG WSO2_SERVER_VERSION=6.6.0 +ARG WSO2_SERVER_PROFILE_NAME=integrator +ARG WSO2_SERVER_PROFILE_OPTIMIZER_NUMBER=1 +ARG WSO2_SERVER=${WSO2_SERVER_NAME}-${WSO2_SERVER_VERSION} +ARG WSO2_SERVER_HOME=${USER_HOME}/${WSO2_SERVER} +ARG WSO2_SERVER_DIST_URL=https://bintray.com/wso2/binaryGA/download_file?file_path=${WSO2_SERVER}.zip +# build arguments for external artifacts +ARG DNS_JAVA_VERSION=2.1.8 +ARG K8S_MEMBERSHIP_SCHEME_VERSION=1.0.11 +# build argument for MOTD +ARG MOTD='printf "\n\ +Welcome to WSO2 Docker resources.\n\ +------------------------------------ \n\ +This Docker container comprises of a WSO2 product, running with its latest GA release \n\ +which is under the Apache License, Version 2.0. \n\ +Read more about Apache License, Version 2.0 here @ http://www.apache.org/licenses/LICENSE-2.0.\n\n"' + +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' +ENV JAVA_VERSION jdk-11.0.14+9 + +# create the non-root user and group and set MOTD login message +RUN \ + groupadd --system -g ${USER_GROUP_ID} ${USER_GROUP} \ + && useradd --system --create-home --home-dir ${USER_HOME} --no-log-init -g ${USER_GROUP_ID} -u ${USER_ID} ${USER} \ + && echo ${MOTD} > /etc/profile.d/motd.sh + +# copy init script to user home +COPY --chown=wso2carbon:wso2 docker-entrypoint.sh ${USER_HOME}/ +# install required packages +RUN \ + yum -y update \ + && yum install -y \ + tzdata openssl ca-certificates fontconfig gzip tar \ + nc \ + unzip \ + wget \ + zip \ + && yum clean all \ + && rm -rf /var/cache/yum/* + +# install OpenJDK +RUN set -eux; \ + ARCH="$(objdump="$(command -v objdump)" && objdump --file-headers "$objdump" | awk -F '[:,]+[[:space:]]+' '$1 == "architecture" { print $2 }')"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='0ba188a2a739733163cd0049344429d2284867e04ca452879be24f3b54320c9a'; \ + BINARY_URL='https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.14%2B9/OpenJDK11U-jdk_aarch64_linux_hotspot_11.0.14_9.tar.gz'; \ + ;; \ + ppc64el|powerpc:common64) \ + ESUM='91c63331faba8c842aef312d415b3e67aecf4f662a36c275f5cb278f7bce1410'; \ + BINARY_URL='https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.14%2B9/OpenJDK11U-jdk_ppc64le_linux_hotspot_11.0.14_9.tar.gz'; \ + ;; \ + amd64|i386:x86-64) \ + ESUM='1189bee178d11402a690edf3fbba0c9f2ada1d3a36ff78929d81935842ef24a9'; \ + BINARY_URL='https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.14%2B9/OpenJDK11U-jdk_x64_linux_hotspot_11.0.14_9.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" + +RUN chown wso2carbon:wso2 -R ${JAVA_HOME} + +# Verify Java installation +RUN echo Verifying install ... \ + && echo javac --version && javac --version \ + && echo java --version && java --version \ + && echo Complete. + +# add the WSO2 product distribution to user's home directory +RUN \ + wget -O ${WSO2_SERVER}.zip "${WSO2_SERVER_DIST_URL}" \ + && unzip -d ${USER_HOME} ${WSO2_SERVER}.zip \ + && rm -f ${WSO2_SERVER}.zip \ + && echo "${WSO2_SERVER_PROFILE_OPTIMIZER_NUMBER}" | bash ${WSO2_SERVER_HOME}/bin/profile-creator.sh \ + && rm -rf ${WSO2_SERVER_HOME} \ + && unzip -d ${USER_HOME} ${WSO2_SERVER_HOME}_${WSO2_SERVER_PROFILE_NAME}.zip \ + && chown wso2carbon:wso2 -R ${WSO2_SERVER_HOME} \ + && rm -f ${WSO2_SERVER_HOME}_${WSO2_SERVER_PROFILE_NAME}.zip +# add libraries for Kubernetes membership scheme based clustering +ADD --chown=wso2carbon:wso2 https://repo1.maven.org/maven2/dnsjava/dnsjava/${DNS_JAVA_VERSION}/dnsjava-${DNS_JAVA_VERSION}.jar ${WSO2_SERVER_HOME}/lib +ADD --chown=wso2carbon:wso2 http://maven.wso2.org/nexus/content/repositories/releases/org/wso2/carbon/kubernetes/artifacts/kubernetes-membership-scheme/${K8S_MEMBERSHIP_SCHEME_VERSION}/kubernetes-membership-scheme-${K8S_MEMBERSHIP_SCHEME_VERSION}.jar ${WSO2_SERVER_HOME}/lib + +# set the user and work directory +USER ${USER_ID} +WORKDIR ${USER_HOME} + +# set environment variables +ENV WORKING_DIRECTORY=${USER_HOME} \ + WSO2_SERVER_HOME=${WSO2_SERVER_HOME} + +# expose integrator ports +EXPOSE 8280 8243 9443 4100 + +# initiate container and start WSO2 Carbon server +ENTRYPOINT ["/home/wso2carbon/docker-entrypoint.sh"] diff --git a/dockerfiles/rocky/integrator/README.md b/dockerfiles/rocky/integrator/README.md new file mode 100644 index 00000000..af8f7fa6 --- /dev/null +++ b/dockerfiles/rocky/integrator/README.md @@ -0,0 +1,73 @@ +# Dockerfile for Integrator profile of WSO2 Enterprise Integrator # + +This section defines the step-by-step instructions to build a [RockyLinux](https://hub.docker.com/_/rockylinux) based Docker image +Integrator profile for WSO2 Enterprise Integrator 6.6.0. + +## Prerequisites + +* [Docker](https://www.docker.com/get-docker) v17.09.0 or above +* [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) client + +## How to build an image and run + +##### 1. Checkout this repository into your local machine using the following Git client command and checkout branch v6.6.0.1. + +``` +git clone https://github.com/wso2/docker-ei.git +git checkout v6.6.0.1 +``` + +>The local copy of the `dockerfiles/ubuntu/integrator` directory will be referred to as `INTEGRATOR_DOCKERFILE_HOME` from this point onwards. + +##### 2. Build the Docker image. + +- Navigate to `` directory.
+ Execute `docker build` command as shown below. + + `docker build -t wso2ei-integrator:6.6.0-rocky .` + +> By default, the Docker image will prepackage the General Availability (GA) release version of the relevant WSO2 product. + +##### 3. Running the Docker image. + +- `docker run -p 8280:8280 -p 8243:8243 -p 9443:9443 wso2ei-integrator:6.6.0-rocky` + +##### 4. Accessing management console. + +- To access the management console, use the docker host IP and port 9443. + + `https::9443/carbon` + +>In here, refers to hostname or IP of the host machine on top of which containers are spawned. + +## How to update configurations + +Configurations would lie on the Docker host machine and they can be volume mounted to the container.
+As an example, steps required to change the port offset using `carbon.xml` is as follows: + +##### 1. Stop the Integrator profile container if it's already running. + +In Integrator profile product distribution, `carbon.xml` configuration file can be found at `/conf`. +Copy the file to some suitable location of the host machine, referred to as `/carbon.xml` and +increase the offset value under ports by 1 + +##### 2. Grant read permission to `other` users for `/carbon.xml`. + +``` +chmod o+r /carbon.xml +``` + +##### 3. Run the image by mounting the file to container as follows: + +``` +docker run \ +-p 9443:9443 \ +--volume /carbon.xml:/carbon.xml \ +wso2ei-integrator:6.6.0-rocky +``` + +>In here, refers to /home/wso2carbon/wso2ei-6.6.0/conf folder of the container. + +## Docker command usage references + +* [Docker build command reference](https://docs.docker.com/engine/reference/commandline/build/) +* [Docker run command reference](https://docs.docker.com/engine/reference/run/) +* [Dockerfile reference](https://docs.docker.com/engine/reference/builder/) diff --git a/dockerfiles/rocky/integrator/docker-entrypoint.sh b/dockerfiles/rocky/integrator/docker-entrypoint.sh new file mode 100755 index 00000000..d2330ea3 --- /dev/null +++ b/dockerfiles/rocky/integrator/docker-entrypoint.sh @@ -0,0 +1,36 @@ +#!/bin/bash +# ------------------------------------------------------------------------ +# Copyright 2024 WSO2, LLC. (http://wso2.com) +# +# Licensed 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 + +# volume mounts +config_volume=${WORKING_DIRECTORY}/wso2-config-volume +artifact_volume=${WORKING_DIRECTORY}/wso2-artifact-volume + +# check if the WSO2 non-root user home exists +test ! -d ${WORKING_DIRECTORY} && echo "WSO2 Docker non-root user home does not exist" && exit 1 + +# check if the WSO2 product home exists +test ! -d ${WSO2_SERVER_HOME} && echo "WSO2 Docker product home does not exist" && exit 1 + +# copy any configuration changes mounted to config_volume +test -d ${config_volume} && [[ "$(ls -A ${config_volume})" ]] && cp -RL ${config_volume}/* ${WSO2_SERVER_HOME}/ +# copy any artifact changes mounted to artifact_volume +test -d ${artifact_volume} && [[ "$(ls -A ${artifact_volume})" ]] && cp -RL ${artifact_volume}/* ${WSO2_SERVER_HOME}/ + +# start WSO2 Carbon server +sh ${WSO2_SERVER_HOME}/bin/integrator.sh "$@" diff --git a/dockerfiles/ubuntu/analytics/dashboard/Dockerfile b/dockerfiles/ubuntu/analytics/dashboard/Dockerfile index b741fc17..34e85e49 100644 --- a/dockerfiles/ubuntu/analytics/dashboard/Dockerfile +++ b/dockerfiles/ubuntu/analytics/dashboard/Dockerfile @@ -76,7 +76,7 @@ RUN echo Verifying install ... \ && echo Complete. LABEL maintainer="WSO2 Docker Maintainers " \ - com.wso2.docker.source="https://github.com/wso2/docker-ei/releases/tag/v6.6.0.7" + com.wso2.docker.source="https://github.com/wso2/docker-ei/releases/tag/v6.6.0.8" # set Docker image build arguments # build arguments for user/group configurations diff --git a/dockerfiles/ubuntu/analytics/worker/Dockerfile b/dockerfiles/ubuntu/analytics/worker/Dockerfile index 8a568a76..285786fb 100644 --- a/dockerfiles/ubuntu/analytics/worker/Dockerfile +++ b/dockerfiles/ubuntu/analytics/worker/Dockerfile @@ -76,7 +76,7 @@ RUN echo Verifying install ... \ && echo Complete. LABEL maintainer="WSO2 Docker Maintainers " \ - com.wso2.docker.source="https://github.com/wso2/docker-ei/releases/tag/v6.6.0.7" + com.wso2.docker.source="https://github.com/wso2/docker-ei/releases/tag/v6.6.0.8" # set Docker image build arguments # build arguments for user/group configurations diff --git a/dockerfiles/ubuntu/broker/Dockerfile b/dockerfiles/ubuntu/broker/Dockerfile index cf0ef18c..4f799287 100644 --- a/dockerfiles/ubuntu/broker/Dockerfile +++ b/dockerfiles/ubuntu/broker/Dockerfile @@ -19,7 +19,7 @@ # set base Docker image to AdoptOpenJDK Ubuntu Docker image FROM adoptopenjdk:11.0.5_10-jdk-hotspot-bionic LABEL maintainer="WSO2 Docker Maintainers " \ - com.wso2.docker.source="https://github.com/wso2/docker-ei/releases/tag/v6.6.0.7" + com.wso2.docker.source="https://github.com/wso2/docker-ei/releases/tag/v6.6.0.8" # set Docker image build arguments # build arguments for user/group configurations diff --git a/dockerfiles/ubuntu/business-process/Dockerfile b/dockerfiles/ubuntu/business-process/Dockerfile index a92ffa0f..8076b26b 100644 --- a/dockerfiles/ubuntu/business-process/Dockerfile +++ b/dockerfiles/ubuntu/business-process/Dockerfile @@ -19,7 +19,7 @@ # set base Docker image to AdoptOpenJDK Ubuntu Docker image FROM adoptopenjdk:11.0.5_10-jdk-hotspot-bionic LABEL maintainer="WSO2 Docker Maintainers " \ - com.wso2.docker.source="https://github.com/wso2/docker-ei/releases/tag/v6.6.0.7" + com.wso2.docker.source="https://github.com/wso2/docker-ei/releases/tag/v6.6.0.8" # set Docker image build arguments # build arguments for user/group configurations diff --git a/dockerfiles/ubuntu/integrator/Dockerfile b/dockerfiles/ubuntu/integrator/Dockerfile index 04355c48..95185ee4 100644 --- a/dockerfiles/ubuntu/integrator/Dockerfile +++ b/dockerfiles/ubuntu/integrator/Dockerfile @@ -76,7 +76,7 @@ RUN echo Verifying install ... \ && echo Complete. LABEL maintainer="WSO2 Docker Maintainers " \ - com.wso2.docker.source="https://github.com/wso2/docker-ei/releases/tag/v6.6.0.7" + com.wso2.docker.source="https://github.com/wso2/docker-ei/releases/tag/v6.6.0.8" # set Docker image build arguments # build arguments for user/group configurations