mirror of
https://github.com/QYG2297248353/appstore-1panel.git
synced 2024-11-10 18:06:56 +08:00
feat: 优化 nacos 安装包
This commit is contained in:
parent
f231cb712f
commit
224972aca1
@ -1,156 +0,0 @@
|
|||||||
additionalProperties:
|
|
||||||
formFields:
|
|
||||||
- child:
|
|
||||||
default: ""
|
|
||||||
envKey: PANEL_DB_HOST
|
|
||||||
required: true
|
|
||||||
type: service
|
|
||||||
default: mysql
|
|
||||||
envKey: PANEL_DB_TYPE
|
|
||||||
labelEn: Database Service
|
|
||||||
labelZh: 数据库服务
|
|
||||||
required: true
|
|
||||||
type: apps
|
|
||||||
values:
|
|
||||||
- label: MySQL
|
|
||||||
value: mysql
|
|
||||||
- label: MariaDB
|
|
||||||
value: mariadb
|
|
||||||
- default: "serverIdentity"
|
|
||||||
edit: true
|
|
||||||
envKey: NACOS_AUTH_IDENTITY_KEY
|
|
||||||
labelEn: Nacos auth identity key
|
|
||||||
labelZh: Nacos身份验证密钥键
|
|
||||||
required: true
|
|
||||||
type: text
|
|
||||||
- default: "security"
|
|
||||||
edit: true
|
|
||||||
envKey: NACOS_AUTH_IDENTITY_VALUE
|
|
||||||
labelEn: Nacos auth identity value
|
|
||||||
labelZh: Nacos身份验证密钥值
|
|
||||||
required: true
|
|
||||||
type: text
|
|
||||||
- default: "SecretKey012345678901234567890123456789012345678901234567890123456789"
|
|
||||||
edit: true
|
|
||||||
envKey: NACOS_AUTH_TOKEN
|
|
||||||
labelEn: Nacos auth token
|
|
||||||
labelZh: Nacos身份验证令牌
|
|
||||||
required: true
|
|
||||||
type: text
|
|
||||||
- default: 8848
|
|
||||||
edit: true
|
|
||||||
envKey: PANEL_APP_PORT_HTTP
|
|
||||||
labelEn: Nacos run port
|
|
||||||
labelZh: Nacos 运行端口
|
|
||||||
required: true
|
|
||||||
rule: paramPort
|
|
||||||
type: number
|
|
||||||
- default: 9848
|
|
||||||
edit: true
|
|
||||||
envKey: NACOS_COMMUNICATION_PORT
|
|
||||||
labelEn: Nacos communication port
|
|
||||||
labelZh: Nacos 通讯端口
|
|
||||||
required: true
|
|
||||||
rule: paramPort
|
|
||||||
type: number
|
|
||||||
- default: "/home/nacos"
|
|
||||||
edit: true
|
|
||||||
envKey: NACOS_DATA_ROOT_PATH
|
|
||||||
labelEn: Nacos root directory of data storage
|
|
||||||
labelZh: Nacos 数据存储根目录
|
|
||||||
required: true
|
|
||||||
type: text
|
|
||||||
- default: ""
|
|
||||||
edit: true
|
|
||||||
envKey: NACOS_SERVER_IP
|
|
||||||
labelEn: IP can be specified in multi network card mode
|
|
||||||
labelZh: 多网卡模式下可以指定IP
|
|
||||||
required: false
|
|
||||||
type: text
|
|
||||||
- default: "mysql"
|
|
||||||
edit: true
|
|
||||||
envKey: SPRING_DATASOURCE_PLATFORM
|
|
||||||
labelEn: Database type
|
|
||||||
labelZh: 数据库驱动类型
|
|
||||||
required: true
|
|
||||||
type: select
|
|
||||||
values:
|
|
||||||
- label: MySQL
|
|
||||||
value: mysql
|
|
||||||
- default: ""
|
|
||||||
edit: true
|
|
||||||
envKey: MYSQL_SERVICE_HOST
|
|
||||||
labelEn: Database host IP
|
|
||||||
labelZh: 数据库主机IP
|
|
||||||
required: true
|
|
||||||
type: text
|
|
||||||
- default: "nacos"
|
|
||||||
edit: true
|
|
||||||
envKey: MYSQL_SERVICE_DB_NAME
|
|
||||||
labelEn: Database Name
|
|
||||||
labelZh: 数据库名称
|
|
||||||
required: true
|
|
||||||
type: text
|
|
||||||
- default: 3306
|
|
||||||
edit: true
|
|
||||||
envKey: MYSQL_SERVICE_PORT
|
|
||||||
labelEn: Database Port
|
|
||||||
labelZh: 数据库端口
|
|
||||||
rule: paramPort
|
|
||||||
type: number
|
|
||||||
- default: "nacos"
|
|
||||||
edit: true
|
|
||||||
envKey: MYSQL_SERVICE_USER
|
|
||||||
labelEn: Database Connection Users
|
|
||||||
labelZh: 数据库连接用户
|
|
||||||
required: true
|
|
||||||
type: text
|
|
||||||
- default: "nacos"
|
|
||||||
edit: true
|
|
||||||
envKey: MYSQL_SERVICE_PASSWORD
|
|
||||||
labelEn: Database connection password
|
|
||||||
labelZh: 数据库连接密码
|
|
||||||
required: true
|
|
||||||
type: password
|
|
||||||
- default: "characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useUnicode=true&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true"
|
|
||||||
edit: true
|
|
||||||
envKey: MYSQL_SERVICE_DB_PARAM
|
|
||||||
labelEn: Database connection parameters
|
|
||||||
labelZh: 数据库连接参数
|
|
||||||
required: true
|
|
||||||
type: text
|
|
||||||
- default: "2g"
|
|
||||||
edit: true
|
|
||||||
envKey: JVM_XMS
|
|
||||||
labelEn: JVM_XMS
|
|
||||||
labelZh: JVM_XMS
|
|
||||||
required: true
|
|
||||||
type: text
|
|
||||||
- default: "2g"
|
|
||||||
edit: true
|
|
||||||
envKey: JVM_XMX
|
|
||||||
labelEn: JVM_XMX
|
|
||||||
labelZh: JVM_XMX
|
|
||||||
required: true
|
|
||||||
type: text
|
|
||||||
- default: "1g"
|
|
||||||
edit: true
|
|
||||||
envKey: JVM_XMN
|
|
||||||
labelEn: JVM_XMN
|
|
||||||
labelZh: JVM_XMN
|
|
||||||
required: true
|
|
||||||
type: text
|
|
||||||
- default: "128m"
|
|
||||||
edit: true
|
|
||||||
envKey: JVM_MS
|
|
||||||
labelEn: JVM_MS
|
|
||||||
labelZh: JVM_MS
|
|
||||||
required: true
|
|
||||||
type: text
|
|
||||||
- default: "320m"
|
|
||||||
edit: true
|
|
||||||
envKey: JVM_MMS
|
|
||||||
labelEn: JVM_MMS
|
|
||||||
labelZh: JVM_MMS
|
|
||||||
required: true
|
|
||||||
type: text
|
|
@ -1,231 +0,0 @@
|
|||||||
/*
|
|
||||||
* 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 (
|
|
||||||
id bigint NOT NULL generated by default as identity,
|
|
||||||
data_id varchar(255) NOT NULL,
|
|
||||||
group_id varchar(128) NOT NULL,
|
|
||||||
tenant_id varchar(128) default '',
|
|
||||||
app_name varchar(128),
|
|
||||||
content CLOB,
|
|
||||||
md5 varchar(32) DEFAULT NULL,
|
|
||||||
gmt_create timestamp NOT NULL DEFAULT '2010-05-05 00:00:00',
|
|
||||||
gmt_modified timestamp NOT NULL DEFAULT '2010-05-05 00:00:00',
|
|
||||||
src_user varchar(128) DEFAULT NULL,
|
|
||||||
src_ip varchar(50) DEFAULT NULL,
|
|
||||||
c_desc varchar(256) DEFAULT NULL,
|
|
||||||
c_use varchar(64) DEFAULT NULL,
|
|
||||||
effect varchar(64) DEFAULT NULL,
|
|
||||||
type varchar(64) DEFAULT NULL,
|
|
||||||
c_schema LONG VARCHAR DEFAULT NULL,
|
|
||||||
encrypted_data_key LONG VARCHAR DEFAULT NULL,
|
|
||||||
constraint configinfo_id_key PRIMARY KEY (id),
|
|
||||||
constraint uk_configinfo_datagrouptenant UNIQUE (data_id,group_id,tenant_id));
|
|
||||||
|
|
||||||
CREATE INDEX configinfo_dataid_key_idx ON config_info(data_id);
|
|
||||||
CREATE INDEX configinfo_groupid_key_idx ON config_info(group_id);
|
|
||||||
CREATE INDEX configinfo_dataid_group_key_idx ON config_info(data_id, group_id);
|
|
||||||
|
|
||||||
CREATE TABLE his_config_info (
|
|
||||||
id bigint NOT NULL,
|
|
||||||
nid bigint NOT NULL generated by default as identity,
|
|
||||||
data_id varchar(255) NOT NULL,
|
|
||||||
group_id varchar(128) NOT NULL,
|
|
||||||
tenant_id varchar(128) default '',
|
|
||||||
app_name varchar(128),
|
|
||||||
content CLOB,
|
|
||||||
md5 varchar(32) DEFAULT NULL,
|
|
||||||
gmt_create timestamp NOT NULL DEFAULT '2010-05-05 00:00:00.000',
|
|
||||||
gmt_modified timestamp NOT NULL DEFAULT '2010-05-05 00:00:00.000',
|
|
||||||
src_user varchar(128),
|
|
||||||
src_ip varchar(50) DEFAULT NULL,
|
|
||||||
op_type char(10) DEFAULT NULL,
|
|
||||||
encrypted_data_key LONG VARCHAR DEFAULT NULL,
|
|
||||||
constraint hisconfiginfo_nid_key PRIMARY KEY (nid));
|
|
||||||
|
|
||||||
CREATE INDEX hisconfiginfo_dataid_key_idx ON his_config_info(data_id);
|
|
||||||
CREATE INDEX hisconfiginfo_gmt_create_idx ON his_config_info(gmt_create);
|
|
||||||
CREATE INDEX hisconfiginfo_gmt_modified_idx ON his_config_info(gmt_modified);
|
|
||||||
|
|
||||||
|
|
||||||
CREATE TABLE config_info_beta (
|
|
||||||
id bigint NOT NULL generated by default as identity,
|
|
||||||
data_id varchar(255) NOT NULL,
|
|
||||||
group_id varchar(128) NOT NULL,
|
|
||||||
tenant_id varchar(128) default '',
|
|
||||||
app_name varchar(128),
|
|
||||||
content CLOB,
|
|
||||||
beta_ips varchar(1024),
|
|
||||||
md5 varchar(32) DEFAULT NULL,
|
|
||||||
gmt_create timestamp NOT NULL DEFAULT '2010-05-05 00:00:00',
|
|
||||||
gmt_modified timestamp NOT NULL DEFAULT '2010-05-05 00:00:00',
|
|
||||||
src_user varchar(128),
|
|
||||||
src_ip varchar(50) DEFAULT NULL,
|
|
||||||
encrypted_data_key LONG VARCHAR DEFAULT NULL,
|
|
||||||
constraint configinfobeta_id_key PRIMARY KEY (id),
|
|
||||||
constraint uk_configinfobeta_datagrouptenant UNIQUE (data_id,group_id,tenant_id));
|
|
||||||
|
|
||||||
CREATE TABLE config_info_tag (
|
|
||||||
id bigint NOT NULL generated by default as identity,
|
|
||||||
data_id varchar(255) NOT NULL,
|
|
||||||
group_id varchar(128) NOT NULL,
|
|
||||||
tenant_id varchar(128) default '',
|
|
||||||
tag_id varchar(128) NOT NULL,
|
|
||||||
app_name varchar(128),
|
|
||||||
content CLOB,
|
|
||||||
md5 varchar(32) DEFAULT NULL,
|
|
||||||
gmt_create timestamp NOT NULL DEFAULT '2010-05-05 00:00:00',
|
|
||||||
gmt_modified timestamp NOT NULL DEFAULT '2010-05-05 00:00:00',
|
|
||||||
src_user varchar(128),
|
|
||||||
src_ip varchar(50) DEFAULT NULL,
|
|
||||||
constraint configinfotag_id_key PRIMARY KEY (id),
|
|
||||||
constraint uk_configinfotag_datagrouptenanttag UNIQUE (data_id,group_id,tenant_id,tag_id));
|
|
||||||
|
|
||||||
CREATE TABLE config_info_aggr (
|
|
||||||
id bigint NOT NULL generated by default as identity,
|
|
||||||
data_id varchar(255) NOT NULL,
|
|
||||||
group_id varchar(128) NOT NULL,
|
|
||||||
tenant_id varchar(128) default '',
|
|
||||||
datum_id varchar(255) NOT NULL,
|
|
||||||
app_name varchar(128),
|
|
||||||
content CLOB,
|
|
||||||
gmt_modified timestamp NOT NULL DEFAULT '2010-05-05 00:00:00',
|
|
||||||
constraint configinfoaggr_id_key PRIMARY KEY (id),
|
|
||||||
constraint uk_configinfoaggr_datagrouptenantdatum UNIQUE (data_id,group_id,tenant_id,datum_id));
|
|
||||||
|
|
||||||
CREATE TABLE app_list (
|
|
||||||
id bigint NOT NULL generated by default as identity,
|
|
||||||
app_name varchar(128) NOT NULL,
|
|
||||||
is_dynamic_collect_disabled smallint DEFAULT 0,
|
|
||||||
last_sub_info_collected_time timestamp DEFAULT '1970-01-01 08:00:00.0',
|
|
||||||
sub_info_lock_owner varchar(128),
|
|
||||||
sub_info_lock_time timestamp DEFAULT '1970-01-01 08:00:00.0',
|
|
||||||
constraint applist_id_key PRIMARY KEY (id),
|
|
||||||
constraint uk_appname UNIQUE (app_name));
|
|
||||||
|
|
||||||
CREATE TABLE app_configdata_relation_subs (
|
|
||||||
id bigint NOT NULL generated by default as identity,
|
|
||||||
app_name varchar(128) NOT NULL,
|
|
||||||
data_id varchar(255) NOT NULL,
|
|
||||||
group_id varchar(128) NOT NULL,
|
|
||||||
gmt_modified timestamp DEFAULT '2010-05-05 00:00:00',
|
|
||||||
constraint configdatarelationsubs_id_key PRIMARY KEY (id),
|
|
||||||
constraint uk_app_sub_config_datagroup UNIQUE (app_name, data_id, group_id));
|
|
||||||
|
|
||||||
|
|
||||||
CREATE TABLE app_configdata_relation_pubs (
|
|
||||||
id bigint NOT NULL generated by default as identity,
|
|
||||||
app_name varchar(128) NOT NULL,
|
|
||||||
data_id varchar(255) NOT NULL,
|
|
||||||
group_id varchar(128) NOT NULL,
|
|
||||||
gmt_modified timestamp DEFAULT '2010-05-05 00:00:00',
|
|
||||||
constraint configdatarelationpubs_id_key PRIMARY KEY (id),
|
|
||||||
constraint uk_app_pub_config_datagroup UNIQUE (app_name, data_id, group_id));
|
|
||||||
|
|
||||||
CREATE TABLE config_tags_relation (
|
|
||||||
id bigint NOT NULL,
|
|
||||||
tag_name varchar(128) NOT NULL,
|
|
||||||
tag_type varchar(64) DEFAULT NULL,
|
|
||||||
data_id varchar(255) NOT NULL,
|
|
||||||
group_id varchar(128) NOT NULL,
|
|
||||||
tenant_id varchar(128) DEFAULT '',
|
|
||||||
nid bigint NOT NULL generated by default as identity,
|
|
||||||
constraint config_tags_id_key PRIMARY KEY (nid),
|
|
||||||
constraint uk_configtagrelation_configidtag UNIQUE (id, tag_name, tag_type));
|
|
||||||
|
|
||||||
CREATE INDEX config_tags_tenant_id_idx ON config_tags_relation(tenant_id);
|
|
||||||
|
|
||||||
CREATE TABLE group_capacity (
|
|
||||||
id bigint NOT NULL generated by default as identity,
|
|
||||||
group_id varchar(128) DEFAULT '',
|
|
||||||
quota int DEFAULT 0,
|
|
||||||
usage int DEFAULT 0,
|
|
||||||
max_size int DEFAULT 0,
|
|
||||||
max_aggr_count int DEFAULT 0,
|
|
||||||
max_aggr_size int DEFAULT 0,
|
|
||||||
max_history_count int DEFAULT 0,
|
|
||||||
gmt_create timestamp DEFAULT '2010-05-05 00:00:00',
|
|
||||||
gmt_modified timestamp DEFAULT '2010-05-05 00:00:00',
|
|
||||||
constraint group_capacity_id_key PRIMARY KEY (id),
|
|
||||||
constraint uk_group_id UNIQUE (group_id));
|
|
||||||
|
|
||||||
CREATE TABLE tenant_capacity (
|
|
||||||
id bigint NOT NULL generated by default as identity,
|
|
||||||
tenant_id varchar(128) DEFAULT '',
|
|
||||||
quota int DEFAULT 0,
|
|
||||||
usage int DEFAULT 0,
|
|
||||||
max_size int DEFAULT 0,
|
|
||||||
max_aggr_count int DEFAULT 0,
|
|
||||||
max_aggr_size int DEFAULT 0,
|
|
||||||
max_history_count int DEFAULT 0,
|
|
||||||
gmt_create timestamp DEFAULT '2010-05-05 00:00:00',
|
|
||||||
gmt_modified timestamp DEFAULT '2010-05-05 00:00:00',
|
|
||||||
constraint tenant_capacity_id_key PRIMARY KEY (id),
|
|
||||||
constraint uk_tenant_id UNIQUE (tenant_id));
|
|
||||||
|
|
||||||
CREATE TABLE tenant_info (
|
|
||||||
id bigint NOT NULL generated by default as identity,
|
|
||||||
kp varchar(128) NOT NULL,
|
|
||||||
tenant_id varchar(128) DEFAULT '',
|
|
||||||
tenant_name varchar(128) DEFAULT '',
|
|
||||||
tenant_desc varchar(256) DEFAULT NULL,
|
|
||||||
create_source varchar(32) DEFAULT NULL,
|
|
||||||
gmt_create bigint NOT NULL,
|
|
||||||
gmt_modified bigint NOT NULL,
|
|
||||||
constraint tenant_info_id_key PRIMARY KEY (id),
|
|
||||||
constraint uk_tenant_info_kptenantid UNIQUE (kp,tenant_id));
|
|
||||||
CREATE INDEX tenant_info_tenant_id_idx ON tenant_info(tenant_id);
|
|
||||||
|
|
||||||
CREATE TABLE users (
|
|
||||||
username varchar(50) NOT NULL PRIMARY KEY,
|
|
||||||
password varchar(500) NOT NULL,
|
|
||||||
enabled boolean NOT NULL DEFAULT true
|
|
||||||
);
|
|
||||||
|
|
||||||
CREATE TABLE roles (
|
|
||||||
username varchar(50) NOT NULL,
|
|
||||||
role varchar(50) NOT NULL,
|
|
||||||
constraint uk_username_role UNIQUE (username,role)
|
|
||||||
);
|
|
||||||
|
|
||||||
CREATE TABLE permissions (
|
|
||||||
role varchar(50) NOT NULL,
|
|
||||||
resource varchar(512) NOT NULL,
|
|
||||||
action varchar(8) NOT NULL,
|
|
||||||
constraint uk_role_permission UNIQUE (role,resource,action)
|
|
||||||
);
|
|
||||||
|
|
||||||
INSERT INTO users (username, password, enabled) VALUES ('nacos', '$2a$10$EuWPZHzz32dJN7jexM34MOeYirDdFAZm2kuWj7VEOJhhZkDrxfvUu', TRUE);
|
|
||||||
|
|
||||||
INSERT INTO roles (username, role) VALUES ('nacos', 'ROLE_ADMIN');
|
|
||||||
|
|
||||||
|
|
||||||
/******************************************/
|
|
||||||
/* ipv6 support */
|
|
||||||
/******************************************/
|
|
||||||
ALTER TABLE `config_info_tag`
|
|
||||||
MODIFY COLUMN `src_ip` varchar(50) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT 'source ip' AFTER `src_user`;
|
|
||||||
|
|
||||||
ALTER TABLE `his_config_info`
|
|
||||||
MODIFY COLUMN `src_ip` varchar(50) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL AFTER `src_user`;
|
|
||||||
|
|
||||||
ALTER TABLE `config_info`
|
|
||||||
MODIFY COLUMN `src_ip` varchar(50) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT 'source ip' AFTER `src_user`;
|
|
||||||
|
|
||||||
ALTER TABLE `config_info_beta`
|
|
||||||
MODIFY COLUMN `src_ip` varchar(50) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT 'source ip' AFTER `src_user`;
|
|
@ -1,32 +0,0 @@
|
|||||||
version: "2"
|
|
||||||
services:
|
|
||||||
nacos:
|
|
||||||
image: nacos/nacos-server:v2.3.0
|
|
||||||
container_name: ${CONTAINER_NAME}-mysql
|
|
||||||
restart: always
|
|
||||||
environment:
|
|
||||||
- PREFER_HOST_MODE=hostname
|
|
||||||
- MODE=standalone
|
|
||||||
- JVM_XMS=${JVM_XMS}
|
|
||||||
- JVM_XMX=${JVM_XMX}
|
|
||||||
- JVM_XMN=${JVM_XMN}
|
|
||||||
- JVM_MS=${JVM_MS}
|
|
||||||
- JVM_MMS=${JVM_MMS}
|
|
||||||
- NACOS_AUTH_IDENTITY_KEY=${NACOS_AUTH_IDENTITY_KEY}
|
|
||||||
- NACOS_AUTH_IDENTITY_VALUE=${NACOS_AUTH_IDENTITY_VALUE}
|
|
||||||
- NACOS_AUTH_TOKEN=${NACOS_AUTH_TOKEN}
|
|
||||||
- NACOS_SERVER_IP=${NACOS_SERVER_IP}
|
|
||||||
- SPRING_DATASOURCE_PLATFORM=${SPRING_DATASOURCE_PLATFORM}
|
|
||||||
- MYSQL_SERVICE_HOST=${MYSQL_SERVICE_HOST}
|
|
||||||
- MYSQL_SERVICE_PORT=${MYSQL_SERVICE_PORT}
|
|
||||||
- MYSQL_SERVICE_USER=${MYSQL_SERVICE_USER}
|
|
||||||
- MYSQL_SERVICE_PASSWORD=${MYSQL_SERVICE_PASSWORD}
|
|
||||||
- MYSQL_SERVICE_DB_NAME=${MYSQL_SERVICE_DB_NAME}
|
|
||||||
volumes:
|
|
||||||
- ./log/standalone-logs/:/home/nacos/logs
|
|
||||||
ports:
|
|
||||||
- "${PANEL_APP_PORT_HTTP}:8848"
|
|
||||||
- "${NACOS_COMMUNICATION_PORT}:9848"
|
|
||||||
networks:
|
|
||||||
1panel-network:
|
|
||||||
external: true
|
|
@ -1,221 +0,0 @@
|
|||||||
/*
|
|
||||||
* 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 */
|
|
||||||
/******************************************/
|
|
||||||
CREATE TABLE `config_info` (
|
|
||||||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
|
|
||||||
`data_id` varchar(255) NOT NULL COMMENT 'data_id',
|
|
||||||
`group_id` varchar(128) DEFAULT NULL,
|
|
||||||
`content` longtext NOT NULL COMMENT 'content',
|
|
||||||
`md5` varchar(32) DEFAULT NULL COMMENT 'md5',
|
|
||||||
`gmt_create` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
|
||||||
`gmt_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
|
|
||||||
`src_user` text COMMENT 'source user',
|
|
||||||
`src_ip` varchar(50) DEFAULT NULL COMMENT 'source ip',
|
|
||||||
`app_name` varchar(128) DEFAULT NULL,
|
|
||||||
`tenant_id` varchar(128) DEFAULT '' COMMENT '租户字段',
|
|
||||||
`c_desc` varchar(256) DEFAULT NULL,
|
|
||||||
`c_use` varchar(64) DEFAULT NULL,
|
|
||||||
`effect` varchar(64) DEFAULT NULL,
|
|
||||||
`type` varchar(64) DEFAULT NULL,
|
|
||||||
`c_schema` text,
|
|
||||||
`encrypted_data_key` text NOT NULL COMMENT '秘钥',
|
|
||||||
PRIMARY KEY (`id`),
|
|
||||||
UNIQUE KEY `uk_configinfo_datagrouptenant` (`data_id`,`group_id`,`tenant_id`)
|
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='config_info';
|
|
||||||
|
|
||||||
/******************************************/
|
|
||||||
/* 数据库全名 = nacos_config */
|
|
||||||
/* 表名称 = config_info_aggr */
|
|
||||||
/******************************************/
|
|
||||||
CREATE TABLE `config_info_aggr` (
|
|
||||||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
|
|
||||||
`data_id` varchar(255) NOT NULL COMMENT 'data_id',
|
|
||||||
`group_id` varchar(128) NOT NULL COMMENT 'group_id',
|
|
||||||
`datum_id` varchar(255) NOT NULL COMMENT 'datum_id',
|
|
||||||
`content` longtext NOT NULL COMMENT '内容',
|
|
||||||
`gmt_modified` datetime NOT NULL COMMENT '修改时间',
|
|
||||||
`app_name` varchar(128) DEFAULT NULL,
|
|
||||||
`tenant_id` varchar(128) DEFAULT '' COMMENT '租户字段',
|
|
||||||
PRIMARY KEY (`id`),
|
|
||||||
UNIQUE KEY `uk_configinfoaggr_datagrouptenantdatum` (`data_id`,`group_id`,`tenant_id`,`datum_id`)
|
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='增加租户字段';
|
|
||||||
|
|
||||||
|
|
||||||
/******************************************/
|
|
||||||
/* 数据库全名 = nacos_config */
|
|
||||||
/* 表名称 = config_info_beta */
|
|
||||||
/******************************************/
|
|
||||||
CREATE TABLE `config_info_beta` (
|
|
||||||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
|
|
||||||
`data_id` varchar(255) NOT NULL COMMENT 'data_id',
|
|
||||||
`group_id` varchar(128) NOT NULL COMMENT 'group_id',
|
|
||||||
`app_name` varchar(128) DEFAULT NULL COMMENT 'app_name',
|
|
||||||
`content` longtext NOT NULL COMMENT 'content',
|
|
||||||
`beta_ips` varchar(1024) DEFAULT NULL COMMENT 'betaIps',
|
|
||||||
`md5` varchar(32) DEFAULT NULL COMMENT 'md5',
|
|
||||||
`gmt_create` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
|
||||||
`gmt_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
|
|
||||||
`src_user` text COMMENT 'source user',
|
|
||||||
`src_ip` varchar(50) DEFAULT NULL COMMENT 'source ip',
|
|
||||||
`tenant_id` varchar(128) DEFAULT '' COMMENT '租户字段',
|
|
||||||
`encrypted_data_key` text NOT NULL COMMENT '秘钥',
|
|
||||||
PRIMARY KEY (`id`),
|
|
||||||
UNIQUE KEY `uk_configinfobeta_datagrouptenant` (`data_id`,`group_id`,`tenant_id`)
|
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='config_info_beta';
|
|
||||||
|
|
||||||
/******************************************/
|
|
||||||
/* 数据库全名 = nacos_config */
|
|
||||||
/* 表名称 = config_info_tag */
|
|
||||||
/******************************************/
|
|
||||||
CREATE TABLE `config_info_tag` (
|
|
||||||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
|
|
||||||
`data_id` varchar(255) NOT NULL COMMENT 'data_id',
|
|
||||||
`group_id` varchar(128) NOT NULL COMMENT 'group_id',
|
|
||||||
`tenant_id` varchar(128) DEFAULT '' COMMENT 'tenant_id',
|
|
||||||
`tag_id` varchar(128) NOT NULL COMMENT 'tag_id',
|
|
||||||
`app_name` varchar(128) DEFAULT NULL COMMENT 'app_name',
|
|
||||||
`content` longtext NOT NULL COMMENT 'content',
|
|
||||||
`md5` varchar(32) DEFAULT NULL COMMENT 'md5',
|
|
||||||
`gmt_create` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
|
||||||
`gmt_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
|
|
||||||
`src_user` text COMMENT 'source user',
|
|
||||||
`src_ip` varchar(50) DEFAULT NULL COMMENT 'source ip',
|
|
||||||
PRIMARY KEY (`id`),
|
|
||||||
UNIQUE KEY `uk_configinfotag_datagrouptenanttag` (`data_id`,`group_id`,`tenant_id`,`tag_id`)
|
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='config_info_tag';
|
|
||||||
|
|
||||||
/******************************************/
|
|
||||||
/* 数据库全名 = nacos_config */
|
|
||||||
/* 表名称 = config_tags_relation */
|
|
||||||
/******************************************/
|
|
||||||
CREATE TABLE `config_tags_relation` (
|
|
||||||
`id` bigint(20) NOT NULL COMMENT 'id',
|
|
||||||
`tag_name` varchar(128) NOT NULL COMMENT 'tag_name',
|
|
||||||
`tag_type` varchar(64) DEFAULT NULL COMMENT 'tag_type',
|
|
||||||
`data_id` varchar(255) NOT NULL COMMENT 'data_id',
|
|
||||||
`group_id` varchar(128) NOT NULL COMMENT 'group_id',
|
|
||||||
`tenant_id` varchar(128) DEFAULT '' COMMENT 'tenant_id',
|
|
||||||
`nid` bigint(20) NOT NULL AUTO_INCREMENT,
|
|
||||||
PRIMARY KEY (`nid`),
|
|
||||||
UNIQUE KEY `uk_configtagrelation_configidtag` (`id`,`tag_name`,`tag_type`),
|
|
||||||
KEY `idx_tenant_id` (`tenant_id`)
|
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='config_tag_relation';
|
|
||||||
|
|
||||||
/******************************************/
|
|
||||||
/* 数据库全名 = nacos_config */
|
|
||||||
/* 表名称 = group_capacity */
|
|
||||||
/******************************************/
|
|
||||||
CREATE TABLE `group_capacity` (
|
|
||||||
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键ID',
|
|
||||||
`group_id` varchar(128) NOT NULL DEFAULT '' COMMENT 'Group ID,空字符表示整个集群',
|
|
||||||
`quota` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '配额,0表示使用默认值',
|
|
||||||
`usage` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '使用量',
|
|
||||||
`max_size` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '单个配置大小上限,单位为字节,0表示使用默认值',
|
|
||||||
`max_aggr_count` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '聚合子配置最大个数,,0表示使用默认值',
|
|
||||||
`max_aggr_size` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '单个聚合数据的子配置大小上限,单位为字节,0表示使用默认值',
|
|
||||||
`max_history_count` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '最大变更历史数量',
|
|
||||||
`gmt_create` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
|
||||||
`gmt_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
|
|
||||||
PRIMARY KEY (`id`),
|
|
||||||
UNIQUE KEY `uk_group_id` (`group_id`)
|
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='集群、各Group容量信息表';
|
|
||||||
|
|
||||||
/******************************************/
|
|
||||||
/* 数据库全名 = nacos_config */
|
|
||||||
/* 表名称 = his_config_info */
|
|
||||||
/******************************************/
|
|
||||||
CREATE TABLE `his_config_info` (
|
|
||||||
`id` bigint(20) unsigned NOT NULL,
|
|
||||||
`nid` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
|
||||||
`data_id` varchar(255) NOT NULL,
|
|
||||||
`group_id` varchar(128) NOT NULL,
|
|
||||||
`app_name` varchar(128) DEFAULT NULL COMMENT 'app_name',
|
|
||||||
`content` longtext NOT NULL,
|
|
||||||
`md5` varchar(32) DEFAULT NULL,
|
|
||||||
`gmt_create` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
||||||
`gmt_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
||||||
`src_user` text,
|
|
||||||
`src_ip` varchar(50) DEFAULT NULL,
|
|
||||||
`op_type` char(10) DEFAULT NULL,
|
|
||||||
`tenant_id` varchar(128) DEFAULT '' COMMENT '租户字段',
|
|
||||||
`encrypted_data_key` text NOT NULL COMMENT '秘钥',
|
|
||||||
PRIMARY KEY (`nid`),
|
|
||||||
KEY `idx_gmt_create` (`gmt_create`),
|
|
||||||
KEY `idx_gmt_modified` (`gmt_modified`),
|
|
||||||
KEY `idx_did` (`data_id`)
|
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='多租户改造';
|
|
||||||
|
|
||||||
|
|
||||||
/******************************************/
|
|
||||||
/* 数据库全名 = nacos_config */
|
|
||||||
/* 表名称 = tenant_capacity */
|
|
||||||
/******************************************/
|
|
||||||
CREATE TABLE `tenant_capacity` (
|
|
||||||
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键ID',
|
|
||||||
`tenant_id` varchar(128) NOT NULL DEFAULT '' COMMENT 'Tenant ID',
|
|
||||||
`quota` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '配额,0表示使用默认值',
|
|
||||||
`usage` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '使用量',
|
|
||||||
`max_size` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '单个配置大小上限,单位为字节,0表示使用默认值',
|
|
||||||
`max_aggr_count` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '聚合子配置最大个数',
|
|
||||||
`max_aggr_size` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '单个聚合数据的子配置大小上限,单位为字节,0表示使用默认值',
|
|
||||||
`max_history_count` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '最大变更历史数量',
|
|
||||||
`gmt_create` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
|
||||||
`gmt_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
|
|
||||||
PRIMARY KEY (`id`),
|
|
||||||
UNIQUE KEY `uk_tenant_id` (`tenant_id`)
|
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='租户容量信息表';
|
|
||||||
|
|
||||||
|
|
||||||
CREATE TABLE `tenant_info` (
|
|
||||||
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
|
|
||||||
`kp` varchar(128) NOT NULL COMMENT 'kp',
|
|
||||||
`tenant_id` varchar(128) default '' COMMENT 'tenant_id',
|
|
||||||
`tenant_name` varchar(128) default '' COMMENT 'tenant_name',
|
|
||||||
`tenant_desc` varchar(256) DEFAULT NULL COMMENT 'tenant_desc',
|
|
||||||
`create_source` varchar(32) DEFAULT NULL COMMENT 'create_source',
|
|
||||||
`gmt_create` bigint(20) NOT NULL COMMENT '创建时间',
|
|
||||||
`gmt_modified` bigint(20) NOT NULL COMMENT '修改时间',
|
|
||||||
PRIMARY KEY (`id`),
|
|
||||||
UNIQUE KEY `uk_tenant_info_kptenantid` (`kp`,`tenant_id`),
|
|
||||||
KEY `idx_tenant_id` (`tenant_id`)
|
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='tenant_info';
|
|
||||||
|
|
||||||
CREATE TABLE `users` (
|
|
||||||
`username` varchar(50) NOT NULL PRIMARY KEY,
|
|
||||||
`password` varchar(500) NOT NULL,
|
|
||||||
`enabled` boolean NOT NULL
|
|
||||||
);
|
|
||||||
|
|
||||||
CREATE TABLE `roles` (
|
|
||||||
`username` varchar(50) NOT NULL,
|
|
||||||
`role` varchar(50) NOT NULL,
|
|
||||||
UNIQUE INDEX `idx_user_role` (`username` ASC, `role` ASC) USING BTREE
|
|
||||||
);
|
|
||||||
|
|
||||||
CREATE TABLE `permissions` (
|
|
||||||
`role` varchar(50) NOT NULL,
|
|
||||||
`resource` varchar(255) NOT NULL,
|
|
||||||
`action` varchar(8) NOT NULL,
|
|
||||||
UNIQUE INDEX `uk_role_permission` (`role`,`resource`,`action`) USING BTREE
|
|
||||||
);
|
|
||||||
|
|
||||||
INSERT INTO users (username, password, enabled) VALUES ('nacos', '$2a$10$EuWPZHzz32dJN7jexM34MOeYirDdFAZm2kuWj7VEOJhhZkDrxfvUu', TRUE);
|
|
||||||
|
|
||||||
INSERT INTO roles (username, role) VALUES ('nacos', 'ROLE_ADMIN');
|
|
@ -1,5 +1,32 @@
|
|||||||
additionalProperties:
|
additionalProperties:
|
||||||
formFields:
|
formFields:
|
||||||
|
- default: "false"
|
||||||
|
envKey: NACOS_AUTH_ENABLE
|
||||||
|
labelEn: Enable Authentication
|
||||||
|
labelZh: 开启鉴权
|
||||||
|
required: true
|
||||||
|
type: select
|
||||||
|
values:
|
||||||
|
- label: 开启
|
||||||
|
value: "true"
|
||||||
|
- label: 关闭
|
||||||
|
value: "false"
|
||||||
|
- default: 8848
|
||||||
|
edit: true
|
||||||
|
envKey: PANEL_APP_PORT_HTTP
|
||||||
|
labelEn: Nacos run port
|
||||||
|
labelZh: Nacos 运行端口
|
||||||
|
required: true
|
||||||
|
rule: paramPort
|
||||||
|
type: number
|
||||||
|
- default: 9848
|
||||||
|
edit: true
|
||||||
|
envKey: PANEL_APP_PORT_COMMUNICATION
|
||||||
|
labelEn: Nacos communication port
|
||||||
|
labelZh: Nacos 通讯端口
|
||||||
|
required: true
|
||||||
|
rule: paramPort
|
||||||
|
type: number
|
||||||
- default: "serverIdentity"
|
- default: "serverIdentity"
|
||||||
edit: true
|
edit: true
|
||||||
envKey: NACOS_AUTH_IDENTITY_KEY
|
envKey: NACOS_AUTH_IDENTITY_KEY
|
||||||
@ -21,29 +48,6 @@ additionalProperties:
|
|||||||
labelZh: Nacos身份验证令牌
|
labelZh: Nacos身份验证令牌
|
||||||
required: true
|
required: true
|
||||||
type: text
|
type: text
|
||||||
- default: 8848
|
|
||||||
edit: true
|
|
||||||
envKey: PANEL_APP_PORT_HTTP
|
|
||||||
labelEn: Nacos run port
|
|
||||||
labelZh: Nacos 运行端口
|
|
||||||
required: true
|
|
||||||
rule: paramPort
|
|
||||||
type: number
|
|
||||||
- default: 9848
|
|
||||||
edit: true
|
|
||||||
envKey: NACOS_COMMUNICATION_PORT
|
|
||||||
labelEn: Nacos communication port
|
|
||||||
labelZh: Nacos 通讯端口
|
|
||||||
required: true
|
|
||||||
rule: paramPort
|
|
||||||
type: number
|
|
||||||
- default: "/home/nacos"
|
|
||||||
edit: true
|
|
||||||
envKey: NACOS_DATA_ROOT_PATH
|
|
||||||
labelEn: Nacos root directory of data storage
|
|
||||||
labelZh: Nacos 数据存储根目录
|
|
||||||
required: true
|
|
||||||
type: text
|
|
||||||
- default: ""
|
- default: ""
|
||||||
edit: true
|
edit: true
|
||||||
envKey: NACOS_SERVER_IP
|
envKey: NACOS_SERVER_IP
|
||||||
|
@ -1,10 +1,11 @@
|
|||||||
version: "2"
|
version: '3'
|
||||||
services:
|
services:
|
||||||
nacos:
|
nacos:
|
||||||
image: nacos/nacos-server:v2.3.0
|
image: nacos/nacos-server:v2.3.0
|
||||||
container_name: ${CONTAINER_NAME}-standalone
|
container_name: ${CONTAINER_NAME}-standalone
|
||||||
restart: always
|
restart: always
|
||||||
environment:
|
environment:
|
||||||
|
- NACOS_AUTH_ENABLE=${NACOS_AUTH_ENABLE:-FALSE}
|
||||||
- PREFER_HOST_MODE=hostname
|
- PREFER_HOST_MODE=hostname
|
||||||
- MODE=standalone
|
- MODE=standalone
|
||||||
- JVM_XMS=${JVM_XMS}
|
- JVM_XMS=${JVM_XMS}
|
||||||
@ -17,11 +18,11 @@ services:
|
|||||||
- NACOS_AUTH_TOKEN=${NACOS_AUTH_TOKEN}
|
- NACOS_AUTH_TOKEN=${NACOS_AUTH_TOKEN}
|
||||||
- NACOS_SERVER_IP=${NACOS_SERVER_IP}
|
- NACOS_SERVER_IP=${NACOS_SERVER_IP}
|
||||||
volumes:
|
volumes:
|
||||||
- ${NACOS_DATA_ROOT_PATH}/logs:/home/nacos/logs
|
- ./data/logs:/home/nacos/logs
|
||||||
- ${NACOS_DATA_ROOT_PATH}/data:/home/nacos/data
|
- ./data/data:/home/nacos/data
|
||||||
ports:
|
ports:
|
||||||
- "${PANEL_APP_PORT_HTTP}:8848"
|
- "${PANEL_APP_PORT_HTTP}:8848"
|
||||||
- "${NACOS_COMMUNICATION_PORT}:9848"
|
- "${PANEL_APP_PORT_COMMUNICATION}:9848"
|
||||||
networks:
|
networks:
|
||||||
1panel-network:
|
1panel-network:
|
||||||
external: true
|
external: true
|
||||||
|
@ -1,89 +1,30 @@
|
|||||||
# Nacos
|
# 使用说明
|
||||||
|
|
||||||
Nacos `/nɑ:kəʊs/` 是 Dynamic Naming and Configuration Service的首字母简称,一个更易于构建云原生应用的动态服务发现、配置管理和服务管理平台。
|
## 服务地址
|
||||||
|
|
||||||
Nacos 致力于帮助您发现、配置和管理微服务。Nacos 提供了一组简单易用的特性集,帮助您快速实现动态服务发现、服务配置、服务元数据及流量管理。
|
- 访问地址:`http://IP:8848/nacos`
|
||||||
|
- 用户名:`nacos`
|
||||||
Nacos 帮助您更敏捷和容易地构建、交付和管理微服务平台。 Nacos 是构建以“服务”为中心的现代应用架构 (
|
- 密码:`nacos`
|
||||||
例如微服务范式、云原生范式) 的服务基础设施。
|
|
||||||
|
|
||||||
## 快速启动
|
|
||||||
|
|
||||||
访问地址
|
|
||||||
`http://IP:8848/nacos`
|
|
||||||
|
|
||||||
> 用户名
|
|
||||||
> nacos
|
|
||||||
>
|
|
||||||
> 密码
|
|
||||||
> nacos
|
|
||||||
|
|
||||||
## Nacos 的关键特性
|
|
||||||
|
|
||||||
### 服务发现和服务健康监测
|
|
||||||
|
|
||||||
Nacos 支持基于 DNS 和基于 RPC 的服务发现。服务提供者使用 原生SDK、OpenAPI、或一个独立的Agent TODO注册 Service
|
|
||||||
后,服务消费者可以使用DNS TODO 或HTTP&API查找和发现服务。
|
|
||||||
|
|
||||||
Nacos 提供对服务的实时的健康检查,阻止向不健康的主机或服务实例发送请求。Nacos 支持传输层 (PING 或 TCP)和应用层 (如
|
|
||||||
HTTP、MySQL、用户自定义)的健康检查。 对于复杂的云环境和网络拓扑环境中(如 VPC、边缘网络等)服务的健康检查,Nacos 提供了 agent
|
|
||||||
上报模式和服务端主动检测2种健康检查模式。Nacos 还提供了统一的健康检查仪表盘,帮助您根据健康状态管理服务的可用性及流量。
|
|
||||||
|
|
||||||
### 动态配置服务
|
|
||||||
|
|
||||||
动态配置服务可以让您以中心化、外部化和动态化的方式管理所有环境的应用配置和服务配置。
|
|
||||||
|
|
||||||
动态配置消除了配置变更时重新部署应用和服务的需要,让配置管理变得更加高效和敏捷。
|
|
||||||
|
|
||||||
配置中心化管理让实现无状态服务变得更简单,让服务按需弹性扩展变得更容易。
|
|
||||||
|
|
||||||
Nacos 提供了一个简洁易用的UI (控制台样例 Demo) 帮助您管理所有的服务和应用的配置。Nacos
|
|
||||||
还提供包括配置版本跟踪、金丝雀发布、一键回滚配置以及客户端配置更新状态跟踪在内的一系列开箱即用的配置管理特性,帮助您更安全地在生产环境中管理配置变更和降低配置变更带来的风险。
|
|
||||||
|
|
||||||
### 动态 DNS 服务
|
|
||||||
|
|
||||||
动态 DNS 服务支持权重路由,让您更容易地实现中间层负载均衡、更灵活的路由策略、流量控制以及数据中心内网的简单DNS解析服务。动态DNS服务还能让您更容易地实现以
|
|
||||||
DNS 协议为基础的服务发现,以帮助您消除耦合到厂商私有服务发现 API 上的风险。
|
|
||||||
|
|
||||||
Nacos 提供了一些简单的 DNS APIs TODO 帮助您管理服务的关联域名和可用的 IP 列表.
|
|
||||||
|
|
||||||
### 服务及其元数据管理
|
|
||||||
|
|
||||||
Nacos 能让您从微服务平台建设的视角管理数据中心的所有服务及元数据,包括管理服务的描述、生命周期、服务的静态依赖分析、服务的健康状态、服务的流量管理、路由及安全策略、服务的
|
|
||||||
SLA 以及最首要的 metrics 统计数据。
|
|
||||||
|
|
||||||
## 版本说明
|
|
||||||
|
|
||||||
### 2.2.0-derby
|
|
||||||
|
|
||||||
derby 单机模式
|
|
||||||
|
|
||||||
数据存于本地文件目录
|
|
||||||
`/home/nacos`
|
|
||||||
|
|
||||||
### 2.2.0-mysql
|
|
||||||
|
|
||||||
derby 单机模式 + mysql
|
|
||||||
数据存于mysql
|
|
||||||
|
|
||||||
#### 数据库初始化
|
|
||||||
|
|
||||||
下载数据库文件 `mysql-schema.sql`
|
|
||||||
|
|
||||||
[https://github.com/alibaba/nacos/tree/develop/distribution/conf](https://github.com/alibaba/nacos/tree/develop/distribution/conf)
|
|
||||||
|
|
||||||
导入数据文件 `mysql-schema.sql` 或通过工具导入/执行语句
|
|
||||||
|
|
||||||
```shell
|
|
||||||
mysql -uroot -p123456 -h127.0.0.1 -P3306 nacos < mysql-schema.sql
|
|
||||||
```
|
|
||||||
|
|
||||||
## 参数调优
|
## 参数调优
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
- JVM_XMS=64m #-Xms default :2g
|
- JVM_XMS=64m # -Xms default :2g
|
||||||
- JVM_XMX=64m #-Xmx default :2g
|
- JVM_XMX=64m # -Xmx default :2g
|
||||||
- JVM_XMN=16m #-Xmn default :1g
|
- JVM_XMN=16m # -Xmn default :1g
|
||||||
- JVM_MS=8m #-XX:MetaspaceSize default :128m
|
- JVM_MS=8m # -XX:MetaspaceSize default :128m
|
||||||
- JVM_MMS=8m #-XX:MaxMetaspaceSize default :320m
|
- JVM_MMS=8m # -XX:MaxMetaspaceSize default :320m
|
||||||
```
|
```
|
||||||
|
|
||||||
|
# Nacos
|
||||||
|
|
||||||
|
**Nacos** 是一个更易于构建云原生应用的动态服务发现、配置管理和服务管理平台。
|
||||||
|
|
||||||
|
## Nacos 的关键特性
|
||||||
|
|
||||||
|
## 特色:
|
||||||
|
|
||||||
|
- **易用**:动态服务发现的一站式解决方案。配置管理和动态 DNS服务。提供 20 多项开箱即用的特性,适用于面向服务的架构。轻量级的生产就绪控制台。
|
||||||
|
- **可靠**:无缝支持 Kubernetes 和 Spring Cloud,更容易在流行的公共云(例如阿里云和 AWS)上部署和运行,支持多租户和多环境。
|
||||||
|
- **云原生**:源自阿里巴巴集团经过时间验证的内部产品。支持具有数百万服务规模的大型场景。开源产品并提供企业级的服务级别协议(SLA)。
|
||||||
|
- **可扩展**:支持速率限制、大规模推广计划和多区域主动-主动架构。直接或稍作扩展支持各种相关的基于互联网的使用案例。流量调度和服务治理。
|
@ -1,7 +1,7 @@
|
|||||||
name: Nacos
|
name: Nacos
|
||||||
tags:
|
tags:
|
||||||
- 中间件
|
- 中间件
|
||||||
title: Nacos
|
title: 动态服务发现、配置管理和服务管理平台
|
||||||
type: 中间件
|
type: 中间件
|
||||||
description: 动态服务发现、配置管理和服务管理平台
|
description: 动态服务发现、配置管理和服务管理平台
|
||||||
additionalProperties:
|
additionalProperties:
|
||||||
@ -9,11 +9,12 @@ additionalProperties:
|
|||||||
name: Nacos
|
name: Nacos
|
||||||
tags:
|
tags:
|
||||||
- Middleware
|
- Middleware
|
||||||
shortDescZh: 动态命名和配置服务
|
shortDescZh: 动态服务发现、配置管理和服务管理平台
|
||||||
shortDescEn: Dynamic Naming and Configuration Service
|
shortDescEn: Dynamic service discovery, configuration and service management platform
|
||||||
type: runtime
|
type: tool
|
||||||
crossVersionUpdate: false
|
crossVersionUpdate: false
|
||||||
limit: 1
|
limit: 1
|
||||||
|
recommend: 0
|
||||||
website: https://nacos.io/
|
website: https://nacos.io/
|
||||||
github: https://github.com/alibaba/nacos
|
github: https://github.com/alibaba/nacos
|
||||||
document: https://github.com/alibaba/nacos/blob/develop/README.md
|
document: https://nacos.io/docs/latest/what-is-nacos/
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 2.2 KiB |
Loading…
Reference in New Issue
Block a user