From bca9f4fe71d4d00c3e84536c099aed854eefd9c9 Mon Sep 17 00:00:00 2001 From: JaredTan95 Date: Sat, 20 Jun 2020 19:50:47 +0800 Subject: [PATCH] support 8.0.1 docker image. --- 8/8.0.1/base-es7/Dockerfile | 97 ++++++++++++++++++++++++++ 8/8.0.1/base/Dockerfile | 97 ++++++++++++++++++++++++++ 8/8.0.1/compose-es7/docker-compose.yml | 58 +++++++++++++++ 8/8.0.1/compose/docker-compose.yml | 68 ++++++++++++++++++ 8/8.0.1/oap-es7/Dockerfile | 45 ++++++++++++ 8/8.0.1/oap-es7/README.md | 39 +++++++++++ 8/8.0.1/oap-es7/docker-entrypoint.sh | 49 +++++++++++++ 8/8.0.1/oap-es7/log4j2.xml | 31 ++++++++ 8/8.0.1/oap/Dockerfile | 45 ++++++++++++ 8/8.0.1/oap/README.md | 39 +++++++++++ 8/8.0.1/oap/docker-entrypoint.sh | 49 +++++++++++++ 8/8.0.1/oap/log4j2.xml | 31 ++++++++ 8/8.0.1/ui/Dockerfile | 45 ++++++++++++ 8/8.0.1/ui/README.md | 38 ++++++++++ 8/8.0.1/ui/docker-entrypoint.sh | 26 +++++++ 8/8.0.1/ui/logback.xml | 21 ++++++ 16 files changed, 778 insertions(+) create mode 100644 8/8.0.1/base-es7/Dockerfile create mode 100644 8/8.0.1/base/Dockerfile create mode 100644 8/8.0.1/compose-es7/docker-compose.yml create mode 100644 8/8.0.1/compose/docker-compose.yml create mode 100644 8/8.0.1/oap-es7/Dockerfile create mode 100644 8/8.0.1/oap-es7/README.md create mode 100644 8/8.0.1/oap-es7/docker-entrypoint.sh create mode 100644 8/8.0.1/oap-es7/log4j2.xml create mode 100644 8/8.0.1/oap/Dockerfile create mode 100644 8/8.0.1/oap/README.md create mode 100644 8/8.0.1/oap/docker-entrypoint.sh create mode 100644 8/8.0.1/oap/log4j2.xml create mode 100644 8/8.0.1/ui/Dockerfile create mode 100644 8/8.0.1/ui/README.md create mode 100644 8/8.0.1/ui/docker-entrypoint.sh create mode 100644 8/8.0.1/ui/logback.xml diff --git a/8/8.0.1/base-es7/Dockerfile b/8/8.0.1/base-es7/Dockerfile new file mode 100644 index 0000000..b027968 --- /dev/null +++ b/8/8.0.1/base-es7/Dockerfile @@ -0,0 +1,97 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +FROM openjdk:8-jre-alpine AS build + +LABEL maintainer="tanjian@apache.org" + +# Install required packages +RUN apk add --no-cache \ + bash \ + python \ + su-exec + + +ENV SKYWALKING_HOME=/skywalking +RUN mkdir -p "${SKYWALKING_HOME}" +WORKDIR $SKYWALKING_HOME + +ENV GPG_KEYS A968F6905E0ACB59E5B24C15D3D9CD50820184C2 B0801BC746F965029A1338072EF5026E70A55777 D360AB2AB20B28403270E2CBE8608938DB25E06B +ENV SKYWALKING_VERSION=8.0.1 +ENV SKYWALKING_SHA512 b8dc0a05aed7678a18b04039f0769137283974a1a3d648a8f4c988d6aec132edae1ac8e6c6bfa06742069392ae6af67358530bce19a3897ecbb84969a80f948c + +ENV SKYWALKING_TGZ_URLS \ + https://www.apache.org/dyn/closer.cgi?action=download&filename=skywalking/$SKYWALKING_VERSION/apache-skywalking-apm-es7-$SKYWALKING_VERSION.tar.gz \ + # if the version is outdated, we might have to pull from the dist/archive :/ + https://www-us.apache.org/dist/skywalking/$SKYWALKING_VERSION/apache-skywalking-apm-es7-$SKYWALKING_VERSION.tar.gz \ + https://www.apache.org/dist/skywalking/$SKYWALKING_VERSION/apache-skywalking-apm-es7-$SKYWALKING_VERSION.tar.gz \ + https://archive.apache.org/dist/skywalking/$SKYWALKING_VERSION/apache-skywalking-apm-es7-$SKYWALKING_VERSION.tar.gz + +ENV SKYWALKING_ASC_URLS \ + https://www.apache.org/dyn/closer.cgi?action=download&filename=skywalking/$SKYWALKING_VERSION/apache-skywalking-apm-es7-$SKYWALKING_VERSION.tar.gz.asc \ + # if the version is outdated, we might have to pull from the dist/archive :/ + https://www-us.apache.org/dist/skywalking/$SKYWALKING_VERSION/apache-skywalking-apm-es7-$SKYWALKING_VERSION.tar.gz.asc \ + https://www.apache.org/dist/skywalking/$SKYWALKING_VERSION/apache-skywalking-apm-es7-$SKYWALKING_VERSION.tar.gz.asc \ + https://archive.apache.org/dist/skywalking/$SKYWALKING_VERSION/apache-skywalking-apm-es7-$SKYWALKING_VERSION.tar.gz.asc + +RUN set -eux; \ + \ + apk add --no-cache --virtual .fetch-deps \ + gnupg \ + \ + ca-certificates \ + openssl \ + ; \ + \ + export GNUPGHOME="$(mktemp -d)"; \ + for key in $GPG_KEYS; do \ + gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \ + done; \ + \ + success=; \ + for url in $SKYWALKING_TGZ_URLS; do \ + if wget -O skywalking.tar.gz "$url"; then \ + success=1; \ + break; \ + fi; \ + done; \ + [ -n "$success" ]; \ + \ + echo "$SKYWALKING_SHA512 *skywalking.tar.gz" | sha512sum -c -; \ + \ + success=; \ + for url in $SKYWALKING_ASC_URLS; do \ + if wget -O skywalking.tar.gz.asc "$url"; then \ + success=1; \ + break; \ + fi; \ + done; \ + [ -n "$success" ]; \ + \ + gpg --batch --verify skywalking.tar.gz.asc skywalking.tar.gz; \ + tar -xvf skywalking.tar.gz --strip-components=1; \ + rm -rf bin/; \ + rm skywalking.tar.gz*; \ + command -v gpgconf && gpgconf --kill all || :; \ + rm -rf "$GNUPGHOME"; \ + apk del .fetch-deps + +FROM openjdk:8-jre-alpine + +COPY --from=build /skywalking /skywalking + +RUN apk add --no-cache \ + bash \ No newline at end of file diff --git a/8/8.0.1/base/Dockerfile b/8/8.0.1/base/Dockerfile new file mode 100644 index 0000000..e1be661 --- /dev/null +++ b/8/8.0.1/base/Dockerfile @@ -0,0 +1,97 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +FROM openjdk:8-jre-alpine AS build + +LABEL maintainer="tanjian@apache.org" + +# Install required packages +RUN apk add --no-cache \ + bash \ + python \ + su-exec + + +ENV SKYWALKING_HOME=/skywalking +RUN mkdir -p "${SKYWALKING_HOME}" +WORKDIR $SKYWALKING_HOME + +ENV GPG_KEYS A968F6905E0ACB59E5B24C15D3D9CD50820184C2 B0801BC746F965029A1338072EF5026E70A55777 D360AB2AB20B28403270E2CBE8608938DB25E06B +ENV SKYWALKING_VERSION=8.0.1 +ENV SKYWALKING_SHA512 6ca42f7958a482e3a5fe4e5cca25758cfca1bdebc296ea409b5eef64529c070c4d5f658d0345701e70c9ea68fe1019d495b339bbaa95cdd6044acd66b127acd3 + +ENV SKYWALKING_TGZ_URLS \ + https://www.apache.org/dyn/closer.cgi?action=download&filename=skywalking/$SKYWALKING_VERSION/apache-skywalking-apm-$SKYWALKING_VERSION.tar.gz \ + # if the version is outdated, we might have to pull from the dist/archive :/ + https://www-us.apache.org/dist/skywalking/$SKYWALKING_VERSION/apache-skywalking-apm-$SKYWALKING_VERSION.tar.gz \ + https://www.apache.org/dist/skywalking/$SKYWALKING_VERSION/apache-skywalking-apm-$SKYWALKING_VERSION.tar.gz \ + https://archive.apache.org/dist/skywalking/$SKYWALKING_VERSION/apache-skywalking-apm-$SKYWALKING_VERSION.tar.gz + +ENV SKYWALKING_ASC_URLS \ + https://www.apache.org/dyn/closer.cgi?action=download&filename=skywalking/$SKYWALKING_VERSION/apache-skywalking-apm-$SKYWALKING_VERSION.tar.gz.asc \ + # if the version is outdated, we might have to pull from the dist/archive :/ + https://www-us.apache.org/dist/skywalking/$SKYWALKING_VERSION/apache-skywalking-apm-$SKYWALKING_VERSION.tar.gz.asc \ + https://www.apache.org/dist/skywalking/$SKYWALKING_VERSION/apache-skywalking-apm-$SKYWALKING_VERSION.tar.gz.asc \ + https://archive.apache.org/dist/skywalking/$SKYWALKING_VERSION/apache-skywalking-apm-$SKYWALKING_VERSION.tar.gz.asc + +RUN set -eux; \ + \ + apk add --no-cache --virtual .fetch-deps \ + gnupg \ + \ + ca-certificates \ + openssl \ + ; \ + \ + export GNUPGHOME="$(mktemp -d)"; \ + for key in $GPG_KEYS; do \ + gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \ + done; \ + \ + success=; \ + for url in $SKYWALKING_TGZ_URLS; do \ + if wget -O skywalking.tar.gz "$url"; then \ + success=1; \ + break; \ + fi; \ + done; \ + [ -n "$success" ]; \ + \ + echo "$SKYWALKING_SHA512 *skywalking.tar.gz" | sha512sum -c -; \ + \ + success=; \ + for url in $SKYWALKING_ASC_URLS; do \ + if wget -O skywalking.tar.gz.asc "$url"; then \ + success=1; \ + break; \ + fi; \ + done; \ + [ -n "$success" ]; \ + \ + gpg --batch --verify skywalking.tar.gz.asc skywalking.tar.gz; \ + tar -xvf skywalking.tar.gz --strip-components=1; \ + rm -rf bin/; \ + rm skywalking.tar.gz*; \ + command -v gpgconf && gpgconf --kill all || :; \ + rm -rf "$GNUPGHOME"; \ + apk del .fetch-deps + +FROM openjdk:8-jre-alpine + +COPY --from=build /skywalking /skywalking + +RUN apk add --no-cache \ + bash \ No newline at end of file diff --git a/8/8.0.1/compose-es7/docker-compose.yml b/8/8.0.1/compose-es7/docker-compose.yml new file mode 100644 index 0000000..18604b2 --- /dev/null +++ b/8/8.0.1/compose-es7/docker-compose.yml @@ -0,0 +1,58 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +version: '3.3' +services: + elasticsearch: + image: docker.elastic.co/elasticsearch/elasticsearch:7.5.0 + container_name: elasticsearch + restart: always + ports: + - 9200:9200 + environment: + - discovery.type=single-node + - bootstrap.memory_lock=true + - "ES_JAVA_OPTS=-Xms512m -Xmx512m" + ulimits: + memlock: + soft: -1 + hard: -1 + oap: + image: apache/skywalking-oap-server:8.0.1-es7 + container_name: oap + depends_on: + - elasticsearch + links: + - elasticsearch + restart: always + ports: + - 11800:11800 + - 12800:12800 + environment: + SW_STORAGE: elasticsearch7 + SW_STORAGE_ES_CLUSTER_NODES: elasticsearch:9200 + ui: + image: apache/skywalking-ui:8.0.1 + container_name: ui + depends_on: + - oap + links: + - oap + restart: always + ports: + - 8080:8080 + environment: + SW_OAP_ADDRESS: oap:12800 diff --git a/8/8.0.1/compose/docker-compose.yml b/8/8.0.1/compose/docker-compose.yml new file mode 100644 index 0000000..a8c2613 --- /dev/null +++ b/8/8.0.1/compose/docker-compose.yml @@ -0,0 +1,68 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +version: '3.3' +services: + elasticsearch: + image: docker.elastic.co/elasticsearch/elasticsearch:6.8.6 + container_name: elasticsearch + restart: always + ports: + - 9200:9200 + - 9300:9300 + environment: + - discovery.type=single-node + - bootstrap.memory_lock=true + - "ES_JAVA_OPTS=-Xms4096m -Xmx4096m" + - thread_pool.write.queue_size=1000 + - thread_pool.index.queue_size=1000 + ulimits: + memlock: + soft: -1 + hard: -1 + volumes: + - data:/usr/share/elasticsearch/data + oap: + image: apache/skywalking-oap-server:8.0.1-es6 + container_name: oap + depends_on: + - elasticsearch + links: + - elasticsearch + restart: always + ports: + - 11800:11800 + - 12800:12800 + environment: + SW_STORAGE: elasticsearch + SW_STORAGE_ES_CLUSTER_NODES: elasticsearch:9200 + JAVA_OPTS: "-Xms2048m -Xmx2048m" + ui: + image: apache/skywalking-ui:8.0.1 + container_name: ui + depends_on: + - oap + links: + - oap + restart: always + ports: + - 8080:8080 + environment: + SW_OAP_ADDRESS: oap:12800 + +volumes: + data: + driver: local diff --git a/8/8.0.1/oap-es7/Dockerfile b/8/8.0.1/oap-es7/Dockerfile new file mode 100644 index 0000000..c120009 --- /dev/null +++ b/8/8.0.1/oap-es7/Dockerfile @@ -0,0 +1,45 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +FROM apache/skywalking-base:8.0.1-es7 AS build + +WORKDIR skywalking + +RUN set -eux; \ + rm -rf "config/log4j2.xml"; \ + rm -rf "webapp"; rm -rf "agent"; + +COPY log4j2.xml config/ +COPY docker-entrypoint.sh . +RUN mkdir ext-config; \ + mkdir ext-libs; + +FROM openjdk:8-jre-alpine + +ENV JAVA_OPTS=" -Xms256M " + +LABEL maintainer="tanjian@apache.org" + +COPY --from=build /skywalking /skywalking + +WORKDIR skywalking + +RUN apk add --no-cache \ + bash + +EXPOSE 12800 11800 1234 + +ENTRYPOINT ["bash", "docker-entrypoint.sh"] diff --git a/8/8.0.1/oap-es7/README.md b/8/8.0.1/oap-es7/README.md new file mode 100644 index 0000000..9937721 --- /dev/null +++ b/8/8.0.1/oap-es7/README.md @@ -0,0 +1,39 @@ +# Apache SkyWalking OAP Server Docker Files + +Sky Walking logo + +**SkyWalking**: an APM(application performance monitor) system, especially designed for +microservices, cloud native and container-based (Docker, Kubernetes, Mesos) architectures. + +# Notice + +This image can only connect to Elasticsearch **7** when setting `SW_STORAGE`=`elasticsearch`. + +# How to use this image + +## Start a `standlone` container with `H2` storage + +``` +$ docker run --name oap --restart always -d apache/skywalking-oap-server:8.0.0-es7 +``` + +## Start a `standlone` container with `elasticsearch` storage whose address is `elasticsearch:9200` + +``` +$ docker run --name oap --restart always -d -e SW_STORAGE=elasticsearch -e SW_STORAGE_ES_CLUSTER_NODES=elasticsearch:9200 apache/skywalking-oap-server:8.0.0-es7 +``` + +# Configuration + +We could set up environment variables to configure this image. They are defined in [backend-setup](https://github.com/apache/skywalking/blob/v8.0.0/docs/en/setup/backend/backend-setup.md). + +# Extend image + +If you intend to override or add config files in `/skywalking/config`, `/skywalking/ext-config` is the location for you to put extra files. +The files with the same name will be overridden, otherwise, they will be added in `/skywalking/config`. + +If you want to add more libs/jars into the classpath of OAP, for example, new metrics for OAL. These jars can be mounted into `/skywalking/ext-libs`, then +`entrypoint` bash will append them into the classpath. Notice, you can't override an existing jar in classpath. + +# License +[Apache 2.0 License.](/LICENSE) diff --git a/8/8.0.1/oap-es7/docker-entrypoint.sh b/8/8.0.1/oap-es7/docker-entrypoint.sh new file mode 100644 index 0000000..585d9bf --- /dev/null +++ b/8/8.0.1/oap-es7/docker-entrypoint.sh @@ -0,0 +1,49 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +#!/bin/bash + +set -e + +echo "[Entrypoint] Apache SkyWalking Docker Image" + +if [[ "$SW_STORAGE" = "elasticsearch" ]]; then + echo "Current image doesn't Elasticsearch 6" + exit 1 +fi + +EXT_LIB_DIR=/skywalking/ext-libs +EXT_CONFIG_DIR=/skywalking/ext-config + +# Override configuration files +cp -vfR ${EXT_CONFIG_DIR}/* config/ || true + +CLASSPATH="config:$CLASSPATH" +for i in oap-libs/*.jar +do + CLASSPATH="$i:$CLASSPATH" +done +for i in ${EXT_LIB_DIR}/*.jar +do + CLASSPATH="$i:$CLASSPATH" +done + +echo "Configuration files:" +ls -lt /skywalking/config + +set -ex +exec java -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap \ + ${JAVA_OPTS} -classpath ${CLASSPATH} org.apache.skywalking.oap.server.starter.OAPServerStartUp "$@" diff --git a/8/8.0.1/oap-es7/log4j2.xml b/8/8.0.1/oap-es7/log4j2.xml new file mode 100644 index 0000000..89c8112 --- /dev/null +++ b/8/8.0.1/oap-es7/log4j2.xml @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/8/8.0.1/oap/Dockerfile b/8/8.0.1/oap/Dockerfile new file mode 100644 index 0000000..323bfe7 --- /dev/null +++ b/8/8.0.1/oap/Dockerfile @@ -0,0 +1,45 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +FROM apache/skywalking-base:8.0.1-es6 AS build + +WORKDIR skywalking + +RUN set -eux; \ + rm -rf "config/log4j2.xml"; \ + rm -rf "webapp"; rm -rf "agent"; + +COPY log4j2.xml config/ +COPY docker-entrypoint.sh . +RUN mkdir ext-config; \ + mkdir ext-libs; + +FROM openjdk:8-jre-alpine + +ENV JAVA_OPTS=" -Xms256M " + +LABEL maintainer="tanjian@apache.org" + +COPY --from=build /skywalking /skywalking + +WORKDIR skywalking + +RUN apk add --no-cache \ + bash + +EXPOSE 12800 11800 1234 + +ENTRYPOINT ["bash", "docker-entrypoint.sh"] \ No newline at end of file diff --git a/8/8.0.1/oap/README.md b/8/8.0.1/oap/README.md new file mode 100644 index 0000000..bcfdcce --- /dev/null +++ b/8/8.0.1/oap/README.md @@ -0,0 +1,39 @@ +# Apache SkyWalking OAP Server Docker Files + +Sky Walking logo + +**SkyWalking**: an APM(application performance monitor) system, especially designed for +microservices, cloud native and container-based (Docker, Kubernetes, Mesos) architectures. + +# Notice + +This image can only connect to Elasticsearch **6** when setting `SW_STORAGE`=`elasticsearch`. + +# How to use this image + +## Start a `standlone` container with `H2` storage + +``` +$ docker run --name oap --restart always -d apache/skywalking-oap-server:8.0.0-es6 +``` + +## Start a `standlone` container with `elasticsearch7` storage whose address is `elasticsearch:9200` + +``` +$ docker run --name oap --restart always -d -e SW_STORAGE=elasticsearch7 -e SW_STORAGE_ES_CLUSTER_NODES=elasticsearch:9200 apache/skywalking-oap-server:8.0.0-es6 +``` + +# Configuration + +We could set up environment variables to configure this image. They are defined in [backend-setup](https://github.com/apache/skywalking/blob/v8.0.0/docs/en/setup/backend/backend-setup.md). + +# Extend image + +If you intend to override or add config files in `/skywalking/config`, `/skywalking/ext-config` is the location for you to put extra files. +The files with the same name will be overridden, otherwise, they will be added in `/skywalking/config`. + +If you want to add more libs/jars into the classpath of OAP, for example, new metrics for OAL. These jars can be mounted into `/skywalking/ext-libs`, then +`entrypoint` bash will append them into the classpath. Notice, you can't override an existing jar in classpath. + +# License +[Apache 2.0 License.](/LICENSE) diff --git a/8/8.0.1/oap/docker-entrypoint.sh b/8/8.0.1/oap/docker-entrypoint.sh new file mode 100644 index 0000000..a70bfd9 --- /dev/null +++ b/8/8.0.1/oap/docker-entrypoint.sh @@ -0,0 +1,49 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +#!/bin/bash + +set -e + +echo "[Entrypoint] Apache SkyWalking Docker Image" + +if [[ "$SW_STORAGE" = "elasticsearch7" ]]; then + echo "Current image doesn't Elasticsearch 7" + exit 1 +fi + +EXT_LIB_DIR=/skywalking/ext-libs +EXT_CONFIG_DIR=/skywalking/ext-config + +# Override configuration files +cp -vfR ${EXT_CONFIG_DIR}/* config/ || true + +CLASSPATH="config:$CLASSPATH" +for i in oap-libs/*.jar +do + CLASSPATH="$i:$CLASSPATH" +done +for i in ${EXT_LIB_DIR}/*.jar +do + CLASSPATH="$i:$CLASSPATH" +done + +echo "Configuration files:" +ls -lt /skywalking/config + +set -ex +exec java -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap \ + ${JAVA_OPTS} -classpath ${CLASSPATH} org.apache.skywalking.oap.server.starter.OAPServerStartUp "$@" diff --git a/8/8.0.1/oap/log4j2.xml b/8/8.0.1/oap/log4j2.xml new file mode 100644 index 0000000..89c8112 --- /dev/null +++ b/8/8.0.1/oap/log4j2.xml @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/8/8.0.1/ui/Dockerfile b/8/8.0.1/ui/Dockerfile new file mode 100644 index 0000000..07c39a0 --- /dev/null +++ b/8/8.0.1/ui/Dockerfile @@ -0,0 +1,45 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +FROM apache/skywalking-base:8.0.1-es6 AS build + +WORKDIR skywalking + +RUN set -eux; \ + rm -rf "config"; rm -rf "oap-libs"; \ + rm -rf "agent"; + +COPY docker-entrypoint.sh . +COPY logback.xml webapp/ + +FROM openjdk:8-jre-alpine + +ENV JAVA_OPTS=" -Xms256M " \ + SW_OAP_ADDRESS="oap:12800" \ + SW_TIMEOUT="20000" + +LABEL maintainer="tanjian@apache.org" + +COPY --from=build /skywalking /skywalking + +WORKDIR skywalking + +RUN apk add --no-cache \ + bash + +EXPOSE 8080 + +ENTRYPOINT ["bash", "docker-entrypoint.sh"] \ No newline at end of file diff --git a/8/8.0.1/ui/README.md b/8/8.0.1/ui/README.md new file mode 100644 index 0000000..3456cac --- /dev/null +++ b/8/8.0.1/ui/README.md @@ -0,0 +1,38 @@ +# Apache SkyWalking UI docker file + +**Docker images are not official ASF releases but provided for convenience. Recommended usage is always to build the source** + +Sky Walking logo + +**SkyWalking**: an APM(application performance monitor) system, especially designed for +microservices, cloud native and container-based (Docker, Kubernetes, Mesos) architectures. + +[![GitHub stars](https://img.shields.io/github/stars/apache/skywalking.svg?style=for-the-badge&label=Stars&logo=github)](https://github.com/apache/skywalking) +[![Twitter Follow](https://img.shields.io/twitter/follow/asfskywalking.svg?style=for-the-badge&label=Follow&logo=twitter)](https://twitter.com/AsfSkyWalking) + +You could find docker file at [here](https://github.com/apache/skywalking-docker) + +This image would start up SkyWalking UI only. + +[SkyWalking K8s deployment scripts](https://github.com/apache/skywalking-kubernetes) use this image by default. + +# How to use this image + +## Start a container to connect oap server whose address is `oap:12800` + +``` +$ docker run --name oap --restart always -d -e SW_OAP_ADDRESS=oap:12800 apache/skywalking-ui:8.0.0 +``` + +# Configuration + +We could set up environment variables to configure this image. + +## SW_OAP_ADDRESS +The address of OAP server. Default value is `127.0.0.1:12800`. + +## SW_TIMEOUT +Reading timeout. Default value is `20000`(millisecond). + +# License +[Apache 2.0 License.](/LICENSE) \ No newline at end of file diff --git a/8/8.0.1/ui/docker-entrypoint.sh b/8/8.0.1/ui/docker-entrypoint.sh new file mode 100644 index 0000000..6771e22 --- /dev/null +++ b/8/8.0.1/ui/docker-entrypoint.sh @@ -0,0 +1,26 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +#!/bin/bash + +set -e + +export LOGGING_CONFIG="webapp/logback.xml" + +[[ ! -z "$SW_OAP_ADDRESS" ]] && export COLLECTOR_RIBBON_LISTOFSERVERS=${SW_OAP_ADDRESS} && echo "COLLECTOR_RIBBON_LISTOFSERVERS=$COLLECTOR_RIBBON_LISTOFSERVERS" +[[ ! -z "$SW_TIMEOUT" ]] && export COLLECTOR_RIBBON_READTIMEOUT=${SW_TIMEOUT} && echo "COLLECTOR_RIBBON_READTIMEOUT=$COLLECTOR_RIBBON_READTIMEOUT" + +exec java -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap -jar webapp/skywalking-webapp.jar "$@" diff --git a/8/8.0.1/ui/logback.xml b/8/8.0.1/ui/logback.xml new file mode 100644 index 0000000..834036d --- /dev/null +++ b/8/8.0.1/ui/logback.xml @@ -0,0 +1,21 @@ + + + + + \ No newline at end of file -- GitLab