第一、按照docker docker-compose
第二、安装skywalking数据存储 es
docker run -d --name elasticsearch \ --restart always \ -p 9200:9200 \ -p 9300:9300 \ -e "discovery.type=single-node" \ -e "ES_JAVA_OPTS=-Xms256m -Xmx256m" \ -e "cluster.name=your_cluster_name" \ -e "bootstrap.memory_lock=true" \ -e "xpack.security.enabled=false" \ -v /data/es_data:/usr/share/elasticsearch/data \ elasticsearch:7.17.5
第三、按照skywalking组件和ui组件
docker run -d --name skywalking-oap \ --restart always \ -p 11800:11800 \ -p 12800:12800 \ -e SW_STORAGE=elasticsearch \ -e SW_STORAGE_ES_CLUSTER_NODES=192.168.10.101:9200 \ -e SW_TELEMETRY_DEFAULT_NAMESERVERS=192.168.10.101:9200 \ -v /data/skywalking_data:/skywalking/data \ apache/skywalking-oap-server:latest docker run -d --name skywalking-ui \ --restart always \ -p 8080:8080 \ -e SW_OAP_ADDRESS=http://192.168.10.101:12800 \ apache/skywalking-ui:latest
第四、在应用程序中添加相关依赖或者把依赖放入类路径下面:
<dependency> <groupId>org.apache.skywalking</groupId> <artifactId>apm-toolkit-logback-1.x</artifactId> <version>9.2.0</version> </dependency> <dependency> <groupId>org.apache.skywalking</groupId> <artifactId>apm-toolkit-trace</artifactId> <version>9.2.0</version> </dependency> <dependency> <groupId>org.apache.skywalking</groupId> <artifactId>apm-toolkit-opentracing</artifactId> <version>9.2.0</version> </dependency> <dependency> <groupId>org.apache.skywalking</groupId> <artifactId>apm-jdbc-commons</artifactId> <version>9.2.0</version> <scope>provided</scope> </dependency>
下载skywaliing-agent.jar包
在启用中配置:
-javaagent:D:\scala\doc\tools\skywalking-agent\skywalking-agent.jar -Dskywalking.agent.service_name=hospitalDemo -Dskywalking.collector.backend_service=192.168.10.101:11800
标签:name,--,跟踪,链路,apache,skywalking,data,docker From: https://www.cnblogs.com/niun/p/18147226