diff --git a/zlt-register/nacos/bin/startup.cmd b/zlt-register/nacos/bin/startup.cmd index 8e79e6dd6a64cf2b672c8838e5ef3fbc4ae53024..2df9905f0c1122051feab18d3c3a0684f9f45b57 100644 --- a/zlt-register/nacos/bin/startup.cmd +++ b/zlt-register/nacos/bin/startup.cmd @@ -30,6 +30,8 @@ set SERVER=nacos-server set MODE_INDEX=-1 set FUNCTION_MODE_INDEX=-1 set SERVER_INDEX=-1 +set EMBEDDED_STORAGE_INDEX=-1 +set EMBEDDED_STORAGE="" set i=0 @@ -37,6 +39,7 @@ for %%a in (%*) do ( if "%%a" == "-m" ( set /a MODE_INDEX=!i!+1 ) if "%%a" == "-f" ( set /a FUNCTION_MODE_INDEX=!i!+1 ) if "%%a" == "-s" ( set /a SERVER_INDEX=!i!+1 ) + if "%%a" == "-p" ( set /a EMBEDDED_STORAGE_INDEX=!i!+1 ) set /a i+=1 ) @@ -45,6 +48,7 @@ for %%a in (%*) do ( if %MODE_INDEX% == !i! ( set MODE="%%a" ) if %FUNCTION_MODE_INDEX% == !i! ( set FUNCTION_MODE="%%a" ) if %SERVER_INDEX% == !i! (set SERVER="%%a") + if %EMBEDDED_STORAGE_INDEX% == !i! (set EMBEDDED_STORAGE="%%a") set /a i+=1 ) @@ -52,6 +56,9 @@ if %MODE% == "standalone" ( set "JAVA_OPT=%JAVA_OPT% -Xms512m -Xmx512m -Xmn256m" set "JAVA_OPT=%JAVA_OPT% -Dnacos.standalone=true" ) else ( + if %EMBEDDED_STORAGE% == "embedded" ( + set "JAVA_OPT=%JAVA_OPT% -DembeddedStorage=true" + ) set "JAVA_OPT=%JAVA_OPT% -server -Xms2g -Xmx2g -Xmn1g -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=320m" set "JAVA_OPT=%JAVA_OPT% -XX:-OmitStackTraceInFastThrow XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=%BASE_DIR%\logs\java_heapdump.hprof" set "JAVA_OPT=%JAVA_OPT% -XX:-UseLargePages" @@ -64,7 +71,7 @@ if %FUNCTION_MODE% == "naming" ( set "JAVA_OPT=%JAVA_OPT% -Dnacos.functionMode=naming" ) -set "JAVA_OPT=%JAVA_OPT% -Dloader.path=%BASE_DIR%/plugins/health,%BASE_DIR%/plugins/cmdb,%BASE_DIR%/plugins/mysql" +set "JAVA_OPT=%JAVA_OPT% -Dloader.path=%BASE_DIR%/plugins/health,%BASE_DIR%/plugins/cmdb" set "JAVA_OPT=%JAVA_OPT% -Dnacos.home=%BASE_DIR%" set "JAVA_OPT=%JAVA_OPT% -jar %BASE_DIR%\target\%SERVER%.jar" diff --git a/zlt-register/nacos/bin/startup.sh b/zlt-register/nacos/bin/startup.sh index 558442f8cb99bba5ddca46bc4c90605754aa22cc..52b345c1bc6090deeb9c9450f16e853ec50dfdc9 100644 --- a/zlt-register/nacos/bin/startup.sh +++ b/zlt-register/nacos/bin/startup.sh @@ -113,7 +113,7 @@ else JAVA_OPT="${JAVA_OPT} -Xloggc:${BASE_DIR}/logs/nacos_gc.log -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintGCTimeStamps -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=100M" fi -JAVA_OPT="${JAVA_OPT} -Dloader.path=${BASE_DIR}/plugins/health,${BASE_DIR}/plugins/cmdb,${BASE_DIR}/plugins/mysql" +JAVA_OPT="${JAVA_OPT} -Dloader.path=${BASE_DIR}/plugins/health,${BASE_DIR}/plugins/cmdb" JAVA_OPT="${JAVA_OPT} -Dnacos.home=${BASE_DIR}" JAVA_OPT="${JAVA_OPT} -jar ${BASE_DIR}/target/${SERVER}.jar" JAVA_OPT="${JAVA_OPT} ${JAVA_OPT_EXT}" diff --git a/zlt-register/nacos/conf/application.properties b/zlt-register/nacos/conf/application.properties index 87dc5455af12c28c64fc1880eedffeee92b6f996..cc660bdd4c49bb60680dc25264a85341c46ee886 100644 --- a/zlt-register/nacos/conf/application.properties +++ b/zlt-register/nacos/conf/application.properties @@ -1,3 +1,19 @@ +# +# Copyright 1999-2018 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. +# + #*************** Spring Boot Related Configurations ***************# ### Default web context path: server.servlet.contextPath=/nacos @@ -13,7 +29,7 @@ server.port=8848 #*************** Config Module Related Configurations ***************# -### If user MySQL as datasource: +### If use MySQL as datasource: # spring.datasource.platform=mysql ### Count of DB: diff --git a/zlt-register/nacos/conf/application.properties.example b/zlt-register/nacos/conf/application.properties.example index 87dc5455af12c28c64fc1880eedffeee92b6f996..56642f0cadd749f4fc9c821cff04f76cfb59b90d 100644 --- a/zlt-register/nacos/conf/application.properties.example +++ b/zlt-register/nacos/conf/application.properties.example @@ -1,3 +1,19 @@ +# +# Copyright 1999-2018 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. +# + #*************** Spring Boot Related Configurations ***************# ### Default web context path: server.servlet.contextPath=/nacos diff --git a/zlt-register/nacos/conf/cluster.conf.example b/zlt-register/nacos/conf/cluster.conf.example index 2cbf5154a53bfa5665d3afd53a0a2240d7fa2859..0e3a7214146c58998f05ff2f5c39d2a4e7d0415c 100644 --- a/zlt-register/nacos/conf/cluster.conf.example +++ b/zlt-register/nacos/conf/cluster.conf.example @@ -1,5 +1,21 @@ +# +# Copyright 1999-2018 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. +# + #it is ip #example 192.168.16.101:8847 192.168.16.102 -192.168.16.103 \ No newline at end of file +192.168.16.103 diff --git a/zlt-register/nacos/conf/nacos-logback.xml b/zlt-register/nacos/conf/nacos-logback.xml index 27da0022bfab8d23effc5620f875c416b3764dfa..b3b4fa772c31d2aeac32012fc5145269c0ecee7d 100644 --- a/zlt-register/nacos/conf/nacos-logback.xml +++ b/zlt-register/nacos/conf/nacos-logback.xml @@ -1,4 +1,20 @@ + + @@ -11,7 +27,7 @@ ${nacos.home}/logs/cmdb-main.log.%d{yyyy-MM-dd}.%i 2GB - 7 + 7 7GB true @@ -35,7 +51,7 @@ ${LOG_HOME}/naming-server.log.%d{yyyy-MM-dd}.%i 1GB - 7 + 7 7GB true @@ -59,7 +75,7 @@ ${LOG_HOME}/naming-raft.log.%d{yyyy-MM-dd}.%i 1GB - 7 + 7 3GB true @@ -84,7 +100,7 @@ ${LOG_HOME}/naming-distro.log.%d{yyyy-MM-dd}.%i 1GB - 7 + 7 3GB true @@ -108,7 +124,7 @@ ${LOG_HOME}/naming-event.log.%d{yyyy-MM-dd}.%i 1GB - 7 + 7 3GB true @@ -132,7 +148,7 @@ ${LOG_HOME}/naming-push.log.%d{yyyy-MM-dd}.%i 1GB - 7 + 7 3GB true @@ -148,7 +164,7 @@ ${LOG_HOME}/naming-rt.log.%d{yyyy-MM-dd}.%i 1GB - 7 + 7 3GB true @@ -165,7 +181,7 @@ ${LOG_HOME}/naming-performance.log.%d{yyyy-MM-dd}.%i 1GB - 7 + 7 3GB true @@ -183,7 +199,7 @@ ${LOG_HOME}/config-dump.log.%d{yyyy-MM-dd}.%i 2GB - 7 + 7 7GB true @@ -199,7 +215,7 @@ ${LOG_HOME}/config-pull.log.%d{yyyy-MM-dd}.%i 20MB - 7 + 7 128MB true @@ -215,7 +231,7 @@ ${LOG_HOME}/config-fatal.log.%d{yyyy-MM-dd}.%i 20MB - 7 + 7 128MB true @@ -231,7 +247,7 @@ ${LOG_HOME}/config-memory.log.%d{yyyy-MM-dd}.%i 20MB - 7 + 7 128MB true @@ -247,7 +263,7 @@ ${LOG_HOME}/config-pull-check.log.%d{yyyy-MM-dd}.%i 1GB - 7 + 7 3GB true @@ -264,7 +280,7 @@ ${LOG_HOME}/config-client-request.log.%d{yyyy-MM-dd}.%i 2GB - 7 + 7 7GB true @@ -281,7 +297,7 @@ ${LOG_HOME}/config-trace.log.%d{yyyy-MM-dd}.%i 2GB - 7 + 7 7GB true @@ -298,7 +314,7 @@ ${LOG_HOME}/config-notify.log.%d{yyyy-MM-dd}.%i 1GB - 7 + 7 3GB true @@ -315,7 +331,7 @@ ${LOG_HOME}/config-server.log.%d{yyyy-MM-dd}.%i 50MB - 7 + 7 512MB true @@ -332,7 +348,7 @@ ${LOG_HOME}/nacos.log.%d{yyyy-MM-dd}.%i 50MB - 7 + 7 512MB true @@ -349,7 +365,7 @@ ${LOG_HOME}/nacos-address.log.%d{yyyy-MM-dd}.%i 2GB - 7 + 7 7GB true @@ -366,7 +382,7 @@ ${LOG_HOME}/istio-main.log.%d{yyyy-MM-dd}.%i 2GB - 7 + 7 7GB true @@ -383,7 +399,7 @@ ${LOG_HOME}/core-auth.log.%d{yyyy-MM-dd}.%i 2GB - 7 + 7 7GB true @@ -400,7 +416,7 @@ ${LOG_HOME}/protocol-raft.log.%d{yyyy-MM-dd}.%i 2GB - 7 + 7 7GB true @@ -417,7 +433,7 @@ ${LOG_HOME}/protocol-distro.log.%d{yyyy-MM-dd}.%i 2GB - 7 + 7 7GB true @@ -434,7 +450,7 @@ ${LOG_HOME}/nacos-cluster.log.%d{yyyy-MM-dd}.%i 2GB - 7 + 7 7GB true @@ -451,7 +467,7 @@ ${LOG_HOME}/alipay-jraft.log.%d{yyyy-MM-dd}.%i 2GB - 7 + 7 7GB true diff --git a/zlt-register/nacos/conf/nacos-mysql.sql b/zlt-register/nacos/conf/nacos-mysql.sql index 5e88447adbc2e5a09ccbecdc67acca63a12c7b42..d932c3cea6979da8b55a0091ce988208cb60fd51 100644 --- a/zlt-register/nacos/conf/nacos-mysql.sql +++ b/zlt-register/nacos/conf/nacos-mysql.sql @@ -1,3 +1,19 @@ +/* + * Copyright 1999-2018 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. + */ + /******************************************/ /* 数据库全名 = nacos_config */ /* 表名称 = config_info */ @@ -192,7 +208,7 @@ CREATE TABLE `roles` ( CREATE TABLE `permissions` ( `role` varchar(50) NOT NULL, - `resource` varchar(512) NOT NULL, + `resource` varchar(255) NOT NULL, `action` varchar(8) NOT NULL, UNIQUE INDEX `uk_role_permission` (`role`,`resource`,`action`) USING BTREE ); diff --git a/zlt-register/nacos/conf/schema.sql b/zlt-register/nacos/conf/schema.sql index f0a19931bcb331b9f9f569e4b435247c4b9d27f0..fd6bf4708306def3c4dae1ba440eb8981a7eeda0 100644 --- a/zlt-register/nacos/conf/schema.sql +++ b/zlt-register/nacos/conf/schema.sql @@ -1,3 +1,19 @@ +/* + * Copyright 1999-2018 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. + */ + CREATE SCHEMA nacos AUTHORIZATION nacos; CREATE TABLE config_info ( diff --git a/zlt-register/nacos/target/nacos-server.jar b/zlt-register/nacos/target/nacos-server.jar index 3e1c462533fffc4d2b2116e0dab7688977dc9e5a..2520bf40395f073111b38fcacc1650f77795173d 100644 Binary files a/zlt-register/nacos/target/nacos-server.jar and b/zlt-register/nacos/target/nacos-server.jar differ