Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
zhangjian1949
microservices-platform
提交
f32bd3c4
microservices-platform
项目概览
zhangjian1949
/
microservices-platform
与 Fork 源项目一致
Fork自
zlt2000 / microservices-platform
通知
6
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
microservices-platform
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
f32bd3c4
编写于
6月 05, 2020
作者:
zlt2000
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update nacos to v1.3.0
上级
cb93972f
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
327 addition
and
37 deletion
+327
-37
zlt-register/nacos/LICENSE
zlt-register/nacos/LICENSE
+1
-19
zlt-register/nacos/bin/startup.sh
zlt-register/nacos/bin/startup.sh
+11
-1
zlt-register/nacos/conf/application.properties
zlt-register/nacos/conf/application.properties
+52
-5
zlt-register/nacos/conf/application.properties.example
zlt-register/nacos/conf/application.properties.example
+156
-8
zlt-register/nacos/conf/cluster.conf.example
zlt-register/nacos/conf/cluster.conf.example
+3
-3
zlt-register/nacos/conf/nacos-logback.xml
zlt-register/nacos/conf/nacos-logback.xml
+104
-1
zlt-register/nacos/target/nacos-server.jar
zlt-register/nacos/target/nacos-server.jar
+0
-0
未找到文件。
zlt-register/nacos/LICENSE
浏览文件 @
f32bd3c4
...
...
@@ -245,24 +245,6 @@ The source code of slf4j can be found at https://github.com/qos-ch/slf4j.
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
------
This product has a bundle fastjson, which is available under the ASL2 License.
The source code of fastjson can be found at https://github.com/alibaba/fastjson.
Copyright 1999-2016 Alibaba Group Holding Ltd.
Licensed 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.
------
This product has a bundle javassist, which is available under the ASL2 License.
The source code of javassist can be found at https://github.com/jboss-javassist/javassist.
...
...
@@ -301,7 +283,7 @@ The source code of jna can be found at https://github.com/java-native-access/jna
This product has a bundle guava, which is available under the ASL2 License.
The source code of guava can be found at https://github.com/google/guava.
Copyright (C) 2007 The Guava authors
Copyright (C) 2007 The Guava authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
...
...
zlt-register/nacos/bin/startup.sh
浏览文件 @
f32bd3c4
...
...
@@ -54,7 +54,9 @@ fi
export
SERVER
=
"nacos-server"
export
MODE
=
"cluster"
export
FUNCTION_MODE
=
"all"
while
getopts
":m:f:s:"
opt
export
MEMBER_LIST
=
""
export
EMBEDDED_STORAGE
=
""
while
getopts
":m:f:s:c:p:"
opt
do
case
$opt
in
m
)
...
...
@@ -63,6 +65,10 @@ do
FUNCTION_MODE
=
$OPTARG
;;
s
)
SERVER
=
$OPTARG
;;
c
)
MEMBER_LIST
=
$OPTARG
;;
p
)
EMBEDDED_STORAGE
=
$OPTARG
;;
?
)
echo
"Unknown parameter"
exit
1
;;
...
...
@@ -82,6 +88,9 @@ if [[ "${MODE}" == "standalone" ]]; then
JAVA_OPT
=
"
${
JAVA_OPT
}
-Xms512m -Xmx512m -Xmn256m"
JAVA_OPT
=
"
${
JAVA_OPT
}
-Dnacos.standalone=true"
else
if
[[
"
${
EMBEDDED_STORAGE
}
"
==
"embedded"
]]
;
then
JAVA_OPT
=
"
${
JAVA_OPT
}
-DembeddedStorage=true"
fi
JAVA_OPT
=
"
${
JAVA_OPT
}
-server -Xms2g -Xmx2g -Xmn1g -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=320m"
JAVA_OPT
=
"
${
JAVA_OPT
}
-XX:-OmitStackTraceInFastThrow -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=
${
BASE_DIR
}
/logs/java_heapdump.hprof"
JAVA_OPT
=
"
${
JAVA_OPT
}
-XX:-UseLargePages"
...
...
@@ -94,6 +103,7 @@ elif [[ "${FUNCTION_MODE}" == "naming" ]]; then
JAVA_OPT
=
"
${
JAVA_OPT
}
-Dnacos.functionMode=naming"
fi
JAVA_OPT
=
"
${
JAVA_OPT
}
-Dnacos.member.list=
${
MEMBER_LIST
}
"
JAVA_MAJOR_VERSION
=
$(
$JAVA
-version
2>&1 |
sed
-E
-n
's/.* version "([0-9]*).*$/\1/p'
)
if
[[
"
$JAVA_MAJOR_VERSION
"
-ge
"9"
]]
;
then
...
...
zlt-register/nacos/conf/application.properties
浏览文件 @
f32bd3c4
...
...
@@ -12,7 +12,6 @@ server.port=8848
# nacos.inetutils.ip-address=
#*************** Config Module Related Configurations ***************#
### If user MySQL as datasource:
# spring.datasource.platform=mysql
...
...
@@ -21,9 +20,9 @@ server.port=8848
# db.num=1
### Connect URL of DB:
# db.url.0=jdbc:mysql://1
.1.1.1:3306/nacos?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true
# db.user=
user
# db.password=
password
# db.url.0=jdbc:mysql://1
27.0.0.1:3306/nacos?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useUnicode=true&useSSL=false&serverTimezone=UTC
# db.user=
nacos
# db.password=
nacos
#*************** Naming Module Related Configurations ***************#
...
...
@@ -42,6 +41,10 @@ server.port=8848
### If enable the instance auto expiration, kind like of health check of instance:
# nacos.naming.expireInstance=true
nacos.naming.empty-service.auto-clean
=
true
nacos.naming.empty-service.clean.initial-delay-ms
=
50000
nacos.naming.empty-service.clean.period-time-ms
=
30000
#*************** CMDB Module Related Configurations ***************#
### The interval to dump external CMDB in seconds:
...
...
@@ -105,9 +108,53 @@ nacos.core.auth.default.token.expire.seconds=18000
nacos.core.auth.default.token.secret.key
=
SecretKey012345678901234567890123456789012345678901234567890123456789
### Turn on/off caching of auth information. By turning on this switch, the update of auth information would have a 15 seconds delay.
nacos.core.auth.caching.enabled
=
fals
e
nacos.core.auth.caching.enabled
=
tru
e
#*************** Istio Related Configurations ***************#
### If turn on the MCP server:
nacos.istio.mcp.server.enabled
=
false
###*************** Add from 1.3.0 ***************###
#*************** Core Related Configurations ***************#
### set the WorkerID manually
# nacos.core.snowflake.worker-id=
### Member-MetaData
# nacos.core.member.meta.site=
# nacos.core.member.meta.adweight=
# nacos.core.member.meta.weight=
### MemberLookup
### Addressing pattern category, If set, the priority is highest
# nacos.core.member.lookup.type=[file,address-server,discovery]
## Set the cluster list with a configuration file or command-line argument
# nacos.member.list=192.168.16.101:8847?raft_port=8807,192.168.16.101?raft_port=8808,192.168.16.101:8849?raft_port=8809
## for DiscoveryMemberLookup
# If you want to use cluster node self-discovery, turn this parameter on
# nacos.member.discovery=false
## for AddressServerMemberLookup
# Maximum number of retries to query the address server upon initialization
# nacos.core.address-server.retry=5
#*************** JRaft Related Configurations ***************#
### Sets the Raft cluster election timeout, default value is 5 second
# nacos.core.protocol.raft.data.election_timeout_ms=5000
### Sets the amount of time the Raft snapshot will execute periodically, default is 30 minute
# nacos.core.protocol.raft.data.snapshot_interval_secs=30
### Requested retries, default value is 1
# nacos.core.protocol.raft.data.request_failoverRetries=1
### raft internal worker threads
# nacos.core.protocol.raft.data.core_thread_num=8
### Number of threads required for raft business request processing
# nacos.core.protocol.raft.data.cli_service_thread_num=4
### raft linear read strategy, defaults to index
# nacos.core.protocol.raft.data.read_index_type=ReadOnlySafe
### rpc request timeout, default 5 seconds
# nacos.core.protocol.raft.data.rpc_request_timeout_ms=5000
zlt-register/nacos/conf/application.properties.example
浏览文件 @
f32bd3c4
# spring
server.contextPath=/nacos
#*************** Spring Boot Related Configurations ***************#
### Default web context path:
server.servlet.contextPath=/nacos
### Default web server port:
server.port=8848
#*************** Network Related Configurations ***************#
### If prefer hostname over ip for Nacos server addresses in cluster.conf:
# nacos.inetutils.prefer-hostname-over-ip=false
### Specify local server's IP:
# nacos.inetutils.ip-address=
#*************** Config Module Related Configurations ***************#
### If user MySQL as datasource:
# spring.datasource.platform=mysql
### Count of DB:
# db.num=1
### Connect URL of DB:
# db.url.0=jdbc:mysql://127.0.0.1:3306/nacos?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useUnicode=true&useSSL=false&serverTimezone=UTC
# db.user=nacos
# db.password=nacos
#*************** Naming Module Related Configurations ***************#
### Data dispatch task execution period in milliseconds:
# nacos.naming.distro.taskDispatchPeriod=200
### Data count of batch sync task:
# nacos.naming.distro.batchSyncKeyCount=1000
### Retry delay in milliseconds if sync task failed:
# nacos.naming.distro.syncRetryDelay=5000
### If enable data warmup. If set to false, the server would accept request without local data preparation:
# nacos.naming.data.warmup=true
### If enable the instance auto expiration, kind like of health check of instance:
# nacos.naming.expireInstance=true
nacos.naming.empty-service.auto-clean=true
nacos.naming.empty-service.clean.initial-delay-ms=50000
nacos.naming.empty-service.clean.period-time-ms=30000
#*************** CMDB Module Related Configurations ***************#
### The interval to dump external CMDB in seconds:
# nacos.cmdb.dumpTaskInterval=3600
### The interval of polling data change event in seconds:
# nacos.cmdb.eventTaskInterval=10
### The interval of loading labels in seconds:
# nacos.cmdb.labelTaskInterval=300
### If turn on data loading task:
# nacos.cmdb.loadDataAtStart=false
#*************** Metrics Related Configurations ***************#
### Metrics for prometheus
#management.endpoints.web.exposure.include=*
### Metrics for elastic search
management.metrics.export.elastic.enabled=false
#management.metrics.export.elastic.host=http://localhost:9200
### Metrics for influx
management.metrics.export.influx.enabled=false
#management.metrics.export.influx.db=springboot
#management.metrics.export.influx.uri=http://localhost:8086
#management.metrics.export.influx.auto-create-db=true
#management.metrics.export.influx.consistency=one
#management.metrics.export.influx.compressed=true
#*************** Access Log Related Configurations ***************#
### If turn on the access log:
server.tomcat.accesslog.enabled=true
### The access log pattern:
server.tomcat.accesslog.pattern=%h %l %u %t "%r" %s %b %D %{User-Agent}i
### The directory of access log:
server.tomcat.basedir=
#*************** Access Control Related Configurations ***************#
### If enable spring security, this option is deprecated in 1.2.0:
#spring.security.enabled=false
### The ignore urls of auth, is deprecated in 1.2.0:
nacos.security.ignore.urls=/,/error,/**/*.css,/**/*.js,/**/*.html,/**/*.map,/**/*.svg,/**/*.png,/**/*.ico,/console-fe/public/**,/v1/auth/**,/v1/console/health/**,/actuator/**,/v1/console/server/**
### The auth system to use, currently only 'nacos' is supported:
nacos.core.auth.system.type=nacos
### If turn on auth system:
nacos.core.auth.enabled=false
### The token expiration in seconds:
nacos.core.auth.default.token.expire.seconds=18000
### The default token:
nacos.core.auth.default.token.secret.key=SecretKey012345678901234567890123456789012345678901234567890123456789
### Turn on/off caching of auth information. By turning on this switch, the update of auth information would have a 15 seconds delay.
nacos.core.auth.caching.enabled=true
#*************** Istio Related Configurations ***************#
### If turn on the MCP server:
nacos.istio.mcp.server.enabled=false
###*************** Add from 1.3.0 ***************###
#*************** Core Related Configurations ***************#
### set the WorkerID manually
# nacos.core.snowflake.worker-id=
### Member-MetaData
# nacos.core.member.meta.site=
# nacos.core.member.meta.adweight=
# nacos.core.member.meta.weight=
### MemberLookup
### Addressing pattern category, If set, the priority is highest
# nacos.core.member.lookup.type=[file,address-server,discovery]
## Set the cluster list with a configuration file or command-line argument
# nacos.member.list=192.168.16.101:8847?raft_port=8807,192.168.16.101?raft_port=8808,192.168.16.101:8849?raft_port=8809
## for DiscoveryMemberLookup
# If you want to use cluster node self-discovery, turn this parameter on
# nacos.member.discovery=false
## for AddressServerMemberLookup
# Maximum number of retries to query the address server upon initialization
# nacos.core.address-server.retry=5
#*************** JRaft Related Configurations ***************#
db.num=2
db.url.0=jdbc:mysql://11.162.196.16:3306/nacos_devtest?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useUnicode=true&useSSL=false&serverTimezone=UTC
db.url.1=jdbc:mysql://11.163.152.9:3306/nacos_devtest?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useUnicode=true&useSSL=false&serverTimezone=UTC
db.user=nacos_devtest
db.password=nacos
\ No newline at end of file
### Sets the Raft cluster election timeout, default value is 5 second
# nacos.core.protocol.raft.data.election_timeout_ms=5000
### Sets the amount of time the Raft snapshot will execute periodically, default is 30 minute
# nacos.core.protocol.raft.data.snapshot_interval_secs=30
### Requested retries, default value is 1
# nacos.core.protocol.raft.data.request_failoverRetries=1
### raft internal worker threads
# nacos.core.protocol.raft.data.core_thread_num=8
### Number of threads required for raft business request processing
# nacos.core.protocol.raft.data.cli_service_thread_num=4
### raft linear read strategy, defaults to index
# nacos.core.protocol.raft.data.read_index_type=ReadOnlySafe
### rpc request timeout, default 5 seconds
# nacos.core.protocol.raft.data.rpc_request_timeout_ms=5000
zlt-register/nacos/conf/cluster.conf.example
浏览文件 @
f32bd3c4
#it is ip
#example
10.10.109.214
11.16.128.34
11.16.128.36
\ No newline at end of file
192.168.16.101:8847
192.168.16.102
192.168.16.103
\ No newline at end of file
zlt-register/nacos/conf/nacos-logback.xml
浏览文件 @
f32bd3c4
...
...
@@ -393,6 +393,74 @@
</encoder>
</appender>
<appender
name=
"protocol-raft"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<file>
${LOG_HOME}/protocol-raft.log
</file>
<append>
true
</append>
<rollingPolicy
class=
"ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"
>
<fileNamePattern>
${LOG_HOME}/protocol-raft.log.%d{yyyy-MM-dd}.%i
</fileNamePattern>
<maxFileSize>
2GB
</maxFileSize>
<MaxHistory>
7
</MaxHistory>
<totalSizeCap>
7GB
</totalSizeCap>
<cleanHistoryOnStart>
true
</cleanHistoryOnStart>
</rollingPolicy>
<encoder>
<Pattern>
%date %level %msg%n%n
</Pattern>
<charset>
UTF-8
</charset>
</encoder>
</appender>
<appender
name=
"protocol-distro"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<file>
${LOG_HOME}/protocol-distro.log
</file>
<append>
true
</append>
<rollingPolicy
class=
"ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"
>
<fileNamePattern>
${LOG_HOME}/protocol-distro.log.%d{yyyy-MM-dd}.%i
</fileNamePattern>
<maxFileSize>
2GB
</maxFileSize>
<MaxHistory>
7
</MaxHistory>
<totalSizeCap>
7GB
</totalSizeCap>
<cleanHistoryOnStart>
true
</cleanHistoryOnStart>
</rollingPolicy>
<encoder>
<Pattern>
%date %level %msg%n%n
</Pattern>
<charset>
UTF-8
</charset>
</encoder>
</appender>
<appender
name=
"nacos-cluster"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<file>
${LOG_HOME}/nacos-cluster.log
</file>
<append>
true
</append>
<rollingPolicy
class=
"ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"
>
<fileNamePattern>
${LOG_HOME}/nacos-cluster.log.%d{yyyy-MM-dd}.%i
</fileNamePattern>
<maxFileSize>
2GB
</maxFileSize>
<MaxHistory>
7
</MaxHistory>
<totalSizeCap>
7GB
</totalSizeCap>
<cleanHistoryOnStart>
true
</cleanHistoryOnStart>
</rollingPolicy>
<encoder>
<Pattern>
%date %level %msg%n%n
</Pattern>
<charset>
UTF-8
</charset>
</encoder>
</appender>
<appender
name=
"alipay-jraft"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<file>
${LOG_HOME}/alipay-jraft.log
</file>
<append>
true
</append>
<rollingPolicy
class=
"ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"
>
<fileNamePattern>
${LOG_HOME}/alipay-jraft.log.%d{yyyy-MM-dd}.%i
</fileNamePattern>
<maxFileSize>
2GB
</maxFileSize>
<MaxHistory>
7
</MaxHistory>
<totalSizeCap>
7GB
</totalSizeCap>
<cleanHistoryOnStart>
true
</cleanHistoryOnStart>
</rollingPolicy>
<encoder>
<Pattern>
%date %level %msg%n%n
</Pattern>
<charset>
UTF-8
</charset>
</encoder>
</appender>
<logger
name=
"com.alibaba.nacos.address.main"
additivity=
"false"
>
<level
value=
"INFO"
/>
<appender-ref
ref=
"nacos-address"
/>
...
...
@@ -483,6 +551,26 @@
<appender-ref
ref=
"core-auth"
/>
</logger>
<logger
name=
"com.alibaba.nacos.core.protocol.raft"
additivity=
"false"
>
<level
value=
"INFO"
/>
<appender-ref
ref=
"protocol-raft"
/>
</logger>
<logger
name=
"com.alipay.sofa.jraft"
additivity=
"false"
>
<level
value=
"INFO"
/>
<appender-ref
ref=
"alipay-jraft"
/>
</logger>
<logger
name=
"com.alibaba.nacos.core.protocol.distro"
additivity=
"false"
>
<level
value=
"INFO"
/>
<appender-ref
ref=
"protocol-distro"
/>
</logger>
<logger
name=
"com.alibaba.nacos.core.cluster"
additivity=
"false"
>
<level
value=
"INFO"
/>
<appender-ref
ref=
"nacos-cluster"
/>
</logger>
<springProfile
name=
"standalone"
>
<logger
name=
"org.springframework"
>
<appender-ref
ref=
"CONSOLE"
/>
...
...
@@ -510,7 +598,22 @@
</logger>
</springProfile>
<logger
name=
"com.alibaba.nacos.core.listener.StartingSpringApplicationRunListener"
>
<logger
name=
"com.alibaba.nacos.core.code.StartingSpringApplicationRunListener"
>
<appender-ref
ref=
"CONSOLE"
/>
<level
value=
"INFO"
/>
</logger>
<logger
name=
"com.alibaba.nacos.core.notify.NotifyCenter"
>
<appender-ref
ref=
"CONSOLE"
/>
<level
value=
"INFO"
/>
</logger>
<logger
name=
"com.alibaba.nacos.core.file.WatchFileCenter"
>
<appender-ref
ref=
"CONSOLE"
/>
<level
value=
"INFO"
/>
</logger>
<logger
name=
"com.alibaba.nacos.common.executor.ThreadPoolManager"
>
<appender-ref
ref=
"CONSOLE"
/>
<level
value=
"INFO"
/>
</logger>
...
...
zlt-register/nacos/target/nacos-server.jar
浏览文件 @
f32bd3c4
无法预览此类型文件
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录