mirror of
https://github.com/QYG2297248353/appstore-1panel.git
synced 2024-11-10 14:56:58 +08:00
parent
54e5284a8e
commit
87dac5de93
88
apps/nacos/2.2.0-derby/data.yml
Normal file
88
apps/nacos/2.2.0-derby/data.yml
Normal file
@ -0,0 +1,88 @@
|
||||
additionalProperties:
|
||||
formFields:
|
||||
- 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: "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
|
27
apps/nacos/2.2.0-derby/docker-compose.yml
Normal file
27
apps/nacos/2.2.0-derby/docker-compose.yml
Normal file
@ -0,0 +1,27 @@
|
||||
version: "2"
|
||||
services:
|
||||
nacos:
|
||||
image: nacos/nacos-server:v2.2.0
|
||||
container_name: ${CONTAINER_NAME}-standalone
|
||||
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}
|
||||
volumes:
|
||||
- ${NACOS_DATA_ROOT_PATH}/logs:/home/nacos/logs
|
||||
- ${NACOS_DATA_ROOT_PATH}/data:/home/nacos/data
|
||||
ports:
|
||||
- "${PANEL_APP_PORT_HTTP}:8848"
|
||||
- "${NACOS_COMMUNICATION_PORT}:9848"
|
||||
networks:
|
||||
1panel-network:
|
||||
external: true
|
156
apps/nacos/2.2.0-mysql/data.yml
Normal file
156
apps/nacos/2.2.0-mysql/data.yml
Normal file
@ -0,0 +1,156 @@
|
||||
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
|
231
apps/nacos/2.2.0-mysql/derby-schema.sql
Normal file
231
apps/nacos/2.2.0-mysql/derby-schema.sql
Normal file
@ -0,0 +1,231 @@
|
||||
/*
|
||||
* 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`;
|
32
apps/nacos/2.2.0-mysql/docker-compose.yml
Normal file
32
apps/nacos/2.2.0-mysql/docker-compose.yml
Normal file
@ -0,0 +1,32 @@
|
||||
version: "2"
|
||||
services:
|
||||
nacos:
|
||||
image: nacos/nacos-server:v2.2.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
|
221
apps/nacos/2.2.0-mysql/mysql-schema.sql
Normal file
221
apps/nacos/2.2.0-mysql/mysql-schema.sql
Normal file
@ -0,0 +1,221 @@
|
||||
/*
|
||||
* 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');
|
89
apps/nacos/README.md
Normal file
89
apps/nacos/README.md
Normal file
@ -0,0 +1,89 @@
|
||||
# Nacos
|
||||
|
||||
Nacos `/nɑ:kəʊs/` 是 Dynamic Naming and Configuration Service的首字母简称,一个更易于构建云原生应用的动态服务发现、配置管理和服务管理平台。
|
||||
|
||||
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
|
||||
- JVM_XMS=64m #-Xms default :2g
|
||||
- JVM_XMX=64m #-Xmx default :2g
|
||||
- JVM_XMN=16m #-Xmn default :1g
|
||||
- JVM_MS=8m #-XX:MetaspaceSize default :128m
|
||||
- JVM_MMS=8m #-XX:MaxMetaspaceSize default :320m
|
||||
```
|
19
apps/nacos/data.yml
Normal file
19
apps/nacos/data.yml
Normal file
@ -0,0 +1,19 @@
|
||||
name: Nacos
|
||||
tags:
|
||||
- 中间件
|
||||
title: Nacos
|
||||
type: 中间件
|
||||
description: 动态服务发现、配置管理和服务管理平台
|
||||
additionalProperties:
|
||||
key: nacos
|
||||
name: Nacos
|
||||
tags:
|
||||
- Middleware
|
||||
shortDescZh: 动态命名和配置服务
|
||||
shortDescEn: Dynamic Naming and Configuration Service
|
||||
type: runtime
|
||||
crossVersionUpdate: false
|
||||
limit: 1
|
||||
website: https://nacos.io/
|
||||
github: https://github.com/alibaba/nacos
|
||||
document: https://github.com/alibaba/nacos/blob/develop/README.md
|
BIN
apps/nacos/logo.png
Normal file
BIN
apps/nacos/logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 12 KiB |
18
apps/sentinel-dashboard/1.8.6/data.yml
Normal file
18
apps/sentinel-dashboard/1.8.6/data.yml
Normal file
@ -0,0 +1,18 @@
|
||||
additionalProperties:
|
||||
formFields:
|
||||
- default: 8858
|
||||
edit: true
|
||||
envKey: PANEL_APP_PORT_HTTP
|
||||
labelEn: Web port
|
||||
labelZh: Web 端口
|
||||
required: true
|
||||
rule: paramPort
|
||||
type: number
|
||||
- default: 8719
|
||||
edit: true
|
||||
envKey: COMMUNICATION_PORT
|
||||
labelEn: Communication port
|
||||
labelZh: 通讯端口
|
||||
required: true
|
||||
rule: paramPort
|
||||
type: number
|
12
apps/sentinel-dashboard/1.8.6/docker-compose.yml
Normal file
12
apps/sentinel-dashboard/1.8.6/docker-compose.yml
Normal file
@ -0,0 +1,12 @@
|
||||
version: "3"
|
||||
services:
|
||||
"sentinel-dashboard":
|
||||
image: bladex/sentinel-dashboard:1.8.6
|
||||
container_name: ${CONTAINER_NAME}
|
||||
restart: always
|
||||
ports:
|
||||
- "${PANEL_APP_PORT_HTTP}:8858"
|
||||
- "${COMMUNICATION_PORT}:8719"
|
||||
networks:
|
||||
1panel-network:
|
||||
external: true
|
47
apps/sentinel-dashboard/README.md
Normal file
47
apps/sentinel-dashboard/README.md
Normal file
@ -0,0 +1,47 @@
|
||||
# Sentinel-Dashboard
|
||||
|
||||
随着微服务的流行,服务和服务之间的稳定性变得越来越重要。Sentinel是面向分布式、多语言异构化服务架构的流量治理组件,主要以流量为切入点,从流量路由、流量控制、流量整形、熔断降级、系统自适应过载保护、热点流量防护等多个维度来帮助开发者保障微服务的稳定性。
|
||||
|
||||
## 快速启动
|
||||
|
||||
访问地址
|
||||
`http://IP:8858/sentinel`
|
||||
|
||||
> 用户名
|
||||
> sentinel
|
||||
>
|
||||
> 密码
|
||||
> sentinel
|
||||
|
||||
## Sentinel 的历史
|
||||
|
||||
+ 2012 年,Sentinel 诞生,主要功能为入口流量控制。
|
||||
+ 2013-2017 年,Sentinel 在阿里巴巴集团内部迅速发展,成为基础技术模块,覆盖了所有的核心场景。Sentinel 也因此积累了大量的流量归整场景以及生产实践。
|
||||
+ 2018 年,Sentinel 开源,并持续演进。
|
||||
+ 2019 年,Sentinel 朝着多语言扩展的方向不断探索,推出 C++ 原生版本,同时针对 Service Mesh 场景也推出了 Envoy 集群流量控制支持,以解决
|
||||
Service Mesh 架构下多语言限流的问题。
|
||||
+ 2020 年,推出 Sentinel Go 版本,继续朝着云原生方向演进。
|
||||
+ 2021 年,Sentinel 正在朝着 2.0 云原生高可用决策中心组件进行演进;同时推出了 Sentinel Rust 原生版本。同时我们也在 Rust
|
||||
社区进行了 Envoy WASM extension 及 eBPF extension 等场景探索。
|
||||
+ 2022 年,Sentinel 品牌升级为流量治理,领域涵盖流量路由/调度、流量染色、流控降级、过载保护/实例摘除等;同时社区将流量治理相关标准抽出到
|
||||
OpenSergo 标准中,Sentinel 作为流量治理标准实现。
|
||||
|
||||
## Sentinel 基本概念
|
||||
|
||||
### 资源
|
||||
|
||||
资源是 Sentinel 的关键概念。它可以是 Java 应用程序中的任何内容,例如,由应用程序提供的服务,或由应用程序调用的其它应用提供的服务,甚至可以是一段代码。在接下来的文档中,我们都会用资源来描述代码块。
|
||||
|
||||
只要通过 Sentinel API 定义的代码,就是资源,能够被 Sentinel 保护起来。大部分情况下,可以使用方法签名,URL,甚至服务名称作为资源名来标示资源。
|
||||
|
||||
### 规则
|
||||
|
||||
围绕资源的实时状态设定的规则,可以包括流量控制规则、熔断降级规则以及系统保护规则。所有规则可以动态实时调整。
|
||||
|
||||
## Sentinel 是如何工作的
|
||||
|
||||
Sentinel 的主要工作机制如下:
|
||||
|
||||
+ 对主流框架提供适配或者显示的 API,来定义需要保护的资源,并提供设施对资源进行实时统计和调用链路分析。
|
||||
+ 根据预设的规则,结合对资源的实时统计信息,对流量进行控制。同时,Sentinel 提供开放的接口,方便您定义及改变规则。
|
||||
+ Sentinel 提供实时的监控系统,方便您快速了解目前系统的状态。
|
19
apps/sentinel-dashboard/data.yml
Normal file
19
apps/sentinel-dashboard/data.yml
Normal file
@ -0,0 +1,19 @@
|
||||
name: sentinel-dashboard
|
||||
tags:
|
||||
- 中间件
|
||||
title: Sentinel-Dashboard
|
||||
type: 中间件
|
||||
description: 阿里巴巴流量卫兵
|
||||
additionalProperties:
|
||||
key: sentinel-dashboard
|
||||
name: Sentinel-Dashboard
|
||||
tags:
|
||||
- Middleware
|
||||
shortDescZh: 阿里巴巴流量卫兵
|
||||
shortDescEn: Alibaba Traffic Guard
|
||||
type: runtime
|
||||
crossVersionUpdate: false
|
||||
limit: 0
|
||||
website: https://sentinelguard.io/
|
||||
github: https://github.com/alibaba/Sentinel
|
||||
document: https://sentinelguard.io/zh-cn/docs/introduction.html
|
18
apps/sentinel-dashboard/latest/data.yml
Normal file
18
apps/sentinel-dashboard/latest/data.yml
Normal file
@ -0,0 +1,18 @@
|
||||
additionalProperties:
|
||||
formFields:
|
||||
- default: 8858
|
||||
edit: true
|
||||
envKey: PANEL_APP_PORT_HTTP
|
||||
labelEn: Web port
|
||||
labelZh: Web 端口
|
||||
required: true
|
||||
rule: paramPort
|
||||
type: number
|
||||
- default: 8719
|
||||
edit: true
|
||||
envKey: COMMUNICATION_PORT
|
||||
labelEn: Communication port
|
||||
labelZh: 通讯端口
|
||||
required: true
|
||||
rule: paramPort
|
||||
type: number
|
12
apps/sentinel-dashboard/latest/docker-compose.yml
Normal file
12
apps/sentinel-dashboard/latest/docker-compose.yml
Normal file
@ -0,0 +1,12 @@
|
||||
version: "3"
|
||||
services:
|
||||
"sentinel-dashboard":
|
||||
image: bladex/sentinel-dashboard:latest
|
||||
container_name: ${CONTAINER_NAME}
|
||||
restart: always
|
||||
ports:
|
||||
- "${PANEL_APP_PORT_HTTP}:8858"
|
||||
- "${COMMUNICATION_PORT}:8719"
|
||||
networks:
|
||||
1panel-network:
|
||||
external: true
|
BIN
apps/sentinel-dashboard/logo.png
Normal file
BIN
apps/sentinel-dashboard/logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 12 KiB |
Loading…
Reference in New Issue
Block a user