This is the 18th day of my participation in the November Gwen Challenge. Check out the event details: The last Gwen Challenge 2021

Antecedents to review

The sixth article on Nacos, today’s article can be regarded as the development of Nacos tutorial, also can be called the operating manual of the Nacos background system, simple popularization of its background system related functions.

Nacos background system

The background system of Nacos has the following menus:

Let’s take a look at the basic uses of these menu functions.

Configuration management

Configuration management is one of the key features of Nacos. There are three small menus, namely configuration list, historical version and listening query.

It provides the functions of adding, deleting, modifying and searching corresponding module configurations, recording the history of configuration files and rolling back operations, and monitoring consumption configuration IP information.

Let’s look at how to use them one by one.

Add the configuration

Data ID: Indicates the name of the configuration file. Generally, the parameter is set to the same as the module name. If you want to change the environment, add -dev and -test after the name.

Nacos provides a default Group DEFAULT_GROUP.

Description: Note description, optional, not very important.

Configuration format: Nacos provides a variety of configuration formats, including text, json, XML, yaml, HTML, and properties. Yaml files are generally recommended when using SpringCloud.

Configuration content: The configuration content is the corresponding configuration, such as specifying the database and so on.

After the addition, we should have a data query in the list, as shown below:

There are action columns in the list, where you can view, edit, delete, and most importantly, provide a sample code through which you can dynamically invoke Nacos configuration.

Version history

Historical versions. Nacos stores a configuration file for historical versions each time a configuration is changed, thus avoiding incorrect changes.

Listening to the query

Listen to queries. Nacos provides the ability to listen to subscribers’ IP information to confirm whether the latest configuration can be pushed properly.

Service management

The service management menu has two functions, service list and subscriber list respectively.

Service list

The list of services, of course, is a query function in Nacos service governance, through which you can query the relevant services currently registered with Nacos.

List of subscribers

Subscriber list, which is also easy to understand, means that you can query which IP clients have registered their services with Nacos. This list can query relevant information.

Access control

There are three kinds of functions in authority control: user management, role management and authority management. Although this function is not the main function provided by Nacos for services, it is equally important.

This permission function is designed for the current Nacos background, including adding, deleting, modifying and searching users, adding, deleting, modifying and searching roles, and providing role authorization functions.

You can do it yourself, it’s very simple.

The namespace

Namespace functionality is used to isolate multiple user logics, or multiple environments, such as declaring dev, test, and production namespaces to effectively isolate different operations.

The ID of the new namespace can be specified through the namespace attribute of the project.

Cluster management

If you need to deploy a Nacos cluster, or have already deployed a Nacos cluster, you can query the Nacos server for each node in the corresponding Nacos cluster in the current page.

conclusion

The Nacos background system is very operable, so it doesn’t take a long time to learn how to use it. It only takes a little effort. Did you learn it?