A method for rapidly deploying a containerized testing platform

Through the containerized test platform method and the use of docker and mirroring technology, the problem of low resource utilization in large-scale ansible test environments is solved, efficient resource utilization and rapid deployment are achieved, and it is suitable for a variety of client scenarios, reducing hardware costs and Operating system installation time.

CN114168264BActive Publication Date: 2024-10-11SHENZHEN VIRTUAL CLUSTERS INFORMATION TECH
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202111482381.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-06
Publication Date
2024-10-11
Estimated Expiration
2041-12-06

AI Technical Summary

Technical Problem

The existing technology has low resource utilization when deploying large-scale Ansible test environments, and the horizontal expansion cost of traditional physical machines is high. The virtualization method wastes resources seriously when increasing the number of clients, and the operating system installation time is long, which cannot satisfy a large number of machines. needs.

Method used

Adopt the containerized test platform method, install the local environment through docker, prepare and make images of ansible server and client, use dockerfile files to write and build images, and start container instances to achieve rapid deployment of test environments for multiple operating systems.

Benefits of technology

Effectively utilize existing resources to achieve efficient resource utilization, support learning and testing environments for multiple client scenarios, quickly deploy and deliver test platforms, reduce hardware costs, and are suitable for different hardware and platforms.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114168264B_ABST
    Figure CN114168264B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for realizing rapid deployment of a containerized test platform, which belongs to the technical field of containerized test platforms. It aims at the situation that the traditional method (see Figure 1 of the specification) obviously has extremely low resource utilization. For company resources, it is impossible to spend such a large amount of hardware resources for employees to conduct learning tests to achieve the effect of improving their capabilities. If a vertical virtualization method is used, it can effectively alleviate the waste of resources and achieve the effect of dozens of machines. If the number of clients is increased, it is limited by the problem of great waste of resources at the virtualized OS layer. The method comprises the following steps: S1: installing a containerized local environment; the present invention can very effectively utilize existing resources, and through a containerized method, run ansible server and a large number of ansible clients with different basic images, thereby not only meeting a large number of test environment requirements, but also satisfying the learning test environment of all client scenarios.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of containerized test platforms, and in particular relates to a method for implementing rapid deployment of a containerized test platform. Background Art

[0002] If operation and maintenance personnel want to learn how to use Ansible and perform verification tests, they must prepare at least one physical machine or a virtual machine, and the Ansible server and client share a host, which makes learning and testing very inconvenient, especially when large-scale environment learning requires a large number of servers. The solution using virtual machines can temporarily solve this problem by deploying multiple virtual machines on this physical machine, allocating independent hardware resources to each virtual machine, installing an independent operating system, and finally selecting different virtual machines as the Ansible server and client. This can efficiently utilize current physical resources and reasonably allocate resources to achieve the purpose of learning. However, there are some questions now. What if learning requires hundreds or thousands of Ansible machines, and even different machines need to deploy different operating systems? At this point, the virtual machine solution is definitely not feasible, because its underlying layer still needs to independently install different operating systems, which is a bit too wasteful of hardware resources. Even the current large domestic training institutions cannot meet such learning needs;

[0003] Traditional method (see the instructions attached) Figure 1 ) There is obviously an extremely low resource utilization rate. If the physical machine is completely expanded horizontally, it is impossible for ordinary operation and maintenance personnel to achieve it. For the company's resources, it is impossible to spend such a large amount of hardware resources for employees to conduct learning tests to achieve the effect of improving their capabilities. If the vertical virtualization method is used, although it can effectively alleviate the waste of resources and can achieve the effect of dozens of machines, if the number of clients is increased, it is limited by the huge waste of resources at the virtualization OS layer, and the physical machine must be expanded horizontally again. The most troublesome thing is that it takes a lot of time to install the OS, which cannot fundamentally solve this problem;

[0004] To this end, we proposed an implementation method for rapidly deploying a containerized testing platform. Summary of the invention

[0005] The purpose of the present invention is to provide a method for quickly deploying a containerized testing platform to solve the problems raised in the above background technology.

[0006] To achieve the above object, the present invention provides the following technical solution: a method for rapidly deploying a containerized test platform, comprising the following steps:

[0007] S1: Install the containerized local environment: First, select a local physical server to deploy and install the Docker software, install the system tools using the apg-get command, then install the GPG certificate, write the certificate information to the software source information, and finally update and install Docker-CE;

[0008] S2: Prepare the required image images: log in to the default Docker official repository, obtain the server system image image when Ansible is running, and different client system image images;

[0009] S3: Write a Dockerfile to create an Ansible server image: Create a subdirectory ansible-demo under the root directory on the local server, create a file named Dockerfile in this subdirectory, and then write the basic image information in the Dockerfile format, update the source content, and install the Ansible installation package and the OpenSSH installation package.

[0010] S4: Create a new Ansible image: Execute the command dockerbuild -t centos_ansible:v1 in the dockerfile directory to create an Ansible image file;

[0011] S5: Start a large number of instances to complete containerized deployment: First, start the Ansible server through the command, then start a large number of Ansible CentOS clients through the command, then start a large number of Ansible Windows clients through the command, and then start a large number of Ansible Ubuntu clients through the command.

[0012] It should be noted in the solution that the system tools in S1 include apt-transport-https, ca-certificates curl, and software-properties-common.

[0013] As a preferred implementation, the image files of different operating systems are pulled from the public warehouse in S2 by docker, which serve as the basic images of the server and client of ansible.

[0014] As a preferred implementation, the root user's password is modified in S3 according to actual conditions, and then ssh pam authentication is disabled, exposing port number 22 to the container.

[0015] Compared with the prior art, the method for implementing the rapid deployment of a containerized test platform provided by the present invention has at least the following beneficial effects:

