CN115589358A - Configuration script generation method and device, computer equipment and storage medium - Google Patents

Configuration script generation method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN115589358A
CN115589358A CN202211224602.6A CN202211224602A CN115589358A CN 115589358 A CN115589358 A CN 115589358A CN 202211224602 A CN202211224602 A CN 202211224602A CN 115589358 A CN115589358 A CN 115589358A
Authority
CN
China
Prior art keywords
service
configuration
switch
information
script
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211224602.6A
Other languages
Chinese (zh)
Inventor
陈凡
浦晓君
陈赞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202211224602.6A priority Critical patent/CN115589358A/en
Publication of CN115589358A publication Critical patent/CN115589358A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0876Aspects of the degree of configuration automation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Automation & Control Theory (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application relates to a method and a device for generating a configuration script, computer equipment and a storage medium, and relates to the technical field of big data. The method comprises the following steps: acquiring parameter information and service information of a switch to be configured according to the setting requirement of the cloud server; generating a reference and the parameter information according to a preset script, and generating a baseline configuration script; generating a service configuration script according to the service information; and generating the configuration script of the switch according to the baseline configuration script and the service configuration script. By adopting the method, the efficiency of setting the configuration script of the switch can be improved.

Description

Configuration script generation method and device, computer equipment and storage medium
Technical Field
The present application relates to the field of big data technologies, and in particular, to a method and an apparatus for generating a configuration script, a computer device, and a storage medium.
Background
With the increase of the traffic volume processed by the cloud server, the server needs to be expanded. And when the capacity expansion processing is performed on the server, a corresponding switch needs to be added. Typically, the newly added switch needs to be configured with its configuration script.
In the traditional technology, the configuration script of the switch is mainly written manually, and the newly added switch is configured by using the written configuration script. However, the conventional technology has a problem of low efficiency in writing the configuration script.
Disclosure of Invention
In view of the above, it is necessary to provide a configuration script generation method, apparatus, computer device and storage medium capable of improving efficiency of setting a switch configuration script in view of the above technical problems.
In a first aspect, the present application provides a method for generating a configuration script. The method comprises the following steps:
acquiring parameter information and service information of a switch to be configured according to the setting requirement of the cloud server;
generating a reference and the parameter information according to a preset script, and generating a baseline configuration script;
generating a service configuration script according to the service information;
and generating the configuration script of the switch according to the baseline configuration script and the service configuration script.
In one embodiment, generating a service configuration script according to the service information includes:
determining the service configuration information of the switch according to the service information;
and generating the service configuration script according to the service configuration information.
In one embodiment, the service configuration script includes: at least one of a port configuration item, a dynamic switching service group configuration item, a virtual expansion local area network configuration item, a boundary service network segment configuration item, a gateway protocol configuration item and a static routing configuration item of the switch.
In one embodiment, the determining the service configuration information of the switch according to the service information includes:
determining service configuration information of the switch from a preset database according to the service information; the database comprises the corresponding relation between the service configuration information of the switches of various types corresponding to the cloud server and the service information of the switches.
In one embodiment, the acquiring parameter information and service information of the switch to be configured according to the setting requirement of the cloud server includes:
determining the parameter information according to the setting requirement;
determining the service information from the database according to the parameter information; the database also comprises the corresponding relation between the service information of the switches of various types corresponding to the cloud server and the parameter information of the switches.
In one embodiment, the method further comprises:
generating a checking script according to a preset command;
checking the configuration script by using the checking script to obtain a checking result; the detection result is used for representing the accuracy of the configuration script.
In a second aspect, the present application further provides a device for generating a configuration script. The device comprises:
the acquisition module is used for acquiring parameter information and service information of the switch to be configured according to the setting requirement of the cloud server;
the first generation module is used for generating a reference and the parameter information according to a preset script and generating a baseline configuration script;
the second generation module is used for generating a service configuration script according to the service information;
and the third generation module is used for generating the configuration script of the switch according to the baseline configuration script and the service configuration script.
In a third aspect, the present application also provides a computer device. The computer device comprises a memory storing a computer program and a processor implementing the steps of the method according to any of the embodiments of the first aspect when executing the computer program.
In a fourth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium having stored thereon a computer program which, when being executed by a processor, carries out the steps of the method according to any of the embodiments of the first aspect as described above
In a fifth aspect, the present application further provides a computer program product. The computer program product comprising a computer program that, when being executed by a processor, performs the steps of the method according to any of the embodiments of the first aspect described above
According to the method and the device for generating the configuration script, the computer equipment and the storage medium, the parameter information and the service information of the switch to be configured can be obtained according to the setting requirement of the cloud server, then the reference and the parameter information of the switch to be configured are generated according to the preset script, the baseline configuration script can be generated, the service configuration script can be generated according to the service information, and then the configuration script of the switch can be generated according to the generated baseline configuration script and the service configuration script; in addition, the configuration script is automatically generated according to the parameter information and the service information of the switch to be configured, so that the problem that the configuration script is easily mistaken by manual setting is avoided, and the generation accuracy of the configuration script of the switch is improved.
Drawings
FIG. 1 is a diagram of an application environment in which a method for generating a configuration script according to an embodiment is implemented;
FIG. 2 is a flowchart illustrating a method for generating a configuration script according to one embodiment;
FIG. 3 is a flowchart showing a method of generating a configuration script according to another embodiment;
FIG. 4 is a flowchart showing a method of generating a configuration script according to another embodiment;
FIG. 5 is a flowchart showing a method of generating a configuration script according to another embodiment;
FIG. 6 is a block diagram showing an example of a configuration script generating apparatus according to an embodiment;
fig. 7 is a block diagram showing a configuration script generating apparatus according to another embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
It should be noted that the method, the apparatus, the computer device, and the storage medium for generating the configuration script according to the present application may be applied to the field of big data, and may also be applied to other technical fields except the field of big data.
The method for generating the configuration script provided by the embodiment of the application can be applied to the application environment shown in fig. 1. Fig. 1 provides a computer device, which may be a server, and its internal structure diagram may be as shown in fig. 1. The computer device includes a processor, a memory, and a network interface connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the computer device is used for storing data involved in the determination method of the interface component. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a method of generating a configuration script.
In one embodiment, as shown in fig. 2, a method for generating a configuration script is provided, which is described by taking the method as an example applied to the computer device in fig. 1, and includes the following steps:
s201, acquiring parameter information and service information of the switch to be configured according to the setting requirement of the cloud server.
The cloud server is an important component of a bottom layer (Underlay) physical network in a cloud computing service system, various services of a cloud platform in the operation process need to be used by the cloud server, and capacity expansion processing needs to be performed on the cloud server along with the increase of the traffic processed by the cloud server. It should be noted that, in the cloud computing service system, pooling of computing resources is performed, that is, in the process of integrating various physical resources required by various underlying computing, storage, and networks, such as various switches and various servers, a cloud environment needs to be formed by the nodes of the switches and the servers, and services are provided to an application side through a virtualization technology, and dynamic allocation and reallocation of the physical resources and the virtual resources can be realized according to the requirements of users.
It should be noted that the setting requirement of the cloud server refers to information of the cloud servers that need to be added when the capacity of the cloud environment is expanded, and includes the number of the required cloud servers, and the capacity size of the system disk and the capacity size of the storage disk corresponding to the required cloud servers. Optionally, the parameter information and the service information of the corresponding switch may be determined according to the setting requirement of the cloud server, optionally, the parameter information of the switch may include a number, a model, a device name, a management address (Internet Protocol, IP), a use, a loopback address (hookback IP), and the service information of the switch includes interconnection port information, service network segment information, routing information, and the like of the switch.
For example, if 180 servers for bearing computing services need to be added when the capacity of the cloud environment is expanded at this time, the 180 servers may be divided into two fault domains, each fault domain includes 90 servers, generally, one fault domain requires two groups of switches, and each group of switches may include four switches, so that it may be determined that 16 switches need to be added to access the 180 servers to the existing network.
And S202, generating reference and parameter information according to a preset script, and generating a baseline configuration script.
The script generation standard is a basic standard for configuring various physical devices in the underlying network, and the baseline configuration script refers to a script for configuring various basic configurations for the switch.
Optionally, the baseline configuration script may include at least one of a time zone configuration item, a loopback interface configuration item, an Access Control List (ACL) configuration item, a login setting (SSH) configuration item, a Simple Network Management Protocol (SNMP) configuration item, and a user interface configuration item.
It should be noted that, in general, the generation of the baseline configuration script is related to the same standard specification of the switch device, and is not related to various business environments such as the cloud environment where the switch is located. Optionally, in this embodiment, the baseline configuration script of the switch may be fixed as a template, and is used to configure various types of switches.
And S203, generating a service configuration script according to the service information.
The service configuration script is a script configured according to the service type and service information processed by the switch, and the service configuration scripts configured by different types of switches are different, for example, the configuration script may include an interconnection port configuration item, a service network segment configuration item, and a generated routing configuration item, the interconnection port configuration item may be generated according to interconnection port information of the switch, the service network segment configuration item may be generated according to the service network segment information of the switch, and the routing configuration item may be generated according to routing information of the switch.
Optionally, the service configuration script may include: the virtual expansion local area Network system comprises a port configuration item of a switch, a Dynamic switching Service Group (DFS-Group) configuration item, a Service Network segment configuration item, a virtual expansion local area Network configuration item, a Border Gateway Protocol (BGP) configuration item, a port linkage configuration item, a static routing configuration item, and the like, wherein the virtual expansion local area Network configuration item may include a Network Virtual Edge (NVE) interface configuration item, and a bridge domain (bridge-domain) configuration item.
It should be noted that the two-layer switch adopts LEAF-SPINE switch architecture of LEAF-spin, the spin layer switch is a core switch, the LEAF layer switch is an access layer, the LEAF layer switch provides network connection to the terminal and the server, and the LEAF layer switch is connected to the spin layer switch in an uplink manner, so that the interconnection port configuration of the switch includes uplink core interface configuration, downlink LEAF interface configuration, spin-spin interconnection interface configuration of the spin layer switch, and uplink spin interface configuration and LEAF-spin interconnection configuration of the LEAF layer switch.
And S204, generating a configuration script of the switch according to the baseline configuration script and the service configuration script.
The configuration script of the switch comprises various configuration information required by the switch when the switch is communicated with other physical equipment in the underlying network, and the switch can be automatically configured according to the configuration script.
Optionally, the configuration script may be divided into a baseline configuration script and a service configuration script, and the configuration script may be formed by combining the baseline configuration script and the service configuration script.
According to the method for generating the configuration script, the parameter information and the service information of the switch to be configured can be obtained according to the setting requirement of the cloud server, then the reference and the parameter information of the switch to be configured are generated according to the preset script, the baseline configuration script can be generated, the service configuration script can be generated according to the service information, and the configuration script of the switch can be generated according to the generated baseline configuration script and the service configuration script; in addition, the configuration script is automatically generated according to the parameter information and the service information of the switch to be configured, so that the problem that the configuration script is easily mistaken by manual setting is avoided, and the generation accuracy of the configuration script of the switch is improved.
In a scenario of generating a service configuration script according to the service information, in an embodiment, as shown in fig. 3, the step S203 includes:
s301, determining the service configuration information of the switch according to the service information.
The service configuration information is configuration information determined according to service information of different types of switches, and includes port configuration information, service network segment configuration information, routing configuration information, gateway protocol configuration information and the like of the switches.
Illustratively, in this embodiment, the interconnection port configuration information and the port linkage configuration information may be determined according to the port information of the switch; determining service network segment configuration information according to the service network segment information of the switch; static routing configuration information may be generated from routing information for the switch.
S302, generating a service configuration script according to the service configuration information.
Optionally, the service configuration script may be divided into at least one of a port configuration item, a dynamic switching service group configuration item, a service network segment configuration item, a virtual expansion local area network configuration item, a border gateway protocol configuration item, and a static routing configuration item of the switch.
It should be noted that, besides the Basic Management Controller (BMC) switch, other switches are used in pairs, so the interface between each pair of switches is called an interconnection interface, and generally, the port configuration items of the switches refer to an uplink interface configuration, a downlink interface configuration, and a configuration of the interconnection interface of one switch, and the specific configuration includes, for different types of switches: the method comprises the steps of configuring an upper connection core interface, a lower connection LEAF interface and a SPINE-SPINE interconnection interface of a SPINE switch; calculating the uplink SPINE interface configuration and LEAF-LEAF interconnection configuration of a business LEAF switch; calculating and storing the uplink SPINE interface configuration and the LEAF-LEAF interconnection configuration of the LEAF switch; storing the uplink SPINE interface configuration and the LEAF-LEAF interconnection configuration of the front-end LEAF switch; storing uplink SPINE interface configuration and LEAF-LEAF interconnection configuration of a back-end LEAF switch; configuring an upper connection SPINE interface of a bare-machine LEAF switch, and configuring LEAF-LEAF interconnection; and configuring an uplink LEAF interface of the BMC switch. If the uplink port of the switch fails, the switch is considered to have no capability of providing network communication for the downlink equipment, and all downlink ports of the switch are actively closed.
Dynamic switching Service groups (DFS-groups) are used to manage each pair of switches, and one DFS-Group includes two switches, and can determine whether a role or b role of a switch according to the name of the switch, thereby determining the priority of the two switches according to the roles, and generating corresponding configuration. The dynamic switching service group configuration items specifically include: the priority of the a role in the SPINE switch is 150, the b role is 100; the priority of a role in the computing service LEAF switch is 150, and the priority of b role is 100; calculating the priority of the role a in the storage LEAF switch as 150, and the priority of the role b in the storage LEAF switch as 100; storing the priority of the a role in the front-end LEAF switch as 150 and the priority of the b role as 100; storing the priority of the a role in the back-end LEAF switch as 150 and the priority of the b role as 100; the priority of the a role in the bare LEAF switch is 150, and the priority of the b role is 100.
In an Underlay physical network layer, different types of switches need to configure different network segments to meet different service requirements, and the service network segment configuration items specifically include: initiating an external trunk segment of the spin switch; calculating an initial internal communication network segment, a tunnel bearing network segment and an operation and maintenance management network segment of the business LEAF switch; calculating and storing an initial data storage network segment of the LEAF switch; storing an initial internal communication network segment, an operation and maintenance management network segment and a storage service network segment of the front-end LEAF switch; storing an initial storage internal network segment of the back-end LEAF switch; the method comprises the following steps that an initial internal communication network segment, a tunnel bearing network segment and an operation and maintenance management network segment of a bare machine LEAF switch are adopted; the BMC switch initiates an out-of-band management network segment.
The virtual eXtensible Local Area Network (Vxlan) configuration item comprises a Network Virtual Edge (NVE) interface configuration item and a Bridge-Domain (BD) configuration item, wherein the NVE interface is used for establishing a Vxlan tunnel, and the BD is a two-layer broadcast Domain for forwarding a data message in the Vxlan. The NVE interface configuration items for the different types of switches specifically include: the SPINE switch needs to be configured with an IP (Internet protocol) of an NVE (network video express) interface and establishes a Vxlan tunnel with a lower-connection LEAF switch; the computing service LEAF switch needs to be configured with an IP of an NVE interface and establishes a Vxlan tunnel with the upper SPINE; the calculation storage LEAF switch, the storage front-end LEAF switch and the storage back-end LEAF switch do not need to be configured with NVE interfaces; the bare computer LEAF switch needs to be configured with an IP (Internet protocol) of an NVE (network video express) interface and establishes a Vxlan tunnel with the upper SPINE; the BMC switch does not need to be configured with NVE interfaces. BD configuration items for different types of switches specifically include: the spin switch needs to configure BD, bind Virtual Network Identifier (VNI); a computing service LEAF switch needs to configure a BD, bind a VNI and bind a Virtual Local Area Network (VLAN); the calculation storage LEAF switch, the storage front-end LEAF switch and the storage back-end LEAF switch do not need to be configured with a BD; the bare LEAF switch needs to be configured with a BD, bind a VNI and bind a VLAN; the BMC switch does not need to configure the BD.
A Border Gateway Protocol (BGP) configuration item is specifically configured to, for different types of switches: the SPINE switch needs to configure its own label (ID) and Autonomous System (AS) number to declare its own service network segment and lower LEAF interface network segment; the calculation service LEAF switch needs to configure self ID and AS number, declare self service network segment and upper SPINE interface network segment; calculating and storing the ID and AS number of the LEAF switch which needs to be configured, and declaring a self service network segment and an upper SPINE interface network segment; storing the ID and AS number of the front-end LEAF switch, and announcing the self service network segment and the upper SPINE interface network segment; storing the ID and AS number of the back-end LEAF switch, and announcing the self service network segment and the upper SPINE interface network segment; the bare LEAF switch needs to configure self ID and AS number to declare a self service network segment and an upper SPINE interface network segment; the BMC switch does not need to configure the NGP.
The static routing is a configuration item used between the LEAF switch and the BMC switch, and is specifically configured as follows: if the computing service LEAF switch comprises a hung-down BMC switch, the configuration of the computing service LEAF switch points to a static route of a BMC network segment of the computing service LEAF switch; the calculation storage LEAF switch, the storage front-end LEAF switch and the storage back-end LEAF switch do not need to be configured with static routes; the bare computer LEAF slows down and if the bare computer LEAF comprises a hung-down BMC switch, the configuration of the computing service LEAF switch points to a static route of a BMC network segment of the bare computer LEAF switch; the configuration of the BMC switch points to the default static route of the upstream LEAF.
In the embodiment, the service configuration information of the switch is determined according to the service information, and then the service configuration script is generated according to the service configuration information.
In the scenario of determining the service configuration information of the switch according to the service information, in an embodiment, the S301 includes: determining service configuration information of the switch from a preset database according to the service information; the database comprises the corresponding relation between the service configuration information of the various types of switches corresponding to the cloud server and the service information of the switches.
Optionally, in this embodiment, the LLD may include basic information of the switch, service information, service configuration information, and a correspondence between the service information and the service configuration information, where the information may be stored in an equipment table, a port interconnection table, and a network segment planning table, respectively, where the equipment table is used to store parameter information of the switch, the port interconnection table is used to store uplink port configuration, downlink port configuration, and interconnection port configuration of the switch, and the network segment planning table is used to store an IP address used by the switch for service communication.
Optionally, when the cloud environment is expanded, information of the type, number, name, relationship between the uplink and the downlink ports, the planned network segment, and the like of the newly added switch needs to be stored in the LLD, so as to perfect the switch information in the underleay network. It can be understood that, the LLD uses the name of the switch as the unique identifier, and the service information of the switch can be obtained by querying the name of the switch in the LLD, so as to obtain the service configuration information of the switch according to the corresponding relationship between the service information of the switch and the service configuration information.
In this embodiment, by determining the service configuration information of the switch from the correspondence between the service configuration information of each type of switch corresponding to the cloud server and the service information of the switch according to the service information, the service configuration information of the switch can be accurately and quickly determined, thereby improving the efficiency and accuracy of generating the service configuration script of the switch.
In the scenario of determining the service information, in an embodiment, as shown in fig. 4, the S201 includes:
s401, determining parameter information according to setting requirements.
The parameter information includes the model, number, device name, etc. of the switch to be configured. Optionally, the setting requirement may include the number of newly added switches, and the model, the number, the device name, and the like of the switch that needs to be configured may be determined according to the setting requirement, where the device name may be used as a unique identifier of the switch in the database, and the parameter information of the switch may be acquired from the database by querying the device name of the switch in the database.
S402, determining service information from a database according to the parameter information; the database also comprises the corresponding relation between the service information of the switches of various types corresponding to the cloud server and the parameter information of the switches.
Optionally, in this embodiment, the database further includes a corresponding relationship between service information of each type of switch corresponding to the cloud server and parameter information of the switch, and in this embodiment, after the parameter information is determined, the corresponding service information may be found from the database according to the corresponding relationship between the parameter information and the service information, so as to determine the service information of the switch.
In the embodiment, the parameter information of the switch can be quickly determined according to the setting requirement of the cloud server, so that the service information can be determined from the database comprising the corresponding relation between the service information of each type of switch corresponding to the cloud server and the parameter information of the switch according to the parameter information.
In some scenarios, the generated configuration script may also need to be checked. On the basis of the above generating the configuration script of the switch, in an embodiment, as shown in fig. 5, the method further includes:
s501, generating a checking script according to a preset command.
The preset commands can include display commands, pipeline command operators and the like, wherein the display commands are used for viewing the current state of the equipment, detecting the state of adjacent equipment, monitoring a network and positioning network faults; the pipeline command operator is used for linking two commands or a plurality of commands, and the execution result of the previous command is used as the input of the next command, for example, how many scripts are in total can be counted by the pipeline command operator, and the configuration content of the device can be viewed by the pipeline character.
Optionally, in this embodiment, a display command may be used in combination with a pipe command operator to generate a check script, so as to check whether the generated configuration script is complete and whether each configuration item is correct.
S502, checking the configuration script by using the checking script to obtain a checking result; the detection result is used for representing the accuracy of the configuration script.
Optionally, the checking script may be run to check various configuration items of the configuration scripts of the different types of switches, so as to detect whether the configuration script is correct. Further, if the detection result is incorrect, the detection result is returned, and the operation and maintenance personnel can modify the configuration script according to the detection result.
Optionally, in this embodiment, the checking script may check whether a static user is created in the configuration script of the switch, including checking a spin switch, a computing service LEAF switch, a computing storage LEAF switch, a storage front-end LEA switch, a storage back-end LEAF switch, a bare-computer LEAF switch, and a BMC switch; whether the connection state between the end and the middle of the DFS-group is normal or not can be checked, wherein the connection state comprises checking of a SPINE switch, a calculation service LEAF switch, a calculation storage LEAF switch, a storage front end LEA switch, a storage rear end LEAF switch and a bare computer LEAF switch; whether a neighbor state machine of BGP and a neighbor BGP session state built by the equipment normally run can be checked, wherein the checking comprises checking a SPINE switch, a computation service LEAF switch, a computation storage LEAF switch, a storage front-end LEA switch, a storage back-end LEAF switch and a bare-computer LEAF switch; whether the VNI state of the Vxlan tunnel seen by the equipment is normal or not can be checked, wherein the VNI state includes checking of a SPINE switch, a computing service LEAF switch and a bare-computer LEAF switch; the states of all components of the device, such as a power supply, a fan, a board card and the like, can also be checked to be normal, including checking a spin switch, a computing service LEAF switch, a computing storage LEAF switch, a storage front-end LEA switch, a storage rear-end LEAF switch, a bare computer LEAF switch and a BMC switch; it is also possible to check whether the license of the switch is successfully registered, including checking the spin switch, the compute services LEAF switch, the compute storage LEAF switch, the storage front-end LEA switch, the storage back-end LEAF switch, the bare LEAF switch, and the BMC switch.
In the embodiment, the check script is generated according to the preset command, the check script is used for checking the configuration script to obtain the check result representing the accuracy of the configuration script, and the configuration script can be checked, so that the influence of the configuration script error on the network environment is avoided, the correctness of the configuration script can be ensured, and the accuracy of the switch configuration script is improved.
It should be understood that, although the steps in the flowcharts related to the embodiments as described above are sequentially displayed as indicated by arrows, the steps are not necessarily performed sequentially as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least a part of the steps in the flowcharts related to the embodiments described above may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, and the execution order of the steps or stages is not necessarily sequential, but may be rotated or alternated with other steps or at least a part of the steps or stages in other steps.
Based on the same inventive concept, the embodiment of the present application further provides a device for generating a configuration script, which is used for implementing the method for generating a configuration script. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme described in the above method, so specific limitations in the following embodiments of one or more configuration script generation devices may refer to the above limitations on the configuration script generation method, and details are not described herein.
In one embodiment, as shown in fig. 6, there is provided a configuration script generating apparatus, including: an acquisition module 11, a first generation module 12, a second generation module 13 and a third generation module 14, wherein:
the acquisition module 11 is configured to acquire parameter information and service information of the switch to be configured according to a setting requirement of the cloud server;
the first generation module 12 is configured to generate a baseline configuration script according to a preset script generation reference and the parameter information;
the second generating module 13 is configured to generate a service configuration script according to the service information;
and a third generating module 14, configured to generate a configuration script of the switch according to the baseline configuration script and the service configuration script.
The device for generating a configuration script provided in this embodiment may execute the method embodiments described above, and the implementation principle and the technical effect are similar, which are not described herein again.
In one embodiment, as shown in fig. 7, the second generating module 13 includes: a first determining unit 131 and a first generating unit 132, wherein:
a first determining unit 131, configured to determine service configuration information of the switch according to the service information.
The first generating unit 132 is configured to generate a service configuration script according to the service configuration information.
Optionally, the service configuration script includes: at least one of port configuration item, dynamic switching service group configuration item, service network segment configuration item, virtual extended local area network configuration item, border gateway protocol configuration item and static routing configuration item of the switch.
The device for generating a configuration script provided in this embodiment may execute the method embodiments described above, and the implementation principle and the technical effect are similar, which are not described herein again.
In one embodiment, the first determining unit 131 is specifically configured to:
determining service configuration information of the switch from a preset database according to the service information; the database comprises the corresponding relation between the service configuration information of the various types of switches corresponding to the cloud server and the service information of the switches.
The device for generating a configuration script provided in this embodiment may execute the method embodiments described above, and the implementation principle and the technical effect are similar, which are not described herein again.
In one embodiment, please continue to refer to fig. 7, the obtaining module 11 includes a second determining unit 111 and a third determining unit 112, where:
and a second determining unit 111, configured to determine the parameter information according to the setting requirement.
A third determining unit 112, configured to determine service information from the database according to the parameter information; the database also comprises the corresponding relation between the service information of the switches of various types corresponding to the cloud server and the parameter information of the switches.
The device for generating a configuration script provided in this embodiment may execute the method embodiments described above, and the implementation principle and the technical effect are similar, which are not described herein again.
In one embodiment, referring to fig. 7, the apparatus further includes: a fourth generation module 15 and an inspection module 16, wherein:
a fourth generating module 15, configured to generate the inspection script according to a preset command.
The checking module 16 is used for checking the configuration script by using the checking script to obtain a checking result; the detection result is used for representing the accuracy of the configuration script.
The device for generating a configuration script provided in this embodiment may execute the method embodiments described above, and the implementation principle and the technical effect are similar, which are not described herein again.
The modules in the configuration script generating device can be wholly or partially implemented by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, comprising a memory having a computer program stored therein and a processor that when executing the computer program performs the steps of:
acquiring parameter information and service information of a switch to be configured according to the setting requirement of the cloud server;
generating reference and parameter information according to a preset script, and generating a baseline configuration script;
generating a service configuration script according to the service information;
and generating a configuration script of the switch according to the baseline configuration script and the service configuration script.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
determining service configuration information of the switch according to the service information;
and generating a service configuration script according to the service configuration information.
Optionally, the service configuration script includes: at least one of a port configuration item, a dynamic switching service group configuration item, a service network segment configuration item, a virtual extended local area network configuration item, a border gateway protocol configuration item and a static routing configuration item of the switch.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
determining service configuration information of the switch from a preset database according to the service information; the database comprises the corresponding relation between the service configuration information of the various types of switches corresponding to the cloud server and the service information of the switches.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
determining parameter information according to setting requirements;
determining service information from a database according to the parameter information; the database also comprises the corresponding relation between the service information of the various types of switches corresponding to the cloud server and the parameter information of the switches.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
generating a checking script according to a preset command;
checking the configuration script by using the checking script to obtain a checking result; the detection result is used for representing the accuracy of the configuration script.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of:
acquiring parameter information and service information of a switch to be configured according to the setting requirement of the cloud server;
generating reference and parameter information according to a preset script, and generating a baseline configuration script;
generating a service configuration script according to the service information;
and generating a configuration script of the switch according to the baseline configuration script and the service configuration script.
In one embodiment, the computer program when executed by the processor further performs the steps of:
determining service configuration information of the switch according to the service information;
and generating a service configuration script according to the service configuration information.
Optionally, the service configuration script includes: at least one of a port configuration item, a dynamic switching service group configuration item, a service network segment configuration item, a virtual extended local area network configuration item, a border gateway protocol configuration item and a static routing configuration item of the switch.
In one embodiment, the computer program when executed by the processor further performs the steps of: determining service configuration information of the switch from a preset database according to the service information; the database comprises the corresponding relation between the service configuration information of the various types of switches corresponding to the cloud server and the service information of the switches.
In one embodiment, the computer program when executed by the processor further performs the steps of: determining parameter information according to setting requirements;
determining service information from a database according to the parameter information; the database also comprises the corresponding relation between the service information of the various types of switches corresponding to the cloud server and the parameter information of the switches.
In one embodiment, the computer program when executed by the processor further performs the steps of: generating a checking script according to a preset pipeline symbol command;
checking the configuration script by using the checking script to obtain a checking result; the detection result is used for representing the accuracy of the configuration script.
In one embodiment, a computer program product is provided, comprising a computer program which, when executed by a processor, performs the steps of:
acquiring parameter information and service information of a switch to be configured according to the setting requirement of the cloud server;
generating reference and parameter information according to a preset script, and generating a baseline configuration script;
generating a service configuration script according to the service information;
and generating a configuration script of the switch according to the baseline configuration script and the service configuration script.
In one embodiment, the computer program when executed by the processor further performs the steps of:
determining service configuration information of the switch according to the service information;
and generating a service configuration script according to the service configuration information.
Optionally, the service configuration script includes: at least one of a port configuration item, a dynamic switching service group configuration item, a service network segment configuration item, a virtual extended local area network configuration item, a border gateway protocol configuration item and a static routing configuration item of the switch.
In one embodiment, the computer program when executed by the processor further performs the steps of: determining service configuration information of the switch from a preset database according to the service information; the database comprises the corresponding relation between the service configuration information of the various types of switches corresponding to the cloud server and the service information of the switches.
In one embodiment, the computer program when executed by the processor further performs the steps of:
determining parameter information according to setting requirements;
determining service information from a database according to the parameter information; the database also comprises the corresponding relation between the service information of the various types of switches corresponding to the cloud server and the parameter information of the switches.
In one embodiment, the computer program when executed by the processor further performs the steps of:
generating a checking script according to a preset command;
checking the configuration script by using the checking script to obtain a checking result; the detection result is used for representing the accuracy of the configuration script.
It should be noted that, the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, presented data, etc.) referred to in the present application are information and data authorized by the user or sufficiently authorized by each party.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above may be implemented by hardware instructions of a computer program, which may be stored in a non-volatile computer-readable storage medium, and when executed, may include the processes of the embodiments of the methods described above. Any reference to memory, database, or other medium used in the embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high-density embedded nonvolatile Memory, resistive Random Access Memory (ReRAM), magnetic Random Access Memory (MRAM), ferroelectric Random Access Memory (FRAM), phase Change Memory (PCM), graphene Memory, and the like. Volatile Memory can include Random Access Memory (RAM), external cache Memory, and the like. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), among others. The databases referred to in various embodiments provided herein may include at least one of relational and non-relational databases. The non-relational database may include, but is not limited to, a block chain based distributed database, and the like. The processors referred to in the embodiments provided herein may be general purpose processors, central processing units, graphics processors, digital signal processors, programmable logic devices, quantum computing based data processing logic devices, etc., without limitation.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present application. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present application shall be subject to the appended claims.

