Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 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
22 changes: 22 additions & 0 deletions package-lock.json
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't change package-lock.json file in this PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reverted package-lock.json changes in commit 65c12d7. The PR now only includes the documentation changes.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

130 changes: 129 additions & 1 deletion src/content/docs/next/en/manual/admin/upgrading.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -205,4 +205,132 @@ NACOS_AUTH_IDENTITY_VALUE=${任意字符串}
kubectl set image deployment/nacos-deployment ${container_name}=nacos/nacos-server:${target_version}
```
</TabItem>
</Tabs>
</Tabs>

## 3. Legacy HTTP API Removal (Nacos 3.2.0+)

### 3.1 API Removal Notice

:::caution[Breaking Change]
Starting from **Nacos 3.2.0**, the legacy v1 and v2 HTTP APIs have been **removed** from the main Nacos repository.
:::

The old v1 and v2 HTTP APIs are no longer included in the default Nacos server distribution. These APIs have been migrated to a separate legacy adapter module.

**Affected APIs:**
- All v1 REST APIs (e.g., `/nacos/v1/ns/instance`, `/nacos/v1/cs/configs`)
- All v2 REST APIs

### 3.2 Migration Options

You have two options:

#### Option 1: Migrate to New APIs and Clients (Recommended)
- Use the new v3 APIs
- Upgrade to the latest Nacos client SDK
- Refer to: Nacos official documentation

#### Option 2: Use Legacy API Adapter (Temporary Solution)
If you need time to migrate, you can temporarily restore the old APIs using the legacy adapter.

### 3.3 Installing the Legacy API Adapter

:::danger[Important Warnings]
- The legacy adapter is **NOT guaranteed** to be supported in future Nacos versions
- This module is **NOT actively maintained** by the community
- This is a **temporary solution** only for urgent migration scenarios
- **We strongly recommend migrating to v3 APIs and new clients as soon as possible**
:::

#### Step 1: Build or Download the Adapter

**Option A: Download from Release**
```bash
# Download from GitHub releases
wget https://github.com/nacos-group/nacos-api-legacy-adapter/releases/download/v${version}/nacos-api-legacy-adapter-${version}.jar
```

**Option B: Build from Source**
```bash
git clone https://github.com/nacos-group/nacos-api-legacy-adapter.git
cd nacos-api-legacy-adapter
mvn clean install
# Output: target/nacos-api-legacy-adapter-${version}.jar
```

**Requirements:**
- JDK 17+
- Maven 3.6+
- The `nacos.version` in `pom.xml` must match the target Nacos server version

#### Step 2: Install the Adapter

**For Nacos Server Deployment:**

1. Place the JAR file in the Nacos `plugins` directory:
```bash
cp nacos-api-legacy-adapter-${version}.jar ${NACOS_HOME}/plugins/
```

2. Restart Nacos server:
```bash
sh ${NACOS_HOME}/bin/shutdown.sh
sh ${NACOS_HOME}/bin/startup.sh -m standalone # Standalone mode
# or
sh ${NACOS_HOME}/bin/startup.sh # Cluster mode
```

3. The adapter will automatically load when the JAR is in the classpath.

**For Embedded/Custom Applications:**

Add the Maven dependency:
```xml
<dependency>
<groupId>com.alibaba.nacos</groupId>
<artifactId>nacos-api-legacy-adapter</artifactId>
<version>${nacos.version}</version>
</dependency>
```

#### Step 3: Verify Installation

Check Nacos server logs for confirmation:
```bash
tail -f ${NACOS_HOME}/logs/nacos.log
```

Look for log messages indicating the legacy adapter has loaded.

#### Step 4: Test Legacy APIs

Test that your old v1/v2 API calls work again:
```bash
curl -X GET "http://localhost:8848/nacos/v1/ns/instance/list?serviceName=test"
```

### 3.4 Version Compatibility

| Nacos Version | Legacy Adapter Version | Compatibility |
|--------------|----------------------|---------------|
| 3.2.0 | 3.2.0 | ✅ Compatible |
| 3.3.0+ | Match Nacos version | ⚠️ Check compatibility |

**Important:** The adapter version must match your Nacos server version.

### 3.5 Planning Your Migration

While using the legacy adapter, plan your migration:

1. **Audit your API usage** - Identify all v1/v2 API calls
2. **Review new v3 APIs** - Understand the new API structure
3. **Update clients** - Upgrade to latest Nacos client SDKs
4. **Test thoroughly** - Test in staging environment
5. **Migrate gradually** - Use feature flags or canary deployments
6. **Remove adapter** - Once migration is complete, remove the adapter JAR

### 3.6 Getting Help

- Legacy Adapter Repository: https://github.com/nacos-group/nacos-api-legacy-adapter
- Nacos Main Repository: https://github.com/alibaba/nacos
- Community Support: [Nacos Community](https://nacos.io/community/)
Loading