Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Method for dynamically creating docker container nodes to execute tasks based on jenkins real-time tasks

A technology of dynamic creation and real-time tasks, which is applied in the direction of instruments, program code conversion, program control design, etc., can solve the problem of low resource utilization, achieve the effect of saving resources and meeting business requirements

Inactive Publication Date: 2020-10-02
SICHUAN XW BANK CO LTD
View PDF7 Cites 2 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] In order to solve the problem of low resource usage in the prior art solutions, the present invention provides a method for dynamically creating docker container nodes to execute tasks based on jenkins real-time tasks, dynamically creating jenkins slave nodes, without long-term occupation, and when there are a large number of concurrent tasks In the scenario, by automatically destroying container nodes, a lot of resources can be saved, and the maximum number of jenkins jobs can be dynamically adjusted according to the actual situation to meet business requirements

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method for dynamically creating docker container nodes to execute tasks based on jenkins real-time tasks

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0065] 1. Write the information of 100 triggered jobs into the database;

[0066] 2. Develop a customized script to generate a dockerfile; the dockerfile script generates a dockerfile according to the parameters passed in, for example: the incoming linux version parameter is centos7.6 to generate a dockerfile format text for the java operating environment:

[0067] COPY jdk1.8

[0068] ENV JAVA_HOME= / opt / jdk1.8

[0069] ENV PATH=$JAVA_HOME / bin:$PATH

[0070] ENV CLASSPATH=.:$JAVA_HOME / lib / dt.jar:$JAVA_HOME / lib / tools.jar;

[0071] Pass in the parameter JAVA1.8 to generate a dockerfile format text of the java runtime environment:

[0072] COPY jdk1.8

[0073] ENV JAVA_HOME= / opt / jdk1.8

[0074] ENV PATH=$JAVA_HOME / bin:$PATH

[0075] ENV CLASSPATH=.:$JAVA_HOME / lib / dt.jar:$JAVA_HOME / lib / tools.jar;

[0076] Pass in the parameter git to generate a dockerfile format text of the git operating environment:

[0077] COPY git

[0078] ENV GIT_HOME= / opt / git

[0079] ENV PATH=$GIT...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention relates to a method for dynamically creating docker container nodes to execute tasks based on jenkins real-time tasks, which comprises the following steps: A, a customized script for generating docker files is developed, and a docker file format file is dynamically generated so as to generate a container mirror image; B, a jenkins plug-in is developed in a customized mode, jenkins job queuing queue information is obtained in real time, a container mirror image is dynamically started, the container mirror image is registered as a jenkins slave node, and a jenkins job task is completed; C, the jenkins plug-in counts the number of jenkins jobs in operation in real time, and the jenkins plug-in counts the number of jenkins jobs in operation in real time; the number is compared with a set maximum parallel number, and if the number of the jenkins queues is less than the maximum parallel number, job information is obtained from a database for storing real-time jenkins job queuing queue information, a container is started as a jenkins slave according to the job information, and a task set is executed by the jenkins job. According to the method, resources do not need to be occupied for a long time, in a scene with a large number of concurrent tasks, a large number of resources can be saved by automatically destroying the container nodes, the maximum jenkins job number canbe dynamically adjusted according to actual conditions, the service requirements are met, and the resource utilization rate is increased.

Description

technical field [0001] The invention relates to the technical fields of software development and software testing, in particular to a method for dynamically creating docker container nodes to execute tasks based on jenkins real-time tasks. Background technique [0002] Jenkins is an open source software project. It is a continuous integration tool developed based on Java. It is used to monitor continuous and repetitive work. It aims to provide an open and easy-to-use software platform to make continuous integration of software possible. Docker is an open source application container engine that allows developers to package their applications and dependencies into a portable image, and then publish it to any popular Linux or Windows machine, or implement virtualization. Jenkins slave node: Interact with the jenkins master node, accept the jenkins job distributed by the jenkins master node, and complete the tasks set by the jenkins job on the child nodes. [0003] At present,...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F8/20G06F8/41G06F9/455
CPCG06F8/24G06F8/41G06F9/45558G06F2009/45562G06F2009/45575
Inventor 毛航熊阳黄勇梁骏黄凯
Owner SICHUAN XW BANK CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products