CN110753088A - System deployment method and device - Google Patents

System deployment method and device Download PDF

Info

Publication number
CN110753088A
CN110753088A CN201910880738.4A CN201910880738A CN110753088A CN 110753088 A CN110753088 A CN 110753088A CN 201910880738 A CN201910880738 A CN 201910880738A CN 110753088 A CN110753088 A CN 110753088A
Authority
CN
China
Prior art keywords
server
installation
mirror image
file
target 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.)
Granted
Application number
CN201910880738.4A
Other languages
Chinese (zh)
Other versions
CN110753088B (en
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.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen 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 Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201910880738.4A priority Critical patent/CN110753088B/en
Publication of CN110753088A publication Critical patent/CN110753088A/en
Application granted granted Critical
Publication of CN110753088B publication Critical patent/CN110753088B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • G06F8/63Image based installation; Cloning; Build to order
    • 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/4401Bootstrapping
    • G06F9/4406Loading of operating system
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources

Abstract

The embodiment of the application is suitable for development in research and development management, and discloses a system deployment method and a system deployment device, wherein the method comprises the following steps: the method comprises the steps that a target server sends a mirror image acquisition request to a console server through a preset independent gateway channel, wherein the mirror image acquisition request comprises an interface address of the independent gateway channel of a source server, a server identifier of the target server and an identifier category to which the server identifier of the target server belongs; the target server acquires a mirror image installation file sent by the source server through the console server and stores the mirror image installation file locally, and the storage path of the mirror image installation file is set as a default starting path in the system boot file; and when the target server is started, executing the mirror image installation file based on the default starting path in the system boot file so as to install the operating system and the application service. Therefore, the intelligent customized installation of the operating system and the application service is realized, the batch installation is realized, and the influence of the network on the installation process is reduced.

Description

System deployment method and device
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a system deployment method and apparatus.
Background
In order to provide services to the outside, each physical machine must be deployed, including an Operating System (OS) and related application services of the physical machine, and with the rapid development of information technology, especially the development of big data and cloud computing, the usage amount of the physical machine or the demand for a PC server also increases rapidly, so how to implement the deployment of the OS and the application services quickly and efficiently is called a problem to be solved urgently in the face of the deployment and installation requirements of the OS and the application services in more and more complex environments.
To address this problem, those skilled in the art currently deploy OS and related application services in two ways:
1. the method comprises the steps of installing a physical machine in a guiding mode according to steps by installing an optical disk or an installation mirror, logging in an OS after the installation is finished to deploy basic system configuration, application services and the like, namely, the installation step prompt of an installation package of the OS is used for carrying out one-step installation, configuring the OS after the OS is installed, and deploying the application services, so that a large amount of manpower, time and energy can be consumed when more physical machines need to be installed, and the OS and the application services cannot be synchronously deployed;
2. the method is implemented by a preboot execution environment (PXE) network installation manner, which can be implemented in batch for physical machines, but has strong dependency and needs support of hardware, network environment, installation source server, and the like, so that a long debugging time, a high skill requirement, and operation and maintenance cost are required in the early stage of deployment, and the method cannot be implemented without a network environment.
Disclosure of Invention
Based on this, in order to solve the technical problems that the installation efficiency is not high, the synchronous deployment of the OS and the application service cannot be realized, and the dependence on the network environment is strong in the above-mentioned traditional technology, the invention provides a system deployment method and a system deployment device, so that the installation configuration efficiency of the system and the application service is improved, the time consumption, the labor and the energy are reduced, and meanwhile, the batch and customized installation can be realized.
A first aspect of an embodiment of the present application provides a system deployment method, where the method includes:
a target server sends a mirror image acquisition request to a console server through a preset independent gateway channel, wherein the mirror image acquisition request comprises an interface address of an independent gateway channel of a source server, a server identifier of the target server and an identifier category to which the server identifier of the target server belongs, so that the console server sends the mirror image acquisition request to the source server through the independent gateway channel of the source server according to the interface address after determining the access authority of the target server to the source server according to the server identifier;
the target server acquires a mirror image installation file sent by the source server through the console server and stores the mirror image installation file locally, the storage path of the mirror image installation file is set as a default starting path in a system boot file, and the mirror image installation file is determined by the source server according to the identifier type to which the server identifier of the target server belongs;
and when the target server is started, executing the mirror image installation file based on a default starting path in the system boot file so as to install an operating system and an application service.
Wherein, before the method, the method further comprises:
and the target server sets an interface address of the independent gateway channel of the source server as an access address of a system configuration page, so that the target server sends a mirror image acquisition request to a console server through a preset independent gateway channel when starting.
The mirror image installation files comprise installation script files, system mirror images and application service installation files;
when the target server is started, executing the mirror image installation file based on a default starting path in the system boot file, wherein the executing step comprises the following steps:
when the target server is started, reading the installation script file based on a default starting path in the system boot file, wherein the installation script file comprises a system installation command and an application installation command;
and analyzing the system mirror image according to the system installation command to realize the installation and configuration of the operating system, and analyzing the application installation file according to the application installation command to realize the installation and configuration of the application service.
The mirror image installation file comprises a storage position of a mirror image installation package in an independent gateway channel of the source server, and the mirror image installation package comprises an installation script file, a system mirror image and an application service installation file;
when the target server is started, the mirror image installation file is executed based on the default starting path in the system boot file so as to install an operating system and application services, and the method comprises the following steps:
when the target server is started, acquiring a default starting path in the system boot file, and executing the mirror image installation file based on the default starting path;
the target server sends a mirror image installation request to the console server based on the mirror image installation file, wherein the mirror image installation request comprises an interface address of an independent gateway channel of the source server, so that the console server sends the mirror image installation request to the source server through the independent gateway channel of the source server according to the interface address;
the target server acquires a mirror image installation response sent by the source server through the console server, wherein the mirror image installation response comprises system configuration data, system installation data, application service configuration data and application service installation data, the system configuration data and the system installation data are obtained by the source server determining the mirror image installation package based on the identification type of the server identification of the target server, building an installation environment based on the mirror image installation package, executing the system mirror image based on the installation script file of the mirror image installation package in the installation environment, and the application service configuration data and the application service installation data are obtained by the source server executing the application service installation file based on the installation script file in the installation environment;
and the target server analyzes and configures the system installation data based on the system configuration data so as to install the operating system, and analyzes and configures the application service installation data based on the application service configuration data so as to install the application service.
The access right of the target server to the source server is determined by the console server based on an identification category set corresponding to an interface address of an independent gateway channel of the source server, wherein the console server acquires the identification category set, and if the identification category set contains an identification category to which a server identification of the target server belongs, the target server is determined to have the access right to the source server.
The mirror image installation file is generated by the source server according to an identification type to which a server identification of the target server belongs, acquiring a mirror image installation package corresponding to the identification type and the mirror image installation package; and the corresponding relation between the identification type and the mirror image installation package is stored in a storage memory corresponding to the independent gateway channel of the source server.
A second aspect of the embodiments of the present application provides a further method for deploying a system, the method including:
the method comprises the steps that a console server receives a mirror image acquisition request sent by a target server through a preset independent gateway channel, wherein the mirror image acquisition request comprises an interface address of the independent gateway channel of a source server, a server identifier of the target server and an identifier type to which the server identifier of the target server belongs;
the console server determines the access authority of the target server to the source server according to the server identifier of the server, and sends the mirror image acquisition request to the source server through an independent gateway channel of the source server according to the interface address;
and the console server sends the mirror image installation file sent by the source server to the target server so that the target server installs an operating system and an application service according to the mirror image installation file, wherein the mirror image installation file is determined by the source server according to the identifier type of the server identifier of the target server.
The mirror image installation file comprises a storage position of a mirror image installation package in an independent gateway channel of the source server, and the mirror image installation package comprises an installation script file, a system mirror image and an application service installation file;
the console server receives a mirror image installation request sent by the target server based on the mirror image installation file, wherein the mirror image installation request comprises an interface address of an independent gateway channel of the source server;
the console server sends the mirror image installation request to the source server through an independent gateway channel of the source server according to the interface address;
and the console server receives a mirror image installation response sent by the source server and sends the mirror image installation response to the target server, wherein the mirror image installation response comprises system configuration data, system installation data, application service configuration data and application service installation data.
Wherein, the console server determines the access authority of the target server to the source server according to the server identifier of the server, including:
the console server obtains a corresponding identification category set based on an interface address of an independent gateway channel of the source server, and if the identification category set contains an identification category to which a server identification of the target server belongs, the target server is determined to have the access right of the source server.
A third aspect of the embodiments of the present application provides a system deployment method, where the method includes:
a source server receives a mirror image acquisition request sent by a target server through a console server, wherein the mirror image acquisition request comprises an interface address of an independent gateway channel of the source server, a server identifier of the target server and an identifier category to which the server identifier of the target server belongs, and the mirror image acquisition request is sent to the source server by the console server through the independent gateway channel of the source server according to the interface address;
and the source server determines a mirror image installation package according to the identification category to which the server identification of the target server belongs, generates a mirror image installation file according to the mirror image installation package, and sends the mirror image installation file to the target server through the console server, so that the target server installs an operating system and an application service based on the mirror image installation file.
Wherein, before the method, the method further comprises:
the source server acquires installation requirements of a user, wherein the installation requirements comprise system configuration information and application service information;
the source server acquires a preset installation script template, and changes the preset installation script template according to the installation requirement to generate an installation script file;
the source server acquires a system mirror image and an application service installation file, and generates the mirror image installation package according to the installation script file, the system mirror image and the application service installation file;
and the source server generates the corresponding relation between the identification category specified by the user and the mirror image installation package.
The mirror image installation file comprises a storage position of a mirror image installation package in an independent gateway channel of the source server, and the mirror image installation package comprises an installation script file, a system mirror image and an application service installation file;
after the source server sends the mirror image installation file to the target server through the console server, the method further includes:
the source server receives a mirror image installation request sent by the target server through a console server, wherein the mirror image installation request comprises an interface address of an independent gateway channel of the source server and an identification category to which a server identification of the target server belongs;
the source server determines the mirror image installation package based on the identification category to which the server identification of the target server belongs, establishes an installation environment based on the mirror image installation package, executes the system mirror image based on the installation script file of the mirror image installation package in the installation environment to obtain the system configuration data and the system installation data, and executes the application service installation file based on the installation script file of the mirror image installation package in the installation environment to obtain the application service configuration data and the application service installation data;
and the source server generates a mirror image installation response according to the system configuration data, the system installation data, the application service configuration data and the application service installation data, and sends the mirror image installation response to the console server, so that the console server sends the mirror image installation response to the target server based on the server identifier of the target server.
Wherein, the source server determines the mirror image installation file according to the identification category to which the server identification of the target server belongs, and the method comprises the following steps:
the source server acquires a mirror image installation package corresponding to the identification type according to the identification type to which the server identification of the target server belongs, wherein the corresponding relation between the identification type and the mirror image installation package is stored in a storage memory corresponding to an independent gateway channel of the source server;
and the source server generates the mirror image installation file according to the mirror image installation package.
A fourth aspect of an embodiment of the present application provides a system deployment apparatus, including:
the system comprises a sending module, a receiving module and a sending module, wherein the sending module is used for sending a mirror image obtaining request to a console server through a preset independent gateway channel, the mirror image obtaining request comprises an interface address of the independent gateway channel of a source server, a server identifier of the target server and an identifier type to which the server identifier of the target server belongs, so that the console server sends the mirror image obtaining request to the source server through the independent gateway channel of the source server according to the interface address after determining the access authority of the target server to the source server according to the server identifier;
an obtaining module, configured to obtain, by the target server, a mirror image installation file sent by the source server through the console server and store the mirror image installation file locally, where the mirror image installation file is determined by the source server according to an identifier category to which a server identifier of the target server belongs;
the setting module is used for setting the saving path of the mirror image installation file as a default starting path in a system boot file;
and the execution module is used for executing the mirror image installation file based on a default starting path in the system boot file when the target server is started so as to install an operating system and application service.
Wherein the setting module is further configured to:
and the target server sets an interface address of the independent gateway channel of the source server as an access address of a system configuration page, so that the target server sends a mirror image acquisition request to a console server through a preset independent gateway channel when starting.
The mirror image installation files comprise installation script files, system mirror images and application service installation files; the device further comprises:
the execution module comprises:
the reading unit is used for reading the installation script file based on a default starting path in the system boot file when the target server is started, wherein the installation script file comprises a system installation command and an application installation command;
and the analysis unit is used for analyzing the system mirror image according to the system installation command so as to realize the installation and the configuration of the operating system, and analyzing the application installation file according to the application installation command so as to realize the installation and the configuration of the application service.
The mirror image installation file comprises a storage position of a mirror image installation package in an independent gateway channel of the source server, and the mirror image installation package comprises an installation script file, a system mirror image and an application service installation file;
the execution module further comprises:
the acquisition unit is used for acquiring a default starting path in the system boot file when the target server is started, and executing the mirror image installation file based on the default starting path;
a sending unit, configured to send, by the target server, a mirror image installation request to the console server based on the mirror image installation file, where the mirror image installation request includes an interface address of an independent gateway channel of the source server, so that the console server sends the mirror image installation request to the source server through the independent gateway channel of the source server according to the interface address;
the obtaining unit is further configured to obtain, by the target server, the mirror installation response sent by the source server through the console server, the mirror installation response includes system configuration data, system installation data, application service configuration data, and application service installation data, wherein the system configuration data and the system installation data are that the source server determines the mirror installation package based on the identification category to which the server identification of the target server belongs, builds an installation environment based on the mirror installation package, executing the system image in the installation environment based on the installation script file of the mirrored installation package, the application service configuration data and the application service installation data are obtained by the source server executing the application service installation file in the installation environment based on the installation script file;
the analysis unit is further configured to analyze and configure the system installation data based on the system configuration data by the target server to install the operating system, and analyze and configure the application service installation data based on the application service configuration data to install the application service.
A fifth aspect of the present embodiment provides an electronic device, including a processor, a memory, and a transceiver;
the processor is connected to the memory and the transceiver respectively, wherein the transceiver is used for data interaction between the servers, the memory is used for storing program codes, and the processor is used for calling the program codes to execute the system deployment method provided by the first aspect, the second aspect and the third aspect.
The method comprises the steps that a target server sends a mirror image acquisition request to a console server through a preset independent gateway channel, wherein the mirror image acquisition request comprises an interface address of the independent gateway channel of a source server, a server identifier of the target server and an identifier type to which the server identifier of the target server belongs. The console server determines the access right of the target server to the source server according to the server identifier or the identifier type to which the server identifier belongs, and sends the mirror image acquisition request to the source server when the target server has the access right to the source server. The source server acquires the mirror image installation package according to the identification category to which the server identification of the target server belongs, generates a mirror image installation file according to the mirror image installation package, and sends the mirror image installation file to the target server through the console server. After receiving the mirror image installation file, the target server sets a local storage path of the mirror image installation file as a default starting path in the system boot file, and when the target server is started, the target server accesses the default starting path in the system boot file, so that the mirror image installation file is executed, and the installation and configuration of an operating system and application services are realized. Because other servers are controlled by the console server and are connected and transmitted through the independent gateway channel, a plurality of servers can run in parallel, the dependence on a network environment is small, and the operating system and the application service can be installed in parallel by the plurality of servers. And different identification types correspond to different mirror image installation packages, so that customized installation of the operating system and the application service can be realized, wherein the customized installation comprises personalized configuration of the system and personalized installation of the application service. Simultaneously, the system mirror image and the application service installation file are executed through the installation script file, and the installation script contains a plurality of installation script commands so as to realize automatic installation, improve the installation and configuration efficiency of the operating system and the application service and reduce the waste of labor and energy.
Drawings
In order to more clearly illustrate the embodiments of the present application 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, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Wherein:
fig. 1 is a schematic diagram of a network architecture according to an embodiment of the present application;
FIG. 2 is a flow chart of a system deployment method according to an embodiment of the present application;
fig. 3 is a schematic diagram illustrating a system deployment interaction flow according to an embodiment of the present application;
fig. 4 is a schematic diagram illustrating another interaction flow for system deployment according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of a system deployment apparatus of a target server according to an embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of a system deployment apparatus of a console server according to an embodiment of the present disclosure;
fig. 7 is a schematic structural diagram of a system deployment apparatus of a source server according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. 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 application.
The method and the device for installing the mirror image installation package in the customized system achieve customized installation of an operating system and application services of a target server through independent gateway channels, the independent gateway channels of all the servers are controlled and managed by a console server in a unified mode, one server is a source server and used for generating the mirror image installation package, the mirror image installation package is installation files of the system and the application services generated in a customized mode, and therefore other servers can obtain the needed customized mirror image installation package from the source server through the console server, and installation of the operating system and the application services of equipment corresponding to the server is achieved.
Referring to fig. 1, fig. 1 is a schematic diagram of a network architecture provided in an embodiment of the present application, where the network architecture may include a console server 200a, a plurality of servers (specifically, as shown in fig. 1, including a server 100a, a server 100b, and a server 100c), and a database 300a, and the console server 200a may implement control management of each server through an independent gateway channel to implement communication. Here, the server 100a is used as a source server, at least one mirror image installation package is generated and stored in the database 300a, the server 100b and/or the server 100c can be used as a target server, when the target server needs to install a system and an application service, the required mirror image installation package is acquired from the source server 100a through the console server 200a according to requirements, the mirror image installation package is directly analyzed, and automatic installation is performed. When the server 100b and the server 100c need to install the operating system and the application service, the console server 200a may obtain the required mirror image installation package from the source server 100a at the same time, and the processes are not affected by each other, so that parallel installation is realized. The database 300a of the source server 100a further stores a correspondence table between the identifier category and the mirror image installation package, so that after the source server 100a obtains the identifier category to which the server identifier of the target server belongs, the mirror image installation package corresponding to the identifier category to which the server identifier of the target server belongs is obtained according to the correspondence table between the identifier category and the mirror image installation package stored in the database 300a, a mirror image installation file is generated according to the mirror image installation package, and the mirror image installation file is sent to the target server through the console server 200 a. And after the target server acquires the mirror image installation file, the automatic installation of the operating system and the application service is realized.
The term "comprises" and any variations thereof in the description and claims of this application and the drawings are intended to cover non-exclusive inclusions. For example, a process, method, apparatus, product, or apparatus that comprises a list of steps or elements is not limited to the listed steps or modules, but may alternatively include other steps or modules not listed or inherent to such process, method, apparatus, product, or apparatus. Moreover, the term "at least" is used in a partial recitation to reflect implementation considerations and not merely to present implementation requirements for the method.
Specifically, referring to fig. 2, fig. 2 is a flowchart of a system deployment method provided in the embodiment of the present application, which is described in terms of one target server obtaining an image installation file from a source server and installing an operating system and an application service, and when there are multiple target servers that need to execute the system deployment method, the system deployment method provided in the embodiment of the present application can be implemented independently and concurrently without affecting each other. The method comprises the following steps:
step S201, the target server sends a mirror image obtaining request to the console server through a preset independent gateway channel.
Specifically, when the target server needs to install the operating system and the application service, the mirror image acquisition request is sent to the console server through a preset independent gateway channel, the preset independent gateway channel is an independent gateway channel of the source server, the source server is used for storing each generated mirror image installation package, and each mirror image installation package is generated according to specific user requirements. The mirror image acquisition request comprises an interface address of an independent gateway channel of the source server, a server identifier of the target server and an identifier category to which the server identifier of the target server belongs, so that the console server determines the access authority of the target server to the source server according to the server identifier and then sends the mirror image acquisition request to the source server through the independent gateway channel of the source server according to the interface address. The interface address of the independent gateway channel of the source server is used for indicating a receiver of the mirror image acquisition request, and the server identifier of the target server is used for indicating a sender of the mirror image acquisition request, so that the source server or the console server can realize communication with the target server according to the server identifier of the target server.
The independent gateway channel may be an out-of-band network, which is managed by hardware, and specifically, the out-of-band network transmits control information and data information through different physical channels. The independent gateway channel can be directly accessed through an IP address or an interface address of the independent gateway channel without main network pre-wiring and network environment configuration. Specifically, the independent gateway channel is a special independent network management channel, does not need to be managed through a network, and is a part of an out-of-band network management system. The out-of-band network management system comprises a console server, an intelligent power supply manager and the like, wherein the console server is used for managing each server, each server can access the console server through a dial-up of a modem (modem) so as to access other servers managed by the console server, the access process is based on an interface address of an independent gateway channel, and the console server can directly access a source server according to the interface address of the independent gateway channel of the source server after the console server is accessed through the dial-up of the modem when no network connection or network connection exists. Because the out-of-band network management system comprises the console server, each server in the out-of-band network management system is provided with an asynchronous port, remote and multi-process operation can be realized through dial-up access of the modem, so that a plurality of servers needing to install the operating system can be realized through remotely controlling the installation of the operating system and the application service of other servers, and simultaneously, the mirror image installation file is obtained from the source server storing the mirror image installation package and is installed. The source server can set a chip as an independent gateway channel, the address of the chip is the interface address of the independent gateway channel, and other servers can access the independent gateway channel of the source server through the console server. At present, when network access is carried out between devices, data transmission between the devices can be realized only by the IP addresses of the devices and network connection is established, but in the application, data transmission between the devices is carried out by hardware addresses, the hardware addresses are interface addresses of independent gateway channels, and when the network between the devices is disconnected or the IP addresses of the devices are not configured, the data transmission between the devices can still be carried out by a console server.
Step S202, the target server obtains the mirror image installation file sent by the source server through the console server and stores the mirror image installation file locally, and the storage path of the mirror image installation file is set as a default starting path in the system boot file.
Specifically, after the source server receives the image acquisition request, a corresponding image installation package is determined according to the identification category to which the server identification of the target server belongs in the image acquisition request, an image installation file is generated according to the image installation package, and the image installation file is sent to the target server through the console server. And the target server acquires the mirror image installation file sent by the source server through the console server and stores the mirror image installation file locally, and the storage path of the mirror image installation file is set as a default starting path in the system boot file. The System boot file is a file started by a Basic Input Output System (BIOS) and/or a Unified Extensible Firmware Interface (UEFI), and a default boot path in the System boot file is modified to indicate a default selected boot option when the operating System is installed, that is, a boot mode path of the operating System. For example, when the default boot path in the system boot file is "usb disk", the server boots by default through the usb disk when booting.
Step S203, when the target server is started, the image installation file is executed based on the default start path in the system boot file to install the operating system and the application service.
Specifically, when the target server is started, a default starting path in the system boot file is read, and the operating system is started by the default starting path. When the target server is started, the operating system is started through the default starting path, the mirror image installation file is acquired and executed, the mirror image installation file is analyzed, and therefore installation configuration of the operating system and the application service is conducted.
According to the method and the device, the mirror image acquisition request is sent to the console server through the preset independent gateway channel so as to acquire the required customized mirror image installation file from the source server, and the local storage path of the mirror image installation file is set as the default starting path, so that the target server is started by the path indicated by the default starting path when being started, the mirror image installation file is acquired and executed, and the installation of the operating system and the application service is realized. The system comprises a console server, a gateway channel, a plurality of target servers, a plurality of network environment servers and a plurality of network environment servers, wherein the console server is used for carrying out unified management and is connected through the independent gateway channel, so that when the plurality of target servers exist, the processes in the embodiment of the application can be independently and parallelly realized, the waste of installation time is reduced, the dependence on the network environment is reduced, and the installation process is not required. Meanwhile, the mirror image installation package corresponding to the mirror image installation file comprises an installation script file, a system mirror image and an application service installation file, the target server installs the operating system and the application service through the mirror image installation file, and automatic execution installation is carried out through the installation script file, so that an unattended intelligent installation process is realized, and the installation configuration efficiency of the operating system and the application service is improved.
Referring to fig. 3 in detail, fig. 3 is a schematic diagram illustrating a system deployment interaction flow provided by an embodiment of the present application. As shown in fig. 3, the interaction process among the source server, the console server and the target server is described, and the method includes the following steps:
step S301, the source server generates a mirror image installation package according to the user requirement.
Specifically, the source server acquires installation requirements of a user, wherein the installation requirements comprise system configuration information and application service information; the source server acquires a preset installation script template, and changes the preset installation script template according to installation requirements to generate an installation script file; the source server acquires a system mirror image and an application service installation file, and generates a mirror image installation package according to the installation script file, the system mirror image and the application service installation file; and the source server generates a corresponding relation between the identification category specified by the user and the mirror image installation package and stores the corresponding relation in a database.
Specifically, the source server obtains installation requirements of the user, where the installation requirements include system installation requirements and application service installation requirements, the system installation requirements are used for indicating an installation position of an operating system, partition planning of the operating system, and the like, and the application service installation requirements are used for indicating an application service name, an installation position of an application service, an installation component of the application service, and the like. The method comprises the steps of converting system installation requirements into system installation parameters, converting application service installation requirements into application service installation parameters, wherein the system installation parameters and the application service installation parameters are computer language parameters and can be recognized by a computer, obtaining a preset installation script template, the installation script template comprises at least one installation script, each installation script comprises a plurality of installation script commands, obtaining the converted system installation parameters and application service installation parameters, obtaining corresponding installation script commands according to the parameter types of the system installation parameters and the application service installation parameters, and replacing default parameters in the obtained installation script commands with the system installation parameters and the application service installation parameters, so that an installation script file is obtained. The method comprises the steps of obtaining a system mirror image and an application service installation file (namely a software installation package), and generating a mirror image installation package according to an installation script file, the system mirror image and the application service installation file. And storing the mirror image installation package in a storage memory corresponding to the independent gateway channel of the source server.
For example, when the server includes a plurality of hard disks, the hard disk on which the operating system should be installed is determined according to the installation position of the system in the installation requirement of the user, and the number of partitions that the operating system needs to be divided and the storage space requirement, name or use of each partition are determined according to the partition plan of the operating system. When the server comprises three hard disks, the installation requirements of the user comprise that a system selects a first hard disk and is divided into four areas C, D, E, F, C is used for storing system resources, D is used for installing software, E is used for storing document materials, F is used for entertainment, such as an episode, a novel, a game and the like, VS and PS software are installed and are stored on a D disk, VS installs all configuration functions, and a PS key is 'XXXXXX-XXXXXX' ″. OS, D: software, E: file, F: entertainment, system installation parameters are replaced with default parameters in a preset installation script template, application service installation requirements comprise 'installing VS and PS software which are stored in a D disc, the VS is used for installing all configuration functions, a PS key is' XXXX-XXXX-XXXX ', and the PS key is converted into an application service installation parameter' VS: d, all; PS: d, XXXX-XXXX ", replacing default parameters in the preset installation script template with application service installation parameters, thereby generating an installation script file. The above-mentioned system installation parameter or application service installation parameter after a possible conversion can also be a parameter format after a conversion is set according to a specific preset installation script template. The system installation parameter and the application service installation parameter are generated by converting the user requirement template filled by the user, each fillable position in the user requirement template corresponds to one replaceable default parameter in a preset installation script template, so that inconvenience in extracting effective requirements in user requirements can be avoided, and the installation parameter conversion efficiency is improved.
The preset installation script template can comprise a system installation script template, an application installation script template and an execution template, the system installation script template or the application installation script template can comprise a plurality of installation script templates and can also comprise one installation script template, the system installation script template can be directly obtained for updating after the system installation parameters are obtained through conversion, and the application installation script template can be directly obtained for updating after the application service installation parameters are obtained through conversion; or, the preset installation script template may only include one installation script template, and after the system installation parameters and the application installation parameters are obtained through conversion, the corresponding installation script command of each parameter in the preset installation script template is directly searched for, and the default parameter in the installation script command is replaced. When a system installation script template, an application installation script template and an execution template exist, the execution template can be a ks.cfg script file, and a calling script command of the system installation script template and the application installation script template exists in the execution template; when the preset installation script template includes only one installation script template, the preset installation script template may be a script file of the ks. Cfg type script files include pre-install script commands pre and post-install script commands post. The execution template or the preset installation script template may also be another type of script file, the script file is a computer executable file, and the script file may call and manage another script file or a script command.
The method comprises the steps of obtaining a system mirror image, obtaining an application service installation file according to application service installation requirements, and generating a mirror image installation package according to an installation script file, the system mirror image and the application service installation file which are updated by a preset installation script template. For example, if the VS and the PS need to be installed in the above example, an application service installation file is obtained, where the application service installation file includes a VS installation package and a PS installation package.
After the source server generates the mirror image installation package, acquiring an identification category specified by a user, and generating a corresponding relationship between the identification category and the mirror image installation package, wherein the corresponding relationship is stored in a storage memory corresponding to an independent gateway channel of the source server, and the corresponding relationship can be stored through a corresponding relationship table as follows:
mirror image installation package identification Identifying categories
First mirror image installation package A division of AA, BB
Second mirror installation package CC Co Ltd
Step S302, the target server sets the interface address of the independent gateway channel of the source server to the access address of the system configuration page.
Specifically, an interface address of a preset independent gateway channel of the source server is obtained and set as an access address of a system configuration page, and the access address is accessed when the target server is started, so that a mirror image obtaining request is sent to the console server through the preset independent gateway channel when the target server is started.
Step S303, the target server sends a mirror image acquisition request to the console server.
Specifically, when the operating system is not installed or needs to be reinstalled, the target server sends a mirror image acquisition request to the console server through a preset independent gateway channel, where the mirror image acquisition request includes an interface address of the independent gateway channel of the source server, a server identifier of the target server, and an identifier type to which the server identifier of the target server belongs. Wherein, the interface address of the independent gateway channel of the source server is used for indicating the receiver of the mirror image acquisition request; the server identifier of the target server is used for indicating a sender so that the source server can reply the message through the server identifier of the target server, and the server identifier of the target server can be a factory identifier, an MAC (media access control) address or an IP (Internet protocol) address of the server; the identification category to which the server identification of the target server belongs is used for indicating a company, a department, an organization or the like to which the target server belongs, so that the source server can determine the corresponding mirror image installation package according to the identification category to which the server identification of the target server belongs.
For example, assume that the target server belongs to the BB company a department, and when the target server sends the image acquisition request to the console server, the image acquisition request includes the server identifier of the target server, the interface address of the independent gateway channel of the source server, and an identifier category of the BB company a department.
In step S304, the console server determines the access right of the target server to the source server.
Specifically, the console server receives a mirror image acquisition request sent by the target server, acquires a corresponding identifier category set based on an interface address of an independent gateway channel of the source server, and determines that the target server has the access right of the source server if the identifier category set includes an identifier category to which a server identifier of the target server belongs. The control console server stores an identification category set which can access each server controlled and managed by the control console server, wherein the identification category set can be stored through a data table, an interface address or a server identification of an independent gateway channel of any server and the identification category set which can access any server are stored in the data table, the identification category set comprises at least one identification category, and each identification category comprises a server identification of at least one server; the presence or absence of access authority between the servers may be indicated by storing a directed graph and establishing an access authority relationship diagram between the servers managed and controlled by the console server.
In step S305, the console server sends an image acquisition request to the source server.
Specifically, after the console server determines that the target server has an access right to the source server, the console server sends the received image acquisition request to the source server. The console server sends the mirror image acquisition request to the source server through an interface address of an independent gateway channel of the source server.
Step S306, the source server determines the mirror image installation package and generates a mirror image installation file according to the mirror image installation package.
Specifically, the source server receives a mirror image acquisition request sent by the target server through the console server, the mirror image acquisition request includes an interface address of an independent gateway channel of the source server, a server identifier of the target server, and an identifier type to which the server identifier of the target server belongs, and the source server determines a mirror image installation package according to the identifier type to which the server identifier of the target server belongs. Specifically, the corresponding mirror image installation package is searched according to the identification category to which the server identification of the target server belongs through a corresponding relation table stored in the source server. And generating an image installation file according to the image installation package, wherein the image installation file comprises an installation script file, a system image and an application service installation file.
For example, the server of the target server identifies that the identification category is an identification category corresponding to a BB company department a, acquires the corresponding mirror image installation package from the correspondence table as the mirror image installation package represented by the first mirror image installation package, and generates the mirror image installation file according to the mirror image installation package.
In step S307, the source server sends the mirror image installation file to the console server.
Specifically, the source server sends the mirror image installation file to the console server, and the mirror image installation file carries the server identifier of the target server, so that the console server determines the receiver of the mirror image installation file. The mirror image installation file can also carry an interface address of an independent gateway channel of the source server, so that the target server and the source server can continuously send data messages. Because the source server is a server for storing the mirror image installation package, and the target server already determines the interface address of the independent gateway identifier of the source server, whether the mirror image installation file carries the interface identifier of the independent gateway channel of the source server or not does not influence the target server to send the data message to the source server.
Step S308, the console server sends the mirror image installation file to the target server.
Specifically, the console server sends the received mirror image installation file sent by the source server to the target server based on the server identifier of the target server.
In step S309, the target server sets the saving path of the mirror image installation file as a default starting path in the system boot file.
Specifically, after receiving the mirror image installation file sent by the console server, the target server stores the mirror image installation file locally, and sets a storage path of the mirror image installation file as a default starting path in the system boot file. Specifically, the target server sets a saving path of an executable file in an installation script file of the image installation file as a default starting path in a system boot file, wherein the executable file can be a script file of ks.
For example, if the executable file is a ks.cfg type script file, adding a "menu label ^ ks … menu default kernel … appended initrd ═ ks.cfg save path" and deleting other "menu default" instructions to make the ks.cfg type script file a default start path in the system boot file; or directly replacing the default starting path in the system boot file with the saving path of the ks.cfg type script file; or "set default" is set to "0", where "0" indicates the number of entries of the ks.cfg type script file, and the ks.cfg type script file is set to the first one, and therefore set to 0, which may also be set according to a specific configuration. The above are optional ways of changing the default start path in the system boot file, and other ways of changing the default start path may also be used, which are not limited herein, and are specifically determined by the format of the system boot file.
In step S310, the target server executes a default boot path to install the operating system and the application service.
Specifically, when the target server is started, the mirror image installation file is executed based on a default starting path in the system boot file to install the operating system and the application service. Specifically, when the target server is started, the installation script file is read based on a default starting path in the system boot file, and the installation script file comprises a system installation command and an application installation command, wherein a part of commands in the system installation command belong to a pre-installation script command pre and are used for configuring the operating system, and the application installation command belongs to a post-installation script command post and is used for installing and configuring the application service after the operating system is installed. The target server analyzes the system image according to the system installation command, changes the relevant configuration of the operating system in the system image according to the system installation command, executes the system image through the installation script file to realize the installation of the operating system, analyzes the application installation file according to the application installation command in the installation script file, executes the application installation file, and selects and configures options of the application installation file in the installation process according to the application installation command to realize the installation and configuration of the application service.
If only one script file exists in the installation script file, the installation script file is an executable file, and the installation configuration of the operating system and the application service is realized through each script command in the installation script file; if the installation script file comprises a system installation script, an application installation script and an execution script, the execution script is an executable file, the system installation script is called through the execution script, installation and configuration of the operating system are achieved, the application installation script is called through the execution script, and installation and configuration of the application service are achieved.
After the target server finishes installing the operating system and the application service, the system mirror image, the application service installation file and the installation script file can be deleted to release the storage memory.
According to the method and the device, after the source server receives the installation requirement of the user, the customized mirror image installation package is generated according to the installation requirement of the user, and the corresponding relation between the identification type specified by the user and the mirror image installation package is generated and stored. When the target server needs to install the operating system and the application service, the mirror image installation file is obtained from the source server through the console server based on the independent gateway channel of the source server, and the source server determines the mirror image installation package which can be installed by the target server according to the identification type of the server identification of the target server. And the target server installs and configures the operating system and the application service according to the obtained mirror image installation file, so as to realize the customization of installation. Because the identification type is specified when the user sends the installation requirement, the personalized installation can be realized. When the same user group needs to install the operating system and the application service with the same configuration, the same mirror image installation package can be obtained. When the system deployment is carried out through the independent gateway channel, the plurality of target servers can simultaneously and parallelly acquire the mirror image installation packages from the source server, so that the batch processing is realized, and the installation efficiency is improved. Because the installation process is executed by installing the script file, unattended installation is realized, manpower and time are saved, and the system deployment efficiency is improved.
Referring to fig. 4, fig. 4 is a schematic diagram of another system deployment interaction flow provided in the embodiment of the present application, and as shown in fig. 4, the method includes:
step S401, the source server generates a mirror image installation package according to the user requirement.
Step S402, the target server sets the interface address of the independent gateway channel of the source server to the access address of the system configuration page.
In step S403, the target server sends an image acquisition request to the console server.
In step S404, the console server determines the access right of the target server to the source server.
In step S405, the console server sends a mirror image acquisition request to the source server.
Specifically, steps S401 to S405 refer to the descriptions in steps S301 to S305 in fig. 3, and are not repeated here.
Step S406, the source server determines a mirror image installation package, and generates a mirror image installation file according to the mirror image installation package.
Specifically, the source server receives a mirror image acquisition request sent by the target server through the console server, and the source server determines a mirror image installation package according to the identification type to which the server identification of the target server belongs. Specifically, the corresponding mirror image installation package is searched according to the identification category to which the server identification of the target server belongs through a corresponding relation table stored in the source server. And generating a mirror image installation file according to the mirror image installation package, wherein the mirror image installation file comprises a storage position of the mirror image installation package in an independent gateway channel of the source server, and the mirror image installation package comprises an installation script file, a system mirror image and an application service installation file.
For example, the server identifier of the target server is an identifier type corresponding to a BB company department a, the corresponding mirror image installation package is obtained from the correspondence table as the mirror image installation package represented by the first mirror image installation package, and the mirror image installation file is generated according to the storage location of the mirror image installation package in the independent gateway channel of the source server.
In step S407, the source server sends the mirror image installation file to the console server.
Specifically, refer to the description in step S307 in fig. 3, which is not repeated herein.
Step S408, the console server sends the mirror image installation file to the target server.
Specifically, refer to the description in step S308 in fig. 3, which is not repeated herein.
In step S409, the target server sets the saving path of the mirror image installation file as a default starting path in the system boot file.
Specifically, refer to the description of step S309 in fig. 3. In this embodiment, since the mirror image installation file includes a storage location of the mirror image installation package in the independent gateway channel of the source server, when a default boot path in the system boot file is set, a save path of the mirror image installation file may be set as the default boot path, and the mirror image installation file at this time is a script file generated based on the storage location of the mirror image installation package in the independent gateway channel of the source server and may be used to call an executable file in an installation script file of the mirror image installation package; or, directly setting the storage location of the image installation package included in the image installation file in the independent gateway channel of the source server as a default starting path in the system boot file.
In step S410, the target server executes a default startup path.
Specifically, when the target server is started, the default starting path in the system boot file is acquired and accessed. When the default starting path is a local storage path of the mirror image installation file, the mirror image installation file is read when the target server is started, and the independent gateway channel of the source server is accessed through the mirror image installation file; when the default starting path is the storage position of the mirror image installation package included in the mirror image installation file in the independent gateway channel of the source server, the storage position of the mirror image installation package in the independent gateway channel of the source server is directly read when the target server is started, so that the storage position of the mirror image installation package in the independent gateway channel of the source server is accessed.
In step S411, the target server sends a mirror installation request to the console server.
Specifically, the target server sends a mirror image installation request to the console server, where the mirror image installation request includes an interface address of the independent gateway channel of the source server, so that the console server sends the mirror image installation request to the source server through the independent gateway channel of the source server according to the interface address. The mirror image installation request may include a storage location of the mirror image installation package in an independent gateway channel of the source server, so that the source server does not need to determine the mirror image installation package corresponding to the target server again after receiving the mirror image installation request.
In step S412, the console server sends a mirror installation request to the origin server.
Specifically, the console server sends the mirror installation request to the origin server. The system comprises a console server, a source server, a mirror image installation request and a mirror image installation request, wherein the console server can determine the access right of a target server to the source server, and sends the mirror image installation request to the source server when the target server has the access right to the source server; or after determining that the target server has the access right to the source server, the console server defaults that the target server has the access right to the source server within a preset time threshold range, and directly sends the mirror image installation request to the source server; or, in a system deployment period, the console server defaults that the target server has access authority to the source server, directly sends the mirror image installation request to the source server, and clears the access authority of the target server to the source server until the process that the target server installs the operating system and the application service through the independent gateway channel of the source server is finished, and the access authority is determined again in the next access.
Step S413, the source server builds an installation environment, executes the mirror image installation package in the installation environment, and generates system configuration data, system installation data, application service configuration data, and application service installation data.
Specifically, the source server builds an installation environment based on the mirror image installation package, executes each installation script command in the installation script file based on the installation script file of the mirror image installation package in the installation environment, updates related parameters in the system mirror image, generates system configuration data, executes the updated system mirror image, generates the system installation data, executes the installation script file in the installation environment, analyzes the application service installation file, updates related configuration in the execution process of the application service installation file through the installation script file, generates application service configuration data according to the updated related configuration, and generates the application service installation data after the execution of the application service installation file is finished. The installation environment is a built virtual environment, the configuration of the installation environment can be saved after a mounting environment is built, when the mirror image installation package needs to be executed, the installation environment is started, and the installation environment is closed after the execution is finished.
When the source server generates system configuration data, system installation data, application service configuration data and application service installation data corresponding to one mirror image installation package, the system configuration data, the system installation data, the application service configuration data and the application service installation data can be stored in a storage memory of the source server, and when the mirror image installation package with the same request exists, the stored system configuration data, the system installation data, the application service configuration data and the application service installation data can be directly sent to the server requesting the same mirror image installation package. When the storage time of the system configuration data, the system installation data, the application service configuration data and the application service installation data corresponding to any mirror image installation package exceeds a preset storage time value or exceeds a preset request time, no other server requests the mirror image installation package, and the part of the memory is released.
In step S414, the source server sends a mirror installation response to the console server.
Specifically, the source server sends an image installation response to the console server, where the image installation response includes system configuration data, system installation data, application service configuration data, and application service installation data. The mirror installation response carries the server identification of the target server.
In step S415, the console server transmits a mirror installation response to the target server.
Specifically, the console server sends the acquired mirror installation response sent by the source server to the target server.
In step S416, the target server installs the operating system and the application service.
Specifically, after the target server obtains the mirror image installation response, the target server analyzes and configures the system installation data based on the system configuration data, updates relevant parameters of the system configuration of the local server to install the operating system, and analyzes and configures the application service installation data based on the application service configuration data to install the application service.
According to the method and the device, after the source server receives the installation requirement of the user, the customized mirror image installation package is generated according to the installation requirement of the user, and the corresponding relation between the identification type specified by the user and the mirror image installation package is generated and stored. When the target server needs to install the operating system and the application service, the mirror image installation file is obtained from the source server through the console server based on the independent gateway channel of the source server, and the source server determines the mirror image installation package which can be installed by the target server according to the identification type of the server identification of the target server. And the target server installs and configures the operating system and the application service according to the obtained mirror image installation file, so as to realize the customization of installation. Because the identification type is specified when the user sends the installation requirement, the personalized installation can be realized. When the same user group needs to install the operating system and the application service with the same configuration, the same mirror image installation package can be obtained. When the system deployment is carried out through the independent gateway channel, the plurality of target servers can simultaneously and parallelly acquire the mirror image installation packages from the source server, so that the batch processing is realized, and the installation efficiency is improved. Because the installation process is executed by installing the script file, unattended installation is realized, manpower and time are saved, and the system deployment efficiency is improved.
Referring to fig. 5, fig. 5 is a schematic structural diagram of a system deployment apparatus of a target server according to an embodiment of the present disclosure. As shown in fig. 5, the system deployment apparatus 50 may be used to perform the steps in the embodiments corresponding to fig. 2 to 4. The system deployment apparatus 50 may include: a sending module 501, an obtaining module 502, a setting module 503, and an executing module 504. Wherein:
a sending module 501, configured to send, by a target server, an image obtaining request to a console server through a preset independent gateway channel, where the image obtaining request includes an interface address of an independent gateway channel of a source server, a server identifier of the target server, and an identifier category to which the server identifier of the target server belongs, so that after determining, by the console server, an access right of the target server to the source server according to the server identifier, the console server sends, by using the interface address and the independent gateway channel of the source server, the image obtaining request to the source server;
an obtaining module 502, configured to obtain, by the target server, a mirror image installation file sent by the source server through the console server and store the mirror image installation file locally, where the mirror image installation file is determined by the source server according to an identifier category to which a server identifier of the target server belongs;
a setting module 503, configured to set a saving path of the image installation file as a default starting path in a system boot file;
an executing module 504, configured to execute the image installation file based on a default boot path in the system boot file when the target server is booted, so as to install an operating system and an application service.
Wherein the setting module 503 is further configured to:
and the target server sets an interface address of the independent gateway channel of the source server as an access address of a system configuration page, so that the target server sends a mirror image acquisition request to a console server through a preset independent gateway channel when starting.
The mirror image installation files comprise installation script files, system mirror images and application service installation files; the device further comprises:
the execution module 504 includes:
a reading unit 5041, configured to read, when the target server is started, the installation script file based on a default starting path in the system boot file, where the installation script file includes a system installation command and an application installation command;
an analyzing unit 5042, configured to analyze the system image according to the system installation command, so as to implement installation and configuration of the operating system, and analyze the application installation file according to the application installation command, so as to implement installation and configuration of the application service.
The mirror image installation file comprises a storage position of a mirror image installation package in an independent gateway channel of the source server, and the mirror image installation package comprises an installation script file, a system mirror image and an application service installation file;
the execution module 504 further comprises:
an obtaining unit 5043, configured to obtain a default boot path in the system boot file when the target server is booted, and execute the image installation file based on the default boot path;
a sending unit 5044, configured to send, by the target server, an image installation request to the console server based on the image installation file, where the image installation request includes an interface address of an independent gateway channel of the source server, so that the console server sends the image installation request to the source server through an independent gateway channel with the source server according to the interface address;
the obtaining unit 5043, further configured to obtain, by the target server, the mirror installation response sent by the source server through the console server, the mirror installation response includes system configuration data, system installation data, application service configuration data, and application service installation data, wherein the system configuration data and the system installation data are that the source server determines the mirror installation package based on the identification category to which the server identification of the target server belongs, builds an installation environment based on the mirror installation package, executing the system image in the installation environment based on the installation script file of the mirrored installation package, the application service configuration data and the application service installation data are obtained by the source server executing the application service installation file in the installation environment based on the installation script file;
the parsing unit 5042 is further configured to, by the target server, parse and configure the system installation data based on the system configuration data to install the operating system, and parse and configure the application service installation data based on the application service configuration data to install the application service. In a specific implementation, the apparatus may execute, by each module, the implementation manner provided in each step in the implementation manner provided in fig. 4 to implement the functions implemented in the embodiment, which may specifically refer to the corresponding description provided in each step in the method embodiment shown in fig. 4, and is not described herein again.
According to the method and the device, when the target server needs to install the operating system and the application service, the mirror image installation file is obtained from the source server through the console server based on the independent gateway channel of the source server, and the source server determines the mirror image installation package which can be installed by the target server according to the identification type of the server identification of the target server. And the target server installs and configures the operating system and the application service according to the obtained mirror image installation file, so as to realize the customization of installation. Because the identification type is specified when the user sends the installation requirement, the personalized installation can be realized. When the same user group needs to install the operating system and the application service with the same configuration, the same mirror image installation package can be obtained. When the system deployment is carried out through the independent gateway channel, the plurality of target servers can simultaneously and parallelly acquire the mirror image installation packages from the source server, so that the batch processing is realized, and the installation efficiency is improved. Because the installation process is executed by installing the script file, unattended installation is realized, manpower and time are saved, and the system deployment efficiency is improved.
Referring to fig. 6, fig. 6 is a schematic structural diagram of a system deployment apparatus of a console server according to an embodiment of the present disclosure. As shown in fig. 6, the system deployment apparatus 60 may be used to perform the steps in the embodiments corresponding to fig. 3-4 described above. The system deployment device 60 includes a receiving module 601, a determining module 602, and a sending module 603. Wherein:
a receiving module 601, configured to receive, by a console server, a mirror image acquisition request sent by a target server through a preset independent gateway channel, where the mirror image acquisition request includes an interface address of the independent gateway channel of a source server, a server identifier of the target server, and an identifier category to which the server identifier of the target server belongs;
a determining module 602, configured to determine, by the console server, an access right of the target server to the source server according to the server identifier of the server, and send the mirror image obtaining request to the source server through an independent gateway channel with the source server according to the interface address;
a sending module 603, configured to send, by the console server, the mirror image installation file sent by the source server to the target server, so that the target server installs an operating system and an application service according to the mirror image installation file, where the mirror image installation file is determined by the source server according to the identifier type to which the server identifier of the target server belongs.
The mirror image installation file comprises a storage position of a mirror image installation package in an independent gateway channel of the source server, and the mirror image installation package comprises an installation script file, a system mirror image and an application service installation file;
the receiving module 601 is further configured to receive, by the console server, an image installation request sent by the target server based on the image installation file, where the image installation request includes an interface address of an independent gateway channel of the source server;
the sending module 603 is further configured to send, by the console server, the mirror image installation request to the source server through an independent gateway channel with the source server according to the interface address;
the receiving module 601 is further configured to receive, by the console server, a mirror image installation response sent by the source server;
the sending module 603 is further configured to send the mirror image installation response to the target server, where the mirror image installation response includes system configuration data, system installation data, application service configuration data, and application service installation data.
Wherein the determining module 602 includes:
an obtaining unit 6021, configured to obtain, by the console server, a corresponding identifier class set based on an interface address of an independent gateway channel of the source server;
a determining unit 6022, configured to determine that the target server has the access right of the source server if the identification category set includes the identification category to which the server identification of the target server belongs.
Referring to fig. 7, fig. 7 is a schematic structural diagram of a system deployment apparatus of a source server according to an embodiment of the present application. As shown in fig. 7, the system deployment apparatus 70 may be used to perform the steps in the embodiments corresponding to fig. 3-4 described above. The system deployment apparatus 70 includes a receiving module 701, a determining module 702, and a sending module 703. Wherein:
a receiving module 701, configured to receive, by a source server, a mirror image acquisition request sent by a target server through a console server, where the mirror image acquisition request includes an interface address of an independent gateway channel of the source server, a server identifier of the target server, and an identifier category to which the server identifier of the target server belongs, and the mirror image acquisition request is sent by the console server to the source server through the independent gateway channel of the source server according to the interface address;
a determining module 702, configured to determine, by the source server, a mirror image installation package according to the identifier category to which the server identifier of the target server belongs, and generate a mirror image installation file according to the mirror image installation package;
a sending module 703, configured to send, by the source server, the image installation file to the target server through the console server, so that the target server installs the operating system and the application service based on the image installation file.
Wherein the apparatus further comprises:
an obtaining module 704, configured to obtain, by the source server, an installation requirement of a user, where the installation requirement includes system configuration information and application service information;
a generating module 705, configured to obtain a preset installation script template by the source server, and modify the preset installation script template according to the installation requirement to generate an installation script file;
the generating module 705 is further configured to obtain a system image and an application service installation file by the source server, and generate the image installation package according to the installation script file, the system image, and the application service installation file;
the generating module 705 is further configured to generate, by the source server, a corresponding relationship between the identifier category specified by the user and the mirror image installation package.
The mirror image installation file comprises a storage position of a mirror image installation package in an independent gateway channel of the source server, and the mirror image installation package comprises an installation script file, a system mirror image and an application service installation file;
the device further comprises:
the receiving module 701 is further configured to receive, by the source server, a mirror image installation request sent by the target server through a console server, where the mirror image installation request includes an interface address of an independent gateway channel of the source server and an identifier category to which a server identifier of the target server belongs;
the determining module 702 is further configured to determine, by the source server, the mirror image installation package based on the identification category to which the server identification of the target server belongs;
an executing module 706, configured to establish, by a source server, an installation environment based on the image installation package, execute the system image in the installation environment based on the installation script file of the image installation package to obtain the system configuration data and the system installation data, and execute, in the installation environment, the application service installation file based on the installation script file of the image installation package to obtain the application service configuration data and the application service installation data;
the generating module 705 is further configured to generate a mirror image installation response by the source server according to the system configuration data, the system installation data, the application service configuration data, and the application service installation data;
the sending module 703 is further configured to send, by the source server, the mirror image installation response to the console server, so that the console server sends the mirror image installation response to the target server based on the server identifier of the target server.
The determining module 702 is specifically configured to:
the source server acquires a mirror image installation package corresponding to the identification type according to the identification type to which the server identification of the target server belongs, wherein the corresponding relation between the identification type and the mirror image installation package is stored in a storage memory corresponding to an independent gateway channel of the source server;
and the source server generates the mirror image installation file according to the mirror image installation package.
Referring to fig. 8, fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure. As shown in fig. 8, the electronic device in the present embodiment may include: one or more processors 801, memory 802, and a transceiver 803. The processor 801, the memory 802, and the transceiver 803 are connected by a bus 804. The memory 802 is used for storing a computer program comprising program instructions, and the transceiver 803 is used for data interaction among various servers; the processor 801 is configured to execute program instructions stored in the memory 802 to perform the following operations:
a target server sends a mirror image acquisition request to a console server through a preset independent gateway channel, wherein the mirror image acquisition request comprises an interface address of an independent gateway channel of a source server, a server identifier of the target server and an identifier category to which the server identifier of the target server belongs, so that the console server sends the mirror image acquisition request to the source server through the independent gateway channel of the source server according to the interface address after determining the access authority of the target server to the source server according to the server identifier;
the target server acquires a mirror image installation file sent by the source server through the console server and stores the mirror image installation file locally, the storage path of the mirror image installation file is set as a default starting path in a system boot file, and the mirror image installation file is determined by the source server according to the identifier type to which the server identifier of the target server belongs;
and when the target server is started, executing the mirror image installation file based on a default starting path in the system boot file so as to install an operating system and an application service.
In some possible embodiments, the processor 801 may be a Central Processing Unit (CPU), and the processor may be other general purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), field-programmable gate arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 802 may include both read-only memory and random-access memory, and provides instructions and data to the processor 801 and the transceiver 803. A portion of the memory 802 may also include non-volatile random access memory. For example, the memory 802 may also store device type information.
In a specific implementation, the electronic device may execute the implementation manners provided in the steps in fig. 2 to fig. 4 through the built-in functional modules, which may specifically refer to the implementation manners provided in the steps in fig. 2 to fig. 4, and details are not described herein again.
An embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, where the computer program includes program instructions, and when the program instructions are executed by a processor, the method for deploying the system provided in each step in fig. 2 to 4 is implemented, which may specifically refer to the implementation manner provided in each step in fig. 2 to 4, and is not described herein again.
The computer readable storage medium may be the system deployment apparatus provided in any of the foregoing embodiments or an internal storage unit of the electronic device, such as a hard disk or a memory of the electronic device. The computer readable storage medium may also be an external storage device of the electronic device, such as a plug-in hard disk, a smart card (SMC), a Secure Digital (SD) card, a flash card (flash card), and the like, which are provided on the electronic device. Further, the computer readable storage medium may also include both an internal storage unit and an external storage device of the electronic device. The computer-readable storage medium is used for storing the computer program and other programs and data required by the electronic device. The computer readable storage medium may also be used to temporarily store data that has been output or is to be output.
Those of ordinary skill in the art will appreciate that the elements and algorithm steps of the examples described in connection with the embodiments disclosed herein may be embodied in electronic hardware, computer software, or combinations of both, and that the components and steps of the examples have been described in a functional general in the foregoing description for the purpose of illustrating clearly the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The method and the related apparatus provided by the embodiments of the present application are described with reference to the flowchart and/or the structural diagram of the method provided by the embodiments of the present application, and each flow and/or block of the flowchart and/or the structural diagram of the method, and the combination of the flow and/or block in the flowchart and/or the block diagram can be specifically implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block or blocks of the block diagram. These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block or blocks of the block diagram. These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block or blocks.
The above disclosure is only for the purpose of illustrating the preferred embodiments of the present invention, and it is therefore to be understood that the invention is not limited by the scope of the appended claims.

