1.4.1
This commit is contained in:
parent
e047878a5e
commit
0e15aa090d
@ -120,6 +120,11 @@ Run the following command:
|
||||
| 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 |
|
||||
| NACOS_AUTH_CACHE_ENABLE | nacos.core.auth.caching.enabled | default : false |
|
||||
| NACOS_AUTH_USER_AGENT_AUTH_WHITE_ENABLE | nacos.core.auth.enable.userAgentAuthWhite | default : false |
|
||||
| NACOS_AUTH_IDENTITY_KEY | nacos.core.auth.server.identity.key | default : serverIdentity |
|
||||
| NACOS_AUTH_IDENTITY_VALUE | nacos.core.auth.server.identity.value | default : security |
|
||||
| NACOS_SECURITY_IGNORE_URLS | nacos.security.ignore.urls | default : `/,/error,/**/*.css,/**/*.js,/**/*.html,/**/*.map,/**/*.svg,/**/*.png,/**/*.ico,/console-fe/public/**,/v1/auth/**,/v1/console/health/**,/actuator/**,/v1/console/server/**` |
|
||||
|
||||
|
||||
|
||||
|
@ -170,6 +170,11 @@
|
||||
| NACOS_AUTH_CACHE_ENABLE | 权限缓存开关 ,开启后权限缓存的更新默认有15秒的延迟 | 默认 : false |
|
||||
| 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 |
|
||||
| EMBEDDED_STORAGE | 是否开启集群嵌入式存储模式 | `embedded` 默认 : none |
|
||||
| NACOS_AUTH_CACHE_ENABLE | nacos.core.auth.caching.enabled | default : false |
|
||||
| NACOS_AUTH_USER_AGENT_AUTH_WHITE_ENABLE | nacos.core.auth.enable.userAgentAuthWhite | default : false |
|
||||
| NACOS_AUTH_IDENTITY_KEY | nacos.core.auth.server.identity.key | default : serverIdentity |
|
||||
| NACOS_AUTH_IDENTITY_VALUE | nacos.core.auth.server.identity.value | default : security |
|
||||
| NACOS_SECURITY_IGNORE_URLS | nacos.security.ignore.urls | default : `/,/error,/**/*.css,/**/*.js,/**/*.html,/**/*.map,/**/*.svg,/**/*.png,/**/*.ico,/console-fe/public/**,/v1/auth/**,/v1/console/health/**,/actuator/**,/v1/console/server/**` |
|
||||
|
||||
|
||||
|
||||
|
@ -20,7 +20,7 @@ ENV MODE="cluster" \
|
||||
TOMCAT_ACCESSLOG_ENABLED="false" \
|
||||
TIME_ZONE="Asia/Shanghai"
|
||||
|
||||
ARG NACOS_VERSION=1.4.0
|
||||
ARG NACOS_VERSION=1.4.1
|
||||
|
||||
WORKDIR /$BASE_DIR
|
||||
|
||||
|
@ -12,16 +12,16 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
set -x
|
||||
export DEFAULT_SEARCH_LOCATIONS="classpath:/,classpath:/config/,file:./,file:./config/"
|
||||
export CUSTOM_SEARCH_LOCATIONS=${BASE_DIR}/init.d/,file:${BASE_DIR}/conf/,${DEFAULT_SEARCH_LOCATIONS}
|
||||
export CUSTOM_SEARCH_NAMES="application,custom"
|
||||
export CUSTOM_SEARCH_LOCATIONS=${BASE_DIR}/init.d/,file:${BASE_DIR}/conf/
|
||||
|
||||
export MEMBER_LIST=""
|
||||
PLUGINS_DIR="/home/nacos/plugins/peer-finder"
|
||||
function print_servers(){
|
||||
function print_servers() {
|
||||
if [[ ! -d "${PLUGINS_DIR}" ]]; then
|
||||
echo "" > "$CLUSTER_CONF"
|
||||
echo "" >"$CLUSTER_CONF"
|
||||
for server in ${NACOS_SERVERS}; do
|
||||
echo "$server" >> "$CLUSTER_CONF"
|
||||
echo "$server" >>"$CLUSTER_CONF"
|
||||
done
|
||||
else
|
||||
bash $PLUGINS_DIR/plugin.sh
|
||||
@ -86,7 +86,7 @@ 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
|
||||
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} -Xlog:gc*:file=${BASE_DIR}/logs/nacos_gc.log:time,tags:filecount=10,filesize=102400"
|
||||
else
|
||||
@ -94,16 +94,14 @@ 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} -Dnacos.home=${BASE_DIR}"
|
||||
JAVA_OPT="${JAVA_OPT} -jar ${BASE_DIR}/target/nacos-server.jar"
|
||||
JAVA_OPT="${JAVA_OPT} ${JAVA_OPT_EXT}"
|
||||
JAVA_OPT="${JAVA_OPT} --spring.config.location=${CUSTOM_SEARCH_LOCATIONS}"
|
||||
JAVA_OPT="${JAVA_OPT} --spring.config.additional-location=${CUSTOM_SEARCH_LOCATIONS}"
|
||||
JAVA_OPT="${JAVA_OPT} --spring.config.name=${CUSTOM_SEARCH_NAMES}"
|
||||
JAVA_OPT="${JAVA_OPT} --logging.config=${BASE_DIR}/conf/nacos-logback.xml"
|
||||
JAVA_OPT="${JAVA_OPT} --server.max-http-header-size=524288"
|
||||
|
||||
echo "nacos is starting,you can check the ${BASE_DIR}/logs/start.out"
|
||||
echo "$JAVA ${JAVA_OPT}" > ${BASE_DIR}/logs/start.out 2>&1 &
|
||||
nohup $JAVA ${JAVA_OPT} > ${BASE_DIR}/logs/start.out 2>&1 < /dev/null
|
||||
echo "$JAVA ${JAVA_OPT}" >${BASE_DIR}/logs/start.out 2>&1 &
|
||||
nohup $JAVA ${JAVA_OPT} >${BASE_DIR}/logs/start.out 2>&1 </dev/null
|
||||
|
@ -24,14 +24,16 @@ nacos.core.auth.default.token.secret.key=${NACOS_AUTH_TOKEN:SecretKey01234567890
|
||||
|
||||
### 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=${NACOS_AUTH_CACHE_ENABLE:false}
|
||||
|
||||
nacos.core.auth.enable.userAgentAuthWhite=${NACOS_AUTH_USER_AGENT_AUTH_WHITE_ENABLE:false}
|
||||
nacos.core.auth.server.identity.key=${NACOS_AUTH_IDENTITY_KEY:serverIdentity}
|
||||
nacos.core.auth.server.identity.value=${NACOS_AUTH_IDENTITY_VALUE:security}
|
||||
server.tomcat.accesslog.enabled=${TOMCAT_ACCESSLOG_ENABLED:false}
|
||||
server.tomcat.accesslog.pattern=%h %l %u %t "%r" %s %b %D
|
||||
# default current work dir
|
||||
server.tomcat.basedir=
|
||||
## spring security config
|
||||
### turn off security
|
||||
nacos.security.ignore.urls=/,/error,/**/*.css,/**/*.js,/**/*.html,/**/*.map,/**/*.svg,/**/*.png,/**/*.ico,/console-fe/public/**,/v1/auth/**,/v1/console/health/**,/actuator/**,/v1/console/server/**
|
||||
nacos.security.ignore.urls=${NACOS_SECURITY_IGNORE_URLS:/,/error,/**/*.css,/**/*.js,/**/*.html,/**/*.map,/**/*.svg,/**/*.png,/**/*.ico,/console-fe/public/**,/v1/auth/**,/v1/console/health/**,/actuator/**,/v1/console/server/**}
|
||||
# metrics for elastic search
|
||||
management.metrics.export.elastic.enabled=false
|
||||
management.metrics.export.influx.enabled=false
|
||||
|
@ -3,7 +3,7 @@ services:
|
||||
nacos1:
|
||||
hostname: nacos1
|
||||
container_name: nacos1
|
||||
image: nacos/nacos-server:1.3.2
|
||||
image: nacos/nacos-server:1.4.1
|
||||
volumes:
|
||||
- ./cluster-logs/nacos1:/home/nacos/logs
|
||||
- ./init.d/custom.properties:/home/nacos/init.d/custom.properties
|
||||
@ -16,7 +16,7 @@ services:
|
||||
|
||||
nacos2:
|
||||
hostname: nacos2
|
||||
image: nacos/nacos-server:1.3.2
|
||||
image: nacos/nacos-server:1.4.1
|
||||
container_name: nacos2
|
||||
volumes:
|
||||
- ./cluster-logs/nacos2:/home/nacos/logs
|
||||
@ -28,7 +28,7 @@ services:
|
||||
restart: always
|
||||
nacos3:
|
||||
hostname: nacos3
|
||||
image: nacos/nacos-server:1.3.2
|
||||
image: nacos/nacos-server:1.4.1
|
||||
container_name: nacos3
|
||||
volumes:
|
||||
- ./cluster-logs/nacos3:/home/nacos/logs
|
||||
|
Loading…
Reference in New Issue
Block a user