0%

InstallSkyWalking

SetUp

从官方git上下载最新的skywalking的docker目录

由于中国区拉取官方的镜像非常慢,因此把镜像设置成yanliangzhong/elasticsearch6.3.2,并且将data目录挂载出来

修改其中的docker-compose文件:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# "License"); you may not use this file except in compliance
#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: yanliangzhong/elasticsearch6.3.2
container_name: elasticsearch
restart: always
ports:
- 9200:9200
- 9300:9300
environment:
discovery.type: single-node
volumes:
- ./es:/usr/share/elasticsearch/data
oap:
image: skywalking/oap
container_name: oap
depends_on:
- elasticsearch
links:
- elasticsearch
restart: always
ports:
- 11800:11800
- 12800:12800
volumes:
- ./config:/apache-skywalking-apm-incubating/config
ui:
image: skywalking/ui
container_name: ui
depends_on:
- oap
links:
- oap
restart: always
ports:
- 8080:8080
environment:
collector.ribbon.listOfServers: oap:12800

docker的JVM下默认选取的UTC时区,因此还需要手动编译oap的dockerfile,手动设置jvm的时区

在oap的Dockerfile中加上-Duser.timezone=GMT+8

1
2
ENV DIST_NAME=apache-skywalking-apm-incubating \
JAVA_OPTS="-Duser.timezone=GMT+8 -Xms256M -Xmx512M"

最后docker-compose up 访问8080端口就能看到效果了