Scenarios
If you wish to use Polaris (North Star) instead of Nacos as the new Register Configuration Center, Polaris (North Star) provides a Nacos-compatible access method. You only need to modify the server access address of the nacos-client in your application configuration without changing any code or pom dependencies.
Use Limits
1. Compatible Nacos SDK open-source versions and access protocols for different Polaris (North Star) instance versions
Polaris Instance Version | Compatible Open-Source Versions of Nacos SDK | Remarks |
Versions prior to 2.0.2 (excluding development versions) | Incompatible |
|
2.0.2 (excluding development versions) | Compatible with Nacos SDK 2.x using gRPC protocol for access | Part of the APIs in version 2.4 and later are not supported. For details, see the API scope below. |
Versions 2.1.0 and later (excluding development versions) | Compatible with Nacos SDK 2.x using gRPC protocol and HTTP for access Compatible with Nacos SDK 1.x using HTTP for access | Part of the APIs in version 2.4 and later are not supported. For details, see the API scope below. |
2. Polaris (North Star) compatible Nacos SDK interface scope is as follows.
Nacos Client API |
| gRPC Protocol | HTTP protocol |
Configuration center | Obtaining a configuration | ✔ | ✔ |
| Monitoring a configuration | ✔ | ✔ |
| Deleting monitoring | ✔ | ✔ |
| Releasing a configuration | ✔ | ✔ |
| Delete configurations | ✔ | ✔ |
| Obtaining a configuration with monitoring capability | × | - |
| Releasing a configuration with CAS | × | - |
Registry | Registering an instance | ✔ | ✔ |
| Deregistering an instance | ✔ | ✔ |
| Obtaining all instances | ✔ | ✔ |
| Obtaining the list of healthy or unhealthy instances | ✔ | ✔ |
| Obtaining a healthy instance | ✔ | ✔ |
| Monitoring services | ✔ | ✔ |
| Canceling monitoring services | ✔ | ✔ |
| Registering service instances in batches | × | - |
| Deregistering service instances in batches | × | - |
| Monitoring services with selectors | × | - |
| Canceling monitoring services with selectors | × | - |
| Obtaining the service list with pagination | × | - |
| Obtaining the list of services monitored by the current client | × | - |
3. Feature point differences.
Feature | Difference | Remarks |
Authentication capability | By default, write operations require authentication, while read operations do not. |
|
Registration capability | Polaris registrations are written to the database. |
|
Service model | Polaris does not have the concept of groups. | Polaris service names are formed by concatenating the value of the Nacos group field and the value of the Nacos service field. |
Console | There are differences between the Nacos console and the Polaris console. |
|
Usage Instructions
This document introduces how to use Polaris (North Star) onboarding through two scenarios: service registration and configuration management.
Service registration
1. The mapping relationship between Nacos service names and Polaris (North Star) service names
|
namespace | Default namespace/non-default namespace ID | namespace | default/namespace name. |
group | DEFAULT_GROUP | service | Polaris service names are formed by concatenating the value of the Nacos group field and the value of the Nacos service field. ${group}__${service} is the final Polaris service name. If group is DEFAULT_GROUP, the service name is ${service}. |
service | DEFAULT_GROUP | service |
|
cluster | DEFAULT | instance.metadata | As part of an instance tag, the instance tag key is internal-nacos-cluster. |
2. Modify the server-side access IP address.
1. Modify the application configuration file: Polaris (North Star) server IP address and server access credentials:
spring.cloud.nacos.username="can be any value, such as: username"
spring.cloud.nacos.password="Resource access credential Token for Polaris (North Star) user/user group"
spring.cloud.nacos.discovery.server-addr="Polaris (North Star) server IP:8848"
spring.cloud.nacos.discovery.namespace="Polaris (North Star) namespace name"
2. How to view the resource access credential Token for Polaris (North Star) users/user groups:
Log in to the TSF console, click Polaris (Polaris (North Star)) in the left sidebar, and then select the target instance to go to the details page of the target Polaris (North Star) instance. Click Access Control in the sidebar, select User or User Group, and click View Token.
3. How to view the Polaris (North Star) server IP address:
Log in to the TSF console, click Polaris (Polaris (North Star)) in the left sidebar, and then select the target instance to go to the details page of the target Polaris (North Star) instance. Click Engine Management in the sidebar. On the Instance Information page, you can view the IP address.
1. Native Nacos Client modification: Polaris (North Star) server IP address and server access credentials:
Properties properties = new Properties();
properties.put(PropertyKeyConst.SERVER_ADDR, "Polaris (North Star) server IP:8848");
properties.put(PropertyKeyConst.NAMESPACE, "Polaris (North Star) namespace name");
properties.put(PropertyKeyConst.USERNAME, "any value");
properties.put(PropertyKeyConst.PASSWORD, "Polaris (North Star) user/user group resource access credential Token");
NamingService namingService = NacosFactory.createNamingService(properties);
2. How to view the resource access credential Token for Polaris (North Star) users/user groups:
In the Service Governance Center, click Permission Control in the sidebar, and select the target Polaris (North Star) engine instance.
Select User or User Group, and click View Token.
3. How to view the Polaris (North Star) server IP address:
In the Service Governance Center, click Instance List in the sidebar, and click the target Polaris (North Star) engine instance.
On the engine details page, the access IP address of the engine can be viewed on the Instance Information page.
1. Modify the application configuration file: Polaris (North Star) server IP address and server access credentials:
dubbo
registry
address: nacos://Polaris (North Star) server IP:8848?username=any value&password=Resource access credential Token for Polaris (North Star) user/user group
parameters.namespace: Polaris (North Star) namespace name
metadata-report
address: nacos://Polaris (North Star) server IP:8848
2. How to view the resource access credential Token for Polaris (North Star) users/user groups:
In the Service Governance Center, click Permission Control in the sidebar, and select the target Polaris (North Star) engine instance.
Select User or User Group, and click View Token.
3. How to view the Polaris (North Star) server IP address:
In the Service Governance Center, click Instance List in the sidebar, and click the target Polaris (North Star) engine instance.
On the engine details page, the access IP address of the engine can be viewed on the Instance Information page.
Configuration Management
1. The mapping relationship between Nacos configuration information and Polaris (North Star) configuration information
|
namespace | Default namespace/non-default namespace ID | namespace | default/namespace name |
group | DEFAULT_GROUP | group | Polaris configuration group name |
dataId | application.yaml | file_name | Polaris configuration file name |
2. Modify the Server-Side Access IP Address
1. Modify the application configuration file: Polaris (North Star) server IP address and server access credentials:
spring.cloud.nacos.username="can be any value"
spring.cloud.nacos.password="Resource access credential Token for Polaris (North Star) user/user group"
spring.cloud.nacos.config.namespace="Polaris (North Star) namespace name"
spring.cloud.nacos.config.server-addr="Polaris (North Star) server IP:8848"
spring.cloud.nacos.config.group="Polaris (North Star) configuration group name"
2. How to view the resource access credential Token for Polaris (North Star) users/user groups:
Log in to the TSF console, click Polaris (Polaris (North Star)) in the left sidebar, and then select the target instance to go to the details page of the target Polaris (North Star) instance. Click Access Control in the sidebar, select User or User Group, and click View Token.
3. How to view the Polaris (North Star) server IP address:
Log in to the TSF console, click Polaris (Polaris (North Star)) in the left sidebar, and then select the target instance to go to the details page of the target Polaris (North Star) instance. Click Engine Management in the sidebar. On the Instance Information page, you can view the IP address.
1. Native Nacos Client modification: Polaris (North Star) server IP address and server access credentials:
Properties properties = new Properties();
properties.put(PropertyKeyConst.SERVER_ADDR, "Polaris (North Star) server IP:8848");
properties.put(PropertyKeyConst.NAMESPACE, "Polaris (North Star) namespace name");
properties.put(PropertyKeyConst.USERNAME, "any value");
properties.put(PropertyKeyConst.PASSWORD, "Polaris (North Star) user/user group resource access credential Token");
ConfigService configService = new NacosConfigService(properties);
2. How to view the resource access credential Token for Polaris (North Star) users/user groups:
In the Service Governance Center, click Permission Control in the sidebar, and select the target Polaris (North Star) engine instance.
Select User or User Group, and click View Token.
3. How to view the Polaris (North Star) server IP address:
In the Service Governance Center, click Instance List in the sidebar, and click the target Polaris (North Star) engine instance.
On the engine details page, the engine's access IP address can be viewed on the Instance Information page. 1. Modify the application configuration file: Polaris (North Star) server IP address and server access credentials:
dubbo
config-center
address: nacos://Polaris (North Star) server IP:8848
2. How to view the resource access credential Token for Polaris (North Star) users/user groups:
In the Service Governance Center, click Permission Control in the sidebar, and select the target Polaris (North Star) engine instance.
Select User or User Group, and click View Token.
3. How to view the Polaris (North Star) server IP address:
In the Service Governance Center, click Instance List in the sidebar, and click the target Polaris (North Star) engine instance.
On the engine details page, the access IP address of the engine can be viewed on the Instance Information page.