Claims (10)

1. A method of system deployment, the method comprising:
a target server sends a mirror image acquisition request to a console server through a preset independent gateway channel, wherein the mirror image acquisition request comprises an interface address of an independent gateway channel of a source server, a server identifier of the target server and an identifier category to which the server identifier of the target server belongs, so that the console server sends the mirror image acquisition request to the source server through the independent gateway channel of the source server according to the interface address after determining the access authority of the target server to the source server according to the server identifier;
the target server acquires a mirror image installation file sent by the source server through the console server and stores the mirror image installation file locally, the storage path of the mirror image installation file is set as a default starting path in a system boot file, and the mirror image installation file is determined by the source server according to the identifier type to which the server identifier of the target server belongs;
and when the target server is started, executing the mirror image installation file based on a default starting path in the system boot file so as to install an operating system and an application service.
2. The method of claim 1, wherein the method is preceded by:
the target server sets an interface address of an independent gateway channel of the source server as an access address of a system configuration page, so that the target server sends a mirror image acquisition request to a console server through a preset independent gateway channel when being started, and the system configuration page is a default first access page when the target server is started.
3. The method of claim 1, wherein the image installation files include an installation script file, a system image, and an application service installation file;
when the target server is started, executing the mirror image installation file based on a default starting path in the system boot file, wherein the executing step comprises the following steps:
when the target server is started, reading the installation script file based on a default starting path in the system boot file, wherein the installation script file comprises a system installation command and an application installation command;
and analyzing the system mirror image according to the system installation command to realize the installation and configuration of the operating system, and analyzing the application installation file according to the application installation command to realize the installation and configuration of the application service.
4. The method of claim 1, wherein the image installation file comprises a storage location of an image installation package in a separate gateway channel of the origin server, the image installation package comprising an installation script file, a system image, and an application service installation file;
when the target server is started, the mirror image installation file is executed based on the default starting path in the system boot file so as to install an operating system and application services, and the method comprises the following steps:
when the target server is started, acquiring a default starting path in the system boot file, and executing the mirror image installation file based on the default starting path;
the target server sends a mirror image installation request to the console server based on the mirror image installation file, wherein the mirror image installation request comprises an interface address of an independent gateway channel of the source server, so that the console server sends the mirror image installation request to the source server through the independent gateway channel of the source server according to the interface address;
the target server acquires a mirror image installation response sent by the source server through the console server, wherein the mirror image installation response comprises system configuration data, system installation data, application service configuration data and application service installation data, the system configuration data and the system installation data are obtained by the source server determining the mirror image installation package based on the identification type of the server identification of the target server, building an installation environment based on the mirror image installation package, executing the system mirror image based on the installation script file of the mirror image installation package in the installation environment, and the application service configuration data and the application service installation data are obtained by the source server executing the application service installation file based on the installation script file in the installation environment;
and the target server analyzes and configures the system installation data based on the system configuration data so as to install the operating system, and analyzes and configures the application service installation data based on the application service configuration data so as to install the application service.
5. The method of claim 1, wherein the access right of the target server to the source server is determined by the console server based on an identification class set corresponding to an interface address of an independent gateway channel of the source server, wherein the console server obtains the identification class set, and if the identification class set includes an identification class to which a server identification of the target server belongs, it is determined that the target server has the access right to the source server.
6. The method according to claim 1, wherein the image installation file is generated by the source server according to an identification type to which a server identification of the target server belongs, acquiring an image installation package corresponding to the identification type; and the corresponding relation between the identification type and the mirror image installation package is stored in a storage memory corresponding to the independent gateway channel of the source server.
7. A method of system deployment, the method comprising:
the method comprises the steps that a console server acquires a mirror image acquisition request sent by a target server through a preset independent gateway channel, wherein the mirror image acquisition request comprises an interface address of the independent gateway channel of a source server, a server identifier of the target server and an identifier category to which the server identifier of the target server belongs;
the console server determines the access authority of the target server to the source server according to the server identifier of the server, and sends the mirror image acquisition request to the source server through an independent gateway channel of the source server according to the interface address;
and the console server sends the mirror image installation file sent by the source server to the target server so that the target server installs an operating system and an application service according to the mirror image installation file, wherein the mirror image installation file is determined by the source server according to the identifier type of the server identifier of the target server.
8. A system deployment apparatus, the apparatus comprising:
the system comprises a sending module, a receiving module and a sending module, wherein the sending module is used for sending a mirror image obtaining request to a console server through a preset independent gateway channel, the mirror image obtaining request comprises an interface address of the independent gateway channel of a source server, a server identifier of the target server and an identifier type to which the server identifier of the target server belongs, so that the console server sends the mirror image obtaining request to the source server through the independent gateway channel of the source server according to the interface address after determining the access authority of the target server to the source server according to the server identifier;
an obtaining module, configured to obtain, by the target server, a mirror image installation file sent by the source server through the console server and store the mirror image installation file locally, where the mirror image installation file is determined by the source server according to an identifier category to which a server identifier of the target server belongs;
the setting module is used for setting the saving path of the mirror image installation file as a default starting path in a system boot file;
and the execution module is used for executing the mirror image installation file based on a default starting path in the system boot file when the target server is started so as to install an operating system and application service.
9. An electronic device comprising a processor, a memory, and a transceiver;
the processor is connected to the memory and the transceiver respectively, wherein the transceiver is used for data interaction between the servers, the memory is used for storing program codes, and the processor is used for calling the program codes to execute the method of any one of claims 1-6 or the method of claim 7.
10. A computer storage medium, characterized in that the computer storage medium stores a computer program comprising program instructions that, when executed by a processor, cause the processor to perform the method of any of claims 1-6 or the method of claim 7.
CN201910880738.4A 2019-09-18 2019-09-18 System deployment method and device Active CN110753088B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910880738.4A CN110753088B (en) 2019-09-18 2019-09-18 System deployment method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910880738.4A CN110753088B (en) 2019-09-18 2019-09-18 System deployment method and device

