From 600102f36f71fcc5c3bdc53705832246ce06ae3c Mon Sep 17 00:00:00 2001 From: Savidude Date: Fri, 11 Oct 2019 14:36:19 +0530 Subject: [PATCH] Remove Identity Server analytics --- CHANGELOG.md | 2 +- README.md | 4 +- .../alpine/is-analytics/dashboard/Dockerfile | 78 --------------- .../alpine/is-analytics/dashboard/README.md | 72 -------------- .../dashboard/docker-entrypoint.sh | 36 ------- .../alpine/is-analytics/worker/Dockerfile | 78 --------------- .../alpine/is-analytics/worker/README.md | 68 ------------- .../is-analytics/worker/docker-entrypoint.sh | 36 ------- .../centos/is-analytics/dashboard/Dockerfile | 95 ------------------- .../centos/is-analytics/dashboard/README.md | 72 -------------- .../dashboard/docker-entrypoint.sh | 36 ------- .../centos/is-analytics/worker/Dockerfile | 95 ------------------- .../centos/is-analytics/worker/README.md | 68 ------------- .../is-analytics/worker/docker-entrypoint.sh | 36 ------- .../ubuntu/is-analytics/dashboard/Dockerfile | 83 ---------------- .../ubuntu/is-analytics/dashboard/README.md | 72 -------------- .../dashboard/docker-entrypoint.sh | 36 ------- .../ubuntu/is-analytics/worker/Dockerfile | 83 ---------------- .../ubuntu/is-analytics/worker/README.md | 68 ------------- .../is-analytics/worker/docker-entrypoint.sh | 36 ------- 20 files changed, 3 insertions(+), 1151 deletions(-) delete mode 100755 dockerfiles/alpine/is-analytics/dashboard/Dockerfile delete mode 100755 dockerfiles/alpine/is-analytics/dashboard/README.md delete mode 100755 dockerfiles/alpine/is-analytics/dashboard/docker-entrypoint.sh delete mode 100755 dockerfiles/alpine/is-analytics/worker/Dockerfile delete mode 100755 dockerfiles/alpine/is-analytics/worker/README.md delete mode 100755 dockerfiles/alpine/is-analytics/worker/docker-entrypoint.sh delete mode 100755 dockerfiles/centos/is-analytics/dashboard/Dockerfile delete mode 100755 dockerfiles/centos/is-analytics/dashboard/README.md delete mode 100755 dockerfiles/centos/is-analytics/dashboard/docker-entrypoint.sh delete mode 100755 dockerfiles/centos/is-analytics/worker/Dockerfile delete mode 100755 dockerfiles/centos/is-analytics/worker/README.md delete mode 100755 dockerfiles/centos/is-analytics/worker/docker-entrypoint.sh delete mode 100755 dockerfiles/ubuntu/is-analytics/dashboard/Dockerfile delete mode 100755 dockerfiles/ubuntu/is-analytics/dashboard/README.md delete mode 100755 dockerfiles/ubuntu/is-analytics/dashboard/docker-entrypoint.sh delete mode 100755 dockerfiles/ubuntu/is-analytics/worker/Dockerfile delete mode 100755 dockerfiles/ubuntu/is-analytics/worker/README.md delete mode 100755 dockerfiles/ubuntu/is-analytics/worker/docker-entrypoint.sh diff --git a/CHANGELOG.md b/CHANGELOG.md index 882ef4d7..4fd98125 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ## [v5.9.0.1] - 2019-10-11 ### Added -- Per profile Docker resources of WSO2 Identity Server and Analytics v5.9.x for Alpine, CentOS and Ubuntu +- Per profile Docker resources of WSO2 Identity Server v5.9.x for Alpine, CentOS and Ubuntu - Docker Compose resources for WSO2 Identity And Access Management (IAM) deployment patterns ### Changed diff --git a/README.md b/README.md index a0489561..3fbfaf21 100644 --- a/README.md +++ b/README.md @@ -2,10 +2,10 @@ This repository contains following Docker resources: -- Per profile Docker resources of WSO2 Identity Server and Analytics v5.9.x for Alpine, CentOS, Ubuntu +- Per profile Docker resources of WSO2 Identity Server v5.9.x for Alpine, CentOS, Ubuntu - Docker Compose resources to evaluate most common Identity And Access Management (IAM) deployment patterns -Per profile Docker resources for WSO2 Identity Server and Analytics help you build generic Docker images for deploying the +Per profile Docker resources for WSO2 Identity Server help you build generic Docker images for deploying the corresponding product servers in containerized environments. Each Docker image includes the JDK, the relevant product distribution and a collection of utility libraries. Configurations, custom JDBC drivers other than the default MySQL JDBC driver provided, extensions and other deployable artifacts are designed to be provided via volume mounts to the containers spawned. diff --git a/dockerfiles/alpine/is-analytics/dashboard/Dockerfile b/dockerfiles/alpine/is-analytics/dashboard/Dockerfile deleted file mode 100755 index aba91ff5..00000000 --- a/dockerfiles/alpine/is-analytics/dashboard/Dockerfile +++ /dev/null @@ -1,78 +0,0 @@ -# ------------------------------------------------------------------------ -# -# Copyright 2018 WSO2, Inc. (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 AdoptOpenJDK Alpine Docker image -FROM adoptopenjdk/openjdk8:jdk8u222-b10-alpine -LABEL maintainer="WSO2 Docker Maintainers " - -# 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=wso2is-analytics -ARG WSO2_SERVER_VERSION=5.9.0 -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 MYSQL_CONNECTOR_VERSION=8.0.17 -# 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"' -ENV ENV=${USER_HOME}"/.ashrc" - -# create the non-root user and group and set MOTD login message -RUN \ - addgroup -S -g ${USER_GROUP_ID} ${USER_GROUP} \ - && adduser -S -u ${USER_ID} -h ${USER_HOME} -G ${USER_GROUP} ${USER} \ - && echo ${MOTD} > "${ENV}" - -# copy init script to user home -COPY --chown=wso2carbon:wso2 docker-entrypoint.sh ${USER_HOME}/ -# install required packages -RUN apk add --no-cache netcat-openbsd -# add the WSO2 product distribution to user's home directory -RUN \ - wget --no-check-certificate -O ${WSO2_SERVER}.zip "${WSO2_SERVER_DIST_URL}" \ - && unzip -d ${USER_HOME} ${WSO2_SERVER}.zip \ - && chown wso2carbon:wso2 -R ${WSO2_SERVER_HOME} \ - && rm -f ${WSO2_SERVER}.zip -# add MySQL JDBC connector to server home as a third party library -ADD --chown=wso2carbon:wso2 http://central.maven.org/maven2/mysql/mysql-connector-java/${MYSQL_CONNECTOR_VERSION}/mysql-connector-java-${MYSQL_CONNECTOR_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 ports -EXPOSE 9643 - -# initiate container and start WSO2 Carbon server -ENTRYPOINT ["/home/wso2carbon/docker-entrypoint.sh"] diff --git a/dockerfiles/alpine/is-analytics/dashboard/README.md b/dockerfiles/alpine/is-analytics/dashboard/README.md deleted file mode 100755 index c6f9d7e3..00000000 --- a/dockerfiles/alpine/is-analytics/dashboard/README.md +++ /dev/null @@ -1,72 +0,0 @@ -# Dockerfile for Dashboard Profile of WSO2 Identity Server Analytics # - -This section defines the step-by-step instructions to build [Alpine](https://hub.docker.com/_/alpine/) Linux based Docker image for Dashboard profile of -WSO2 Identity Server Analytics 5.9.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. - -``` -git clone https://github.com/wso2/docker-is.git -``` - -> The local copy of the `dockerfile/alpine/is-analytics/dasboard` 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 wso2is-analytics-dashboard:5.9.0-alpine .` - -> By default, the Docker image will prepackage the General Availability (GA) release version of the relevant WSO2 product. - -##### 3. Running Docker images specific to each profile. - -- `docker run -p 9643:9643 wso2is-analytics-dashboard:5.9.0-alpine` - -##### 4. Accessing the Dashboard portal. - -- For dashboard, - + `https::9643/portal` - -> 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 Identity Server Analytics container if it's already running. - -In WSO2 Identity Server Analytics 5.9.0 product distribution, `deployment.yaml` configuration file
-can be found at `/conf/worker`. Copy the file to some suitable location of the host machine,
-referred to as `/deployment.yaml` and change the offset value under ports to 2. - -##### 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 7713:7713 ---volume /deployment.yaml:/deployment.yaml -wso2is-analytics-worker:5.9.0-alpine -``` - -> In here, refers to /home/wso2carbon/wso2is-analytics-5.9.0/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/alpine/is-analytics/dashboard/docker-entrypoint.sh b/dockerfiles/alpine/is-analytics/dashboard/docker-entrypoint.sh deleted file mode 100755 index e55e35b0..00000000 --- a/dockerfiles/alpine/is-analytics/dashboard/docker-entrypoint.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/sh -# ------------------------------------------------------------------------ -# Copyright 2018 WSO2, Inc. (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/dashboard.sh "$@" diff --git a/dockerfiles/alpine/is-analytics/worker/Dockerfile b/dockerfiles/alpine/is-analytics/worker/Dockerfile deleted file mode 100755 index 79c410f8..00000000 --- a/dockerfiles/alpine/is-analytics/worker/Dockerfile +++ /dev/null @@ -1,78 +0,0 @@ -# ------------------------------------------------------------------------ -# -# Copyright 2018 WSO2, Inc. (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 AdoptOpenJDK Alpine Docker image -FROM adoptopenjdk/openjdk8:jdk8u222-b10-alpine -LABEL maintainer="WSO2 Docker Maintainers " - -# 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=wso2is-analytics -ARG WSO2_SERVER_VERSION=5.9.0 -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 MYSQL_CONNECTOR_VERSION=8.0.17 -# 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"' -ENV ENV=${USER_HOME}"/.ashrc" - -# create the non-root user and group and set MOTD login message -RUN \ - addgroup -S -g ${USER_GROUP_ID} ${USER_GROUP} \ - && adduser -S -u ${USER_ID} -h ${USER_HOME} -G ${USER_GROUP} ${USER} \ - && echo ${MOTD} > "${ENV}" - -# copy init script to user home -COPY --chown=wso2carbon:wso2 docker-entrypoint.sh ${USER_HOME}/ -# install required packages -RUN apk add --no-cache netcat-openbsd -# add the WSO2 product distribution to user's home directory -RUN \ - wget --no-check-certificate -O ${WSO2_SERVER}.zip "${WSO2_SERVER_DIST_URL}" \ - && unzip -d ${USER_HOME} ${WSO2_SERVER}.zip \ - && chown wso2carbon:wso2 -R ${WSO2_SERVER_HOME} \ - && rm -f ${WSO2_SERVER}.zip -# add MySQL JDBC connector to server home as a third party library -ADD --chown=wso2carbon:wso2 http://central.maven.org/maven2/mysql/mysql-connector-java/${MYSQL_CONNECTOR_VERSION}/mysql-connector-java-${MYSQL_CONNECTOR_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 ports -EXPOSE 9090 9091 9443 7712 7612 9612 9712 - -# initiate container and start WSO2 Carbon server -ENTRYPOINT ["/home/wso2carbon/docker-entrypoint.sh"] diff --git a/dockerfiles/alpine/is-analytics/worker/README.md b/dockerfiles/alpine/is-analytics/worker/README.md deleted file mode 100755 index 71675a20..00000000 --- a/dockerfiles/alpine/is-analytics/worker/README.md +++ /dev/null @@ -1,68 +0,0 @@ -# Dockerfile for Worker Profile of WSO2 Identity Server Analytics # - -This section defines the step-by-step instructions to build [Alpine](https://hub.docker.com/_/alpine/) Linux based Docker image for Worker profile of -WSO2 Identity Server Analytics 5.9.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. - -``` -git clone https://github.com/wso2/docker-is.git -``` - -> The local copy of the `dockerfile/alpine/is-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 wso2is-analytics-worker:5.9.0-alpine .` - -> By default, the Docker image will prepackage the General Availability (GA) release version of the relevant WSO2 product. - -##### 3. Running Docker images specific to each profile. - -- `docker run -p 9090:9090 -p 9091:9091 wso2is-analytics-worker:5.9.0-alpine` - ->Here, only port 9090 and 9091 have been mapped to Docker host ports. -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 Identity Server Analytics container if it's already running. - -In WSO2 Identity Server Analytics 5.9.0 product distribution, `deployment.yaml` configuration file
-can be found at `/conf/worker`. Copy the file to some suitable location of the host machine,
-referred to as `/deployment.yaml` and change the offset value under ports to 2. - -##### 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 7713:7713 ---volume /deployment.yaml:/deployment.yaml -wso2is-analytics-worker:5.9.0-alpine -``` - -> In here, refers to /home/wso2carbon/wso2is-analytics-5.9.0/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/alpine/is-analytics/worker/docker-entrypoint.sh b/dockerfiles/alpine/is-analytics/worker/docker-entrypoint.sh deleted file mode 100755 index dd29dc83..00000000 --- a/dockerfiles/alpine/is-analytics/worker/docker-entrypoint.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/sh -# ------------------------------------------------------------------------ -# Copyright 2018 WSO2, Inc. (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/worker.sh "$@" diff --git a/dockerfiles/centos/is-analytics/dashboard/Dockerfile b/dockerfiles/centos/is-analytics/dashboard/Dockerfile deleted file mode 100755 index 1028ff4c..00000000 --- a/dockerfiles/centos/is-analytics/dashboard/Dockerfile +++ /dev/null @@ -1,95 +0,0 @@ -# ------------------------------------------------------------------------ -# -# Copyright 2018 WSO2, Inc. (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 latest CentOS Docker image -FROM centos:7 -LABEL maintainer="WSO2 Docker Maintainers " - -# 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=wso2is-analytics -ARG WSO2_SERVER_VERSION=5.9.0 -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 MYSQL_CONNECTOR_VERSION=8.0.17 -# 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 \ - && rm -rf /var/cache/yum/* -# install AdoptOpenJDK HotSpot -RUN \ - mkdir -p ${JAVA_HOME} \ - && wget -O OpenJDK8U-jdk_x64_linux_hotspot.tar.gz https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u222-b10/OpenJDK8U-jdk_x64_linux_hotspot_8u222b10.tar.gz \ - && echo "37356281345b93feb4212e6267109b4409b55b06f107619dde4960e402bafa77 OpenJDK8U-jdk_x64_linux_hotspot.tar.gz" | sha256sum -c - \ - && tar -xf OpenJDK8U-jdk_x64_linux_hotspot.tar.gz -C ${JAVA_HOME} --strip-components=1 \ - && chown wso2carbon:wso2 -R ${JAVA_HOME} \ - && rm -f OpenJDK8U-jdk_x64_linux_hotspot.tar.gz -# add the WSO2 product distribution to user's home directory -RUN \ - wget --no-check-certificate -O ${WSO2_SERVER}.zip "${WSO2_SERVER_DIST_URL}" \ - && unzip -d ${USER_HOME} ${WSO2_SERVER}.zip \ - && chown wso2carbon:wso2 -R ${WSO2_SERVER_HOME} \ - && rm -f ${WSO2_SERVER}.zip -# add MySQL JDBC connector to server home as a third party library -ADD --chown=wso2carbon:wso2 http://central.maven.org/maven2/mysql/mysql-connector-java/${MYSQL_CONNECTOR_VERSION}/mysql-connector-java-${MYSQL_CONNECTOR_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 ports -EXPOSE 9643 - -# initiate container and start WSO2 Carbon server -ENTRYPOINT ["/home/wso2carbon/docker-entrypoint.sh"] diff --git a/dockerfiles/centos/is-analytics/dashboard/README.md b/dockerfiles/centos/is-analytics/dashboard/README.md deleted file mode 100755 index 431c742f..00000000 --- a/dockerfiles/centos/is-analytics/dashboard/README.md +++ /dev/null @@ -1,72 +0,0 @@ -# Dockerfile for Dashboard Profile of WSO2 Identity Server Analytics # - -This section defines the step-by-step instructions to build [CentOS](https://hub.docker.com/_/centos/) Linux based Docker image for Dashboard profile of -WSO2 Identity Server Analytics 5.9.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. - -``` -git clone https://github.com/wso2/docker-is.git -``` - -> The local copy of the `dockerfile/centos/is-analytics/dasboard` 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 wso2is-analytics-dashboard:5.9.0-centos .` - -> By default, the Docker image will prepackage the General Availability (GA) release version of the relevant WSO2 product. - -##### 3. Running Docker images specific to each profile. - -- `docker run -p 9643:9643 wso2is-analytics-dashboard:5.9.0-centos` - -##### 4. Accessing the Dashboard portal. - -- For dashboard, - + `https::9643/portal` - -> 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 Identity Server Analytics container if it's already running. - -In WSO2 Identity Server Analytics 5.9.0 product distribution, `deployment.yaml` configuration file
-can be found at `/conf/worker`. Copy the file to some suitable location of the host machine,
-referred to as `/deployment.yaml` and change the offset value under ports to 2. - -##### 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 7713:7713 ---volume /deployment.yaml:/deployment.yaml -wso2is-analytics-worker:5.9.0-centos -``` - -> In here, refers to /home/wso2carbon/wso2is-analytics-5.9.0/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/centos/is-analytics/dashboard/docker-entrypoint.sh b/dockerfiles/centos/is-analytics/dashboard/docker-entrypoint.sh deleted file mode 100755 index e55e35b0..00000000 --- a/dockerfiles/centos/is-analytics/dashboard/docker-entrypoint.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/sh -# ------------------------------------------------------------------------ -# Copyright 2018 WSO2, Inc. (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/dashboard.sh "$@" diff --git a/dockerfiles/centos/is-analytics/worker/Dockerfile b/dockerfiles/centos/is-analytics/worker/Dockerfile deleted file mode 100755 index be2e2a98..00000000 --- a/dockerfiles/centos/is-analytics/worker/Dockerfile +++ /dev/null @@ -1,95 +0,0 @@ -# ------------------------------------------------------------------------ -# -# Copyright 2018 WSO2, Inc. (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 latest CentOS Docker image -FROM centos:7 -LABEL maintainer="WSO2 Docker Maintainers " - -# 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=wso2is-analytics -ARG WSO2_SERVER_VERSION=5.9.0 -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 MYSQL_CONNECTOR_VERSION=8.0.17 -# 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 \ - && rm -rf /var/cache/yum/* -# install AdoptOpenJDK HotSpot -RUN \ - mkdir -p ${JAVA_HOME} \ - && wget -O OpenJDK8U-jdk_x64_linux_hotspot.tar.gz https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u222-b10/OpenJDK8U-jdk_x64_linux_hotspot_8u222b10.tar.gz \ - && echo "37356281345b93feb4212e6267109b4409b55b06f107619dde4960e402bafa77 OpenJDK8U-jdk_x64_linux_hotspot.tar.gz" | sha256sum -c - \ - && tar -xf OpenJDK8U-jdk_x64_linux_hotspot.tar.gz -C ${JAVA_HOME} --strip-components=1 \ - && chown wso2carbon:wso2 -R ${JAVA_HOME} \ - && rm -f OpenJDK8U-jdk_x64_linux_hotspot.tar.gz -# add the WSO2 product distribution to user's home directory -RUN \ - wget --no-check-certificate -O ${WSO2_SERVER}.zip "${WSO2_SERVER_DIST_URL}" \ - && unzip -d ${USER_HOME} ${WSO2_SERVER}.zip \ - && chown wso2carbon:wso2 -R ${WSO2_SERVER_HOME} \ - && rm -f ${WSO2_SERVER}.zip -# add MySQL JDBC connector to server home as a third party library -ADD --chown=wso2carbon:wso2 http://central.maven.org/maven2/mysql/mysql-connector-java/${MYSQL_CONNECTOR_VERSION}/mysql-connector-java-${MYSQL_CONNECTOR_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 ports -EXPOSE 9090 9091 9443 7712 7612 9612 9712 - -# initiate container and start WSO2 Carbon server -ENTRYPOINT ["/home/wso2carbon/docker-entrypoint.sh"] diff --git a/dockerfiles/centos/is-analytics/worker/README.md b/dockerfiles/centos/is-analytics/worker/README.md deleted file mode 100755 index bd680ee8..00000000 --- a/dockerfiles/centos/is-analytics/worker/README.md +++ /dev/null @@ -1,68 +0,0 @@ -# Dockerfile for Worker Profile of WSO2 Identity Server Analytics # - -This section defines the step-by-step instructions to build [CentOS](https://hub.docker.com/_/centos/) Linux based Docker image for Worker profile of -WSO2 Identity Server Analytics 5.9.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. - -``` -git clone https://github.com/wso2/docker-is.git -``` - -> The local copy of the `dockerfile/centos/is-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 wso2is-analytics-worker:5.9.0-centos .` - -> By default, the Docker image will prepackage the General Availability (GA) release version of the relevant WSO2 product. - -##### 3. Running Docker images specific to each profile. - -- `docker run -p 9090:9090 -p 9091:9091 wso2is-analytics-worker:5.9.0-centos` - ->Here, only port 9090 and 9091 have been mapped to Docker host ports. -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 Identity Server Analytics container if it's already running. - -In WSO2 Identity Server Analytics 5.9.0 product distribution, `deployment.yaml` configuration file
-can be found at `/conf/worker`. Copy the file to some suitable location of the host machine,
-referred to as `/deployment.yaml` and change the offset value under ports to 2. - -##### 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 7713:7713 ---volume /deployment.yaml:/deployment.yaml -wso2is-analytics-worker:5.9.0-centos -``` - -> In here, refers to /home/wso2carbon/wso2is-analytics-5.9.0/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/centos/is-analytics/worker/docker-entrypoint.sh b/dockerfiles/centos/is-analytics/worker/docker-entrypoint.sh deleted file mode 100755 index dd29dc83..00000000 --- a/dockerfiles/centos/is-analytics/worker/docker-entrypoint.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/sh -# ------------------------------------------------------------------------ -# Copyright 2018 WSO2, Inc. (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/worker.sh "$@" diff --git a/dockerfiles/ubuntu/is-analytics/dashboard/Dockerfile b/dockerfiles/ubuntu/is-analytics/dashboard/Dockerfile deleted file mode 100755 index ffc64b13..00000000 --- a/dockerfiles/ubuntu/is-analytics/dashboard/Dockerfile +++ /dev/null @@ -1,83 +0,0 @@ -# ------------------------------------------------------------------------ -# -# Copyright 2018 WSO2, Inc. (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 AdoptOpenJDK Ubuntu Docker image -FROM adoptopenjdk:8u222-b10-jdk-hotspot -LABEL maintainer="WSO2 Docker Maintainers " - -# 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=wso2is-analytics -ARG WSO2_SERVER_VERSION=5.9.0 -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 MYSQL_CONNECTOR_VERSION=8.0.17 -# build argument for MOTD -ARG MOTD="\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" - -# 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 '[ ! -z "${TERM}" -a -r /etc/motd ] && cat /etc/motd' >> /etc/bash.bashrc; echo "${MOTD}" > /etc/motd - -# copy init script to user home -COPY --chown=wso2carbon:wso2 docker-entrypoint.sh ${USER_HOME}/ -# install required packages -RUN \ - apt-get update \ - && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ - netcat \ - unzip \ - wget \ - && rm -rf /var/lib/apt/lists/* -# add the WSO2 product distribution to user's home directory -RUN \ - wget --no-check-certificate -O ${WSO2_SERVER}.zip "${WSO2_SERVER_DIST_URL}" \ - && unzip -d ${USER_HOME} ${WSO2_SERVER}.zip \ - && chown wso2carbon:wso2 -R ${WSO2_SERVER_HOME} \ - && rm -f ${WSO2_SERVER}.zip -# add MySQL JDBC connector to server home as a third party library -ADD --chown=wso2carbon:wso2 http://central.maven.org/maven2/mysql/mysql-connector-java/${MYSQL_CONNECTOR_VERSION}/mysql-connector-java-${MYSQL_CONNECTOR_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 ports -EXPOSE 9643 - -# initiate container and start WSO2 Carbon server -ENTRYPOINT ["/home/wso2carbon/docker-entrypoint.sh"] diff --git a/dockerfiles/ubuntu/is-analytics/dashboard/README.md b/dockerfiles/ubuntu/is-analytics/dashboard/README.md deleted file mode 100755 index 7e96368c..00000000 --- a/dockerfiles/ubuntu/is-analytics/dashboard/README.md +++ /dev/null @@ -1,72 +0,0 @@ -# Dockerfile for Dashboard Profile of WSO2 Identity Server Analytics # - -This section defines the step-by-step instructions to build [Ubuntu](https://hub.docker.com/_/ubuntu/) Linux based Docker image for Dashboard profile of -WSO2 Identity Server Analytics 5.9.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. - -``` -git clone https://github.com/wso2/docker-is.git -``` - -> The local copy of the `dockerfile/ubuntu/is-analytics/dasboard` 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 wso2is-analytics-dashboard:5.9.0 .` - -> By default, the Docker image will prepackage the General Availability (GA) release version of the relevant WSO2 product. - -##### 3. Running Docker images specific to each profile. - -- `docker run -p 9643:9643 wso2is-analytics-dashboard:5.9.0` - -##### 4. Accessing the Dashboard portal. - -- For dashboard, - + `https::9643/portal` - -> 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 Identity Server Analytics container if it's already running. - -In WSO2 Identity Server Analytics 5.9.0 product distribution, `deployment.yaml` configuration file
-can be found at `/conf/worker`. Copy the file to some suitable location of the host machine,
-referred to as `/deployment.yaml` and change the offset value under ports to 2. - -##### 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 7713:7713 ---volume /deployment.yaml:/deployment.yaml -wso2is-analytics-worker:5.9.0 -``` - -> In here, refers to /home/wso2carbon/wso2is-analytics-5.9.0/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/ubuntu/is-analytics/dashboard/docker-entrypoint.sh b/dockerfiles/ubuntu/is-analytics/dashboard/docker-entrypoint.sh deleted file mode 100755 index e55e35b0..00000000 --- a/dockerfiles/ubuntu/is-analytics/dashboard/docker-entrypoint.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/sh -# ------------------------------------------------------------------------ -# Copyright 2018 WSO2, Inc. (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/dashboard.sh "$@" diff --git a/dockerfiles/ubuntu/is-analytics/worker/Dockerfile b/dockerfiles/ubuntu/is-analytics/worker/Dockerfile deleted file mode 100755 index 0050530c..00000000 --- a/dockerfiles/ubuntu/is-analytics/worker/Dockerfile +++ /dev/null @@ -1,83 +0,0 @@ -# ------------------------------------------------------------------------ -# -# Copyright 2018 WSO2, Inc. (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 AdoptOpenJDK Ubuntu Docker image -FROM adoptopenjdk:8u222-b10-jdk-hotspot -LABEL maintainer="WSO2 Docker Maintainers " - -# 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=wso2is-analytics -ARG WSO2_SERVER_VERSION=5.9.0 -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 MYSQL_CONNECTOR_VERSION=8.0.17 -# build argument for MOTD -ARG MOTD="\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" - -# 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 '[ ! -z "${TERM}" -a -r /etc/motd ] && cat /etc/motd' >> /etc/bash.bashrc; echo "${MOTD}" > /etc/motd - -# copy init script to user home -COPY --chown=wso2carbon:wso2 docker-entrypoint.sh ${USER_HOME}/ -# install required packages -RUN \ - apt-get update \ - && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ - netcat \ - unzip \ - wget \ - && rm -rf /var/lib/apt/lists/* -# add the WSO2 product distribution to user's home directory -RUN \ - wget --no-check-certificate -O ${WSO2_SERVER}.zip "${WSO2_SERVER_DIST_URL}" \ - && unzip -d ${USER_HOME} ${WSO2_SERVER}.zip \ - && chown wso2carbon:wso2 -R ${WSO2_SERVER_HOME} \ - && rm -f ${WSO2_SERVER}.zip -# add MySQL JDBC connector to server home as a third party library -ADD --chown=wso2carbon:wso2 http://central.maven.org/maven2/mysql/mysql-connector-java/${MYSQL_CONNECTOR_VERSION}/mysql-connector-java-${MYSQL_CONNECTOR_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 ports -EXPOSE 9090 9091 7712 7612 9612 9712 - -# initiate container and start WSO2 Carbon server -ENTRYPOINT ["/home/wso2carbon/docker-entrypoint.sh"] diff --git a/dockerfiles/ubuntu/is-analytics/worker/README.md b/dockerfiles/ubuntu/is-analytics/worker/README.md deleted file mode 100755 index 80d33a7e..00000000 --- a/dockerfiles/ubuntu/is-analytics/worker/README.md +++ /dev/null @@ -1,68 +0,0 @@ -# Dockerfile for Worker Profile of WSO2 Identity Server Analytics # - -This section defines the step-by-step instructions to build [Ubuntu](https://hub.docker.com/_/ubuntu/) Linux based Docker image for Worker profile of -WSO2 Identity Server Analytics 5.9.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. - -``` -git clone https://github.com/wso2/docker-is.git -``` - -> The local copy of the `dockerfile/ubuntu/is-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 wso2is-analytics-worker:5.9.0 .` - -> By default, the Docker image will prepackage the General Availability (GA) release version of the relevant WSO2 product. - -##### 3. Running Docker images specific to each profile. - -- `docker run -p 9090:9090 -p 9091:9091 wso2is-analytics-worker:5.9.0` - ->Here, only port 9090 and 9091 have been mapped to Docker host ports. -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 Identity Server Analytics container if it's already running. - -In WSO2 Identity Server Analytics 5.9.0 product distribution, `deployment.yaml` configuration file
-can be found at `/conf/worker`. Copy the file to some suitable location of the host machine,
-referred to as `/deployment.yaml` and change the offset value under ports to 2. - -##### 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 7713:7713 ---volume /deployment.yaml:/deployment.yaml -wso2is-analytics-worker:5.9.0 -``` - -> In here, refers to /home/wso2carbon/wso2is-analytics-5.9.0/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/ubuntu/is-analytics/worker/docker-entrypoint.sh b/dockerfiles/ubuntu/is-analytics/worker/docker-entrypoint.sh deleted file mode 100755 index dd29dc83..00000000 --- a/dockerfiles/ubuntu/is-analytics/worker/docker-entrypoint.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/sh -# ------------------------------------------------------------------------ -# Copyright 2018 WSO2, Inc. (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/worker.sh "$@"