Claims (10)

1. A method for generating a configuration script, the method comprising:
acquiring parameter information and service information of a switch to be configured according to the setting requirement of the cloud server;
generating a reference and the parameter information according to a preset script, and generating a baseline configuration script;
generating a service configuration script according to the service information;
and generating the configuration script of the switch according to the baseline configuration script and the service configuration script.
2. The method of claim 1, wherein generating a service configuration script according to the service information comprises:
determining the service configuration information of the switch according to the service information;
and generating the service configuration script according to the service configuration information.
3. The method of claim 2, wherein the service configuration script comprises: at least one of a port configuration item, a dynamic switching service group configuration item, a service network segment configuration item, a virtual extended local area network configuration item, a border gateway protocol configuration item and a static routing configuration item of the switch.
4. The method of claim 2, wherein the determining the service configuration information of the switch according to the service information comprises:
determining service configuration information of the switch from a preset database according to the service information; the database comprises corresponding relations between the service configuration information of the various types of switches corresponding to the cloud server and the service information of the switches.
5. The method according to claim 4, wherein the obtaining parameter information and service information of the switch to be configured according to the setting requirement of the cloud server comprises:
determining the parameter information according to the setting requirement;
determining the service information from the database according to the parameter information; the database also comprises the corresponding relation between the service information of the switches of various types corresponding to the cloud server and the parameter information of the switches.
6. The method according to any one of claims 1-5, further comprising:
generating a checking script according to a preset command;
checking the configuration script by using the checking script to obtain a checking result; the detection result is used for representing the accuracy of the configuration script.
7. An apparatus for generating a configuration script, the apparatus comprising:
the acquisition module is used for acquiring parameter information and service information of the switch to be configured according to the setting requirement of the cloud server;
the first generation module is used for generating a reference and the parameter information according to a preset script and generating a baseline configuration script;
the second generation module is used for generating a service configuration script according to the service information;
and the third generation module is used for generating the configuration script of the switch according to the baseline configuration script and the service configuration script.
8. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor, when executing the computer program, implements the steps of the method of any of claims 1 to 6.
9. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 6.
10. A computer program product comprising a computer program, characterized in that the computer program realizes the steps of the method of any one of claims 1 to 6 when executed by a processor.
CN202211224602.6A 2022-10-09 2022-10-09 Configuration script generation method and device, computer equipment and storage medium Pending CN115589358A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211224602.6A CN115589358A (en) 2022-10-09 2022-10-09 Configuration script generation method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211224602.6A CN115589358A (en) 2022-10-09 2022-10-09 Configuration script generation method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115589358A true CN115589358A (en) 2023-01-10