Publications (2)

Publication Number Publication Date
CN110753088A true CN110753088A (en) 2020-02-04
CN110753088B CN110753088B (en) 2022-10-18

Family

ID=69276656

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910880738.4A Active CN110753088B (en) 2019-09-18 2019-09-18 System deployment method and device

Country Status (1)

Country Link
CN (1) CN110753088B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111443925A (en) * 2020-04-15 2020-07-24 北京易点淘网络技术有限公司 Mirror image installation method, primary and secondary servers, system, electronic equipment and storage medium
CN111930415A (en) * 2020-06-22 2020-11-13 山东浪潮通软信息科技有限公司 Construction deployment method and device for large-scale software product
CN112587917A (en) * 2021-01-23 2021-04-02 上海达龙信息科技有限公司 Cloud game server template and game disk changing method, system, storage medium and server
CN114024846A (en) * 2021-11-18 2022-02-08 上海宝创网络科技有限公司 Method and equipment for generating gateway function
CN114860272A (en) * 2022-07-04 2022-08-05 统信软件技术有限公司 Operating system installation method, computing device and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101014034A (en) * 2006-12-31 2007-08-08 武汉蓝星科技股份有限公司 U disk server-based cluster solving method
CN104468199A (en) * 2014-11-23 2015-03-25 国云科技股份有限公司 Frame and running method suitable for deployment and management of Linux distributed system
CN105187252A (en) * 2015-09-28 2015-12-23 浪潮(北京)电子信息产业有限公司 Method and system for batch deployment of customized systems
CN108958742A (en) * 2017-05-26 2018-12-07 华为技术有限公司 A kind of method of batch installing operating system, relevant device and system
CN108958927A (en) * 2018-05-31 2018-12-07 康键信息技术(深圳)有限公司 Dispositions method, device, computer equipment and the storage medium of container application
CN109739616A (en) * 2018-12-05 2019-05-10 国云科技股份有限公司 A kind of cloud platform container mirror image batch making method

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101014034A (en) * 2006-12-31 2007-08-08 武汉蓝星科技股份有限公司 U disk server-based cluster solving method
CN104468199A (en) * 2014-11-23 2015-03-25 国云科技股份有限公司 Frame and running method suitable for deployment and management of Linux distributed system
CN105187252A (en) * 2015-09-28 2015-12-23 浪潮(北京)电子信息产业有限公司 Method and system for batch deployment of customized systems
CN108958742A (en) * 2017-05-26 2018-12-07 华为技术有限公司 A kind of method of batch installing operating system, relevant device and system
CN108958927A (en) * 2018-05-31 2018-12-07 康键信息技术(深圳)有限公司 Dispositions method, device, computer equipment and the storage medium of container application
CN109739616A (en) * 2018-12-05 2019-05-10 国云科技股份有限公司 A kind of cloud platform container mirror image batch making method

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111443925A (en) * 2020-04-15 2020-07-24 北京易点淘网络技术有限公司 Mirror image installation method, primary and secondary servers, system, electronic equipment and storage medium
CN111443925B (en) * 2020-04-15 2024-03-01 北京易点淘网络技术有限公司 Mirror image installation method, primary and secondary servers, system, electronic equipment and storage medium
CN111930415A (en) * 2020-06-22 2020-11-13 山东浪潮通软信息科技有限公司 Construction deployment method and device for large-scale software product
CN111930415B (en) * 2020-06-22 2022-07-12 浪潮通用软件有限公司 Construction deployment method and device for large-scale software product
CN112587917A (en) * 2021-01-23 2021-04-02 上海达龙信息科技有限公司 Cloud game server template and game disk changing method, system, storage medium and server
CN114024846A (en) * 2021-11-18 2022-02-08 上海宝创网络科技有限公司 Method and equipment for generating gateway function
CN114860272A (en) * 2022-07-04 2022-08-05 统信软件技术有限公司 Operating system installation method, computing device and storage medium

Also Published As

Publication number Publication date
CN110753088B (en) 2022-10-18

Similar Documents

Publication Publication Date Title
CN110753088B (en) System deployment method and device
US7743242B2 (en) Method and system for automatic generation of operating system boot images
CN103458002B (en) One key dispositions method and device of cloud system
WO2018113514A1 (en) Cdn management system, method and apparatus
CN108632375B (en) Online upgrading method for distributed deployment service software program
US8402123B2 (en) Systems and methods for inventorying un-provisioned systems in a software provisioning environment
CN103608773A (en) Deployment system for multi-node applications
CN103761088A (en) Multiple operation system switching method applicable to ARM (advanced risc machine) framework mobile equipment
CN101763277A (en) Method for automatically mounting operating system
CN104113430A (en) Cloud computing data center automatic deployment software framework design
CN105765533A (en) Method and apparatus for firmware virtualization
CN106873970B (en) Installation method and device of operating system
EP3091435A1 (en) Resource management method and device for terminal system
CN102053845B (en) Electronic device for automatically and continuously mounting operating system and related method and system thereof
CN113821220A (en) Installation method and device of linux operating system
CN115357198B (en) Mounting method and device of storage volume, storage medium and electronic equipment
CN109495298B (en) Method and device for managing nodes in OpenStack system
US20220326939A1 (en) Mobile service upgrade method and apparatus, and terminal
CN104079540A (en) Method, device and system of updating application as well as user equipment
CN103902344A (en) Electronic device for installation of operating system automatically and continuously and related method thereof
CN115629819A (en) Operating system installation method and device and computing equipment
US11372627B2 (en) System and method for providing integrated development environment (IDE) for programmable software system
CN106803786B (en) Network element updating method and system based on network function virtualization
CN114662102A (en) File processing method and device and storage medium
WO2016206437A1 (en) Rom package generation method and device

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
GR01 Patent grant
GR01 Patent grant