You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by wu...@apache.org on 2021/08/04 07:54:16 UTC
[skywalking-docker] branch master updated: update ui docker enntry
point script. (#22)
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
The following commit(s) were added to refs/heads/master by this push:
new 458d95f update ui docker enntry point script. (#22)
458d95f is described below
commit 458d95f1dbc3c005c6ed83bb05a5218cbd4a0a81
Author: Jared Tan <ji...@daocloud.io>
AuthorDate: Wed Aug 4 15:54:07 2021 +0800
update ui docker enntry point script. (#22)
---
Makefile | 2 +-
compose/.env.es6 | 3 ++-
compose/.env.es7 | 3 ++-
compose/docker-compose.yml | 6 +++---
ui/Dockerfile | 2 +-
ui/README.md | 15 ++++++---------
ui/docker-entrypoint.sh | 11 ++++++++---
7 files changed, 23 insertions(+), 19 deletions(-)
diff --git a/Makefile b/Makefile
index 5dd813e..202222a 100644
--- a/Makefile
+++ b/Makefile
@@ -55,7 +55,7 @@ $(COMPOSE_TARGETS):
@echo "Booting $@"
$(eval imgTag := $(subst compose.,,$@))
pushd $(ROOT)/compose \
- && $(DC) --env-file .env.${imgTag} up \
+ && SW_VERSION=${SW_VERSION} $(DC) --env-file .env.${imgTag} up \
&& popd
$(foreach TGT,$(COMPLEX_BUILD_TARGETS),$(eval push.$(TGT): ;\
diff --git a/compose/.env.es6 b/compose/.env.es6
index 8879a4d..a2ba582 100644
--- a/compose/.env.es6
+++ b/compose/.env.es6
@@ -15,4 +15,5 @@
# limitations under the License.
ES_VERSION=6.8.8
-SW_STORAGE=elasticsearch
\ No newline at end of file
+SW_STORAGE=elasticsearch
+IMAGE_TAG=es6
diff --git a/compose/.env.es7 b/compose/.env.es7
index 1e2ecaa..d2ffb08 100644
--- a/compose/.env.es7
+++ b/compose/.env.es7
@@ -15,4 +15,5 @@
# limitations under the License.
ES_VERSION=7.5.0
-SW_STORAGE=elasticsearch7
\ No newline at end of file
+SW_STORAGE=elasticsearch7
+IMAGE_TAG=es7
diff --git a/compose/docker-compose.yml b/compose/docker-compose.yml
index bc04f4b..2eb19a5 100644
--- a/compose/docker-compose.yml
+++ b/compose/docker-compose.yml
@@ -39,7 +39,7 @@ services:
volumes:
- data:/usr/share/elasticsearch/data
oap:
- image: apache/skywalking-oap-server:8.4.0-es6
+ image: apache/skywalking-oap-server:${SW_VERSION}-${IMAGE_TAG}
container_name: oap
depends_on:
- elasticsearch
@@ -62,7 +62,7 @@ services:
SW_TELEMETRY: prometheus
JAVA_OPTS: "-Xms2048m -Xmx2048m"
ui:
- image: apache/skywalking-ui:8.4.0
+ image: apache/skywalking-ui:${SW_VERSION}
container_name: ui
depends_on:
- oap
@@ -72,7 +72,7 @@ services:
ports:
- 8080:8080
environment:
- SW_OAP_ADDRESS: oap:12800
+ SW_OAP_ADDRESS: http://oap:12800
volumes:
data:
diff --git a/ui/Dockerfile b/ui/Dockerfile
index 85a2b78..a219d49 100644
--- a/ui/Dockerfile
+++ b/ui/Dockerfile
@@ -30,7 +30,7 @@ COPY logback.xml webapp/
FROM adoptopenjdk/openjdk11:alpine
ENV JAVA_OPTS=" -Xms256M " \
- SW_OAP_ADDRESS="oap:12800" \
+ SW_OAP_ADDRESS="http://oap:12800" \
SW_TIMEOUT="20000"
LABEL maintainer="hanahmily@apache.org,tanjian@apache.org"
diff --git a/ui/README.md b/ui/README.md
index 3c92e56..7f4246e 100644
--- a/ui/README.md
+++ b/ui/README.md
@@ -4,7 +4,7 @@
<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
+**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)
@@ -12,16 +12,16 @@ microservices, cloud native and container-based (Docker, Kubernetes, Mesos) arch
You could find docker file at [here](https://github.com/apache/skywalking-docker)
-This image would start up SkyWalking UI only.
+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`
+## Start a container to connect oap server whose address is `http://oap:12800`
```shell
-$ docker run --name oap --restart always -d -e SW_OAP_ADDRESS=oap:12800 apache/skywalking-ui:8.3.0
+$ docker run --name oap --restart always -d -e SW_OAP_ADDRESS=http://oap:12800 apache/skywalking-ui:8.3.0
```
# Configuration
@@ -29,10 +29,7 @@ $ docker run --name oap --restart always -d -e SW_OAP_ADDRESS=oap:12800 apache/s
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).
+The address of OAP server. Default value is `http://127.0.0.1:12800`.
# License
-[Apache 2.0 License.](/LICENSE)
\ No newline at end of file
+[Apache 2.0 License.](/LICENSE)
diff --git a/ui/docker-entrypoint.sh b/ui/docker-entrypoint.sh
index 7d499a4..807bb71 100644
--- a/ui/docker-entrypoint.sh
+++ b/ui/docker-entrypoint.sh
@@ -20,7 +20,12 @@ 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"
+if [[ ! -z "$SW_OAP_ADDRESS" ]]; then
+ address_arr=(${SW_OAP_ADDRESS//,/ })
+ for i in "${!address_arr[@]}"
+ do
+ JAVA_OPTS="${JAVA_OPTS} -Dspring.cloud.discovery.client.simple.instances.oap-service[$i].uri=${address_arr[$i]}"
+ done
+fi
-exec java -jar webapp/skywalking-webapp.jar "$@"
+exec java ${JAVA_OPTS} -jar webapp/skywalking-webapp.jar "$@"