From 15596a549aea2fb8da9af2b7b19f2cdfb559f6a2 Mon Sep 17 00:00:00 2001 From: Deathef Date: Thu, 15 Dec 2022 10:43:10 +0800 Subject: [PATCH] Support 2.2.0 --- README.md | 4 +-- build/Dockerfile | 2 +- example/.env | 2 +- example/image/mysql/5.7/Dockerfile | 2 +- example/image/mysql/8/Dockerfile | 2 +- example/init.d/application.properties | 36 +++++++++++---------------- 6 files changed, 20 insertions(+), 28 deletions(-) diff --git a/README.md b/README.md index bf7ddc9..be79e04 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ This project contains a Docker image meant to facilitate the deployment of [Naco ## Quick Start ```shell -docker run --name nacos-quick -e MODE=standalone -p 8848:8848 -p 9848:9848 -d nacos/nacos-server:2.0.2 +docker run --name nacos-quick -e MODE=standalone -p 8848:8848 -p 9848:9848 -d nacos/nacos-server:v2.2.0 ``` ## Advanced Usage @@ -34,7 +34,7 @@ docker run --name nacos-quick -e MODE=standalone -p 8848:8848 -p 9848:9848 -d na `example/.env` ```dotenv -NACOS_VERSION=v2.1.1 +NACOS_VERSION=v2.2.0 ``` Run the following command: diff --git a/build/Dockerfile b/build/Dockerfile index ae6ff9b..9817471 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -20,7 +20,7 @@ ENV MODE="cluster" \ TOMCAT_ACCESSLOG_ENABLED="false" \ TIME_ZONE="Asia/Shanghai" -ARG NACOS_VERSION=2.1.2 +ARG NACOS_VERSION=2.2.0 ARG HOT_FIX_FLAG="" WORKDIR $BASE_DIR diff --git a/example/.env b/example/.env index 2893939..66277b1 100644 --- a/example/.env +++ b/example/.env @@ -1 +1 @@ -NACOS_VERSION=2.1.2 +NACOS_VERSION=v2.2.0 diff --git a/example/image/mysql/5.7/Dockerfile b/example/image/mysql/5.7/Dockerfile index d827376..d520f38 100644 --- a/example/image/mysql/5.7/Dockerfile +++ b/example/image/mysql/5.7/Dockerfile @@ -1,4 +1,4 @@ -FROM mysql:5.7.39 +FROM mysql:5.7.40 ADD https://raw.githubusercontent.com/alibaba/nacos/develop/distribution/conf/mysql-schema.sql /docker-entrypoint-initdb.d/nacos-mysql.sql RUN chown -R mysql:mysql /docker-entrypoint-initdb.d/nacos-mysql.sql EXPOSE 3306 diff --git a/example/image/mysql/8/Dockerfile b/example/image/mysql/8/Dockerfile index d4be7c6..22531f2 100644 --- a/example/image/mysql/8/Dockerfile +++ b/example/image/mysql/8/Dockerfile @@ -1,4 +1,4 @@ -FROM mysql:8.0.30 +FROM mysql:8.0.31 ADD https://raw.githubusercontent.com/alibaba/nacos/develop/distribution/conf/mysql-schema.sql /docker-entrypoint-initdb.d/nacos-mysql.sql RUN chown -R mysql:mysql /docker-entrypoint-initdb.d/nacos-mysql.sql EXPOSE 3306 diff --git a/example/init.d/application.properties b/example/init.d/application.properties index b9714c2..07614ac 100644 --- a/example/init.d/application.properties +++ b/example/init.d/application.properties @@ -26,8 +26,10 @@ server.port=8848 ### Specify local server's IP: # nacos.inetutils.ip-address= #*************** Config Module Related Configurations ***************# -### If use MySQL as datasource: -spring.datasource.platform=mysql +### Deprecated configuration property, it is recommended to use `spring.sql.init.platform` replaced. +# spring.datasource.platform=mysql +# nacos.plugin.datasource.log.enabled=true +spring.sql.init.platform=mysql ### Count of DB: db.num=1 ### Connect URL of DB: @@ -40,12 +42,8 @@ db.pool.config.validationTimeout=10000 db.pool.config.maximumPoolSize=20 db.pool.config.minimumIdle=2 #*************** Naming Module Related Configurations ***************# -### Data dispatch task execution period in milliseconds: Will removed on v2.1.X, replace with nacos.core.protocol.distro.data.sync.delayMs -# nacos.naming.distro.taskDispatchPeriod=200 -### Data count of batch sync task: Will removed on v2.1.X. Deprecated -# nacos.naming.distro.batchSyncKeyCount=1000 -### Retry delay in milliseconds if sync task failed: Will removed on v2.1.X, replace with nacos.core.protocol.distro.data.sync.retryDelayMs -# nacos.naming.distro.syncRetryDelay=5000 +### Data dispatch task execution period in milliseconds: + ### 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: @@ -97,6 +95,8 @@ management.metrics.export.influx.enabled=false #*************** Access Log Related Configurations ***************# ### If turn on the access log: server.tomcat.accesslog.enabled=true +### accesslog automatic cleaning time +server.tomcat.accesslog.max-days=30 ### The access log pattern: server.tomcat.accesslog.pattern=%h %l %u %t "%r" %s %b %D %{User-Agent}i %{Request-Source}i ### The directory of access log: @@ -121,7 +121,7 @@ nacos.core.auth.server.identity.value=security ### worked when nacos.core.auth.system.type=nacos ### The token expiration in seconds: nacos.core.auth.plugin.nacos.token.expire.seconds=18000 -### The default token: +### The default token (Base64 string): nacos.core.auth.plugin.nacos.token.secret.key=SecretKey012345678901234567890123456789012345678901234567890123456789 ### worked when nacos.core.auth.system.type=ldap?{0} is Placeholder,replace login username #nacos.core.auth.ldap.url=ldap://localhost:389 @@ -130,9 +130,12 @@ nacos.core.auth.plugin.nacos.token.secret.key=SecretKey0123456789012345678901234 #nacos.core.auth.ldap.password=admin #nacos.core.auth.ldap.userdn=cn={0},dc=example,dc=org #nacos.core.auth.ldap.filter.prefix=uid +#nacos.core.auth.ldap.case.sensitive=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= @@ -167,16 +170,5 @@ nacos.istio.mcp.server.enabled=false # 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 -#*************** Distro Related Configurations ***************# -### Distro data sync delay time, when sync task delayed, task will be merged for same data key. Default 1 second. -# nacos.core.protocol.distro.data.sync.delayMs=1000 -### Distro data sync timeout for one sync data, default 3 seconds. -# nacos.core.protocol.distro.data.sync.timeoutMs=3000 -### Distro data sync retry delay time when sync data failed or timeout, same behavior with delayMs, default 3 seconds. -# nacos.core.protocol.distro.data.sync.retryDelayMs=3000 -### Distro data verify interval time, verify synced data whether expired for a interval. Default 5 seconds. -# nacos.core.protocol.distro.data.verify.intervalMs=5000 -### Distro data verify timeout for one verify, default 3 seconds. -# nacos.core.protocol.distro.data.verify.timeoutMs=3000 -### Distro data load retry delay when load snapshot data failed, default 30 seconds. -# nacos.core.protocol.distro.data.load.retryDelayMs=30000 \ No newline at end of file +### enable to support prometheus service discovery +#nacos.prometheus.metrics.enabled=true