This is an automated email from the ASF dual-hosted git repository. wusheng pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/skywalking-docker.git
commit 2e4d53b42be918c88c2086b2431d48b23bd4627c Author: Gao Hongtao <[email protected]> AuthorDate: Mon Mar 23 04:21:00 2020 +0000 Add 7.0.0 Signed-off-by: Gao Hongtao <[email protected]> --- 7/7.0/base-es7/Dockerfile | 97 ++++++++++++++++++++++++++++++++++++ 7/7.0/base/Dockerfile | 97 ++++++++++++++++++++++++++++++++++++ 7/7.0/compose-es7/docker-compose.yml | 58 +++++++++++++++++++++ 7/7.0/compose/docker-compose.yml | 68 +++++++++++++++++++++++++ 7/7.0/oap-es7/Dockerfile | 45 +++++++++++++++++ 7/7.0/oap-es7/README.md | 39 +++++++++++++++ 7/7.0/oap-es7/docker-entrypoint.sh | 54 ++++++++++++++++++++ 7/7.0/oap-es7/log4j2.xml | 31 ++++++++++++ 7/7.0/oap/Dockerfile | 45 +++++++++++++++++ 7/7.0/oap/README.md | 39 +++++++++++++++ 7/7.0/oap/docker-entrypoint.sh | 54 ++++++++++++++++++++ 7/7.0/oap/log4j2.xml | 31 ++++++++++++ 7/7.0/ui/Dockerfile | 45 +++++++++++++++++ 7/7.0/ui/README.md | 38 ++++++++++++++ 7/7.0/ui/docker-entrypoint.sh | 26 ++++++++++ 7/7.0/ui/logback.xml | 21 ++++++++ 16 files changed, 788 insertions(+) diff --git a/7/7.0/base-es7/Dockerfile b/7/7.0/base-es7/Dockerfile new file mode 100644 index 0000000..1ab377d --- /dev/null +++ b/7/7.0/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="[email protected]" + +# 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=7.0.0 +ENV SKYWALKING_SHA512 3f1f5335aa934b66bb571346873a2979d0ab877fcf8960a86fc4579b9716a21b4be198d401c7b163c838ee71a11bd3255660cce9d8e58ef79bcdaa7c5dc26c92 + +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/7/7.0/base/Dockerfile b/7/7.0/base/Dockerfile new file mode 100644 index 0000000..d236522 --- /dev/null +++ b/7/7.0/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="[email protected]" + +# 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=7.0.0 +ENV SKYWALKING_SHA512 5d0af4cda02968ca9e2b7df2ab8477a8f69c435e935bcb9f2ad4e7eae3481ada88bf7a8e9ab0959a6d24475bcb727654fee5156b10723297051183667d5a24db + +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/7/7.0/compose-es7/docker-compose.yml b/7/7.0/compose-es7/docker-compose.yml new file mode 100644 index 0000000..3c0fcb2 --- /dev/null +++ b/7/7.0/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:7.0.0-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:7.0.0 + container_name: ui + depends_on: + - oap + links: + - oap + restart: always + ports: + - 8080:8080 + environment: + SW_OAP_ADDRESS: oap:12800 diff --git a/7/7.0/compose/docker-compose.yml b/7/7.0/compose/docker-compose.yml new file mode 100644 index 0000000..67ca88f --- /dev/null +++ b/7/7.0/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:7.0.0-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:7.0.0 + 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/7/7.0/oap-es7/Dockerfile b/7/7.0/oap-es7/Dockerfile new file mode 100644 index 0000000..00a2a94 --- /dev/null +++ b/7/7.0/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:7.0.0-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="[email protected]" + +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/7/7.0/oap-es7/README.md b/7/7.0/oap-es7/README.md new file mode 100644 index 0000000..3744cc9 --- /dev/null +++ b/7/7.0/oap-es7/README.md @@ -0,0 +1,39 @@ +# Apache SkyWalking OAP Server Docker Files + +<img src="http://skywalking.apache.org/assets/logo.svg" alt="Sky Walking logo" height="90px" align="right" /> + +**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:7.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:7.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/v7.0.0/docs/en/setup/backend/backend-setup.md). The whole default value of those configruation items is stored in dist [application.yml](https://github.com/apache/skywalking/blob/v7.0.0/dist-material/application.yml) + +# 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/7/7.0/oap-es7/docker-entrypoint.sh b/7/7.0/oap-es7/docker-entrypoint.sh new file mode 100644 index 0000000..cbdbe20 --- /dev/null +++ b/7/7.0/oap-es7/docker-entrypoint.sh @@ -0,0 +1,54 @@ +# 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 + +if [[ "$SW_TELEMETRY" = "so11y" ]]; then + export SW_RECEIVER_SO11Y=default + echo "Set SW_RECEIVER_SO11Y to ${SW_RECEIVER_SO11Y}" +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/7/7.0/oap-es7/log4j2.xml b/7/7.0/oap-es7/log4j2.xml new file mode 100644 index 0000000..89c8112 --- /dev/null +++ b/7/7.0/oap-es7/log4j2.xml @@ -0,0 +1,31 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + ~ 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. + ~ + --> + +<Configuration status="INFO"> + <Appenders> + <Console name="Console" target="SYSTEM_OUT"> + <PatternLayout charset="UTF-8" pattern="%d - %c -%-4r [%t] %-5p %x - %m%n"/> + </Console> + </Appenders> + <Loggers> + <Root level="INFO"> + <AppenderRef ref="Console"/> + </Root> + </Loggers> +</Configuration> \ No newline at end of file diff --git a/7/7.0/oap/Dockerfile b/7/7.0/oap/Dockerfile new file mode 100644 index 0000000..e22fa3f --- /dev/null +++ b/7/7.0/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:7.0.0-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="[email protected]" + +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/7/7.0/oap/README.md b/7/7.0/oap/README.md new file mode 100644 index 0000000..350c391 --- /dev/null +++ b/7/7.0/oap/README.md @@ -0,0 +1,39 @@ +# Apache SkyWalking OAP Server Docker Files + +<img src="http://skywalking.apache.org/assets/logo.svg" alt="Sky Walking logo" height="90px" align="right" /> + +**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:7.0.0-es6 +``` + +## 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:7.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/v7.0.0/docs/en/setup/backend/backend-setup.md). The whole default value of those configruation items is stored in dist [application.yml](https://github.com/apache/skywalking/blob/v7.0.0/dist-material/application.yml) + +# 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/7/7.0/oap/docker-entrypoint.sh b/7/7.0/oap/docker-entrypoint.sh new file mode 100644 index 0000000..37363ea --- /dev/null +++ b/7/7.0/oap/docker-entrypoint.sh @@ -0,0 +1,54 @@ +# 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 + +if [[ "$SW_TELEMETRY" = "so11y" ]]; then + export SW_RECEIVER_SO11Y=default + echo "Set SW_RECEIVER_SO11Y to ${SW_RECEIVER_SO11Y}" +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/7/7.0/oap/log4j2.xml b/7/7.0/oap/log4j2.xml new file mode 100644 index 0000000..89c8112 --- /dev/null +++ b/7/7.0/oap/log4j2.xml @@ -0,0 +1,31 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + ~ 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. + ~ + --> + +<Configuration status="INFO"> + <Appenders> + <Console name="Console" target="SYSTEM_OUT"> + <PatternLayout charset="UTF-8" pattern="%d - %c -%-4r [%t] %-5p %x - %m%n"/> + </Console> + </Appenders> + <Loggers> + <Root level="INFO"> + <AppenderRef ref="Console"/> + </Root> + </Loggers> +</Configuration> \ No newline at end of file diff --git a/7/7.0/ui/Dockerfile b/7/7.0/ui/Dockerfile new file mode 100644 index 0000000..950afac --- /dev/null +++ b/7/7.0/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:7.0.0-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="[email protected]" + +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/7/7.0/ui/README.md b/7/7.0/ui/README.md new file mode 100644 index 0000000..43233ed --- /dev/null +++ b/7/7.0/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** + +<img src="http://skywalking.apache.org/assets/logo.svg" alt="Sky Walking logo" height="90px" align="right" /> + +**SkyWalking**: an APM(application performance monitor) system, especially designed for +microservices, cloud native and container-based (Docker, Kubernetes, Mesos) architectures. + +[](https://github.com/apache/incubator-skywalking) +[](https://twitter.com/AsfSkyWalking) + +You could find docker file at [here](https://github.com/apache/incubator-skywalking-docker) + +This image would start up SkyWalking UI only. + +[SkyWalking K8s deployment scripts](https://github.com/apache/incubator-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:7.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/7/7.0/ui/docker-entrypoint.sh b/7/7.0/ui/docker-entrypoint.sh new file mode 100644 index 0000000..6771e22 --- /dev/null +++ b/7/7.0/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/7/7.0/ui/logback.xml b/7/7.0/ui/logback.xml new file mode 100644 index 0000000..834036d --- /dev/null +++ b/7/7.0/ui/logback.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + ~ 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. + ~ + --> +<configuration> + <include resource="org/springframework/boot/logging/logback/base.xml" /> +</configuration> \ No newline at end of file