Family

ID=84777910

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211224602.6A Pending CN115589358A (en) 2022-10-09 2022-10-09 Configuration script generation method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115589358A (en)

Similar Documents

Publication Publication Date Title
US10797970B2 (en) Interactive hierarchical network chord diagram for application dependency mapping
US20230370348A1 (en) Automatic health check and performance monitoring for applications and protocols using deep packet inspection in a datacenter
US11336567B2 (en) Service aware virtual private network for optimized forwarding in cloud native environment
US9276812B1 (en) Automated testing of a direct network-to-network connection
US8549347B1 (en) Techniques for network replication
US9003222B2 (en) Configuration fault localization in shared resource environments
CN110754065B (en) Network authentication between a logic level and a hardware level of a network
CN107547595B (en) Cloud resource scheduling system, method and device
US20240039781A1 (en) Techniques and interfaces for troubleshooting datacenter networks
US10616072B1 (en) Epoch data interface
EP3780500A2 (en) Network management with topology dependency and path generation
EP3021223B1 (en) Method for enhancing memory fault tolerance
US11916786B2 (en) Distributed routing controllers for multi-region SDWAN
CN105095103A (en) Storage device management method and device used for cloud environment
US10129184B1 (en) Detecting the source of link errors in a cut-through forwarding network fabric
US10210127B2 (en) Storage system cabling analysis
US11539728B1 (en) Detecting connectivity disruptions by observing traffic flow patterns
CN115589358A (en) Configuration script generation method and device, computer equipment and storage medium
CN116264538A (en) Data processing method, device, equipment and computer storage medium
CN106130800B (en) Data frame processing method and device
US20190207804A1 (en) Node fault isolation
US20230164064A1 (en) Fast, Predictable, Dynamic Route Failover in Software-Defined Networks
CN109962820A (en) A kind of detection method and detection platform of cloud platform
US20200327026A1 (en) Circuit-cycle reproduction
US10097419B2 (en) Linear method for detection of multiple service topologies

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination