1

Describes how to install a high-availability Nacos cluster with one click through the cloud native application management platform Rainbond . This method is suitable for users who are not familiar with complex technologies such as Kubernetes and containerization, and lowers the threshold for deploying Nacos in Kubernetes.

Background Information

The combination of Rainbond and Nacos

Rainbond is an easy-to-use open source cloud-native application management platform. With it, users can complete the deployment and operation of microservices in a graphical interface. With the help of the capabilities of Kubernetes and containerization technology, automatic operation and maintenance capabilities such as fault self-healing and elastic scaling can be empowered to users' businesses.

Rainbond has a built-in native Service Mesh microservice framework, and also has a good integration experience with other microservice frameworks such as Spring Cloud and Dubbo. Therefore, a large number of Rainbond users may also be users of the Nacos microservice registry. Such users no longer need to care about how to deploy Nacos clusters. The Rainbond team has made Nacos an application template that can be deployed with one click, which is free for open source users to download and install. This installation method greatly reduces the deployment burden of users using Nacos cluster, and currently supports versions 1.4.2 and 2.0.4.

About Application Templates

The application template is an installation package for the Rainbond cloud-native application management platform, based on which users can install business systems into their own Rainbond with one click. No matter how complex the business system is, the application template will abstract it into an application, and install it together with the images, configuration information of all components in the application, and the relationship between all components.

Preconditions

  • The deployed Rainbond cloud-native application management platform, , the fast-experience version , can be run in a personal PC environment at the cost of starting a container.
  • Internet connection.

quick start

  • Access built-in open source app store
Select the app market tab on the left, switch to the open source app store tab, search for the keywords nacos to find the Nacos-cluster app.

nacos-1

  • One-click installation
Click on the right side of Nacos-cluster to install to enter the installation page. After filling in the simple information, click to confirm to start the installation. The page automatically jumps to the topology view.

nacos-2

Parameter Description:

optionsillustrate
Team NameUser-created workspace, isolated by namespace
cluster nameSelect which K8s cluster Nacos is deployed to
Choose an applicationSelect which application Nacos is deployed to. The application contains several related components
App versionSelect the version of Nacos, currently available versions are 1.4.2, 2.0.4

After a few minutes, the Nacos cluster will be installed and running.

nacos-3

  • test

Other microservice components that need to perform service registration can use ${NACOS_HOST}:${NACOS_PORT} to connect to the Nacos cluster after establishing the Nacos-oriented dependency .

  • service registration

    curl -X PUT "http://${NACOS_HOST}:${NACOS_PORT}/nacos/v1/ns/instance?serviceName=nacos.naming.serviceName&ip=20.18.7.10&port=8080"
  • service found

    curl -X GET "http://${NACOS_HOST}:${NACOS_PORT}/nacos/v1/ns/instance/list?serviceName=nacos.naming.serviceName"
  • release configuration

    curl -X POST "http://${NACOS_HOST}:${NACOS_PORT}/nacos/v1/cs/configs?dataId=nacos.cfg.dataId&group=test&content=helloWorld"
  • get configuration

    curl -X GET "http://${NACOS_HOST}:${NACOS_PORT}/nacos/v1/cs/configs?dataId=nacos.cfg.dataId&group=test"

Advanced Features

  • The Nacos cluster installed with one click contains 3 instances, and the operation of self-organization and election is automatically completed by initializing the plug-in.

nacos-4

  • By default, Mysql is integrated as a data source. Configure the following environment variables in the environment configuration of the Nacos-server-2.0.4 component to switch to other external data sources.
namenecessarydescribe
MYSQL_SERVICE_HOSTYdatabase address
MYSQL_SERVICE_PORTYdatabase port
MYSQL_SERVICE_USERYdatabase username
MYSQL_SERVICE_PASSWORDYdatabase password
MYSQL_SERVICE_DB_NAMEYdata storage name
  • The data persistence directory of Nacos-server-2.0.4 is generated by default.

nacos-5

  • By default, the health check mechanism of Nacos-server-2.0.4 is configured to ensure that the instance goes offline automatically when it fails, and automatically goes online after recovery.

nacos-6


Rainbond
764 声望56 粉丝

不用懂 Kubernetes 的云原生应用管理平台