[0016] (1) The present invention can effectively utilize existing resources and run ansible servers and a large number of ansible clients with different base images through a containerized method, thereby not only meeting a large number of test environment requirements, but also satisfying the learning and testing environment of all client scenarios;

[0017] (2) The present invention can construct a test platform container through a standardized image, which can deploy and deliver the test environment more quickly and can run on any platform. Such compatibility allows operation and maintenance personnel to achieve learning effects regardless of location and hardware resources, and makes the system resource utilization rate extremely high, effectively saving enterprise costs. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 This is a traditional method architecture diagram of the present invention;

[0019] Figure 2 This is an architecture diagram of the containerization method of the present invention. DETAILED DESCRIPTION

[0020] The present invention will be further described below in conjunction with the embodiments.

[0021] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure clearer, the technical solution of the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings of the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, rather than all the embodiments. Based on the described embodiments of the present disclosure, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present disclosure.

[0022] Unless otherwise defined, the technical or scientific terms used in the present disclosure shall have the usual meanings understood by persons with ordinary skills in the field to which the present disclosure belongs. The words "including" or "comprising" and the like used in the present disclosure mean that the elements or objects appearing before the word include the elements or objects listed after the word and their equivalents, without excluding other elements or objects. The words "connect" or "connected" and the like are not limited to physical or mechanical connections, but may also include electrical connections, whether direct or indirect. "Up", "down", "left", "right", etc. are only used to indicate relative position relationships. When the absolute position of the object being described changes, the relative position relationship may also change accordingly.

[0023] The following examples are used to illustrate the present invention, but they cannot be used to limit the scope of protection of the present invention. The conditions in the examples can be further adjusted according to specific conditions. Simple improvements to the method of the present invention under the premise of the concept of the present invention belong to the scope of protection claimed in the present invention.

[0024] See also Figure 1-2 The present invention provides a method for rapidly deploying a containerized test platform, comprising the following steps:

[0025] S1: Install the containerized local environment: First, select a local physical server to deploy and install the Docker software, install the system tools using the apg-get command, then install the GPG certificate, write the certificate information to the software source information, and finally update and install Docker-CE;

[0026] S2: Prepare the required image images: log in to the default Docker official repository, obtain the server system image image when Ansible is running, and different client system image images;

[0027] S3: Write a Dockerfile to create an Ansible server image: Create a subdirectory ansible-demo under the root directory on the local server, create a file named Dockerfile in this subdirectory, and then write the basic image information in the Dockerfile format, update the source content, and install the Ansible installation package and the OpenSSH installation package.

[0028] S4: Create a new Ansible image: Execute the command dockerbuild -t centos_ansible:v1 in the dockerfile directory to create an Ansible image file;

[0029] S5: Start a large number of instances to complete containerized deployment:

[0030] First, start the ansible server through the command:

[0031] docker run-dp 1234:22--name ansible-controller centos_ansible:v1

[0032] Start a large number of ansible centos clients through the command again:

[0033] docker run-dp 1235:22--name ansible-centos1 centos_ansible:v1

[0034] Start a large number of Ansible Windows clients through the command again:

[0035] docker run-dp 1236:22--name ansible-win1 windows:win7

[0036] Start a large number of ansible ubuntu clients again through the command:

[0037] docker run-dp 1237:22 --name ansible-ubuntu1 ubuntu:16.04.

[0038] It should be noted that the system tools in S1 include apt-transport-https, ca-certificates curl, and software-properties-common. In S2, image files of different operating systems are pulled from the public warehouse through docker, which are used as the basic images of the server and client of ansible. In S3, the root user's password is modified according to the actual situation, and then ssh pam authentication is disabled, exposing port 22 to the container.

[0039] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.

Claims

1. A method for rapidly deploying a containerized test platform, characterized in that: The following steps are involved: S1: Install the containerized local environment: First, select a local physical server to deploy and install the Docker software, install the system tools using the apg-get command, then install the GPG certificate, write the certificate information to the software source information, and finally update and install Docker-CE; S2: Prepare the required image images: log in to the default Docker official repository, obtain the server system image image when Ansible is running, and different client system image images; S3: Write a Dockerfile to create an Ansible server image: Create a subdirectory ansible-demo under the root directory on the local server, create a file named Dockerfile in this subdirectory, and then write the basic image information in the Dockerfile format, update the source content, and install the Ansible installation package and the OpenSSH installation package. S4: Create a new Ansible image: Execute the command docker build-tcentos_ansible:v1 in the dockerfile directory to create an Ansible image file; S5: Start a large number of instances to complete containerized deployment: First, start the Ansible server through the command, then start a large number of Ansible CentOS clients through the command, then start a large number of Ansible Windows clients through the command, and then start a large number of Ansible Ubuntu clients through the command.

2. The method for implementing a rapid deployment containerized test platform according to claim 1, characterized in that: The system tools in S1 include apt-transport-https, ca-certificates curl, and software-properties-common.

3. The method for implementing a rapid deployment containerized test platform according to claim 1, characterized in that: In the S2, image files of different operating systems are pulled from the public warehouse by docker, which serve as the basic images of the server and client of ansible.

4. The method for implementing a rapid deployment containerized test platform according to claim 1, characterized in that: In the S3, the root user's password is modified according to the actual situation, and then the ssh pam authentication is disabled, exposing the port number 22 to the container.

Citation Information

Patent Citations

  • Realization method for fast deploying containerized cloud computing test platform

    CN106936636A

  • ICOS system function introduction scenarizing method, storage medium and device

    CN112068905A

  • Method for lightweight deployment of distributed system in private cloud environment

    CN112181592A

  • Methods, devices, and systems for distributing software to and deploying software in a target environment

    US20190303187A1