Halaman ini belum tersedia dalam bahasa lokal Anda. Kami berusaha keras untuk menambahkan lebih banyak versi bahasa. Terima kasih atas dukungan Anda.
- Service Overview
- Billing
- Getting Started
-
User Guide
- Overview
- Permissions Management
- Environment Management
- Application Management
- Component Management
- Instance Management
- Component Configurations
- Component O&M
- System Settings
- Key Operations Recorded by CTS
-
Best Practices
- CAE Best Practices
- Using CAE to Host Nginx Static File Servers
- Interconnecting GitLab with Jenkins for Automatic Build and Deployment on CAE
- Deploying Components Based on the Dependency Sequence Using the Jenkins Pipeline
- Deploying Spring Cloud Applications to CAE to Automatically Connect to the Nacos Engine
- Graceful Startup of a Spring Cloud Application
- Health Check
- Lifecycle Management
- Sending Event Alarms to WeCom
-
Connecting to the CodeArts Pipeline to Automatically Upgrade CAE Components
- Overview
- Upgrading a CAE Component After Uploading a Software Package Built Using the Pipeline to a CodeArts Release Repo
- Upgrading a CAE Component After Uploading a Software Package Built Using the Pipeline to the OBS Bucket
- Upgrading a CAE Component After Uploading an Image Built Using the Pipeline to the SWR Image Repository
- Configuring PromQL to Implement Custom Auto Scaling
- Configuring the Interconnection Between CAE and DEW to Help Applications Obtain Encrypted Secrets from DEW
- Deploying ASP.NET Core Applications to CAE
- Connecting the Network Through Enterprise Routes
- API Reference
-
FAQs
- Component Management FAQs
- Environment Management
-
Component Configuration FAQs
- Is Manual Scaling Still Effective When a Scaling Policy Is Configured?
- Can Components Be Scaled Without a Scaling Policy?
- Why Is My Instance Abnormal After Cloud Storage Is Configured?
- What Do I Do If a Component Becomes Not Ready?
- How Does CAE Support Dark Launch?
- How Do I Provide Prometheus Metrics for a Java Application?
- System Configuration FAQs
- Service Resources FAQs
- General Reference
Show all
Copied.
Overview
Scenario
You can package and deploy the service code to CAE. Only the Nacos engine configuration needs to be added to the deployed component configuration to automatically connect to the Nacos engine. You need not manually modify the service code configuration file to prevent misoperations.
This section describes how to use the CAE source code deployment capability to automatically deploy a provider service and a consumer service, helping you experience automatic access to the Nacos engine.
Process Comparison
Original Nacos interconnection process:
New Nacos interconnection process:
Principles
In Spring Cloud applications, the priority of system environment variables is higher than that of configuration files. Therefore, if parameters are configured in system environment variables, the system preferentially uses the parameters in the environment variables. To automatically connect to the Nacos engine, CAE automatically adds the SPRING_CLOUD_NACOS_DISCOVERY_SERVERADDR and SPRING_CLOUD_NACOS_CONFIG_SERVERADDR environment variables to the component. In this way, the system can correctly connect to the Nacos engine even if these parameters are not configured in the configuration file.
If you configure Nacos registry and discovery parameters with a higher priority than environment variables, the Nacos interconnection may be abnormal. For example, if --spring.cloud.nacos.discovery.server-addr=nacos.com is added to the startup command, the corresponding configuration in the environment variables will be overwritten. As a result, the component cannot connect to Nacos properly. Therefore, when configuring Nacos parameters, pay attention to the priority to ensure that Nacos can be correctly interconnected.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot