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 2020/07/12 02:57:04 UTC
[skywalking-docker] 25/45: Save changes
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 b6989daf4f03dc1562fd76e1ac0ab929ac7962a8
Author: Gao Hongtao <ha...@gmail.com>
AuthorDate: Mon Aug 12 13:05:49 2019 +0800
Save changes
---
6/6.3/base/Dockerfile | 4 +--
6/6.3/compose/docker-compose.yml | 4 +--
6/6.3/oap/Dockerfile | 2 +-
6/6.3/oap/README.md | 13 +++++++---
6/6.3/oap/docker-entrypoint.sh | 56 ++++++++++++++++++++++++++++++++++++----
6/6.3/ui/Dockerfile | 2 +-
6/6.3/ui/README.md | 2 +-
7 files changed, 68 insertions(+), 15 deletions(-)
diff --git a/6/6.3/base/Dockerfile b/6/6.3/base/Dockerfile
index 35aa9eb..714be4b 100644
--- a/6/6.3/base/Dockerfile
+++ b/6/6.3/base/Dockerfile
@@ -30,8 +30,8 @@ RUN mkdir -p "${SKYWALKING_HOME}"
WORKDIR $SKYWALKING_HOME
ENV GPG_KEYS A968F6905E0ACB59E5B24C15D3D9CD50820184C2 B0801BC746F965029A1338072EF5026E70A55777 D360AB2AB20B28403270E2CBE8608938DB25E06B
-ENV SKYWALKING_VERSION=6.2.0
-ENV SKYWALKING_SHA512 753cd9cfeca258cb31355be9c6f8d7e234a488b29b20d1f0e8b3c89c404bcf4fce49fa825c5cb674a42d56e8dc3947b9592b3c8d96c82df84b3926eb341481a6
+ENV SKYWALKING_VERSION=6.3.0
+ENV SKYWALKING_SHA512 55e31f2ea163d8a4616e993332409f0c1faa09ebb1494332631e8ac4590b5ffdfa3fa0cba4d670ba50f9c4c90a8354abe6ef836ccbb23589f95022809e51cef9
ENV SKYWALKING_TGZ_URLS \
https://www.apache.org/dyn/closer.cgi?action=download&filename=skywalking/$SKYWALKING_VERSION/apache-skywalking-apm-$SKYWALKING_VERSION.tar.gz \
diff --git a/6/6.3/compose/docker-compose.yml b/6/6.3/compose/docker-compose.yml
index 7b8b887..a7a3a97 100644
--- a/6/6.3/compose/docker-compose.yml
+++ b/6/6.3/compose/docker-compose.yml
@@ -32,7 +32,7 @@ services:
soft: -1
hard: -1
oap:
- image: apache/skywalking-oap-server:6.2.0
+ image: apache/skywalking-oap-server:6.3.0
container_name: oap
depends_on:
- elasticsearch
@@ -46,7 +46,7 @@ services:
SW_STORAGE: elasticsearch
SW_STORAGE_ES_CLUSTER_NODES: elasticsearch:9200
ui:
- image: apache/skywalking-ui:6.2.0
+ image: apache/skywalking-ui:6.3.0
container_name: ui
depends_on:
- oap
diff --git a/6/6.3/oap/Dockerfile b/6/6.3/oap/Dockerfile
index f265acc..c5d2cf9 100644
--- a/6/6.3/oap/Dockerfile
+++ b/6/6.3/oap/Dockerfile
@@ -14,7 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-FROM apache/skywalking-base:6.2.0 AS build
+FROM apache/skywalking-base:6.3.0 AS build
WORKDIR skywalking
diff --git a/6/6.3/oap/README.md b/6/6.3/oap/README.md
index d41402c..c062478 100644
--- a/6/6.3/oap/README.md
+++ b/6/6.3/oap/README.md
@@ -10,18 +10,18 @@ microservices, cloud native and container-based (Docker, Kubernetes, Mesos) arch
## Start a `standlone` container with `H2` storage
```
-$ docker run --name oap --restart always -d apache/skywalking-oap-server:6.2.0
+$ docker run --name oap --restart always -d apache/skywalking-oap-server:6.3.0
```
## 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:6.2.0
+$ docker run --name oap --restart always -d -e SW_STORAGE=elasticsearch -e SW_STORAGE_ES_CLUSTER_NODES=elasticsearch:9200 apache/skywalking-oap-server:6.3.0
```
# Configuration
-We could set up environment variables to configure this image. Most of them are defined in [backend-setup](https://github.com/apache/skywalking/blob/v6.2.0/docs/en/setup/backend/backend-setup.md), but Apache SkyWalking Docker Image adds extra environment variables to help the user to compose it properly. The details are located in [docker-entrypoint.sh](docker-entrypoint.sh)
+We could set up environment variables to configure this image. Most of them are defined in [backend-setup](https://github.com/apache/skywalking/blob/v6.3.0/docs/en/setup/backend/backend-setup.md), but Apache SkyWalking Docker Image adds extra environment variables to help the user to compose it properly. The details are located in [docker-entrypoint.sh](docker-entrypoint.sh)
## SW_CLUSTER
Default value is `standalone`, avaliable values are:
@@ -46,6 +46,13 @@ Default value is `none`, avaliable values are:
- `apollo`, If set this value, all enviroment variables of `configuration.apollo` in `application.yml` are avaliable.
- `nacos`, If set this value, all enviroment variables of `configuration.nacos` in `application.yml` are avaliable.
- `zookeeper`, If set this value, all enviroment variables of `configuration.zookeeper` in `application.yml` are avaliable.
+
+## SW_TELEMETRY
+Default value is `none`, avaliable values are:
+
+ - `none`, If set this value, all enviroment variables of `telemetry.none` in `application.yml` are avaliable.
+ - `prometheus`, If set this value, all enviroment variables of `configuration.prometheus` in `application.yml` are avaliable.
+ - `so11y`, If set this value, all enviroment variables of `configuration.so11y` in `application.yml` are avaliable.
## XXX_ENABLED
diff --git a/6/6.3/oap/docker-entrypoint.sh b/6/6.3/oap/docker-entrypoint.sh
index 5897b00..931299a 100644
--- a/6/6.3/oap/docker-entrypoint.sh
+++ b/6/6.3/oap/docker-entrypoint.sh
@@ -83,6 +83,7 @@ storage:
elasticsearch:
nameSpace: \${SW_NAMESPACE:""}
clusterNodes: \${SW_STORAGE_ES_CLUSTER_NODES:localhost:9200}
+ protocol: \${SW_STORAGE_ES_HTTP_PROTOCOL:"http"}
user: \${SW_ES_USER:""}
password: \${SW_ES_PASSWORD:""}
indexShardsNumber: \${SW_STORAGE_ES_INDEX_SHARDS_NUMBER:2}
@@ -169,6 +170,32 @@ configuration:
EOT
}
+generateTelemetryNone() {
+ cat <<EOT >> ${var_application_file}
+telemetry:
+ none:
+EOT
+}
+
+generateTelemetryPrometheus() {
+ cat <<EOT >> ${var_application_file}
+telemetry:
+ prometheus:
+ host: \${SW_TELEMETRY_PROMETHEUS_HOST:0.0.0.0}
+ port: \${SW_TELEMETRY_PROMETHEUS_PORT:1234}
+EOT
+}
+
+generateTelemetrySo11y() {
+ cat <<EOT >> ${var_application_file}
+telemetry:
+ so11y:
+ prometheusExporterEnabled: \${SW_TELEMETRY_SO11Y_PROMETHEUS_ENABLED:true}
+ prometheusExporterHost: \${SW_TELEMETRY_PROMETHEUS_HOST:0.0.0.0}
+ prometheusExporterPort: \${SW_TELEMETRY_PROMETHEUS_PORT:1234}
+EOT
+}
+
validateVariables() {
name=$1; value=$2; list=$3
valid=false
@@ -187,7 +214,8 @@ validateVariables() {
generateApplicationYaml() {
# validate
[[ -z "$SW_CLUSTER" ]] && [[ -z "$SW_STORAGE" ]] && [[ -z "$SW_CONFIGURATION" ]] \
- && { echo "Error: please specify \"SW_CLUSTER\" \"SW_STORAGE\" \"SW_CONFIGURATION\""; exit 1; }
+ && [[ -z "$SW_TELEMETRY" ]] \
+ && { echo "Error: please specify \"SW_CLUSTER\" \"SW_STORAGE\" \"SW_CONFIGURATION\" \"SW_TELEMETRY\""; exit 1; }
validateVariables "SW_CLUSTER" "$SW_CLUSTER" "standalone zookeeper kubernetes consul etcd nacos"
@@ -195,6 +223,8 @@ generateApplicationYaml() {
validateVariables "SW_CONFIGURATION" "$SW_CONFIGURATION" "none apollo nacos zookeeper"
+ validateVariables "SW_TELEMETRY" "$SW_TELEMETRY" "none prometheus so11y"
+
echo "# Generated by 'docker-entrypoint.sh'" > ${var_application_file}
#generate cluster
case ${SW_CLUSTER} in
@@ -230,6 +260,9 @@ core:
hourMetricsDataTTL: \${SW_CORE_HOUR_METRIC_DATA_TTL:36} # Unit is hour
dayMetricsDataTTL: \${SW_CORE_DAY_METRIC_DATA_TTL:45} # Unit is day
monthMetricsDataTTL: \${SW_CORE_MONTH_METRIC_DATA_TTL:18} # Unit is month
+ # Cache metric data for 1 minute to reduce database queries, and if the OAP cluster changes within that minute,
+ # the metrics may not be accurate within that minute.
+ enableDatabaseSession: \${SW_CORE_ENABLE_DATABASE_SESSION:true}
EOT
# generate storage
@@ -256,6 +289,8 @@ receiver-jvm:
default:
receiver-clr:
default:
+receiver-so11y:
+ default:
service-mesh:
default:
bufferPath: \${SW_SERVICE_MESH_BUFFER_PATH:../mesh-buffer/} # Path to trace buffer files, suggest to use absolute path
@@ -269,11 +304,14 @@ query:
path: \${SW_QUERY_GRAPHQL_PATH:/graphql}
alarm:
default:
-telemetry:
- prometheus:
- host: \${SW_TELEMETRY_PROMETHEUS_HOST:0.0.0.0}
- port: \${SW_TELEMETRY_PROMETHEUS_PORT:1234}
EOT
+ # generate telemetry
+ case ${SW_TELEMETRY} in
+ none) generateTelemetryNone;;
+ prometheus) generateTelemetryPrometheus;;
+ so11y) generateTelemetrySo11y;;
+ esac
+
# generate configuration
case ${SW_CONFIGURATION} in
none) generateConfigurationNone;;
@@ -311,6 +349,13 @@ receiver_jaeger:
EOT
fi
+ if [[ "$SW_TELEMETRY" = "so11y" ]]; then
+ cat <<EOT >> ${var_application_file}
+receiver-so11y:
+ default:
+EOT
+ fi
+
if [[ "$SW_EXPORTER_ENABLED" = "true" ]]; then
cat <<EOT >> ${var_application_file}
exporter:
@@ -326,6 +371,7 @@ echo "[Entrypoint] Apache SkyWalking Docker Image"
SW_CLUSTER=${SW_CLUSTER:-standalone}
SW_STORAGE=${SW_STORAGE:-h2}
SW_CONFIGURATION=${SW_CONFIGURATION:-none}
+SW_TELEMETRY=${SW_TELEMETRY:-none}
if [[ -z "$SW_L0AD_CONFIG_FILE_FROM_VOLUME" ]] || [[ "$SW_L0AD_CONFIG_FILE_FROM_VOLUME" != "true" ]]; then
generateApplicationYaml
diff --git a/6/6.3/ui/Dockerfile b/6/6.3/ui/Dockerfile
index aab7cb1..110f296 100644
--- a/6/6.3/ui/Dockerfile
+++ b/6/6.3/ui/Dockerfile
@@ -14,7 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-FROM apache/skywalking-base:6.2.0 AS build
+FROM apache/skywalking-base:6.3.0 AS build
WORKDIR skywalking
diff --git a/6/6.3/ui/README.md b/6/6.3/ui/README.md
index 1941256..b902d57 100644
--- a/6/6.3/ui/README.md
+++ b/6/6.3/ui/README.md
@@ -21,7 +21,7 @@ This image would start up SkyWalking UI only.
## 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:6.2.0
+$ docker run --name oap --restart always -d -e SW_OAP_ADDRESS=oap:12800 apache/skywalking-ui:6.3.0
```
# Configuration