Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update nacos 2.4.3 #3886

Open
wants to merge 1 commit into
base: 2023.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion spring-cloud-alibaba-dependencies/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<properties>
<revision>2023.0.1.3</revision>
<sentinel.version>1.8.8</sentinel.version>
<nacos.client.version>2.4.2</nacos.client.version>
<nacos.client.version>2.4.3</nacos.client.version>
<seata.version>2.1.0</seata.version>
<!-- Apache RocketMQ -->
<rocketmq.version>5.3.1</rocketmq.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ services:

# nacos
nacos:
image: nacos/nacos-server:v2.4.2
image: nacos/nacos-server:v2.4.3
hostname: nacos-server
restart: always
container_name: integrated-example-nacos
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ You can also quickly launch the component through the docker-compose file provid

For each component version of this project, please go to the release page of each community to download and decompression run.

- [Nacos: version 2.1.0](https://github.com/alibaba/nacos/releases)
- [Nacos: version 2.4.3](https://github.com/alibaba/nacos/releases)
- [Seata: version 1.5.1](https://github.com/seata/seata/releases)
- [RocketMQ: version 4.9.4](https://github.com/apache/rocketmq/releases)
- MySQL: version 5.7
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

本项目的各个组件版本请移步至各个社区的 release 页面进行下载并解压运行。

- [Nacos: 2.1.0 版本](https://github.com/alibaba/nacos/releases)
- [Nacos: 2.4.3 版本](https://github.com/alibaba/nacos/releases)
- [Seata: 1.5.1 版本](https://github.com/seata/seata/releases)
- [RocketMQ: 4.9.4 版本](https://github.com/apache/rocketmq/releases)
- MySQL: 5.7 版本
Expand Down
16 changes: 8 additions & 8 deletions spring-cloud-alibaba-examples/nacos-example/readme-zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,26 @@

[Nacos](https://github.com/alibaba/Nacos) 是阿里巴巴开源的一个更易于构建云原生应用的动态服务发现、配置管理和服务管理平台。

## 正确配置并启动 Nacos Server 2.4.2
## 正确配置并启动 Nacos Server 2.4.3

在 Nacos 2.4.2 中,加入了用户鉴权相关的功能,在首次启动 Nacos Server 时,需要正确配置,避免出现启动失败的问题。
在 Nacos 2.4.3 中,加入了用户鉴权相关的功能,在首次启动 Nacos Server 时,需要正确配置,避免出现启动失败的问题。

### 下载 Nacos Server

> 本示例中使用 Nacos Server 版本为 2.4.2
> 本示例中使用 Nacos Server 版本为 2.4.3

Nacos 支持直接下载和源码构建两种方式。**推荐在 Spring Cloud Alibaba 2023.x 中使用 Nacos Server 2.4.2 版本。**
Nacos 支持直接下载和源码构建两种方式。**推荐在 Spring Cloud Alibaba 2023.x 中使用 Nacos Server 2.4.3 版本。**

1. 直接下载:[Nacos Server 下载页](https://github.com/alibaba/nacos/releases)
2. 源码构建:进入 Nacos [Github 项目页面](https://github.com/alibaba/nacos),将代码 git clone 到本地自行编译打包,[参考文档](https://nacos.io/zh-cn/docs/quick-start.html)。

### 配置 Nacos Server

打开 `\nacos-server-2.4.2\conf\application.properties` 配置文件,修改以下配置项:
打开 `\nacos-server-2.4.3\conf\application.properties` 配置文件,修改以下配置项:

#### 配置数据源

此处以 MySQL 数据库为例,使用 `nacos-server-2.4.2\conf\mysql-schema.sql` 初始化数据库表文件。同时修改以下配置
此处以 MySQL 数据库为例,使用 `nacos-server-2.4.3\conf\mysql-schema.sql` 初始化数据库表文件。同时修改以下配置

```properties
#*************** Config Module Related Configurations ***************#
Expand All @@ -49,7 +49,7 @@ db.pool.config.minimumIdle=2

#### 开启鉴权

**注意:不开启在 2.4.2 中会出现登陆失败异常!**
**注意:不开启在 2.4.3 中会出现登陆失败异常!**

```properties
### The auth system to use, currently only 'nacos' and 'ldap' is supported:
Expand Down Expand Up @@ -77,7 +77,7 @@ nacos.core.auth.plugin.nacos.token.secret.key=SecretKey0123456789012345678901234

#### Open API 鉴权

在 nacos server 2.4.2 中使用 Open api 接口时需要鉴权:更多细节请参考:[Nacos api 鉴权](https://nacos.io/zh-cn/docs/auth.html)
在 nacos server 2.4.3 中使用 Open api 接口时需要鉴权:更多细节请参考:[Nacos api 鉴权](https://nacos.io/zh-cn/docs/auth.html)

1. 获取 accessToken:使用用户名和密码登陆 nacos server:

Expand Down
8 changes: 4 additions & 4 deletions spring-cloud-alibaba-examples/nacos-example/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ This project demonstrates how to use Spring Cloud Alibaba Nacos related Starters

[Nacos](https://github.com/alibaba/Nacos) It is Alibaba's open source dynamic service discovery, configuration management and service management platform that is easier to build cloud-native applications.

## Nacos Server 2.4.2 is properly configured and started
## Nacos Server 2.4.3 is properly configured and started

In Nacos 2.4.2, functions related to user authentication are added. When starting Nacos Server for the first time, it needs to be configured correctly to avoid the problem of startup failure.
In Nacos 2.4.3, functions related to user authentication are added. When starting Nacos Server for the first time, it needs to be configured correctly to avoid the problem of startup failure.

### Download Nacos Server

Expand Down Expand Up @@ -49,7 +49,7 @@ db.pool.config.minimumIdle=2

#### Turn on authentication

**Note: If it is not enabled, login failure exception will occur in 2.4.2!**
**Note: If it is not enabled, login failure exception will occur in 2.4.3!**

```properties
### The auth system to use, currently only 'nacos' and 'ldap' is supported:
Expand Down Expand Up @@ -77,7 +77,7 @@ nacos.core.auth.plugin.nacos.token.secret.key=SecretKey0123456789012345678901234

#### Open API authentication

Authentication is required when using the Open api interface in nacos server 2.4.2: For more details, please refer to: [Nacos api authentication](https://nacos.io/zh-cn/docs/auth.html)
Authentication is required when using the Open api interface in nacos server 2.4.3: For more details, please refer to: [Nacos api authentication](https://nacos.io/zh-cn/docs/auth.html)

1. Obtain accessToken: Use username and password to log in to the nacos server:

Expand Down
4 changes: 2 additions & 2 deletions spring-cloud-alibaba-examples/seata-example/readme-zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ CREATE TABLE `account_tbl` (

### 2. 配置 Nacos

> Spring Cloud Alibaba 适配了 Nacos 2.2.3 版本,在本示例中,使用 Nacos 2.2.3 作为 Seata 的配置中心组件。
> Spring Cloud Alibaba 适配了 Nacos 2.4.3 版本,在本示例中,使用 Nacos 2.4.3 作为 Seata 的配置中心组件。

创建 Seata 的 Nacos 配置: data-id: `seata.properties` , Group: `SEATA_GROUP` (seata 2.1.0 默认分组) ,导入 [Seata Config](https://github.com/seata/seata/blob/2.1.0/script/config-center/config.txt)

Expand Down Expand Up @@ -220,7 +220,7 @@ seata:
```

> **注意:**
> Nacos 2.4.2 开启鉴权,需要配置 `username` 和 `password` 属性,否则登陆失败。更多 Nacos 2.4.2 版本相关配置,参考 `nacos-example`。
> Nacos 2.4.3 开启鉴权,需要配置 `username` 和 `password` 属性,否则登陆失败。更多 Nacos 2.4.3 版本相关配置,参考 `nacos-example`。
> **Seata-server 启动时的 Nacos 服务注册分组需要和示例应用中的分组保持一致,否则出现无法找到 seata-server 的错误!**
> 更多 Seata-server 以 Nacos 作为配置中心的配置请参考:https://seata.io/zh-cn/docs/ops/deploy-by-docker-compose/#nacos-db

Expand Down
4 changes: 2 additions & 2 deletions spring-cloud-alibaba-examples/seata-example/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ CREATE TABLE `account_tbl` (

### 2. Configure Nacos

> Spring Cloud Alibaba is adapted with Nacos 2.4.2. In this example, Nacos 2.4.2 is used as the configuration center component of Seata.
> Spring Cloud Alibaba is adapted with Nacos 2.4.3. In this example, Nacos 2.4.3 is used as the configuration center component of Seata.

Create Nacos configuration for Seata: data-id: `seata.properties`, Group: `SEATA_GROUP` (default grouping for seata 2.1.0), import

Expand Down Expand Up @@ -220,7 +220,7 @@ seata:
```

> **Notice**
> Nacos 2.4.2 enables authentication. Configuration `username` and `password` properties are required, otherwise login fails. For more Nacos 2.4.2 related configurations, refer to `nacos-example`.
> Nacos 2.4.3 enables authentication. Configuration `username` and `password` properties are required, otherwise login fails. For more Nacos 2.4.3 related configurations, refer to `nacos-example`.
> **The Nacos service registration group when seata-server is started must be consistent with the group in the sample application, otherwise an error that seata-server cannot be found will occur!**
> For more information about the configuration of Seata-server with Nacos as the configuration center, please refer to https://seata.io/zh-cn/docs/ops/deploy-by-docker-compose/#nacos-db.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

**在接入 Sidecar 之前,首先需要启动 Nacos服务器。**

1. 下载[Nacos二进制文件](https://github.com/alibaba/nacos/releases/download/2.1.0/nacos-server-2.1.0.zip) 并解压
1. 下载[Nacos二进制文件](https://github.com/alibaba/nacos/releases/download/2.4.3/nacos-server-2.4.3.zip) 并解压

2. 启动 Nacos Server

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
services:
nacos:
image: nacos/nacos-server:v2.4.2
image: nacos/nacos-server:v2.4.3
container_name: nacos-standalone
environment:
- PREFER_HOST_MODE=hostname
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
services:
nacos:
image: nacos/nacos-server:v2.4.2
image: nacos/nacos-server:v2.4.3
container_name: nacos-standalone
environment:
- PREFER_HOST_MODE=hostname
Expand Down
Loading