diff --git a/Other/dubbo-admin-0.6.0-cluster/demo.png b/Other/dubbo-admin-0.6.0-cluster/demo.png new file mode 100644 index 0000000..d29837c Binary files /dev/null and b/Other/dubbo-admin-0.6.0-cluster/demo.png differ diff --git a/Other/dubbo-admin-0.6.0-cluster/docker-compose.yml b/Other/dubbo-admin-0.6.0-cluster/docker-compose.yml new file mode 100644 index 0000000..e133a24 --- /dev/null +++ b/Other/dubbo-admin-0.6.0-cluster/docker-compose.yml @@ -0,0 +1,82 @@ +version: '3' + +networks: + dubbo-network: + ipam: + driver: default + config: + - subnet: "172.23.0.0/24" + +services: + zookeeper1: + image: registry.cn-shanghai.aliyuncs.com/odboy/zookeeper:3.9.3 # 原镜像`zookeeper:3.9.3` + container_name: zookeeper1 + restart: unless-stopped + volumes: + - "./zookeeper1/data:/data" + - "./zookeeper1/datalog:/datalog" + - "./zookeeper1/zoo.cfg:/conf/zoo.cfg" + environment: + ZOO_MY_ID: 1 + ports: + - "2181:2181" + networks: + dubbo-network: + ipv4_address: 172.23.0.81 + zookeeper2: + image: registry.cn-shanghai.aliyuncs.com/odboy/zookeeper:3.9.3 # 原镜像`zookeeper:3.9.3` + container_name: zookeeper2 + restart: unless-stopped + volumes: + - "./zookeeper2/data:/data" + - "./zookeeper2/datalog:/datalog" + - "./zookeeper2/zoo.cfg:/conf/zoo.cfg" + environment: + ZOO_MY_ID: 2 + ports: + - "2182:2181" + networks: + dubbo-network: + ipv4_address: 172.23.0.82 + zookeeper3: + image: registry.cn-shanghai.aliyuncs.com/odboy/zookeeper:3.9.3 # 原镜像`zookeeper:3.9.3` + container_name: zookeeper3 + restart: unless-stopped + volumes: + - "./zookeeper3/data:/data" + - "./zookeeper3/datalog:/datalog" + - "./zookeeper3/zoo.cfg:/conf/zoo.cfg" + environment: + ZOO_MY_ID: 3 + ports: + - "2183:2181" + networks: + dubbo-network: + ipv4_address: 172.23.0.83 + dubbo-admin: + image: registry.cn-shanghai.aliyuncs.com/odboy/dubbo-admin:0.6.0 # 原镜像`apache/dubbo-admin:0.6.0` + container_name: dubbo-admin + restart: unless-stopped + volumes: + # application.properties配置文件可参考:https://github.com/apache/dubbo-admin/blob/develop/docker/latest/application.properties + - "./dubbo-admin/config:/config" + environment: + "admin.registry.address": zookeeper://172.23.0.81:2181 + "admin.config-center": zookeeper://172.23.0.81:2181 + "admin.metadata-report.address": zookeeper://172.23.0.81:2181 + "admin.root.user.name": root + "admin.root.user.password": root + "JAVA_OPTS": "-Xmx100M -Xms100M -XX:+UseG1GC" + depends_on: + - zookeeper1 + - zookeeper2 + - zookeeper3 + links: + - zookeeper1 + - zookeeper2 + - zookeeper3 + ports: + - "38080:38080" + networks: + dubbo-network: + ipv4_address: 172.23.0.71 \ No newline at end of file diff --git a/Other/dubbo-admin-0.6.0-cluster/dubbo-admin/config/application.properties b/Other/dubbo-admin-0.6.0-cluster/dubbo-admin/config/application.properties new file mode 100644 index 0000000..8e4c7a6 --- /dev/null +++ b/Other/dubbo-admin-0.6.0-cluster/dubbo-admin/config/application.properties @@ -0,0 +1,86 @@ +# +# 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. +# +server.port=38080 +dubbo.protocol.port=30880 +dubbo.application.qos-port=32222 + +# centers in dubbo2.7, if you want to add parameters, please add them to the url +admin.registry.address=zookeeper://172.23.0.81:2181 +admin.config-center=zookeeper://172.23.0.81:2181 +admin.metadata-report.address=zookeeper://172.23.0.81:2181 + +# nacos config, add parameters to url like username=nacos&password=nacos +#admin.registry.address=nacos://127.0.0.1:8848?group=DEFAULT_GROUP&namespace=public +#admin.config-center=nacos://127.0.0.1:8848?group=dubbo +#admin.metadata-report.address=nacos://127.0.0.1:8848?group=dubbo + +#group (Deprecated it is recommended to use URL to add parameters,will be removed in the future) +#admin.registry.group=dubbo +#admin.config-center.group=dubbo +#admin.metadata-report.group=dubbo + +#namespace used by nacos. (Deprecated it is recommended to use URL to add parameters,will be removed in the future) +#admin.registry.namespace=public +#admin.config-center.namespace=public +#admin.metadata-report.namespace=public + +admin.root.user.name=root +admin.root.user.password=root + +#session timeout, default is one hour +admin.check.sessionTimeoutMilli=3600000 + + +# apollo config +# admin.config-center = apollo://localhost:8070?token=e16e5cd903fd0c97a116c873b448544b9d086de9&app.id=test&env=dev&cluster=default&namespace=dubbo + +# (Deprecated it is recommended to use URL to add parameters,will be removed in the future) +#admin.apollo.token=e16e5cd903fd0c97a116c873b448544b9d086de9 +#admin.apollo.appId=test +#admin.apollo.env=dev +#admin.apollo.cluster=default +#admin.apollo.namespace=dubbo + +#compress +server.compression.enabled=true +server.compression.mime-types=text/css,text/javascript,application/javascript +server.compression.min-response-size=10240 + +#token timeout, default is one hour +admin.check.tokenTimeoutMilli=3600000 +#Jwt signingKey +admin.check.signSecret=86295dd0c4ef69a1036b0b0c15158d77 + +#dubbo config +dubbo.application.name=dubbo-admin +dubbo.registry.address=${admin.registry.address} + +# mysql +#spring.datasource.driver-class-name=com.mysql.jdbc.Driver +#spring.datasource.url=jdbc:mysql://172.23.0.71:3306/dubbo-admin?characterEncoding=utf8&connectTimeout=1000&socketTimeout=10000&autoReconnect=true +#spring.datasource.username=root +#spring.datasource.password=root + +# h2 +spring.datasource.url=jdbc:h2:mem:~/dubbo-admin;MODE=MYSQL; +spring.datasource.username=sa +spring.datasource.password= + +# id generate type +mybatis-plus.global-config.db-config.id-type=none + +dubbo.application.logger=slf4j \ No newline at end of file diff --git a/Other/dubbo-admin-0.6.0-cluster/install.sh b/Other/dubbo-admin-0.6.0-cluster/install.sh new file mode 100644 index 0000000..3af4390 --- /dev/null +++ b/Other/dubbo-admin-0.6.0-cluster/install.sh @@ -0,0 +1 @@ +docker-compose -f docker-compose.yml -p dubbo up -d \ No newline at end of file diff --git a/Other/dubbo-admin-0.6.0-cluster/run.md b/Other/dubbo-admin-0.6.0-cluster/run.md new file mode 100644 index 0000000..1f5c220 --- /dev/null +++ b/Other/dubbo-admin-0.6.0-cluster/run.md @@ -0,0 +1,15 @@ +# Dubbo Admin + +https://github.com/apache/dubbo-admin + +### 部署方式 +```shell +sh install.sh +``` + +### 访问地址 +访问地址:http://192.168.235.104:38080 +账号密码:root/root + +### 示例 +![demo](./demo.png) \ No newline at end of file diff --git a/Other/dubbo-admin-0.6.0-cluster/shutdown.sh b/Other/dubbo-admin-0.6.0-cluster/shutdown.sh new file mode 100644 index 0000000..d381f72 --- /dev/null +++ b/Other/dubbo-admin-0.6.0-cluster/shutdown.sh @@ -0,0 +1 @@ +docker-compose -f docker-compose.yml -p dubbo down \ No newline at end of file diff --git a/Other/dubbo-admin-0.6.0-cluster/zookeeper1/zoo.cfg b/Other/dubbo-admin-0.6.0-cluster/zookeeper1/zoo.cfg new file mode 100644 index 0000000..af19028 --- /dev/null +++ b/Other/dubbo-admin-0.6.0-cluster/zookeeper1/zoo.cfg @@ -0,0 +1,28 @@ +# Zookeeper 服务器之间或客户端与服务器之间维持心跳的时间间隔, +# 也就是每个 tickTime 时间就会发送一个心跳。 +tickTime=2000 +# 用于集群,允许从节点连接并同步到 master 节点的初始化连接时间,以 tickTime 的倍数来表示; +initLimit=10 +# 用于集群, master 主节点与从节点之间发送消息,请求和应答时间长度(心跳机制); +syncLimit=5 +admin.serverPort=8887 +# 是否启动后台管理 +admin.enableServer=true +# 进入后台的命令 只能是 http://localhost:8887/commands 访问 +admin.commandUrl=/commands +# 指定了需要保留的文件数目。默认是保留3个 +autopurge.snapRetainCount=4 +# ZK提供了自动清理事务日志和快照文件的功能,这个参数指定了清理频率,单位是小时, +# 需要配置一个1或更大的整数,默认是0,表示不开启自动清理功能。 +autopurge.purgeInterval=1 +# Zookeeper 存储快照文件snapshot的目录 +dataDir=/data +# Zookeeper 保存事务日志文件的目录 +dataLogDir=/datalog +# 客户端连接Zookeeper 服务器的端口 +# Zookeeper 会监听这个端口,接受客户端的访问请求 +clientPort=2181 +# localhost: server·1的 ip地址 2220:集群间的通信端口 6660当进行选举时候的通信端口 +server.1=172.23.0.81:2220:6660 +server.2=172.23.0.82:2220:6660 +server.3=172.23.0.83:2220:6660 \ No newline at end of file diff --git a/Other/dubbo-admin-0.6.0-cluster/zookeeper2/zoo.cfg b/Other/dubbo-admin-0.6.0-cluster/zookeeper2/zoo.cfg new file mode 100644 index 0000000..af19028 --- /dev/null +++ b/Other/dubbo-admin-0.6.0-cluster/zookeeper2/zoo.cfg @@ -0,0 +1,28 @@ +# Zookeeper 服务器之间或客户端与服务器之间维持心跳的时间间隔, +# 也就是每个 tickTime 时间就会发送一个心跳。 +tickTime=2000 +# 用于集群,允许从节点连接并同步到 master 节点的初始化连接时间,以 tickTime 的倍数来表示; +initLimit=10 +# 用于集群, master 主节点与从节点之间发送消息,请求和应答时间长度(心跳机制); +syncLimit=5 +admin.serverPort=8887 +# 是否启动后台管理 +admin.enableServer=true +# 进入后台的命令 只能是 http://localhost:8887/commands 访问 +admin.commandUrl=/commands +# 指定了需要保留的文件数目。默认是保留3个 +autopurge.snapRetainCount=4 +# ZK提供了自动清理事务日志和快照文件的功能,这个参数指定了清理频率,单位是小时, +# 需要配置一个1或更大的整数,默认是0,表示不开启自动清理功能。 +autopurge.purgeInterval=1 +# Zookeeper 存储快照文件snapshot的目录 +dataDir=/data +# Zookeeper 保存事务日志文件的目录 +dataLogDir=/datalog +# 客户端连接Zookeeper 服务器的端口 +# Zookeeper 会监听这个端口,接受客户端的访问请求 +clientPort=2181 +# localhost: server·1的 ip地址 2220:集群间的通信端口 6660当进行选举时候的通信端口 +server.1=172.23.0.81:2220:6660 +server.2=172.23.0.82:2220:6660 +server.3=172.23.0.83:2220:6660 \ No newline at end of file diff --git a/Other/dubbo-admin-0.6.0-cluster/zookeeper3/zoo.cfg b/Other/dubbo-admin-0.6.0-cluster/zookeeper3/zoo.cfg new file mode 100644 index 0000000..af19028 --- /dev/null +++ b/Other/dubbo-admin-0.6.0-cluster/zookeeper3/zoo.cfg @@ -0,0 +1,28 @@ +# Zookeeper 服务器之间或客户端与服务器之间维持心跳的时间间隔, +# 也就是每个 tickTime 时间就会发送一个心跳。 +tickTime=2000 +# 用于集群,允许从节点连接并同步到 master 节点的初始化连接时间,以 tickTime 的倍数来表示; +initLimit=10 +# 用于集群, master 主节点与从节点之间发送消息,请求和应答时间长度(心跳机制); +syncLimit=5 +admin.serverPort=8887 +# 是否启动后台管理 +admin.enableServer=true +# 进入后台的命令 只能是 http://localhost:8887/commands 访问 +admin.commandUrl=/commands +# 指定了需要保留的文件数目。默认是保留3个 +autopurge.snapRetainCount=4 +# ZK提供了自动清理事务日志和快照文件的功能,这个参数指定了清理频率,单位是小时, +# 需要配置一个1或更大的整数,默认是0,表示不开启自动清理功能。 +autopurge.purgeInterval=1 +# Zookeeper 存储快照文件snapshot的目录 +dataDir=/data +# Zookeeper 保存事务日志文件的目录 +dataLogDir=/datalog +# 客户端连接Zookeeper 服务器的端口 +# Zookeeper 会监听这个端口,接受客户端的访问请求 +clientPort=2181 +# localhost: server·1的 ip地址 2220:集群间的通信端口 6660当进行选举时候的通信端口 +server.1=172.23.0.81:2220:6660 +server.2=172.23.0.82:2220:6660 +server.3=172.23.0.83:2220:6660 \ No newline at end of file diff --git a/Other/dubbo-admin-0.6.0-standalone/install.sh b/Other/dubbo-admin-0.6.0-standalone/install.sh new file mode 100644 index 0000000..3af4390 --- /dev/null +++ b/Other/dubbo-admin-0.6.0-standalone/install.sh @@ -0,0 +1 @@ +docker-compose -f docker-compose.yml -p dubbo up -d \ No newline at end of file diff --git a/Other/dubbo-admin-0.6.0-standalone/shutdown.sh b/Other/dubbo-admin-0.6.0-standalone/shutdown.sh new file mode 100644 index 0000000..d381f72 --- /dev/null +++ b/Other/dubbo-admin-0.6.0-standalone/shutdown.sh @@ -0,0 +1 @@ +docker-compose -f docker-compose.yml -p dubbo down \ No newline at end of file diff --git a/Other/dubbo-admin-0.6.0-standalone/zookeeper/zoo.cfg b/Other/dubbo-admin-0.6.0-standalone/zookeeper/zoo.cfg new file mode 100644 index 0000000..1c4d8e1 --- /dev/null +++ b/Other/dubbo-admin-0.6.0-standalone/zookeeper/zoo.cfg @@ -0,0 +1,24 @@ +# Zookeeper 服务器之间或客户端与服务器之间维持心跳的时间间隔, +# 也就是每个 tickTime 时间就会发送一个心跳。 +tickTime=2000 +# 用于集群,允许从节点连接并同步到 master 节点的初始化连接时间,以 tickTime 的倍数来表示; +initLimit=10 +# 用于集群, master 主节点与从节点之间发送消息,请求和应答时间长度(心跳机制); +syncLimit=5 +admin.serverPort=8887 +# 是否启动后台管理 +admin.enableServer=true +# 进入后台的命令 只能是 http://localhost:8887/commands 访问 +admin.commandUrl=/commands +# 指定了需要保留的文件数目。默认是保留3个 +autopurge.snapRetainCount=4 +# ZK提供了自动清理事务日志和快照文件的功能,这个参数指定了清理频率,单位是小时, +# 需要配置一个1或更大的整数,默认是0,表示不开启自动清理功能。 +autopurge.purgeInterval=1 +# Zookeeper 存储快照文件snapshot的目录 +dataDir=/data +# Zookeeper 保存事务日志文件的目录 +dataLogDir=/datalog +# 客户端连接Zookeeper 服务器的端口 +# Zookeeper 会监听这个端口,接受客户端的访问请求 +clientPort=2181 \ No newline at end of file