Server large-scale automatic deployment delivery method based on OS

Through the combination of PXE+Kickstart and Ansible, the automated deployment and delivery of large-scale servers is achieved, solving the problems of low efficiency and long delivery cycle caused by manual intervention in the traditional model, and improving deployment efficiency and delivery speed.

CN120085880APending Publication Date: 2025-06-03XIAMEN MEIYABAIKE INFORMATION SECURITY RES INST CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411957699.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-27
Publication Date
2025-06-03

AI Technical Summary

Technical Problem

The existing technology is difficult to achieve efficient, fast and automated system and application deployment of large-scale servers. The traditional model relies on manual operation, which is inefficient and delays the project delivery cycle.

Method used

It uses PXE+Kickstart to automatically install the batch system, and combines the function of Ansible to automatically deploy and configure applications in batches. Through HTTP, TFTP, and DHCP tools, the client can download files from the server and automatically install the operating system and applications.

Benefits of technology

It realizes unattended large-scale server automated deployment and delivery, improves deployment efficiency, shortens project delivery cycle, and meets the needs of large-scale deployment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120085880A_ABST
    Figure CN120085880A_ABST
Patent Text Reader

Abstract

The invention provides an OS-based server large-scale automatic deployment delivery method. The client requests to download the starting file, and the server sends the starting file to the client; the client loads configuration information according to the startup file and sends installation information to the server, and the server receives the installation information and sends a mirror image and kickstart configuration file to the client; the client loads a kickstart configuration file and installs an operating system according to configuration information, then the operating system of the client completes customization, and an Ansible tool is installed; the Ansible tool downloads an application installation package from the server side; and the Ansible tool installs the application program deployment package by running a specified path script. The method is used for solving the problem of automatic deployment and installation of the service scene application component by automatically installing and deploying the server operating system in a complex hardware configuration environment, and can be applied to rapid deployment and delivery in the implementation process of a large-scale project.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of server operating systems and application deployment, and in particular to a method for large-scale automated deployment and delivery of servers based on an OS. Background Art

[0002] With the continuous upgrading and transformation of the information technology industry, enterprises nowadays have an urgent need for large-scale, efficient, fast, and automated system and application batch deployment and delivery. Under the traditional mode, the installation and deployment of physical machine systems and business applications rely on manual installation using optical discs or USB flash drives. There are a variety of hardware types, and the configuration of each one is more complex. Facing a large-scale application line, the lag in delivery will become a bottleneck restricting business development. Therefore, the problems of standardization and automation must be solved to meet the large-scale deployment requirements.

[0003] Previous solutions have all solved problems through the proficiency of professional technical engineers. However, the manual intervention process is time-consuming and inefficient, delaying the project delivery cycle; moreover, there has been no batch deployment of applications based on the existing technical environment.

[0004] Currently, based on the existing technology, large-scale automated deployment of operating systems can be achieved. After the system deployment is completed, manual intervention is required for application program deployment. To reduce the delivery time of the deployment system, by combining the respective functional advantages of kickstart and Ansible, it is possible to achieve automated deployment of the application system after deploying the operating system without human intervention. Summary of the Invention

[0005] In order to solve the problems of automatic deployment and installation of business scenario application components in the process of operating system installation and deployment in a complex hardware configuration environment, the present invention is a method for large-scale automated deployment and delivery of servers based on an OS, mainly used to solve the above problems.

[0006] The technical solution of the present invention is as follows:

[0007] A method for automated deployment and delivery of a server, which includes the following steps:

[0008] The server starts the service and copies the TFTP service file;

[0009] The client starts a PXE request for the server DHCP service. The server DHCP service assigns an IP address, and the client obtains the IP address;

[0010] The client requests to download the startup file through the TFTP service, and the server TFTP service sends the startup file to the client;

[0011] The client loads configuration information according to the startup file and sends installation information to the server. The server receives the installation information and sends the image and kickstart configuration file to the client.

[0012] The client loads the kickstart configuration file and installs the operating system according to the configuration information. Then, the client operating system is customized, and then the Ansible tool is installed. The Ansible tool downloads the application installation package from the server.

