Release Nacos 1.3.0
This commit is contained in:
parent
6d997ce124
commit
c9797eee45
@ -119,6 +119,8 @@ Run the following command:
|
|||||||
| NACOS_AUTH_TOKEN_EXPIRE_SECONDS | The token expiration in seconds | default :18000 |
|
| NACOS_AUTH_TOKEN_EXPIRE_SECONDS | The token expiration in seconds | default :18000 |
|
||||||
| NACOS_AUTH_TOKEN | The default token | default :SecretKey012345678901234567890123456789012345678901234567890123456789 |
|
| NACOS_AUTH_TOKEN | The default token | default :SecretKey012345678901234567890123456789012345678901234567890123456789 |
|
||||||
| NACOS_AUTH_CACHE_ENABLE | Turn on/off caching of auth information. By turning on this switch, the update of auth information would have a 15 seconds delay. | default : false |
|
| NACOS_AUTH_CACHE_ENABLE | Turn on/off caching of auth information. By turning on this switch, the update of auth information would have a 15 seconds delay. | default : false |
|
||||||
|
| MEMBER_LIST | Set the cluster list with a configuration file or command-line argument | eg:192.168.16.101:8847?raft_port=8807,192.168.16.101?raft_port=8808,192.168.16.101:8849?raft_port=8809 |
|
||||||
|
| EMBEDDED_STORAGE | Use embedded storage in cluster mode without mysql | `embedded` default : none |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ ENV MODE="cluster" \
|
|||||||
TOMCAT_ACCESSLOG_ENABLED="false" \
|
TOMCAT_ACCESSLOG_ENABLED="false" \
|
||||||
TIME_ZONE="Asia/Shanghai"
|
TIME_ZONE="Asia/Shanghai"
|
||||||
|
|
||||||
ARG NACOS_VERSION=1.2.1
|
ARG NACOS_VERSION=1.3.0
|
||||||
|
|
||||||
WORKDIR /$BASE_DIR
|
WORKDIR /$BASE_DIR
|
||||||
|
|
||||||
|
@ -15,6 +15,7 @@ set -x
|
|||||||
export DEFAULT_SEARCH_LOCATIONS="classpath:/,classpath:/config/,file:./,file:./config/"
|
export DEFAULT_SEARCH_LOCATIONS="classpath:/,classpath:/config/,file:./,file:./config/"
|
||||||
export CUSTOM_SEARCH_LOCATIONS=${DEFAULT_SEARCH_LOCATIONS},file:${BASE_DIR}/conf/,${BASE_DIR}/init.d/
|
export CUSTOM_SEARCH_LOCATIONS=${DEFAULT_SEARCH_LOCATIONS},file:${BASE_DIR}/conf/,${BASE_DIR}/init.d/
|
||||||
export CUSTOM_SEARCH_NAMES="application,custom"
|
export CUSTOM_SEARCH_NAMES="application,custom"
|
||||||
|
export MEMBER_LIST=""
|
||||||
PLUGINS_DIR="/home/nacos/plugins/peer-finder"
|
PLUGINS_DIR="/home/nacos/plugins/peer-finder"
|
||||||
function print_servers(){
|
function print_servers(){
|
||||||
if [[ ! -d "${PLUGINS_DIR}" ]]; then
|
if [[ ! -d "${PLUGINS_DIR}" ]]; then
|
||||||
@ -35,7 +36,9 @@ if [[ "${MODE}" == "standalone" ]]; then
|
|||||||
JAVA_OPT="${JAVA_OPT} -Xms512m -Xmx512m -Xmn256m"
|
JAVA_OPT="${JAVA_OPT} -Xms512m -Xmx512m -Xmn256m"
|
||||||
JAVA_OPT="${JAVA_OPT} -Dnacos.standalone=true"
|
JAVA_OPT="${JAVA_OPT} -Dnacos.standalone=true"
|
||||||
else
|
else
|
||||||
|
if [[ "${EMBEDDED_STORAGE}" == "embedded" ]]; then
|
||||||
|
JAVA_OPT="${JAVA_OPT} -DembeddedStorage=true"
|
||||||
|
fi
|
||||||
JAVA_OPT="${JAVA_OPT} -server -Xms${JVM_XMS} -Xmx${JVM_XMX} -Xmn${JVM_XMN} -XX:MetaspaceSize=${JVM_MS} -XX:MaxMetaspaceSize=${JVM_MMS}"
|
JAVA_OPT="${JAVA_OPT} -server -Xms${JVM_XMS} -Xmx${JVM_XMX} -Xmn${JVM_XMN} -XX:MetaspaceSize=${JVM_MS} -XX:MaxMetaspaceSize=${JVM_MMS}"
|
||||||
if [[ "${NACOS_DEBUG}" == "y" ]]; then
|
if [[ "${NACOS_DEBUG}" == "y" ]]; then
|
||||||
JAVA_OPT="${JAVA_OPT} -Xdebug -Xrunjdwp:transport=dt_socket,address=9555,server=y,suspend=n"
|
JAVA_OPT="${JAVA_OPT} -Xdebug -Xrunjdwp:transport=dt_socket,address=9555,server=y,suspend=n"
|
||||||
@ -80,6 +83,8 @@ if [[ "${PREFER_HOST_MODE}" == "hostname" ]]; then
|
|||||||
JAVA_OPT="${JAVA_OPT} -Dnacos.preferHostnameOverIp=true"
|
JAVA_OPT="${JAVA_OPT} -Dnacos.preferHostnameOverIp=true"
|
||||||
fi
|
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')
|
JAVA_MAJOR_VERSION=$($JAVA -version 2>&1 | sed -E -n 's/.* version "([0-9]*).*$/\1/p')
|
||||||
if [[ "$JAVA_MAJOR_VERSION" -ge "9" ]] ; then
|
if [[ "$JAVA_MAJOR_VERSION" -ge "9" ]] ; then
|
||||||
JAVA_OPT="${JAVA_OPT} -cp .:${BASE_DIR}/plugins/cmdb/*.jar:${BASE_DIR}/plugins/mysql/*.jar"
|
JAVA_OPT="${JAVA_OPT} -cp .:${BASE_DIR}/plugins/cmdb/*.jar:${BASE_DIR}/plugins/mysql/*.jar"
|
||||||
|
46
changlog
46
changlog
@ -1,2 +1,44 @@
|
|||||||
version:1.2.1
|
version:1.3.0
|
||||||
修改环境参数变量 修改NACOS_SERVER_PORT -> NACOS_APPLICATION_PORT,原因:Kubernetes 中如果出现服务名为NACOS_SERVER,会导致获取端口出现问题.
|
增加集群开启嵌入式存储
|
||||||
|
新属性
|
||||||
|
###*************** 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
|
||||||
|
8
env/nacos-embedded.env
vendored
Normal file
8
env/nacos-embedded.env
vendored
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
#nacos dev env
|
||||||
|
PREFER_HOST_MODE=hostname
|
||||||
|
EMBEDDED_STORAGE=embedded
|
||||||
|
NACOS_SERVERS=nacos1:8848 nacos2:8848 nacos3:8848
|
||||||
|
MYSQL_SERVICE_DB_NAME=nacos_devtest
|
||||||
|
MYSQL_SERVICE_PORT=3306
|
||||||
|
MYSQL_SERVICE_USER=nacos
|
||||||
|
MYSQL_SERVICE_PASSWORD=nacos
|
42
example/cluster-embedded.yaml
Normal file
42
example/cluster-embedded.yaml
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
version: "3"
|
||||||
|
services:
|
||||||
|
nacos1:
|
||||||
|
hostname: nacos1
|
||||||
|
container_name: nacos1
|
||||||
|
image: nacos/nacos-server:1.3.0
|
||||||
|
volumes:
|
||||||
|
- ./cluster-logs/nacos1:/home/nacos/logs
|
||||||
|
- ./init.d/custom.properties:/home/nacos/init.d/custom.properties
|
||||||
|
ports:
|
||||||
|
- "8848:8848"
|
||||||
|
- "9555:9555"
|
||||||
|
env_file:
|
||||||
|
- ../env/nacos-embedded.env
|
||||||
|
restart: always
|
||||||
|
|
||||||
|
nacos2:
|
||||||
|
hostname: nacos2
|
||||||
|
image: nacos/nacos-server:1.3.0
|
||||||
|
container_name: nacos2
|
||||||
|
volumes:
|
||||||
|
- ./cluster-logs/nacos2:/home/nacos/logs
|
||||||
|
- ./init.d/custom.properties:/home/nacos/init.d/custom.properties
|
||||||
|
ports:
|
||||||
|
- "8849:8848"
|
||||||
|
env_file:
|
||||||
|
- ../env/nacos-embedded.env
|
||||||
|
restart: always
|
||||||
|
nacos3:
|
||||||
|
hostname: nacos3
|
||||||
|
image: nacos/nacos-server:1.3.0
|
||||||
|
container_name: nacos3
|
||||||
|
volumes:
|
||||||
|
- ./cluster-logs/nacos3:/home/nacos/logs
|
||||||
|
- ./init.d/custom.properties:/home/nacos/init.d/custom.properties
|
||||||
|
ports:
|
||||||
|
- "8850:8848"
|
||||||
|
env_file:
|
||||||
|
- ../env/nacos-embedded.env
|
||||||
|
restart: always
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user