CN113923118A - Virtual switch batch deployment method, server, switch and data center - Google Patents

Virtual switch batch deployment method, server, switch and data center Download PDF

Info

Publication number
CN113923118A
CN113923118A CN202111036653.1A CN202111036653A CN113923118A CN 113923118 A CN113923118 A CN 113923118A CN 202111036653 A CN202111036653 A CN 202111036653A CN 113923118 A CN113923118 A CN 113923118A
Authority
CN
China
Prior art keywords
configuration
virtual switch
data center
script
server
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
CN202111036653.1A
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.)
Ruijie Networks Co Ltd
Original Assignee
Ruijie Networks Co Ltd
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 Ruijie Networks Co Ltd filed Critical Ruijie Networks Co Ltd
Priority to CN202111036653.1A priority Critical patent/CN113923118A/en
Publication of CN113923118A publication Critical patent/CN113923118A/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/0803Configuration setting
    • H04L41/0813Configuration setting characterised by the conditions triggering a change of settings
    • H04L41/0816Configuration setting characterised by the conditions triggering a change of settings the condition being an adaptation, e.g. in response to network events
    • 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
    • H04L41/0886Fully automatic configuration

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Automation & Control Theory (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the invention provides a virtual switch batch deployment method, a server, a switch and a data center. The method comprises the following steps: acquiring identification information and configuration information of all virtual switches in a data center; generating a configuration list and a configuration acquisition script according to the identification information and the configuration information of each virtual switch; and sending the configuration list and the configuration acquisition script to all the virtual switches so that each virtual switch can analyze the configuration list, acquire the configuration information of the virtual switch from the configuration list according to the configuration acquisition script, and perform differential configuration according to the configuration information of the virtual switch. The virtual switch batch deployment method provided by the embodiment of the invention solves the problem of differential configuration of the virtual switch in the initialization stage, accelerates the rapid deployment process of the virtual switch in the data center and shortens the time of service online compared with manual deployment.

Description

Virtual switch batch deployment method, server, switch and data center
Technical Field
The embodiment of the invention relates to the technical field of communication, in particular to a virtual switch batch deployment method, a server, a switch and a data center.
Background
In the past decade, the development of the IT technology is rapid, the cloud computing station reaches the peak of the wave, and the data center is undergoing the revolution brought by cloud computing as a carrier for realizing the cloud computing.
In cloud computing, computing resources, storage, networks, and the like have a new organizational structure, namely, a resource pool. The computing power of all the devices is put into a pool and then distributed uniformly. The current cloud computing can schedule and allocate resources through an OpenStack cloud platform. The network is an important resource in cloud computing, and a network structure suitable for a data center is developed according to the change of service flow: Spine-Leaf network architecture. And deploying the virtual switch in the computing node to complete the network access of the virtual switch in the computing node. Because the virtual switch in one computing node can only be responsible for forwarding the network traffic of the virtual switch in the node, the deployment and configuration of the virtual switch need to be completed in each computing node.
The traditional deployment mode of the virtual switch is that the virtual switch is configured by manual station by station. This arrangement has several problems: the deployment speed is slow; the error is easy to occur; the method is only suitable for the data center with a small number of computing nodes. However, with the development of cloud computing, more and more computing nodes are in the resource pool, and the deployment is realized through manual operation, which is time-consuming and labor-consuming operation. While as the number of computing nodes increases to hundreds to thousands, and even more, manual deployment becomes an impossible task.
Disclosure of Invention
Aiming at the defects in the prior art, the embodiment of the invention provides a batch deployment method of virtual switches, a server, a switch and a data center.
In a first aspect, an embodiment of the present invention provides a method for deploying virtual switches in batches, where the method is applied to a server in a data center, and includes:
acquiring identification information and configuration information of all virtual switches in a data center;
generating a configuration list and a configuration acquisition script according to the identification information and the configuration information of each virtual switch;
and sending the configuration list and the configuration acquisition script to all the virtual switches so that each virtual switch can analyze the configuration list, acquire the configuration information of the virtual switch from the configuration list according to the configuration acquisition script, and perform differential configuration according to the configuration information of the virtual switch.
The method as described above, optionally, further includes:
and obtaining a configuration result fed back after the configuration of each virtual switch is completed, and judging whether each virtual switch is correctly configured or not according to the configuration result and corresponding configuration information.
As above, optionally, before acquiring the identification information and the configuration information of all virtual switches in the data center, the method further includes:
deploying an automation operation and maintenance tool Ansible in the data center, wherein a server in the data center is a control node in the Ansible, and all virtual switches in the data center are controlled nodes in the Ansible.
As in the foregoing method, optionally, the sending the configuration obtaining script to all the virtual switches includes:
and adding the configuration acquisition script into a script playbook in the infrastructure so that all the virtual switches acquire the configuration acquisition script according to the script playbook.
Optionally, the obtaining a configuration result fed back after the configuration of each virtual switch is completed, and determining whether each virtual switch is configured correctly according to the configuration result and corresponding configuration information includes:
reading the effective configuration result in the scenario playlist book, and judging whether each virtual switch is correctly configured according to the effective configuration result, wherein the effective configuration result is written into the scenario playlist book after the virtual switch completes differential configuration according to the configuration information of the virtual switch.
In a second aspect, an embodiment of the present invention provides a method for deploying virtual switches in batches, where the method is applied to virtual switches in a data center, and includes:
acquiring a configuration list and a configuration acquisition script sent by a server in a data center;
analyzing the configuration list to acquire configuration information and identification information of all virtual switches in the data center;
acquiring configuration information corresponding to the identification information of the virtual switch from the configuration information and the identification information of all the virtual switches according to the configuration acquisition script;
and performing differentiated configuration according to the configuration information.
The method as described above, optionally, further includes:
and sending a configuration result to the server after the configuration is finished so that the server can judge whether the virtual switch is configured correctly according to the configuration result and the corresponding configuration information.
As in the foregoing method, optionally, before the obtaining the configuration list and the configuration obtaining script sent by the server in the data center, the method further includes:
deploying an automation operation and maintenance tool Ansible in the data center, wherein a server in the data center is a control node in the Ansible, and all virtual switches in the data center are controlled nodes in the Ansible.
As in the foregoing method, optionally, the obtaining a configuration list and a configuration obtaining script sent by a server in a data center includes:
acquiring a configuration list sent by a server in a data center;
reading a script playbook in the infrastructure, and acquiring the configuration acquisition script from the script playbook, wherein the configuration acquisition script is added to the script playbook by the server.
As above, optionally, sending the configuration result to the server after the configuration is completed includes:
after differential configuration is completed according to the configuration information, writing an effective configuration result into the script playbook, so that the server can obtain the effective configuration result according to the script playbook, and judge whether each virtual switch is configured correctly according to the effective configuration result.
In a third aspect, an embodiment of the present invention provides a server, including:
the first acquisition module is used for acquiring identification information and configuration information of all virtual switches in the data center;
the generating module is used for generating a configuration list and a configuration acquisition script according to the identification information and the configuration information of each virtual switch;
the first sending module is configured to send the configuration list and the configuration acquisition script to all virtual switches in the data center, so that each virtual switch analyzes the configuration list, acquires configuration information of the virtual switch from the configuration list according to the configuration acquisition script, and performs differential configuration according to the configuration information of the virtual switch.
As for the server, optionally, the first obtaining module is further configured to:
obtaining a configuration result fed back after the configuration of each virtual switch is completed;
accordingly, the server further comprises:
and the first judging module is used for judging whether each virtual switch is configured correctly according to the configuration result and the corresponding configuration information.
The server as described above, optionally, further includes:
the system comprises a first deployment module, a first management module and a second management module, wherein the first deployment module is used for deploying an automation operation and maintenance tool infrastructure in the data center, a server in the data center is a control node in the infrastructure, and all virtual switches in the data center are controlled nodes in the infrastructure.
Optionally, as for the server, the first sending module is specifically configured to:
and adding the configuration acquisition script into a script playbook in the infrastructure so that all the virtual switches acquire the configuration acquisition script according to the script playbook.
Optionally, the first feedback module is specifically configured to:
reading the effective configuration result in the scenario playlist book, and judging whether each virtual switch is correctly configured according to the effective configuration result, wherein the effective configuration result is written into the scenario playlist book after the virtual switch completes differential configuration according to the configuration information of the virtual switch.
In a fourth aspect, an embodiment of the present invention provides a virtual switch, including:
the second acquisition module is used for acquiring a configuration list and a configuration acquisition script which are sent by a server in the data center;
the analysis module is used for analyzing the configuration list and acquiring configuration information and identification information of all virtual switches in the data center;
a third obtaining module, configured to obtain, according to the configuration obtaining script, configuration information corresponding to the identification information of the third obtaining module from the configuration information and the identification information of all the virtual switches;
and the configuration module is used for carrying out differentiation configuration according to the configuration information.
As above, the virtual switch optionally further includes:
and the second feedback module is used for sending a configuration result to the server after the configuration is finished so that the server can judge whether the virtual switch is correctly configured according to the configuration result and the corresponding configuration information.
As above, the virtual switch optionally further includes:
and the second deployment module is used for deploying an automation operation and maintenance tool infrastructure in the data center, wherein a server in the data center is a control node in the infrastructure, and all virtual switches in the data center are controlled nodes in the infrastructure.
Optionally, the second obtaining module is specifically configured to:
acquiring a configuration list sent by a server in a data center;
reading a script playbook in the infrastructure, and acquiring the configuration acquisition script from the script playbook, wherein the configuration acquisition script is added to the script playbook by the server.
Optionally, the second feedback module is specifically configured to:
after differential configuration is completed according to the configuration information, writing an effective configuration result into the script playbook, so that the server can obtain the effective configuration result according to the script playbook, and judge whether each virtual switch is configured correctly according to the effective configuration result.
In a fifth aspect, an embodiment of the present invention provides a data center, including: a server as claimed in any one of the above and at least one virtual switch as claimed in any one of the above.
In a sixth aspect, an embodiment of the present invention provides an electronic device, including:
the processor and the memory are communicated with each other through a bus; the memory stores program instructions executable by the processor, the processor invoking the program instructions to perform a method comprising: acquiring identification information and configuration information of all virtual switches in a data center; generating a configuration list and a configuration acquisition script according to the identification information and the configuration information of each virtual switch; and sending the configuration list and the configuration acquisition script to all the virtual switches so that each virtual switch can analyze the configuration list, acquire the configuration information of the virtual switch from the configuration list according to the configuration acquisition script, and perform differential configuration according to the configuration information of the virtual switch.
In a seventh aspect, an embodiment of the present invention provides a storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the following method: acquiring identification information and configuration information of all virtual switches in a data center; generating a configuration list and a configuration acquisition script according to the identification information and the configuration information of each virtual switch; and sending the configuration list and the configuration acquisition script to all the virtual switches so that each virtual switch can analyze the configuration list, acquire the configuration information of the virtual switch from the configuration list according to the configuration acquisition script, and perform differential configuration according to the configuration information of the virtual switch.
According to the virtual switch batch deployment method provided by the embodiment of the invention, the server generates the configuration list and the configuration acquisition script according to the identification information and the configuration information of each virtual switch, and sends the configuration list and the configuration acquisition script to all the virtual switches in the data center in batch, the virtual switches analyze the configuration list, acquire the configuration information of the virtual switches from the configuration list according to the configuration acquisition script, and perform differential configuration according to the configuration information of the virtual switches.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and those skilled in the art can also obtain other drawings according to the drawings without creative efforts.
Fig. 1 is a schematic structural diagram of a data center according to an embodiment of the present invention;
fig. 2 is a schematic flow chart of a method for deploying virtual switches in batches according to an embodiment of the present invention;
fig. 3 is a schematic flow chart of another virtual switch batch deployment method according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a server according to an embodiment of the present invention.
Fig. 5 is a schematic structural diagram of a virtual switch according to an embodiment of the present invention.
Fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Fig. 1 is a schematic structural diagram of a data center according to an embodiment of the present invention, as shown in fig. 1, the data center includes a server 11 and a plurality of virtual switches 12, such as a virtual switch 1, a virtual switch 2, a virtual switch n, and the like. In the prior art, each virtual switch 12 is installed in batch by a server 11, and a uniform installation package is used, however, actual configurations of each virtual switch 12 are different, and a problem of differentiated configuration cannot be processed in batch in the prior art, in order to solve this problem, an embodiment of the present invention provides a method for deploying virtual switches in batch, fig. 2 is a schematic flow diagram of the method for deploying virtual switches in batch provided by the embodiment of the present invention, and is applied to the server 11 in a data center, as shown in fig. 2, the method includes:
step S21, acquiring identification information and configuration information of all virtual switches 12 in the data center;
specifically, to process the differentiated configuration problem of each virtual switch 12 in batch, first, the server 12 needs to obtain identification information and corresponding configuration information of all the virtual switches 12 in the data center, where the identification information may be network location information of the virtual switches 12 in the data center, for example, an IP address of the virtual switch 12, and the configuration information refers to the differentiated configuration information for each virtual switch 12.
Step S22, generating a configuration list and a configuration acquisition script according to the identification information and the configuration information of each virtual switch 12;
specifically, after acquiring the identification information and the differentiation configuration information of each virtual switch 12, the server 11 generates a configuration list, where the configuration list covers the configuration information of all virtual switches 12, and meanwhile, the server 11 also generates a configuration acquisition script according to the identification information and the differentiation configuration information of each virtual switch 12, so as to instruct each virtual switch 12 how to acquire the differentiation configuration information corresponding to itself from the configuration list. And the generated configuration list and the configuration acquisition script are respectively one copy.
Step S23, sending the configuration list and the configuration acquisition script to all the virtual switches 12, so that each virtual switch 12 can analyze the configuration list, acquire its own configuration information from the configuration list according to the configuration acquisition script, and perform differentiated configuration according to its own configuration information.
Specifically, the server sends the configuration list and the configuration acquisition script to all the virtual switches 12, the configuration list and the configuration acquisition script received by each virtual switch 12 are the same, after the virtual switch 12 receives the configuration list and the configuration acquisition script, the configuration list is analyzed, the configuration information of the virtual switch is acquired from the configuration list according to the configuration acquisition script, then the differential configuration is performed according to the configuration information, since the deployment of the virtual switch 12 is realized at the initialization stage of the virtual switch 12, the performance of the virtual switch is not affected by the reception of the configuration list and the configuration acquisition script, the server 11 generates the configuration acquisition script including the configuration lists of all the virtual switches 12 and how each virtual switch 12 acquires the configuration information of the virtual switch from the configuration lists, therefore, the configuration list and the configuration acquisition script can be issued in batch, the differentiated configuration of the virtual switches is realized in a batch mode, and the problem that each virtual switch needs to be manually deployed in the prior art is solved. After the configuration is completed, the server 11 further obtains a configuration result fed back after the configuration of each virtual switch 12 is completed, and determines whether each virtual switch 12 is configured correctly according to the configuration result and the corresponding configuration information. If the abnormal virtual switch 12 is found, the virtual switch 12 is checked and repaired.
According to the virtual switch batch deployment method provided by the embodiment of the invention, the server generates the configuration list and the configuration acquisition script according to the identification information and the configuration information of each virtual switch, and sends the configuration list and the configuration acquisition script to all the virtual switches in the data center in batch, the virtual switches analyze the configuration list, acquire the configuration information of the virtual switches from the configuration list according to the configuration acquisition script, and perform differential configuration according to the configuration information of the virtual switches.
On the basis of the foregoing embodiment, further before the acquiring the identification information and the configuration information of all virtual switches in the data center, the method further includes:
deploying an automation operation and maintenance tool Ansible in the data center, wherein a server in the data center is a control node in the Ansible, and all virtual switches in the data center are controlled nodes in the Ansible.
In particular, the infrastructure is an open-source automation operation and maintenance tool that can be used to automate tasks such as initial configuration of servers, configuration of security baselines, updating and patching systems, installing software packages, and the like. The infrastructure is relatively simple, and only a Secure Shell (SSH) protocol is needed to connect the client to execute the task.
The infrastructure includes important information such as a Control node, a managed node, a list, a host file, and the like, where the Control node (Control node) refers to a host installed with the infrastructure, also called an infrastructure server side, a manager, and the like, and refers to a server in a data center in the embodiment of the present invention. The infrastructure control node is mainly used for issuing operation tasks and executing control commands. The program of the infrastructure is installed on the control node, and the control node needs to install various dependency libraries required by Python and infrastructure. Controlled nodes (Managed nodes): also called client, i.e. the client server that needs to use the infrastructure to perform tasks, in this embodiment of the present invention, refers to the virtual switch in the data center. Manifest (Inventory): a list of controlled nodes, i.e. a list of all hosts to be managed. host file: the list is typically stored in a file named host. In the host file, a specific management host and authentication information may be represented using an IP address or a host name, and may be grouped according to a user of the host. Modules (Modules): a module is a block of code that an anchor performs a specific task. For example: add users, upload files, ping clients, etc. While an Angle now defaults to 450 modules per strip, the Angle Galaxy common repository contains about 1600 modules. Task (Task): is an operation performed on an anchor client and may perform a task using an ad-hoc single-line command. Script (Playbook): the method is a list of repeatedly executable tasks written by using YAML markup language, and the playbook realizes more convenient reading, writing and contribution of the tasks.
While the infrastructure provides a convenient framework for batch processing, users need to define specific resource Inventory inventories and script playbooks to meet the requirements of batch processing. The same operations of batch deployment, upgrading, starting, stopping of the virtual switch and the like can be met by writing corresponding scripts. However, some configurations in the virtual switches need to be configured differently according to different topological locations of each virtual switch. Specifically, common operation and maintenance requirements of the virtual switch include: (1) batch pre-configuration, such as configuring a macro page, an isolated core, a CPU virtualization support switch, and the like; (2) installing virtual switches in batches; (3) unloading the virtual switches in batches; (4) upgrading the virtual switches in batches; (5) starting the service of the virtual switch in batches; (6) stopping the service of the virtual switch in batches; (7) restarting the service of the virtual switch in batches; (8) configuring virtual switches in batches; (9) and (3) batch backup virtual switch configuration and the like, wherein, except the virtual switch configured in batches in the item (8), other items can be directly subjected to batch processing by the server.
Thus, the bulk deployment of virtual switches can be accomplished according to the following steps:
A. applying an infrastructure framework, setting a server in a data center as a control node in the infrastructure, setting all virtual switches as controlled nodes, installing infrastructure software in the control node, and establishing an SSH channel with each controlled node;
B. the control node acquires the network position information and the corresponding configuration information of all the controlled nodes, and generates a configuration list and a configuration acquisition script, wherein the configuration list comprises the differentiated configuration information of all the controlled nodes;
C. the control node uniformly transmits the configuration list to each controlled node through an SSH channel, and adds a configuration acquisition script in the playbook;
D. after each controlled node synchronizes the playbook, the content of the configuration list is read out according to the configuration acquisition script, and the configuration information of the current node is screened out.
E. And each controlled node configures the configuration into the virtual switch according to the configuration information of the current node.
F. After configuration takes effect, according to the infrastructure characteristic, the configuration-effective controlled node automatically synchronizes the effective configuration result to the playlist, the control node can determine which controlled nodes are correctly configured and which are abnormal according to comparison between the effective configuration information in the playlist and the configuration list, and if the abnormal nodes are found, checking and repairing are carried out again, wherein the configuration takes effect, namely, the controlled nodes are correctly configured according to the configuration information.
According to the virtual switch batch deployment method provided by the embodiment of the invention, the server generates the configuration list and the configuration acquisition script according to the identification information and the configuration information of each virtual switch, and sends the configuration list and the configuration acquisition script to all the virtual switches in the data center in batches, the virtual switches analyze the configuration list, acquire the configuration information of the virtual switches from the configuration list according to the configuration acquisition script, and perform differential configuration according to the configuration information of the virtual switches.
Based on the same inventive concept, an embodiment of the present invention further provides a method for deploying virtual switches in batches, which is applied to a virtual switch 12 in a data center, and as shown in fig. 3, the method includes:
s31, acquiring a configuration list and a configuration acquisition script sent by a server in the data center;
s32, analyzing the configuration list, and acquiring configuration information and identification information of all virtual switches in the data center;
s33, acquiring configuration information corresponding to the identification information of the virtual switch from the configuration information and the identification information of all the virtual switches according to the configuration acquisition script;
and S34, performing differentiation configuration according to the configuration information.
The method as described above, optionally, further includes:
and sending a configuration result to the server after the configuration is finished so that the server can judge whether the virtual switch is configured correctly according to the configuration result and the corresponding configuration information.
As in the foregoing method, optionally, before the obtaining the configuration list and the configuration obtaining script sent by the server in the data center, the method further includes:
deploying an automation operation and maintenance tool Ansible in the data center, wherein a server in the data center is a control node in the Ansible, and all virtual switches in the data center are controlled nodes in the Ansible.
As in the foregoing method, optionally, the obtaining a configuration list and a configuration obtaining script sent by a server in a data center includes:
acquiring a configuration list sent by a server in a data center;
reading a script playbook in the infrastructure, and acquiring the configuration acquisition script from the script playbook, wherein the configuration acquisition script is added to the script playbook by the server.
As above, optionally, sending the configuration result to the server after the configuration is completed includes:
after differential configuration is completed according to the configuration information, writing an effective configuration result into the script playbook, so that the server can obtain the effective configuration result according to the script playbook, and judge whether each virtual switch is configured correctly according to the effective configuration result.
Based on the same inventive concept, an embodiment of the present invention further provides a server, as shown in fig. 4, including: a first obtaining module 41, a generating module 42, a first sending module 43, wherein:
the first obtaining module 41 is configured to obtain identification information and configuration information of all virtual switches in the data center; the generating module 42 is configured to generate a configuration list and a configuration acquiring script according to the identification information and the configuration information of each virtual switch; the first sending module 43 is configured to send the configuration list and the configuration acquiring script to all virtual switches in the data center, so that each virtual switch analyzes the configuration list, acquires configuration information of itself from the configuration list according to the configuration acquiring script, and performs differential configuration according to the configuration information of itself.
As with the server, optionally, the first obtaining module 41 is further configured to:
obtaining a configuration result fed back after the configuration of each virtual switch is completed;
accordingly, the server further comprises:
and the first judging module is used for judging whether each virtual switch is configured correctly according to the configuration result and the corresponding configuration information.
The server as described above, optionally, further includes:
the system comprises a first deployment module, a first management module and a second management module, wherein the first deployment module is used for deploying an automation operation and maintenance tool infrastructure in the data center, a server in the data center is a control node in the infrastructure, and all virtual switches in the data center are controlled nodes in the infrastructure.
As for the server, optionally, the first sending module 43 is specifically configured to:
and adding the configuration acquisition script into a script playbook in the infrastructure so that all the virtual switches acquire the configuration acquisition script according to the script playbook.
Optionally, the first feedback module is specifically configured to:
reading the effective configuration result in the scenario playlist book, and judging whether each virtual switch is correctly configured according to the effective configuration result, wherein the effective configuration result is written into the scenario playlist book after the virtual switch completes differential configuration according to the configuration information of the virtual switch.
Based on the same inventive concept, an embodiment of the present invention further provides a virtual switch, as shown in fig. 5, including: a second obtaining module 51, an analyzing module 52, a third obtaining module 53 and a configuring module 54, wherein:
the second obtaining module 51 is configured to obtain a configuration list and a configuration obtaining script sent by a server in the data center; the analysis module 52 is configured to analyze the configuration list, and obtain configuration information and identification information of all virtual switches in the data center; the third obtaining module 53 is configured to obtain, according to the configuration obtaining script, configuration information corresponding to the identification information of the third obtaining module from the configuration information and the identification information of all the virtual switches; the configuration module 54 is configured to perform differential configuration according to the configuration information.
As above, the virtual switch optionally further includes:
and the second feedback module is used for sending a configuration result to the server after the configuration is finished so that the server can judge whether the virtual switch is correctly configured according to the configuration result and the corresponding configuration information.
As above, the virtual switch optionally further includes:
and the second deployment module is used for deploying an automation operation and maintenance tool infrastructure in the data center, wherein a server in the data center is a control node in the infrastructure, and all virtual switches in the data center are controlled nodes in the infrastructure.
As for the virtual switch, optionally, the second obtaining module 51 is specifically configured to:
acquiring a configuration list sent by a server in a data center;
reading a script playbook in the infrastructure, and acquiring the configuration acquisition script from the script playbook, wherein the configuration acquisition script is added to the script playbook by the server.
Optionally, the second feedback module is specifically configured to:
after differential configuration is completed according to the configuration information, writing an effective configuration result into the script playbook, so that the server can obtain the effective configuration result according to the script playbook, and judge whether each virtual switch is configured correctly according to the effective configuration result.
The apparatus provided in the embodiment of the present invention is configured to implement the method, and its functions specifically refer to the method embodiment, which is not described herein again.
Fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present invention, and as shown in fig. 6, the electronic device includes: a processor (processor)61, a memory (memory)62, and a bus 63;
wherein, the processor 61 and the memory 62 complete the communication with each other through the bus 63;
the processor 61 is configured to call program instructions in the memory 62 to perform the methods provided by the above-described method embodiments, including, for example: acquiring identification information and configuration information of all virtual switches in a data center; generating a configuration list and a configuration acquisition script according to the identification information and the configuration information of each virtual switch; and sending the configuration list and the configuration acquisition script to all the virtual switches so that each virtual switch can analyze the configuration list, acquire the configuration information of the virtual switch from the configuration list according to the configuration acquisition script, and perform differential configuration according to the configuration information of the virtual switch.
An embodiment of the present invention discloses a computer program product, which includes a computer program stored on a non-transitory computer readable storage medium, the computer program including program instructions, when the program instructions are executed by a computer, the computer can execute the methods provided by the above method embodiments, for example, the method includes: acquiring identification information and configuration information of all virtual switches in a data center; generating a configuration list and a configuration acquisition script according to the identification information and the configuration information of each virtual switch; and sending the configuration list and the configuration acquisition script to all the virtual switches so that each virtual switch can analyze the configuration list, acquire the configuration information of the virtual switch from the configuration list according to the configuration acquisition script, and perform differential configuration according to the configuration information of the virtual switch.
Embodiments of the present invention provide a non-transitory computer-readable storage medium, which stores computer instructions, where the computer instructions cause the computer to perform the methods provided by the above method embodiments, for example, the methods include: acquiring identification information and configuration information of all virtual switches in a data center; generating a configuration list and a configuration acquisition script according to the identification information and the configuration information of each virtual switch; and sending the configuration list and the configuration acquisition script to all the virtual switches so that each virtual switch can analyze the configuration list, acquire the configuration information of the virtual switch from the configuration list according to the configuration acquisition script, and perform differential configuration according to the configuration information of the virtual switch.
Those of ordinary skill in the art will understand that: all or part of the steps for realizing the method embodiments can be completed by hardware related to program instructions, the program can be stored in a computer readable storage medium, and the program executes the steps comprising the method embodiments when executed; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
The above-described embodiments of the apparatuses and the like are merely illustrative, wherein the units described as separate parts may or may not be physically separate, and the parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
Finally, it should be noted that: the above embodiments are only used for illustrating the technical solutions of the embodiments of the present invention, and are not limited thereto; although embodiments of the present invention have been described in detail with reference to the foregoing embodiments, those skilled in the art will understand that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

Claims (23)

1. A method for deploying virtual switches in batches is applied to servers in a data center, and is characterized by comprising the following steps:
acquiring identification information and configuration information of all virtual switches in a data center;
generating a configuration list and a configuration acquisition script according to the identification information and the configuration information of each virtual switch;
and sending the configuration list and the configuration acquisition script to all the virtual switches so that each virtual switch can analyze the configuration list, acquire the configuration information of the virtual switch from the configuration list according to the configuration acquisition script, and perform differential configuration according to the configuration information of the virtual switch.
2. The method of claim 1, further comprising:
and obtaining a configuration result fed back after the configuration of each virtual switch is completed, and judging whether each virtual switch is correctly configured or not according to the configuration result and corresponding configuration information.
3. The method of claim 2, wherein before obtaining the identification information and the configuration information of all virtual switches in the data center, the method further comprises:
deploying an automation operation and maintenance tool Ansible in the data center, wherein a server in the data center is a control node in the Ansible, and all virtual switches in the data center are controlled nodes in the Ansible.
4. The method of claim 3, wherein sending the configuration acquisition script to all virtual switches comprises:
and adding the configuration acquisition script into a script playbook in the infrastructure so that all the virtual switches acquire the configuration acquisition script according to the script playbook.
5. The method according to claim 4, wherein the obtaining a configuration result fed back after the configuration of each virtual switch is completed, and determining whether each virtual switch is configured correctly according to the configuration result and corresponding configuration information includes:
reading the effective configuration result in the scenario playlist book, and judging whether each virtual switch is correctly configured according to the effective configuration result, wherein the effective configuration result is written into the scenario playlist book after the virtual switch completes differential configuration according to the configuration information of the virtual switch.
6. A method for deploying virtual switches in batches is applied to the virtual switches in a data center, and is characterized by comprising the following steps:
acquiring a configuration list and a configuration acquisition script sent by a server in a data center;
analyzing the configuration list to acquire configuration information and identification information of all virtual switches in the data center;
acquiring configuration information corresponding to the identification information of the virtual switch from the configuration information and the identification information of all the virtual switches according to the configuration acquisition script;
and performing differentiated configuration according to the configuration information.
7. The method of claim 6, further comprising:
and sending a configuration result to the server after the configuration is finished so that the server can judge whether the virtual switch is configured correctly according to the configuration result and the corresponding configuration information.
8. The method of claim 7, wherein before the obtaining the configuration manifest and the configuration obtaining script sent by the server in the data center, further comprising:
deploying an automation operation and maintenance tool Ansible in the data center, wherein a server in the data center is a control node in the Ansible, and all virtual switches in the data center are controlled nodes in the Ansible.
9. The method of claim 8, wherein the obtaining the configuration manifest and the configuration obtaining script sent by the server in the data center comprises:
acquiring a configuration list sent by a server in a data center;
reading a script playbook in the infrastructure, and acquiring the configuration acquisition script from the script playbook, wherein the configuration acquisition script is added to the script playbook by the server.
10. The method of claim 9, wherein sending the configuration result to the server after the configuration is completed comprises:
after differential configuration is completed according to the configuration information, writing an effective configuration result into the script playbook, so that the server can obtain the effective configuration result according to the script playbook, and judge whether each virtual switch is configured correctly according to the effective configuration result.
11. A server, comprising:
the first acquisition module is used for acquiring identification information and configuration information of all virtual switches in the data center;
the generating module is used for generating a configuration list and a configuration acquisition script according to the identification information and the configuration information of each virtual switch;
the first sending module is configured to send the configuration list and the configuration acquisition script to all virtual switches in the data center, so that each virtual switch analyzes the configuration list, acquires configuration information of the virtual switch from the configuration list according to the configuration acquisition script, and performs differential configuration according to the configuration information of the virtual switch.
12. The server according to claim 11, wherein the first obtaining module is further configured to obtain a configuration result fed back after the configuration of each virtual switch is completed;
accordingly, the server further comprises:
and the first judging module is used for judging whether each virtual switch is configured correctly according to the configuration result and the corresponding configuration information.
13. The service of claim 12, further comprising:
the system comprises a first deployment module, a first management module and a second management module, wherein the first deployment module is used for deploying an automation operation and maintenance tool infrastructure in the data center, a server in the data center is a control node in the infrastructure, and all virtual switches in the data center are controlled nodes in the infrastructure.
14. The server according to claim 13, wherein the first sending module is specifically configured to:
and adding the configuration acquisition script into a script playbook in the infrastructure so that all the virtual switches acquire the configuration acquisition script according to the script playbook.
15. The server according to claim 14, wherein the first feedback module is specifically configured to:
reading the effective configuration result in the scenario playlist book, and judging whether each virtual switch is correctly configured according to the effective configuration result, wherein the effective configuration result is written into the scenario playlist book after the virtual switch completes differential configuration according to the configuration information of the virtual switch.
16. A virtual switch, comprising:
the second acquisition module is used for acquiring a configuration list and a configuration acquisition script which are sent by a server in the data center;
the analysis module is used for analyzing the configuration list and acquiring configuration information and identification information of all virtual switches in the data center;
a third obtaining module, configured to obtain, according to the configuration obtaining script, configuration information corresponding to the identification information of the third obtaining module from the configuration information and the identification information of all the virtual switches;
and the configuration module is used for carrying out differentiation configuration according to the configuration information.
17. The virtual switch of claim 16, further comprising:
and the second feedback module is used for sending a configuration result to the server after the configuration is finished so that the server can judge whether the virtual switch is correctly configured according to the configuration result and the corresponding configuration information.
18. The virtual switch of claim 17, further comprising:
and the second deployment module is used for deploying an automation operation and maintenance tool infrastructure in the data center, wherein a server in the data center is a control node in the infrastructure, and all virtual switches in the data center are controlled nodes in the infrastructure.
19. The virtual switch of claim 18, wherein the second obtaining module is specifically configured to:
acquiring a configuration list sent by a server in a data center;
reading a script playbook in the infrastructure, and acquiring the configuration acquisition script from the script playbook, wherein the configuration acquisition script is added to the script playbook by the server.
20. The virtual switch of claim 19, wherein the second feedback module is specifically configured to:
after differential configuration is completed according to the configuration information, writing an effective configuration result into the script playbook, so that the server can obtain the effective configuration result according to the script playbook, and judge whether each virtual switch is configured correctly according to the effective configuration result.
21. A data center, comprising: a server according to any of claims 11-15 and at least one virtual switch according to any of claims 16-20.
22. An electronic device, comprising:
the processor and the memory are communicated with each other through a bus; the memory stores program instructions executable by the processor, the processor invoking the program instructions to perform the method of any of claims 1 to 5 or 6-10.
23. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1 to 5 or 6 to 10.
CN202111036653.1A 2021-09-06 2021-09-06 Virtual switch batch deployment method, server, switch and data center Pending CN113923118A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111036653.1A CN113923118A (en) 2021-09-06 2021-09-06 Virtual switch batch deployment method, server, switch and data center

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111036653.1A CN113923118A (en) 2021-09-06 2021-09-06 Virtual switch batch deployment method, server, switch and data center

Publications (1)

Publication Number Publication Date
CN113923118A true CN113923118A (en) 2022-01-11

Family

ID=79234049

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111036653.1A Pending CN113923118A (en) 2021-09-06 2021-09-06 Virtual switch batch deployment method, server, switch and data center

Country Status (1)

Country Link
CN (1) CN113923118A (en)

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103338117A (en) * 2013-05-30 2013-10-02 华为技术有限公司 Management method, management device and management system of virtual switch
CN103763367A (en) * 2014-01-17 2014-04-30 浪潮(北京)电子信息产业有限公司 Method and system for designing distributed virtual network in cloud calculating data center
CN105162640A (en) * 2015-10-15 2015-12-16 上海斐讯数据通信技术有限公司 System and method of configuring switches in batch
CN107147533A (en) * 2017-05-31 2017-09-08 郑州云海信息技术有限公司 A kind of flow table configuration distributing method and system based on SDN frameworks
CN107741853A (en) * 2017-09-20 2018-02-27 深圳市买买提乐购金融服务有限公司 A kind of method, system and the information management platform of deployment services device
CN111106966A (en) * 2019-12-26 2020-05-05 深信服科技股份有限公司 Information processing method and device, equipment and storage medium
CN111371591A (en) * 2020-02-16 2020-07-03 苏州浪潮智能科技有限公司 Configuration method and system for rapidly deploying SDN networking in double-machine virtualization
CN111538561A (en) * 2020-03-27 2020-08-14 上海仪电(集团)有限公司中央研究院 OpenStack large-scale cluster deployment test method and system based on KVM virtualization technology
CN111953518A (en) * 2020-07-10 2020-11-17 苏州浪潮智能科技有限公司 Method and device for automatic configuration of server and switch
CN112073241A (en) * 2020-09-07 2020-12-11 三一石油智能装备有限公司 Switch configuration method and device, electronic equipment and storage medium
US20210144087A1 (en) * 2018-12-28 2021-05-13 Juniper Networks, Inc. Multi-protocol service chaining among devices of interconnected topology
CN112823493A (en) * 2018-10-12 2021-05-18 西门子股份公司 Method, system, computer program and computer readable medium for automatically configuring a system

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103338117A (en) * 2013-05-30 2013-10-02 华为技术有限公司 Management method, management device and management system of virtual switch
CN103763367A (en) * 2014-01-17 2014-04-30 浪潮(北京)电子信息产业有限公司 Method and system for designing distributed virtual network in cloud calculating data center
CN105162640A (en) * 2015-10-15 2015-12-16 上海斐讯数据通信技术有限公司 System and method of configuring switches in batch
CN107147533A (en) * 2017-05-31 2017-09-08 郑州云海信息技术有限公司 A kind of flow table configuration distributing method and system based on SDN frameworks
CN107741853A (en) * 2017-09-20 2018-02-27 深圳市买买提乐购金融服务有限公司 A kind of method, system and the information management platform of deployment services device
CN112823493A (en) * 2018-10-12 2021-05-18 西门子股份公司 Method, system, computer program and computer readable medium for automatically configuring a system
US20210144087A1 (en) * 2018-12-28 2021-05-13 Juniper Networks, Inc. Multi-protocol service chaining among devices of interconnected topology
CN111106966A (en) * 2019-12-26 2020-05-05 深信服科技股份有限公司 Information processing method and device, equipment and storage medium
CN111371591A (en) * 2020-02-16 2020-07-03 苏州浪潮智能科技有限公司 Configuration method and system for rapidly deploying SDN networking in double-machine virtualization
CN111538561A (en) * 2020-03-27 2020-08-14 上海仪电(集团)有限公司中央研究院 OpenStack large-scale cluster deployment test method and system based on KVM virtualization technology
CN111953518A (en) * 2020-07-10 2020-11-17 苏州浪潮智能科技有限公司 Method and device for automatic configuration of server and switch
CN112073241A (en) * 2020-09-07 2020-12-11 三一石油智能装备有限公司 Switch configuration method and device, electronic equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
刘佳;高琪琪;刘飘;梁栋茂;: "基于Ansible的自动化部署与运维", 河南科技, no. 26, 15 September 2020 (2020-09-15) *

Similar Documents

Publication Publication Date Title
CN110389900B (en) Distributed database cluster testing method and device and storage medium
US10592403B2 (en) Method for automated integration testing with mock microservices
US9600264B2 (en) Generating a customized set of tasks for migration of a deployed software solution
US20200042328A1 (en) Autonomous Creation of New Microservices and Modification of Existing Microservices
US20220147367A1 (en) Method and System for Automation Tool Set for Server Maintenance Actions
GB2523338A (en) Testing a virtualised network function in a network
CN111866099B (en) Method, device, system, equipment and storage medium for downloading mirror image file
US20150242200A1 (en) Re-configuration in cloud computing environments
US20170078366A1 (en) Application Deployment Engine
US20200004523A1 (en) Automated internet of things based software patching
CN110727575A (en) Information processing method, system, device and storage medium
CN113741958A (en) Software development and delivery method and system based on cloud-native
CN109597627A (en) A kind of component mounting method, device, storage medium and processor
CN113645314B (en) Private cloud deployment method and server
CN108170588B (en) Test environment construction method and device
CN111768129A (en) Delivery method, device, equipment and storage medium of proprietary cloud product
CN113923118A (en) Virtual switch batch deployment method, server, switch and data center
CN108053288B (en) Service arrangement issuing method and device
CN109408307B (en) Method for automatically testing reserved configuration upgrading function of BMC in parallel
CN111381932A (en) Method and device for triggering application program change, electronic equipment and storage medium
CN110837476A (en) Application program testing method and device
US11405267B2 (en) Policy-based temporal domain configuration architecture
CN115412447B (en) Service testing method, device and medium based on SDN
CN111008035B (en) Software operation and maintenance method, electronic equipment and storage medium
Hashimi et al. Performance Evaluation of Conventional and Systematic IT Services Automation

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