[0013] The Ansible tool installs the application deployment package by running the script at the specified path.

[0014] In one embodiment, the kickstart configuration file includes an installation options section, a package installation section, and a script installation section.

[0015] The installation options section includes installation language, time zone, network configuration, authentication method, system partitioning, and system boot configuration.

[0016] The package installation section lists the packages to be installed during the installation process, starting with %pacakages and ending with %end, specifying a package group or individual packages.

[0017] The script installation section includes a pre-installation script section %pre (scripts executed before system installation) and a post-installation script section %post (scripts executed after system installation is complete).

[0018] The pre-installation script section %pre executes a series of command scripts before system installation, including setting network configuration, preparing disk partitions, and loading additional kernels.

[0019] The post-installation script section %post executes a series of command scripts after system installation, including system configuration and customization, installing additional packages, and system optimization and security settings.

[0020] In one embodiment, the customization of the client operating system specifically includes: system initialization, creating users, configuring static addresses, configuring Yum sources, and creating a shared directory for application installation packages.

[0021] In one embodiment, the Ansible tool installs the application deployment package by running the script at the specified path, specifically including:

[0022] Installing the Ansible automation deployment tool, downloading the application installation package in the shared directory to the client device, and installing the dependency packages required before implementing the application deployment.

[0023] In one embodiment, the Ansible automated deployment tool includes an Ansible Playbook designed according to the requirements of application installation and configuration, which includes necessary tasks, variables, and handlers.

[0024] In one embodiment, the Ansible Playbook further includes a list of remote host machines executed by Hosts, a set of Tasks, and a configuration file with Template syntax.

[0025] In one embodiment, in the Ansible Playbook, built-in variables or custom variables in Varniables are called in the Ansible Playbook, and specific tasks to be executed are specified by tags for part of the code running in the Ansible Playbook;

[0026] Handlers and notify are used in combination, and operations triggered by specific conditions are executed only when the specific conditions are met, otherwise they are not executed.

[0027] In one embodiment, the client configures SSH passwordless login to the server, generates an SSH key pair, and adds the public key to the authorized_keys file of the remote host;

[0028] Create an Inventory file, and configure the server address, port, and username information in the Inventory file.

[0029] In one embodiment, the Ansible Playbook file is written using YAML syntax. A series of execution tasks are defined in the Ansible Playbook file, and these tasks correspond to each step of deploying the application. These tasks will be executed by Ansible in sequence to complete the deployment work.

[0030] In one embodiment, the Ansible-Playbook command-line tool is used to execute the Ansible Playbook file. The command-line tool reads the Ansible Playbook file and the server inventory file, and executes them one by one on the client according to the task flow.

[0031] The present invention combines the functions of the PXE+Kickstart automated batch installation system and the Ansible automated batch deployment and configuration application. Relevant operations are carried out based on HTTP, TFTP, and DHCP tools. The overall structure of the automated deployment is based on the client / server network service mode. The client workstation downloads files from the remote server through the network and boots the operating system through the network. During the boot process, the client requests the DHCP to allocate an IP address, and then uses the TFTP service to obtain the boot file and load it into the local memory of the client to run, thereby guiding the client to download the corresponding system installation file from the HTTP server and execute the automated installation and deployment. In this process, the %post script part of the Kicstart file is pre-configured. The content of the script mainly combines the Ansible tool with the %post function of the Kicstart file to complete the automated deployment and configuration of the application software. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] The accompanying drawings are included to provide a further understanding of the embodiments and are incorporated into and constitute a part of this specification. The drawings illustrate the embodiments and, together with the description, are used to explain the principles of the present invention. Other embodiments and many of the expected advantages of the embodiments will be readily recognized, as they become better understood by reference to the following detailed description. The other features, objects, and advantages of the present application will become more apparent from the detailed description of the non-limiting embodiments made with reference to the following drawings.

[0033] Figure 1 is the overall structure diagram of the large-scale automated deployment and delivery method of the OS-based server in a specific embodiment of the present invention;

[0034] Figure 2 is the implementation flowchart of the large-scale automated deployment and delivery method of the OS-based server in a specific embodiment of the present invention;

[0035] Figure 3 is the automated deployment application process of the large-scale automated deployment and delivery method of the OS-based server in a specific embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0036] The present application will be further described in detail below with reference to the drawings and embodiments. It can be understood that the specific embodiments described herein are only for explaining the relevant invention and not for limiting the invention. Additionally, it should be noted that for the sake of description, only the parts related to the relevant invention are shown in the drawings.

[0037] It should be noted that, without conflict, the embodiments in the present application and the features in the embodiments may be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0038] The present invention mainly realizes unattended operation in the process of mass server deployment and delivery. On the basis of realizing unattended installation of the operating system by defining a configuration file through kickstart, it combines the Ansible automated operation and maintenance tool to realize batch system initialization configuration and batch deployment of application programs.

[0039] Figure 1 , a method for large-scale automated deployment and delivery of servers based on OS, including:

[0040] S1: Prepare the automated installation and deployment environment. The content of building the server environment includes installing the Linux operating system and mounting it, installing DHCP, TFTP, and HTTP service tools at the system bottom layer, and configuring the yum source. The server module interacts with the drive module, the BootOS module interacts with the hardware module, the operating system interacts with the BootOS module and the hardware module, and the server operating system also interacts with multiple clients

[0041] S2: Create a kickstart template file on the server side. This file contains system installation partition information, network configuration information, software package selection and installation information, as well as deployment application installation packages and Ansible scripts.

[0042] S3: After the client automatically installs the operating system using the kickstart file configuration information, it automatically configures the yum source and then installs the Ansible tool by itself

[0043] S4: According to the configuration information in the kickstart file script content, Ansible installs the required deployment packages for the application programs by running the script at the specified path.

[0044] Figure 2 , the method of the present invention includes the following steps:

[0045] The server starts the service and copies the TFTP service file;

[0046] The client starts the PXE request to the server DHCP service, the server DHCP service assigns an IP address, and the client obtains the IP address;

[0047] The client TFTP service requests to download the startup file, and the server TFTP service sends the startup file to the client;

[0048] The client loads configuration information according to the startup file and sends installation information to the server. The server receives the installation information and sends the image and kickstart configuration file to the client;

[0049] The client loads the kickstart configuration file and installs the operating system according to the configuration information. Then, the client operating system is customized, and then the Ansible tool is installed. The Ansible tool downloads the application installation package from the server;

[0050] The Ansible tool installs the application deployment package by running the script in the specified path.

[0051] Specifically, in one embodiment, a method for large-scale automated deployment and delivery of servers based on OS includes:

[0052] S1: Prepare the automated installation and deployment environment. The content of the server environment setup includes installing the Linux operating system mount, and the system requires installing DHCP, TFTP, HTTP service tools, and yum source configuration.

[0053] S2: The server creates a kickstart template file, which contains system installation partition information, network configuration information, software package selection and installation information, and deployment of application installation packages and Ansible scripts.

[0054] S3: After the client automatically installs the operating system using the kickstart file configuration information, it automatically configures the yum source and then installs the Ansible tool by itself

[0055] S4: According to the configuration information in the kickstart file script content, Ansible installs the required deployment packages for the required applications by running the script in the specified path

[0056] Among them, according to different deployment environment requirements, the kickstart configuration file contains an installation option section, a software package installation section, and a script installation section

[0057] The installation option section includes installation language lang, time zone timezone, network configuration network, authentication method, system partition, and system boot configuration bootloader

[0058] The software package installation section lists the software packages to be installed during the installation process, starting with %pacakages and ending with %end, specifying the installation package group (such as @groupname) or a single software package (such as package_name).

[0059] During the script installation section, the pre-installation script section %pre contains scripts that are executed before the system installation, and the post-installation script section %post contains scripts that are executed after the system installation is complete.

[0060] The pre-installation script section %pre executes a series of command scripts before the system installation, including setting up network configuration, preparing disk partitions, and loading additional kernels.

[0061] The post-installation script section %post executes a series of command scripts after the system installation, including system configuration and customization, installing additional software packages, and system optimization and security settings.

[0062] System settings and customization include system initialization, creating users, configuring static addresses, automatically configuring yum sources, and creating a shared directory for application installation packages.

[0063] Installation of software packages outside the system includes installing the Ansible automation deployment tool, downloading application installation packages in the shared directory to the client device, and dependency packages that need to be installed before implementing automated application deployment.

[0064] In some specific implementation cases, an Ansible Playbook is designed according to the requirements of application installation and configuration, including necessary tasks, variables, processors, etc.

[0065] In some specific implementation cases, the core elements of the Playbook include a list of remote host machines executed by Hosts, a set of tasks Tasks, and a configuration file with template syntax Templates.

[0066] In some specific implementation cases, built-in variables or custom variables Varniables are called in the Playbook, and the execution of some code in the Playbook is specified by tags tags to perform specific tasks.

[0067] Handlers and notity are used in combination. Operations triggered by specific conditions are executed only when the conditions are met, otherwise they are not executed.

[0068] Figure 3 , In some instances of deploying applications, the client configures SSH passwordless login to the server. This usually involves generating an SSH key pair, and the public key needs to be added to the authorized_keys file of the remote host. The client automatically executes remote commands and deployment tasks.

[0069] Create an Inventory file. The Inventory file is a text file used to define information about managed hosts and host groups. Server address, port, and username information are configured in this file.

[0070] In some instances of deploying applications, playbooks are task description files for Ansible, written in YAML syntax. A series of execution tasks can be defined in the file, and these tasks correspond to each step of deploying the application. These tasks will be executed by Ansible in sequence to complete the deployment work.

[0071] In some specific implementation cases, the Ansible-playbook command-line tool is used to execute the task file. The command-line tool will read the task file and the host inventory file, and execute them one by one on the client according to the task process.

[0072] When obtaining the kickstart file, the kickstart file contains a command section, a package section, and a script section. In a specific embodiment, the configuration parameters of the configuration file command section are defined as follows:

[0073]

[0074]

[0075] The process of executing the instruction section is mainly used to respond to all operations except packages during the graphical / text interface installation. The instruction section performs settings for the boot medium, system language, network configuration, account password, and service set, etc.

[0076] In a specific embodiment, during the process of installing software packages, it is necessary to list the software packages to be installed during the installation process. It is also possible to indicate the package groups or individual software packages to be installed, or specify the packages not to be installed.

[0077] In the kisckstart script section, %post is a key link to achieve automated deployment. The script content can be highly customized. During this process, static network configuration, file directory creation, downloading of application installation packages, configuration of the yum source, and installation of the Ansible automated deployment application tool need to be completed.

[0078] After installing the Ansible tool on the client, it is necessary to configure SSH passwordless login to the server. This usually involves generating an SSH key pair, and the public key needs to be added to the authorized_keys file of the remote host for the client to automatically execute remote commands and deployment tasks.

[0079] Ansible needs to create an Inventory file to remotely execute commands. The Inventory file is a text file used to define the information of the managed hosts and host groups. In this file, the server address, port, and username information are configured.

[0080] After the client installs and configures Ansibles, the application deployment package is remotely copied to the host through the copy module. The common parameters are as follows:

[0081]

[0082]

[0083] In a specific embodiment, the application deployment package can be placed in a specific path on the server in advance. Ansible can download the deployment package locally through remote copying. The specific configuration template is as follows:

[0084] Ansible all -m copy -a "sorce= / path / to / source / file dest= / path / to / dest / file remote_src=yes"

[0085] Ansible can describe the configuration and deployment tasks through playbooks. It is written in YAML syntax. A series of execution tasks can be defined in the file. These tasks correspond to each step of deploying the application. These tasks will be executed by Ansible in sequence to complete the deployment work.

[0086] During the execution of Ansible's automated deployment tasks, the Ansible - playbook command - line tool is used to execute the task file. The command - line tool will read the task file and the host inventory file and execute them one by one on the client according to the task flow.

[0087] The above description is only the preferred embodiment of the present invention and the explanation of the applied technical principles. Those skilled in the art should understand that the scope of the invention involved in this application is not limited to the technical solution formed by the specific combination of the above - mentioned technical features. At the same time, it should also cover other technical solutions formed by any combination of the above - mentioned technical features or their equivalent features without departing from the above - mentioned inventive concept. For example, the technical solutions formed by mutually replacing the above - mentioned features with the (but not limited to) technical features with similar functions disclosed in this application.

Claims

1. A server automated deployment and delivery method, characterized in that: It includes the following steps: The server starts the service and copies the TFTP service file; The client starts PXE to request the server's DHCP service, the server's DHCP service allocates an IP address, and the client obtains the IP address; The client TFTP service requests to download the startup file, and the server TFTP service sends the startup file to the client; The client loads the configuration information according to the startup file and sends the installation information to the server. The server receives the installation information and sends the image and kickstart configuration file to the client. The client loads the kickstart configuration file and installs the operating system according to the configuration information. The client operating system is then customized and the Ansible tool is installed. The Ansible tool downloads the application installation package from the server. The Ansible tool installs the application deployment package by running the script in the specified path.

2. The method according to claim 1, characterized in that The kickstart configuration file includes an installation option section, a software package installation section, and a script installation section; The installation options section includes installation language, time zone, network configuration, authentication method, system partition, and system boot configuration; The package installation section lists the packages to be installed during the installation process. It starts with %pacakages and ends with %end. It specifies the installation package group or a single package. The script installation segment includes the pre-installation script segment %pre, which is a script executed before the system is installed, and the post-installation script segment %post, which is a script executed after the system is installed. The pre-installation script segment %pre executes a series of command scripts before the system is installed, which includes setting up network configuration, preparing disk partitions, and loading additional kernels; The post-installation script segment %post executes a series of command scripts after the system is installed, which includes system configuration and customization, installation of additional packages, and system optimization and security settings.

3. The method according to claim 2, characterized in that The client operating system customization specifically includes: system initialization, user creation, static address configuration, Yum source configuration, and application installation package shared directory creation.

4. The method according to claim 2, characterized in that The Ansible tool installs the application deployment package by running a script in a specified path, specifically including: Install the Ansible automated deployment tool, download the application installation package from the shared directory to the client device, and install the dependent packages that need to be installed before deploying the application.

5. The method according to claim 2, characterized in that: The Ansible automated deployment tool includes Ansible Playbook, which is designed according to the requirements of application installation and configuration, and includes necessary tasks, variables, and processors.

6. The method according to claim 5, characterized in that The Ansible Playbook also includes a list of remote hosts executed by Hosts, a set of Tasks, and a configuration file of Templates template syntax.

7. The method according to claim 5 or 6, characterized in that: In the Ansible Playbook, Varniables built-in variables or custom variables are called in Ansible Playbook. Part of the code in Ansible Playbook runs specific tasks specified by tags. Handlers and notity are used in combination. Operations triggered by specific conditions are executed only when the specific conditions are met, otherwise they are not executed.

8. The method according to any one of claims 1 to 6, characterized in that: The client configures the SSH password-free login server, generates an SSH key pair, and adds the public key to the authorized_keys file of the remote host; Create an Inventory file and configure the server address, port, and user name information in the Inventory file.

9. The method according to any one of claims 1 to 6, characterized in that: The Ansible Playbook file is written in YAML syntax. A series of execution tasks are defined in the Ansible Playbook file. These tasks correspond to each step of deploying the application. These tasks will be executed in sequence by Ansible to complete the deployment work.

10. The method according to any one of claims 1 to 6, characterized in that: Use the Ansible-Playbook command line tool to execute the Ansible Playbook file. The command line tool reads the Ansible Playbook file and the server inventory file and executes them one by one on the client according to the task flow.