CN110531984A - Code compiling method, device, system, computer equipment and storage medium - Google Patents
Code compiling method, device, system, computer equipment and storage medium Download PDFInfo
- Publication number
- CN110531984A CN110531984A CN201910729495.4A CN201910729495A CN110531984A CN 110531984 A CN110531984 A CN 110531984A CN 201910729495 A CN201910729495 A CN 201910729495A CN 110531984 A CN110531984 A CN 110531984A
- Authority
- CN
- China
- Prior art keywords
- code
- node
- compilation
- request
- marking
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/40—Transformation of program code
- G06F8/41—Compilation
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q10/00—Administration; Management
- G06Q10/10—Office automation; Time management
- G06Q10/101—Collaborative creation, e.g. joint development of products or services
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1095—Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Business, Economics & Management (AREA)
- Human Resources & Organizations (AREA)
- Theoretical Computer Science (AREA)
- Entrepreneurship & Innovation (AREA)
- General Physics & Mathematics (AREA)
- Physics & Mathematics (AREA)
- Strategic Management (AREA)
- General Engineering & Computer Science (AREA)
- Tourism & Hospitality (AREA)
- Operations Research (AREA)
- Quality & Reliability (AREA)
- Data Mining & Analysis (AREA)
- Marketing (AREA)
- General Business, Economics & Management (AREA)
- Signal Processing (AREA)
- Computer Networks & Wireless Communication (AREA)
- Economics (AREA)
- Software Systems (AREA)
- Stored Programmes (AREA)
Abstract
This application involves a kind of code compiling method, device, system, computer equipment and storage mediums.The described method includes: receiving the code compilation request that main controlled node is sent, marking code is carried in the code compilation request, the main controlled node is deployed in public cloud;The corresponding configuration file of the marking code is obtained, includes compilation information in the configuration file;The compilation information and the marking code are sent to the working node being deployed in private clound, so that the working node is compiled using compilation information code to be compiled corresponding to the marking code, generate corresponding image file.The safety of code can be effectively improved using this method.
Description
Technical field
This application involves field of computer technology, more particularly to a kind of code compiling method, device, system, computer
Equipment and storage medium.
Background technique
With the development of computer technology, the exploitation complexity of software application is continuously improved.Same software application needs
It is realized jointly by the several exploitation members in team.How to ensure that application and development quality when several member's joint developments becomes
Inevitable problem, continuous integrating are exactly a kind of practice of software for solving the problems, such as this.Continuous integration system passes through certainly
Dynamic compiling verifies application using corresponding code, guarantees the quality of application and development.
In traditional continuous integration system, service object is generally directed to the user in public cloud.In order to allow public cloud to use
The corresponding terminal in family can be interacted with code storage, and code storage there must be at least one public network interface.Therefore, traditional
Code storage in mode can not be completely isolated with outer net, and the code in code storage has the risk of leakage.Therefore, how to mention
The safety of high code becomes the current technical issues that need to address.
Summary of the invention
Based on this, it is necessary to which, for the lower technical problem of above-mentioned code safety, providing one kind can be improved code peace
Code compiling method, device, system, computer equipment and the storage medium of full property.
A kind of code compiling method, which comprises
The code compilation request that main controlled node is sent is received, carries marking code in the code compilation request, it is described
Main controlled node is deployed in public cloud;
The corresponding configuration file of the marking code is obtained, includes compilation information in the configuration file;
The compilation information and the marking code are sent to the working node being deployed in private clound, so that the work
Make node to be compiled using compilation information code to be compiled corresponding to the marking code, generates corresponding mirror image text
Part.
It in one of the embodiments, further include translation and compiling environment image banner and running environment ginseng in the configuration file
Number;It is described so that the working node is compiled using compilation information code to be compiled corresponding to the marking code
It translates, generating corresponding image file includes:
The working node is called to obtain the corresponding code to be compiled of the marking code from code storage;
Obtain translation and compiling environment mirror image corresponding with the translation and compiling environment image banner;
The code to be compiled and the compilation information are mapped into the translation and compiling environment mirror image, container is generated;
The code to be compiled is compiled using the compilation information in the above-described container, obtains compiling data;
According to compiling data image file corresponding with the running environment parameter generation.
In one of the embodiments, the method also includes:
The application request to create that the main controlled node is sent is received, carries code storage mark in the application request to create
Know;
It is identified in corresponding code storage according to the application request to create from the code storage and obtains list of application;
The list of application is back to the main controlled node so that the main controlled node pair in the list of application
The corresponding configuration file of target application is stored.
The corresponding configuration file of the marking code that obtains includes: in one of the embodiments,
According to the corresponding node interface of main controlled node described in the code compilation request;
The corresponding configuration text of the marking code is obtained from the database of the main controlled node by the node interface
Part, and the configuration file is stored.
A kind of code compiling method, which comprises
The integrated request of code that terminal uploads is received, carries marking code in the integrated request of the code;
The corresponding configuration file of the marking code is obtained, is read from the configuration file corresponding with the marking code
Agent node mark, the agent node identifies corresponding agent node and is deployed in private clound;
The code compilation request for carrying the marking code is generated according to the integrated request of the code;
Code compilation request is sent to the agent node and identifies corresponding agent node, so that the agency saves
Point is requested according to the code compilation, generates the corresponding image file of the marking code.
In one of the embodiments, the method also includes:
Receive the application request to create that the terminal uploads, carried in the application request to create agent node identify with
Code storage mark;
Code storage mark is sent to the agent node and identifies corresponding agent node, so that the agency saves
Point identifies in corresponding code storage from the code storage and obtains list of application;
The list of application that the agent node returns is received, and the list of application is back to corresponding terminal;
In response to the target application that the terminal is determined from the list of application, and the target application pair uploaded
The configuration file answered stores the configuration file.
In one of the embodiments, the method also includes:
Receive the warehouse association request that the terminal uploads, carried in the warehouse association request code storage mark,
Agent node mark and code storage token;
Code storage mark and the code storage token are sent to the agent node and identify corresponding agency
Node carries out so that the agent node identifies corresponding code storage to the code storage according to the code storage token
Verification;
Receive the check results that the agent node returns;
When the check results are to verify successfully, then the code storage is identified into corresponding code storage and the generation
Reason node is associated.
A kind of code compilation device, described device include:
Requirement for compiler receiving module, for receiving the code compilation request of main controlled node transmission, the code compilation request
In carry marking code, the main controlled node is deployed in public cloud;
Configuration file obtains module and wraps in the configuration file for obtaining the marking code corresponding configuration file
Include compilation information;
Code compilation module, for the compilation information and the marking code to be sent to the work being deployed in private clound
Make node, so that the working node is compiled using compilation information code to be compiled corresponding to the marking code
It translates, generates corresponding image file.
A kind of code compilation device, described device include:
Integrated request receiving module, the integrated request of code for receiving terminal upload, the code integrates to be taken in request
With marking code;
Node identification read module, for obtaining the corresponding configuration file of the marking code, from the configuration file
Read corresponding with marking code agent node mark, the corresponding agent node of the agent node mark is deployed in privately owned
Yun Zhong;
Requirement for compiler generation module, for generating the code volume for carrying the marking code according to the integrated request of the code
Translate request;
Image file generation module identifies corresponding generation for code compilation request to be sent to the agent node
It manages node and generates the corresponding image file of the marking code so that the agent node is requested according to the code compilation.
A kind of code compilation system, the system comprises:
Main controlled node, the integrated request of code for receiving terminal upload, the code integrate in request and carry code
Mark;The corresponding configuration file of the marking code is obtained, is read from the configuration file corresponding with the marking code
Agent node mark, the agent node identify corresponding agent node and are deployed in private clound;It is asked according to the code is integrated
Seek survival into the code compilation request for carrying the marking code;Code compilation request is sent to the agent node mark
Corresponding agent node;
Agent node carries in the code compilation request for receiving the code compilation request of main controlled node transmission
Marking code, the main controlled node are deployed in public cloud;Obtain the corresponding configuration file of the marking code, the configuration text
It include compilation information in part;The compilation information and the marking code are sent to the working node being deployed in private clound;
Working node, for being compiled using compilation information code to be compiled corresponding to the marking code,
Generate corresponding image file.
A kind of computer equipment, including memory and processor, the memory are stored with computer program, the processing
The step of device realizes above-mentioned code compiling method when executing the computer program.
A kind of computer readable storage medium, is stored thereon with computer program, and the computer program is held by processor
The step of above-mentioned code compiling method is realized when row.
Above-mentioned code compiling method, device, system, computer equipment and storage medium, the master control being deployed in public cloud
Node receives the integrated request of code that the terminal in public cloud uploads, and the code compilation that main controlled node generation carries marking code is asked
It asks, and code compilation request is sent to the agent node being deployed in private clound.Agent node is according to marking code acquisition pair
The configuration file answered, by configuration file compilation information and marking code be sent to the working node being deployed in private clound,
Working node is compiled under private network environment using compilation information code to be compiled corresponding to marking code, generation pair
The image file answered.Compared to traditional approach, the compilation process of entire code is all carried out in the private clound for the node that maps out the work.
Code storage is also deployed in private clound, and code storage does not need to provide public network interface.By code and code storage with it is privately owned
Network Isolation other than cloud effectively raises the safety of code.
Detailed description of the invention
Fig. 1 is the applied environment figure of code compiling method in one embodiment;
Fig. 2 is the flow diagram of code compiling method in one embodiment;
Fig. 3 is the flow diagram of code compiling method in another embodiment;
Fig. 4 is the structural block diagram of code compilation device in one embodiment;
Fig. 5 is the structural block diagram of code compilation device in another embodiment;
Fig. 6 is the internal structure chart of computer equipment in one embodiment.
Specific embodiment
It is with reference to the accompanying drawings and embodiments, right in order to which the objects, technical solutions and advantages of the application are more clearly understood
The application is further elaborated.It should be appreciated that specific embodiment described herein is only used to explain the application, not
For limiting the application.
Code compiling method provided by the present application can be applied in application environment as shown in Figure 1.Wherein, terminal 102
It is communicated by network with the main controlled node 104 in public cloud, main controlled node 104 can be at least one of private clound generation
Reason node 106 is communicated by network, and agent node 106 can pass through at least one working node in network and private clound
108 are communicated.Terminal 102 integrates in request to the integrated request of 104 upload code of main controlled node, code and carries code mark
Know.Main controlled node 104 obtains agent node mark corresponding with marking code, is generated according to the integrated request of code and carries code mark
The code compilation of knowledge is requested, and code compilation request is sent to agent node and identifies corresponding agent node 106.Agent node
The code compilation request for carrying marking code that 106 reception main controlled nodes 104 are sent obtains the corresponding configuration text of marking code
Part includes compilation information in configuration file.Agent node 106 by configuration file compilation information and marking code be sent to work
Make node 108.Working node 108 obtains marking code corresponding generation to be compiled from the code storage being deployed in private clound
Code is compiled the code got using the compilation information that agent node 106 is sent, generates corresponding image file.Work
The image file of generation can be stored into the mirror image warehouse being deployed in private clound by making node 108.Wherein, terminal 102 can
With but be not limited to various personal computers, laptop, smart phone, tablet computer and portable wearable device, it is main
The either multiple server compositions of independent server can be used by controlling node 104, agent node 106 and working node 108
Server cluster is realized.
In one embodiment, as shown in Fig. 2, providing a kind of code compiling method, it is applied in Fig. 1 in this way
It is illustrated for agent node 106, comprising the following steps:
Step 202, the code compilation request that main controlled node is sent is received, carries marking code in code compilation request,
Main controlled node is deployed in public cloud.
Main controlled node can be the separate server being deployed in public cloud or the service being made of multiple servers
Device cluster.Main controlled node is deployed in global network environment, provides cloud service for the user under global network environment.Agent node
It can be the separate server being deployed in private clound or the server cluster being made of multiple servers.Agent node can
To provide cloud service under private network environment.Main controlled node is deployed at least one of private clound agency's section for managing
Point.Multiple agent nodes can be controlled separately working node compiled code.Different agent nodes carries out code compilation, realizes
The isolation of translation and compiling environment.Wherein, main controlled node can manage one or more agent nodes in same private clound, can be with
Manage the multiple agent nodes being deployed in different private clounds.
Platform can be managed with application deployment on main controlled node, application management platform can be a kind of Paas (Platform as
A service, platform service) cloud platform, application management platform can be used for continuing the corresponding code of development and application
Management that is integrated and persistently disposing.User can access application management platform using public network by terminal.Application management
Platform can manage the exploitation of including but not limited to a variety of applications.Wherein, a variety of applications may include client application and Web
(World Wide Web, global wide area network) application.
User can be by terminal access application management platform, and selection needs integrated code pair on application management platform
The application answered.Terminal can respond the code integration servers that triggering generates, and obtained and corresponded to according to the application identities of the application of selection
Marking code carry selection in the integrated request of code and using public network to the integrated request of main controlled node upload code
Using corresponding marking code.
After main controlled node receives the integrated request of code of terminal upload, the integrated request of code is parsed, generation is obtained
Code collection is at the marking code carried in request.There are mapping relations between marking code and agent node mark, marking code with
Mapping relations between agent node mark can be recorded and stored in main controlled node by main controlled node when creating application item
In corresponding database.Main controlled node obtains marking code pair according to the mapping relations between marking code and agent node mark
The agent node mark answered.Main controlled node generates the code compilation request for carrying marking code, and is sent to agent node mark
Corresponding agent node.Agent node receives the code compilation request that main controlled node is sent, and parses to code compilation request,
Obtain the marking code carried in code compilation request.
Step 204, the corresponding configuration file of marking code is obtained, includes compilation information in configuration file.
Agent node is requested according to code compilation, obtains the corresponding configuration file of marking code.Specifically, agent node can
According to the corresponding node interface of code compilation request main controlled node.Agent node is connect by the corresponding node of main controlled node
Mouth access main controlled node obtains the corresponding configuration file of marking code from main controlled node, and configuration file can be stored in master control
In the corresponding database of node.Wherein, can include but is not limited in configuration file marking code corresponding agent node mark,
Compilation information, running environment parameter and mirror image warehouse mark etc..Agent node can also be from right in one of the embodiments,
The corresponding configuration file of marking code is obtained in the memory space answered.Wherein, the corresponding memory space of agent node may include
The corresponding local file system of agent node, cloud storage space and database etc..
Step 206, compilation information and marking code are sent to the working node being deployed in private clound, so that work section
Point is compiled using compilation information code to be compiled corresponding to marking code, generates corresponding image file.
Agent node is deployed under same private network environment with corresponding working node, and an agent node can correspond to
One or more working nodes.Working node can be the server being deployed in private clound, can also be in agent node and mentions
For the child node of code compilation service.Agent node can control the operation that multiple working nodes execute compiled code parallel.Generation
Compilation information and marking code can be issued to one in corresponding multiple working nodes by reason node.
Specifically, agent node can use load-balancing algorithm determines target operation from multiple corresponding working nodes
Node, and compilation information and marking code are sent in target operation node.Wherein, the load balancing that agent node uses is calculated
Method may include static load balancing algorithm and Dynamic Load-balancing Algorithm.Static load balancing algorithm can be with fixed probability
The selection target working node from multiple corresponding working nodes.For example, static load balancing algorithm can include but is not limited to
Weighted round robin and round-robin algorithm.Dynamic Load-balancing Algorithm can be according to the actual loading of multiple working nodes
Status information determines target operation node.For example, Dynamic Load-balancing Algorithm may include Smallest connection algorithm etc..
Agent node can send compiling instruction to corresponding working node.Compiling instruction is used to indicate working node utilization
Compilation information code to be compiled corresponding to marking code is compiled.Wherein, agent node can will compile instruction and compile
It translates information and marking code is issued to working node together.Compilation information and marking code can also be issued to work by agent node
After making node, compiling instruction is retransmited.Working node is compiled after receiving compiling instruction according to compiling instruction.Work section
Point can obtain compiling parameter, using the compiling parameter in compilation information to generation when carrying out code compilation from compilation information
Code identifies corresponding code to be compiled and is compiled, and obtains compiling data.Working node is according to the compiling data obtained after compiling
Generate the corresponding image file of marking code.Working node can store the image file of generation to being deployed in same private clound
Under mirror image warehouse in.
In the present embodiment, the code that the terminal in main controlled node reception public cloud being deployed in public cloud uploads is integrated
Request, main controlled node generate carry marking code code compilation request, and by code compilation request be sent to be deployed in it is privately owned
Agent node in cloud.Agent node obtains corresponding configuration file according to marking code, by the compilation information in configuration file
The working node being deployed in private clound is sent to marking code, working node utilizes compilation information under private network environment
Code to be compiled corresponding to marking code is compiled, and generates corresponding image file.Compared to traditional approach, entire code
Compilation process all carried out in the private clound for the node that maps out the work.Code storage is also deployed in private clound.Code storage is only
The agent node and working node for needing and being deployed under same private clound interact, and do not need to provide public network interface.It realizes
Network Isolation other than code and code storage and private clound, effectively raises the safety of code.
It in one embodiment, further include translation and compiling environment image banner and running environment parameter in configuration file, so that work
Make the step of node is compiled using compilation information code to be compiled corresponding to marking code, generates corresponding image file
It include: that working node is called to obtain the corresponding code to be compiled of marking code from code storage;It obtains and translation and compiling environment mirror image
Identify corresponding translation and compiling environment mirror image;Code to be compiled and compilation information are mapped into translation and compiling environment mirror image, container is generated;In
Compiled code is treated using compilation information in container to be compiled, and obtains compiling data;Joined according to compiling data and running environment
Number generates corresponding image file.
Compilation information and marking code are sent to the working node being deployed in private clound by agent node, call work section
Point is treated compiled code and is compiled.Working node obtains the corresponding code file of marking code from code storage, to obtaining
Code file parsed, obtain the code to be compiled recorded in code file.Wherein, code storage is deployed in private clound
In, code storage can in private clound agent node and working node interact, do not need provide public network interface.Code
Warehouse can be one of Multiple Code management system or service.For example, code storage can be Gitee, Github,
One of management systems such as Gitlab (code administration warehouse system) or SVN (Subversion, version control system).
User can will be stored in code storage when creating development and application using corresponding code file.Work section
Point obtains the corresponding code file of marking code when executing code compilation operation from code storage.Wherein, code file can
To include multiple code subfiles.For example, may include JS (JavaScript, formula scripting language of literal translating) text in code file
Part, CSS (Cascading Style Sheets, cascading style sheets) file, HTML (Hyper Text Markup
Language, hypertext markup language) file and service logic script file etc..Working node is obtained to from code storage
To code file parsed, obtain the code to be compiled recorded in code file.
It further include translation and compiling environment image banner in configuration file, working node corresponding with marking code is matched from what is got
Set reading translation and compiling environment image banner in file.Working node is according to the translation and compiling environment image banner read from mirror image warehouse
Obtain corresponding translation and compiling environment mirror image.The volume in code to be compiled and compilation information that working node can send agent node
It translates parameter to be mapped into translation and compiling environment mirror image, generates container using application container engine (Docker).One embodiment wherein
In, after working node, which treats compiled code using the container of generation, to be compiled, the container can be destroyed, to avoid not
Translation and compiling environment resource is occupied in the case where executing code compilation operation, effectively prevents the waste of translation and compiling environment resource.Meanwhile
Working node can correspond to different containers according to different code buildings to be compiled, as the translation and compiling environment of code to be compiled,
Realize the isolation of code compilation environment.
Working node executes compilation script, treats compiled code using compiling parameter in a reservoir and is compiled, obtaining can
Execute file.The compiling data obtained after compiling are described in executable file.Compiling data can be numerous types of data
Data.For example, compiling data can be the binary data obtained after compiling.
It further include the corresponding running environment parameter of code in the corresponding configuration file of marking code.Working node can basis
Compile data image file corresponding with the generation of running environment parameter.Specifically, working node is to obtained compiling data and right
The running environment parameter answered is packaged, and is packaged and is generated corresponding image file.After working node can be acted executing one,
To agent node more new state.The image file of generation can be uploaded to mirror image by working node in one of the embodiments,
In warehouse, for being disposed to the corresponding application of image file.
In the present embodiment, agent node calls working node to generate the container of compiled code, can be with after compiling
The container generated is destroyed, it is occupied so as to avoid translation and compiling environment resource, effectively prevent the waste of translation and compiling environment resource.Together
When, realize the isolation of the corresponding translation and compiling environment of difference code to be compiled.Working node obtains generation to be compiled from code storage
Code, and treat compiled code using container and compilation information in private clound and be compiled, according to the compiling number obtained after compiling
According to running environment parameter, be packaged and generate corresponding image file.The compilation process of entire code carries out all in private clound, generation
Code warehouse does not need to provide public network interface yet, effectively raises the safety of code.
In one embodiment, working node is under agent node for providing the child node of code compilation service.Work
Node can be the container generated under private clound by agent node, to realize the containerization of working node.Agent node can be with
HPA (the water of Horizontal Pod Autoscaling, pod is disposed and configured using container orchestration engine (kubernetes)
Flat automatic extension).Specifically, agent node can be according to the pressure index dynamic regulation working node quantity of working node.Generation
Reason node can make according to resources such as the corresponding CPU of working node (Central Processing Unit, central processing unit)
The pressure index of working node is determined with situation.When the pressure index of working node is greater than first threshold, then increase work section
The quantity of point.When the pressure index of working node is less than second threshold, then the quantity of working node is reduced.
In the present embodiment, the quantity of agent node dynamic regulation working node, when the operating pressure of working node is big
Increase working node, reduces working node in the operating pressure hour of working node.Working node when effectively avoiding the free time
Translation and compiling environment resource is occupied, translation and compiling environment resource is effectively saved.
In one embodiment, compiled code can also be treated by code storage triggering agent node to be compiled.Specifically
, when user registers application item in code management system, code storage can will be stored in using corresponding code file
In, user can be marked by terminal to using corresponding code file.Wherein, label may include appointment codes file
Label or branch.Code storage can use agent node and be adjusted back in the network hook (webhook) that code storage is registered.
Wherein, network hook can be what the agent node when creating application was registered in code storage.Code storage is by code file
Corresponding label is sent to agent node.Agent node is by the corresponding label of code file in the corresponding database of main controlled node
The label sent with code storage is matched.When successful match, then code compilation task is triggered.Otherwise, then generation is not triggered
Code compiler task.Agent node can send compiling instruction, work to working node according to code compilation task call working node
Make node to be compiled the code to be compiled of tag match according to the compiling instruction received.
In the present embodiment, code storage can be not required to automatic trigger agent node to needing compiled code to be compiled
User is wanted to pass through the integrated request of the manual upload code of terminal.The operation for reducing user, improves user experience.And can and
When the code that compiles of needs is compiled, effectively raise the efficiency of code compilation.
In one embodiment, the step of obtaining marking code corresponding configuration file includes: to be requested according to code compilation
Obtain the corresponding node interface of main controlled node;It is corresponding that marking code is obtained from the database of main controlled node by node interface
Configuration file, and configuration file is stored.
Agent node parses code compilation request after receiving the code compilation request that main controlled node issues,
Obtain the marking code carried in code compilation request.Agent node obtains the corresponding node interface of main controlled node.Its interior joint
Interface can be API (Application Programming Interface, application programming interface) interface.Agency's section
Point can obtain the corresponding configuration file of marking code from main controlled node by node interface.Configuration file is stored in main controlled node
Database in.
Configuration file can be user and be uploaded to main controlled node by terminal when creating application, and main controlled node will configure
File is associated with the corresponding marking code of application.Incidence relation between configuration file and marking code can pass through mapping table
Record, and be collectively stored in the corresponding database of main controlled node with configuration file.
Agent node utilizes configuration text after getting the corresponding configuration file of marking code in the database of main controlled node
Compilation information code to be compiled corresponding to marking code in part is compiled, and configuration file is stored in agent node pair
In the memory space answered.Wherein, memory space may include the corresponding local file system of agent node, cloud storage space and
Database etc..So that agent node obtains configuration file corresponding with marking code from memory space.An implementation wherein
In example, after agent node gets the corresponding configuration file of marking code from main controlled node every time, it can use in main controlled node
Configuration file the corresponding configuration file of marking code in memory space is updated, to guarantee configuration file in memory space
Correctness.
In the present embodiment, agent node obtains marking code from main controlled node by the corresponding node interface of main controlled node
Corresponding configuration file, and configuration file is stored in corresponding memory space.When between agent node and main controlled node
When network interruption, agent node can obtain the corresponding configuration file of marking code from corresponding memory space, to guarantee generation
The execution of code compilation operations, has effectively been turned up the efficiency of code compilation.
In one embodiment, agent node can also dispose image file.Wherein it is possible in several ways
Triggering agent node disposes image file.For example, after working node generates image file, it can be with sequence trigger switch to mirror
As the deployment of file.After can also being scanned by mirror image warehouse to image file, when the corresponding tag match of image file
Trigger deployment of the agent node to the image file.
Agent node can will be sent to main controlled node using deployment request, carry the application pair using disposing in request
The application identities answered.Main controlled node triggers application management platform and disposes to application.Application management platform utilizes container layout
Engine (kubernetes) obtains image file corresponding with application identities from mirror image warehouse, and image file is run into appearance
Device.After container orchestration engine (kubernetes) creates pod object, container is formatted in pod object, so that user passes through end
End accesses the corresponding application of the application identities.
It in the present embodiment, can image file carry out portion of the automatic trigger agent node to generation in several ways
Administration does not need user and passes through the deployment that terminal is applied manually, reduces user's operation, effectively simplifies to apply and dispose
Journey improves user experience.
In one embodiment, above-mentioned code compiling method further include: the application request to create that main controlled node is sent is received,
It is identified using code storage is carried in request to create;Corresponding code storage is identified from code storage according to application request to create
Middle acquisition list of application;List of application is back to main controlled node, so that main controlled node pair and the target application in list of application
Corresponding configuration file is stored.
Agent node can receive the application request to create of main controlled node transmission, using carrying code storehouse in request to create
Library mark.Code storage identifies corresponding code storage and is associated with agent node, and is deployed in the same private clound.Agency's section
Point identifies in corresponding code storage from code storage according to application request to create and obtains list of application.It is had recorded in list of application
Multiple application items, application item can be when user registers application item by terminal in code storage to be remembered by code storage
Record is in list of application.The list of application that agent node will acquire returns to main controlled node.Main controlled node sends list of application
To application management platform, so that application management platform shows list of application to user by terminal.User passes through terminal from application
Selection needs the application created in list, and uploads and apply corresponding configuration file with this.Wherein, may include in configuration file
Application identities, marking code, agent node mark, code storage mark, compilation script information, translation and compiling environment information and operation
Environmental parameter etc..Main controlled node receives the configuration file and store instruction that terminal uploads.Main controlled node is uploaded according to terminal
Store instruction is associated with application identities by configuration file, and stores in the local database.
In the present embodiment, agent node can identify corresponding code storage from code storage by application request to create
Middle acquisition list of application is back to main controlled node, main controlled node pair configuration file corresponding with the target application in list of application into
Row storage.In creation in application, being interacted by agent node and code storage, code storage does not need open public network interface,
Being isolated for code storage and public network environment is realized, the safety of code is effectively raised.
In one embodiment, agent node can also receive the code storage mark and code storage that main controlled node issues
Token.Code storage token is sent to code storage and identifies corresponding code storage by agent node, so that code storage is to generation
Code warehouse token is verified.Wherein, code storage token is after user is succeeded in registration in code storage by terminal, by generation
Code warehouse issues.When verifying successfully, agent node obtains the corresponding authorized user of code storage token from code storage
Information.It include the corresponding user identifier of authorized user and token (token) information etc. in authorization user information.Agent node can
The authorization user information for verifying successful result and acquisition is back to main controlled node.When verifying failure, agent node is then
The result of direct back-checking failure is to main controlled node.
The check results that main controlled node Receiving Agent node returns.When check results are to verify successfully, main controlled node can
It is associated so that code storage is identified corresponding code storage with the agent node, and related information is stored in main controlled node
In corresponding database.Wherein, related information can include but is not limited to code storage mark, code storage token, Dai Lijie
Point identification and authorization user information.
In the present embodiment, the code storage token received is sent to code storage and identifies corresponding generation by agent node
Code warehouse, so that code storage verifies code storage token.When verifying successfully, agent node is returned to main controlled node
Agent node and the code storage can be associated by check results, main controlled node.In code compilation process, then code storehouse
Library is interacted with associated agent node, and code storage does not need open public network interface, realizes code storage and public network
The isolation of network environment effectively raises the safety of code.
In one embodiment, as shown in figure 3, providing a kind of code compiling method, it is applied in Fig. 1 in this way
It is illustrated for main controlled node 104, comprising the following steps:
Step 302, the integrated request of code that terminal uploads is received, carries marking code in the integrated request of code.
Step 304, the corresponding configuration file of marking code is obtained, generation corresponding with marking code is read from configuration file
Node identification is managed, agent node identifies corresponding agent node and is deployed in private clound.
Step 306, the code compilation request for carrying marking code is generated according to the integrated request of code.
Step 308, code compilation request is sent to the corresponding agent node of code node identification, so that agent node root
It is requested according to code compilation, generates the corresponding image file of marking code.
Main controlled node can be the separate server being deployed in public cloud or the service being made of multiple servers
Device cluster.Main controlled node is deployed in global network environment, provides cloud service for the user under global network environment.Agent node
It can be the separate server being deployed in private clound or the server cluster being made of multiple servers.Agent node can
To provide cloud service under private network environment.Main controlled node is deployed at least one of private clound agency's section for managing
Point.Multiple agent nodes can be controlled separately working node compiled code.Wherein, main controlled node can be managed in same private clound
In one or more agent nodes, the multiple agent nodes being deployed in different private clounds can also be managed.
Platform can be managed with application deployment on main controlled node, application management platform can be a kind of Paas (Platform as
A service, platform service) cloud platform, application management platform can be used for continuing the corresponding code of development and application
Management that is integrated and persistently disposing.User can access application management platform using public network by terminal.Application management
Platform can manage the exploitation of including but not limited to a variety of applications.Wherein, a variety of applications may include client application and Web
(World Wide Web, global wide area network) application.
User can be by terminal access application management platform, and selection needs integrated code pair on application management platform
The application answered.Terminal can respond the code integration servers that triggering generates, and obtained and corresponded to according to the application identities of the application of selection
Marking code carry selection in the integrated request of code and using public network to the integrated request of main controlled node upload code
Using corresponding marking code.
After main controlled node receives the integrated request of code of terminal upload, the integrated request of code is parsed, generation is obtained
Code collection is at the marking code carried in request.Main controlled node obtains the corresponding configuration file of marking code from local data base,
Agent node mark corresponding with marking code is read from configuration file.Main controlled node is generated according to the integrated request of code and is carried
The code compilation of marking code is requested, and code compilation request is sent to agent node and identifies corresponding agent node, agency
The code compilation request call working node that node is sent according to main controlled node, using working node it is corresponding to marking code to
Compiled code is compiled, and generates corresponding image file.
In the present embodiment, main controlled node passes through the integrated request of code by receiving the integrated request of code that terminal uploads
The marking code of middle carrying obtains corresponding agent node mark, and generates code compilation request.Main controlled node is by code compilation
Request is sent to the corresponding agent node being deployed in private clound of code node identification, so that agent node calls working node
Compiled code is treated to be compiled.The process of entire code compilation is completed in private clound, code storage and private clound
In agent node and working node interaction, do not need provide public network interface, realize code and code storage and private clound
Network Isolation in addition effectively raises the safety of code.
In one embodiment, above-mentioned code compiling method further include: receive the application request to create that terminal uploads, application
Agent node mark and code storage mark are carried in request to create;Code storage mark is sent to agent node mark pair
The agent node answered, so that agent node identifies in corresponding code storage from code storage obtains list of application;Receiving Agent
The list of application that node returns, and list of application is back to corresponding terminal;It is determined from list of application in response to terminal
Target application, and the corresponding configuration file of target application uploaded, store configuration file.
User can pass through terminal access application management platform when needing to create application item.Application management platform from
Main controlled node reads agent node list, and agent node mark associated with main controlled node is described in agent node list.
Agent node list is shown by application management platform by the display of terminal, so that user passes through terminal from agent node
The corresponding agent node list of application item is selected in list.Application management platform obtains the generation selected from agent node list
Node identification is managed, main controlled node obtains corresponding code storage list according to agent node mark, and it is flat to be back to application management
Platform.Code storage list is shown by application management platform by the display of terminal, so that user passes through terminal from code
The code storage of registration is selected in warehouse list.Terminal, which generates, applies request to create, selects using user is carried in request to create
The agent node mark and code storage mark selected.
Main controlled node receives the application request to create that terminal uploads, and parses to using request to create, be applied wound
Build the agent node mark and code storage mark carried in request.Code storage mark is sent to agent node by main controlled node
Corresponding agent node is identified, so that agent node identifies in corresponding code storage from code storage obtains list of application.
Specifically, agent node can receive the application request to create of main controlled node transmission, using carrying in request to create
Code storage mark.Code storage identifies corresponding code storage and is associated with agent node, and is deployed in the same private clound
In.Agent node identifies in corresponding code storage from code storage according to application request to create and obtains list of application.Using column
Multiple application items are had recorded in table, application item can be quilt when user registers application item by terminal in code storage
Code storage is recorded in list of application.The list of application that agent node will acquire returns to main controlled node.
List of application is sent to application management platform by main controlled node, so that application management platform passes through terminal to user's exhibition
Show list of application.User selects the application for needing to create by terminal from list of application, and uploads and match with this using corresponding
Set file.Wherein, it may include application identities in configuration file, marking code, agent node mark, code storage mark, compile
Translate script information, translation and compiling environment information and running environment parameter etc..Main controlled node receives the configuration file that terminal uploads, and will match
It is associated with application identities to set file, and stores in the local database.
In the present embodiment, code storage can be identified according to the application request to create that terminal uploads and be sent by main controlled node
It to agent node, is interacted by agent node and code storage, obtains the list of application in code storage, and will be in terminal
The corresponding configuration file storage of the target application of biography is in the local database.It is interacted by agent node and code storage, generation
Code warehouse does not need open public network interface, realizes being isolated for code storage and public network environment, effectively raises code
Safety.
In one embodiment, above-mentioned code compiling method further include: receive the warehouse association request that terminal uploads, warehouse
Code storage mark, agent node mark and code storage token are carried in association request;By code storage mark and generation
Code warehouse token is sent to agent node and identifies corresponding agent node, so that agent node is according to code storage token to code
Warehouse identifies corresponding code storage and is verified;The check results that Receiving Agent node returns;When check results be verification at
When function, then code storage is identified into corresponding code storage and be associated with agent node.
Main controlled node can receive the warehouse association request of terminal upload, carry code storage mark in warehouse association request
Know, agent node identifies and code storage token.Warehouse association request is for establishing between code storage and agent node
Incidence relation, and the related information between code storage and agent node is stored in the database of main controlled node.
Code storage mark and code storage token are sent to agent node and identify corresponding agent node by main controlled node,
And checking command is sent to agent node.Wherein, main controlled node can send code storage mark and code storage token
Send checking command simultaneously, main controlled node can also send code storage mark and code storage token and then to agency
Node sends checking command.Code storage token can be sent to code storage according to the checking command received by agent node
Corresponding code storage is identified, so that code storage verifies code storage token.Wherein, code storage token is user
After being succeeded in registration in code storage by terminal, issued by code storage.When verifying successfully, agent node is from code storehouse
The corresponding authorization user information of code storage token is obtained in library.It include the corresponding user's mark of authorized user in authorization user information
Know and log in key etc..The authorization user information for verifying successful result and acquisition can be back to master control section by agent node
Point.When verifying failure, the agent node result that then direct back-checking fails to main controlled node.
The check results that main controlled node Receiving Agent node returns.When check results are to verify successfully, main controlled node can
It is associated so that code storage is identified corresponding code storage with the agent node, and related information is stored in main controlled node
In corresponding database.Wherein, related information can include but is not limited to code storage mark, code storage token, Dai Lijie
Point identification and authorization user information.
In the present embodiment, main controlled node can be established between code storage and agent node according to warehouse association request
Incidence relation, and in the local database by related information storage.In code compilation process, code storage and associated agency
Node interacts, and code storage does not need open public network interface, realizes being isolated for code storage and public network environment, has
The safety for improving code of effect.
It should be understood that although each step in the flow chart of Fig. 2-3 is successively shown according to the instruction of arrow,
These steps are not that the inevitable sequence according to arrow instruction successively executes.Unless expressly stating otherwise herein, these steps
Execution there is no stringent sequences to limit, these steps can execute in other order.Moreover, at least one in Fig. 2-3
Part steps may include that perhaps these sub-steps of multiple stages or stage are not necessarily in synchronization to multiple sub-steps
Completion is executed, but can be executed at different times, the execution sequence in these sub-steps or stage is also not necessarily successively
It carries out, but can be at least part of the sub-step or stage of other steps or other steps in turn or alternately
It executes.
In one embodiment, as shown in figure 4, providing a kind of code compilation device, comprising: requirement for compiler receiving module
402, configuration file obtains module 404 and code compilation module 406, in which:
Requirement for compiler receiving module 402, the code compilation for receiving main controlled node transmission is requested, in code compilation request
Marking code is carried, main controlled node is deployed in public cloud.
Configuration file obtains module 404, includes compiling in configuration file for obtaining the corresponding configuration file of marking code
Information.
Code compilation module 406, for compilation information and marking code to be sent to the work section being deployed in private clound
Point generates corresponding mirror image so that working node is compiled using compilation information code to be compiled corresponding to marking code
File.
It in one embodiment, further include translation and compiling environment image banner and running environment parameter in configuration file;Above-mentioned generation
Code collector 406 is also used to that working node is called to obtain the corresponding code to be compiled of marking code from code storage;It obtains
Translation and compiling environment mirror image corresponding with translation and compiling environment image banner;Code to be compiled and compilation information are mapped into translation and compiling environment mirror image
In, generate container;Compiled code is treated using compilation information in a reservoir to be compiled, and obtains compiling data;According to compiling number
According to image file corresponding with the generation of running environment parameter.
In one embodiment, above-mentioned code compilation device further includes using creation module, for receiving main controlled node hair
The application request to create sent is identified using code storage is carried in request to create;According to application request to create from code storage
It identifies in corresponding code storage and obtains list of application;List of application is back to main controlled node so that main controlled node pair with answer
It is stored with the corresponding configuration file of the target application in list.
In one embodiment, above-mentioned configuration file obtains module 404 and is also used to according to code compilation request master control
The corresponding node interface of node;The corresponding configuration text of marking code is obtained from the database of main controlled node by node interface
Part, and configuration file is stored.
In one embodiment, as shown in figure 5, providing a kind of code compilation device, comprising: integrated request receiving module
502, node identification read module 504, requirement for compiler generation module 506 and image file generation module 508, in which:
Integrated request receiving module 502, the integrated request of code for receiving terminal upload, code integrates to be carried in request
Marking code.
Node identification read module 504, for obtaining the corresponding configuration file of marking code, from configuration file read with
The corresponding agent node mark of marking code, agent node identify corresponding agent node and are deployed in private clound.
Requirement for compiler generation module 506, the code compilation for generating carrying marking code according to the integrated request of code are asked
It asks.
Image file generation module 508 identifies corresponding agency's section for code compilation request to be sent to agent node
Point generates the corresponding image file of marking code so that agent node is requested according to code compilation.
In one embodiment, above-mentioned code compilation device further includes configuration file memory module, for receiving terminal
The application request to create of biography is identified using agent node mark and code storage is carried in request to create;By code storage mark
Knowledge is sent to agent node and identifies corresponding agent node, so that agent node identifies in corresponding code storage from code storage
Obtain list of application;The list of application that Receiving Agent node returns, and list of application is back to corresponding terminal;In response to end
The target application determined from list of application, and the corresponding configuration file of target application uploaded are held, configuration file is carried out
Storage.
In one embodiment, above-mentioned code compilation device further includes warehouse relating module, for receiving terminal upload
Warehouse association request carries code storage mark, agent node mark and code storage token in warehouse association request;It will
Code storage mark and code storage token are sent to agent node and identify corresponding agent node, so that agent node is according to generation
Code warehouse token identifies corresponding code storage to code storage and verifies;The check results that Receiving Agent node returns;When
Check results are when verifying successfully, then code storage to be identified corresponding code storage and be associated with agent node.
Specific about code compilation device limits the restriction that may refer to above for code compiling method, herein not
It repeats again.Modules in above-mentioned code compilation device can be realized fully or partially through software, hardware and combinations thereof.On
Stating each module can be embedded in the form of hardware or independently of in the processor in computer equipment, can also store in a software form
In memory in computer equipment, the corresponding operation of the above modules is executed in order to which processor calls.
In one embodiment, a kind of code compilation system is provided, comprising: main controlled node, agent node and work section
Point, in which:
Main controlled node, the integrated request of code for receiving terminal upload, code integrate in request and carry marking code;
The corresponding configuration file of marking code is obtained, agent node mark corresponding with marking code, agency are read from configuration file
The corresponding agent node of node identification is deployed in private clound;The code volume for carrying marking code is generated according to the integrated request of code
Translate request;Code compilation request is sent to agent node and identifies corresponding agent node.
Agent node carries code in code compilation request for receiving the code compilation request of main controlled node transmission
Mark, main controlled node are deployed in public cloud;The corresponding configuration file of marking code is obtained, includes compiling letter in configuration file
Breath;Compilation information and marking code are sent to the working node being deployed in private clound.
Working node is generated and is corresponded to for being compiled using compilation information code to be compiled corresponding to marking code
Image file.
It in one embodiment, further include running environment parameter in configuration file;Above-mentioned agent node is also used to call work
Make node and obtains the corresponding code to be compiled of marking code from code storage;Obtain volume corresponding with translation and compiling environment image banner
Translate environment mirror;Code to be compiled and compilation information are mapped into translation and compiling environment mirror image, container is generated;Volume is utilized in a reservoir
It translates information and treats compiled code and be compiled, obtain compiling data;It is corresponding with the generation of running environment parameter according to compiling data
Image file.
In one embodiment, above-mentioned agent node is also used to receive the application request to create of main controlled node transmission, application
Code storage mark is carried in request to create;It is identified in corresponding code storage and is obtained from code storage according to application request to create
Take list of application;List of application is back to main controlled node, so that main controlled node pair is corresponding with the target application in list of application
Configuration file stored.
In one embodiment, above-mentioned agent node is also used to according to the corresponding section of code compilation request main controlled node
Point interface;The corresponding configuration file of marking code is obtained from the database of main controlled node by node interface, and to configuration text
Part is stored.
In one embodiment, above-mentioned main controlled node is also used to receive the application request to create of terminal upload, using creation
Agent node mark and code storage mark are carried in request;It is corresponding that code storage mark is sent to agent node mark
Agent node, so that agent node identifies in corresponding code storage from code storage obtains list of application;Receiving Agent node
The list of application of return, and list of application is back to corresponding terminal;The target determined from list of application in response to terminal
Using, and the corresponding configuration file of target application uploaded, configuration file is stored.
In one embodiment, above-mentioned main controlled node is also used to receive the warehouse association request of terminal upload, warehouse association
Code storage mark, agent node mark and code storage token are carried in request;By code storage mark and code storehouse
Library token is sent to agent node and identifies corresponding agent node, so that agent node is according to code storage token to code storage
Corresponding code storage is identified to be verified;The check results that Receiving Agent node returns;When check results are to verify successfully,
Code storage is then identified corresponding code storage to be associated with agent node.
Specific about code compilation system limits the restriction that may refer to above for code compiling method, herein not
It repeats again.Modules in above-mentioned code compilation system can be realized fully or partially through software, hardware and combinations thereof.On
Stating each module can be embedded in the form of hardware or independently of in the processor in computer equipment, can also store in a software form
In memory in computer equipment, the corresponding operation of the above modules is executed in order to which processor calls.
In one embodiment, a kind of computer equipment is provided, which can be server, internal junction
Composition can be as shown in Figure 6.The server can be above-mentioned main controlled node, is also possible to above-mentioned agent node, can also be
State working node.The computer equipment includes processor, memory, network interface and the database connected by system bus.
Wherein, the processor of the computer equipment is for providing calculating and control ability.The memory of the computer equipment includes non-easy
The property lost storage medium, built-in storage.The non-volatile memory medium is stored with operating system, computer program and database.It should
Built-in storage provides environment for the operation of operating system and computer program in non-volatile memory medium.The computer equipment
Database for store code compile data.The network interface of the computer equipment is used to connect with external terminal by network
Connect letter.To realize a kind of code compiling method when the computer program is executed by processor.
It will be understood by those skilled in the art that structure shown in Fig. 6, only part relevant to application scheme is tied
The block diagram of structure does not constitute the restriction for the computer equipment being applied thereon to application scheme, specific computer equipment
It may include perhaps combining certain components or with different component layouts than more or fewer components as shown in the figure.
In one embodiment, a kind of computer equipment, including memory and processor are provided, is stored in memory
Computer program, the processor realize the step in above-mentioned code compiling method embodiment when executing computer program.
In one embodiment, a kind of computer readable storage medium is provided, computer program is stored thereon with, is calculated
Machine program realizes the step in above-mentioned code compiling method embodiment when being executed by processor.
Those of ordinary skill in the art will appreciate that realizing all or part of the process in above-described embodiment method, being can be with
Relevant hardware is instructed to complete by computer program, the computer program can be stored in a non-volatile computer
In read/write memory medium, the computer program is when being executed, it may include such as the process of the embodiment of above-mentioned each method.Wherein,
To any reference of memory, storage, database or other media used in each embodiment provided herein,
Including non-volatile and/or volatile memory.Nonvolatile memory may include read-only memory (ROM), programming ROM
(PROM), electrically programmable ROM (EPROM), electrically erasable ROM (EEPROM) or flash memory.Volatile memory may include
Random access memory (RAM) or external cache.By way of illustration and not limitation, RAM is available in many forms,
Such as static state RAM (SRAM), dynamic ram (DRAM), synchronous dram (SDRAM), double data rate sdram (DDRSDRAM), enhancing
Type SDRAM (ESDRAM), synchronization link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM
(RDRAM), direct memory bus dynamic ram (DRDRAM) and memory bus dynamic ram (RDRAM) etc..
Each technical characteristic of above embodiments can be combined arbitrarily, for simplicity of description, not to above-described embodiment
In each technical characteristic it is all possible combination be all described, as long as however, the combination of these technical characteristics be not present lance
Shield all should be considered as described in this specification.
The several embodiments of the application above described embodiment only expresses, the description thereof is more specific and detailed, but simultaneously
It cannot therefore be construed as limiting the scope of the patent.It should be pointed out that coming for those of ordinary skill in the art
It says, without departing from the concept of this application, various modifications and improvements can be made, these belong to the protection of the application
Range.Therefore, the scope of protection shall be subject to the appended claims for the application patent.
Claims (12)
1. a kind of code compiling method, which comprises
The code compilation request that main controlled node is sent is received, carries marking code, the master control in the code compilation request
Node deployment is in public cloud;
The corresponding configuration file of the marking code is obtained, includes compilation information in the configuration file;
The compilation information and the marking code are sent to the working node being deployed in private clound, so that the work section
Point is compiled using compilation information code to be compiled corresponding to the marking code, generates corresponding image file.
2. the method according to claim 1, wherein further including translation and compiling environment image banner in the configuration file
With running environment parameter;It is described so that the working node using the compilation information it is corresponding to the marking code to be compiled
Code is compiled, and is generated corresponding image file and is included:
The working node is called to obtain the corresponding code to be compiled of the marking code from code storage;
Obtain translation and compiling environment mirror image corresponding with the translation and compiling environment image banner;
The code to be compiled and the compilation information are mapped into the translation and compiling environment mirror image, container is generated;
The code to be compiled is compiled using the compilation information in the above-described container, obtains compiling data;
According to compiling data image file corresponding with the running environment parameter generation.
3. the method according to claim 1, wherein the method also includes:
The application request to create that the main controlled node is sent is received, code storage mark is carried in the application request to create;
It is identified in corresponding code storage according to the application request to create from the code storage and obtains list of application;
The list of application is back to the main controlled node, so that the main controlled node pair and the target in the list of application
It is stored using corresponding configuration file.
4. the method according to claim 1, wherein described obtain the corresponding configuration file packet of the marking code
It includes:
According to the corresponding node interface of main controlled node described in the code compilation request;
The corresponding configuration file of the marking code is obtained from the database of the main controlled node by the node interface, and
The configuration file is stored.
5. a kind of code compiling method, which comprises
The integrated request of code that terminal uploads is received, carries marking code in the integrated request of the code;
The corresponding configuration file of the marking code is obtained, generation corresponding with the marking code is read from the configuration file
Node identification is managed, the agent node identifies corresponding agent node and is deployed in private clound;
The code compilation request for carrying the marking code is generated according to the integrated request of the code;
Code compilation request is sent to the agent node and identifies corresponding agent node, so that the agent node root
It is requested according to the code compilation, generates the corresponding image file of the marking code.
6. according to the method described in claim 5, it is characterized in that, the method also includes:
The application request to create that the terminal uploads is received, agent node mark and code are carried in the application request to create
Warehouse mark;
Code storage mark is sent to the agent node and identifies corresponding agent node so that the agent node from
The code storage identifies in corresponding code storage and obtains list of application;
The list of application that the agent node returns is received, and the list of application is back to corresponding terminal;
It is corresponding in response to the target application that the terminal is determined from the list of application, and the target application uploaded
Configuration file stores the configuration file.
7. according to the method described in claim 5, it is characterized in that, the method also includes:
The warehouse association request that the terminal uploads is received, code storage mark, agency are carried in the warehouse association request
Node identification and code storage token;
Code storage mark and the code storage token are sent to the agent node and identify corresponding agent node,
It is verified so that the agent node identifies corresponding code storage to the code storage according to the code storage token;
Receive the check results that the agent node returns;
When the check results are to verify successfully, then the code storage are identified into corresponding code storage and the agency saves
Point is associated.
8. a kind of code compilation device, which is characterized in that described device includes:
Requirement for compiler receiving module is taken in the code compilation request for receiving the code compilation request of main controlled node transmission
It is deployed in public cloud with marking code, the main controlled node;
Configuration file obtains module, includes compiling in the configuration file for obtaining the corresponding configuration file of the marking code
Translate information;
Code compilation module, for the compilation information and the marking code to be sent to the work section being deployed in private clound
Point, so that the working node is compiled using compilation information code to be compiled corresponding to the marking code, it is raw
At corresponding image file.
9. a kind of code compilation device, which is characterized in that described device includes:
Integrated request receiving module, the integrated request of code for receiving terminal upload, the code integrates to be carried in request
Marking code;
Node identification read module is read from the configuration file for obtaining the corresponding configuration file of the marking code
Agent node mark corresponding with the marking code, the agent node identify corresponding agent node and are deployed in private clound
In;
Requirement for compiler generation module, the code compilation for generating the carrying marking code according to the integrated request of the code are asked
It asks;
Image file generation module identifies corresponding agency's section for code compilation request to be sent to the agent node
Point generates the corresponding image file of the marking code so that the agent node is requested according to the code compilation.
10. a kind of code compilation system, which is characterized in that the system comprises:
Main controlled node, the integrated request of code for receiving terminal upload, the code integrate in request and carry marking code;
The corresponding configuration file of the marking code is obtained, agency's section corresponding with the marking code is read from the configuration file
Point identification, the agent node identify corresponding agent node and are deployed in private clound;It is generated according to the integrated request of the code
Carry the code compilation request of the marking code;It is corresponding that code compilation request is sent to the agent node mark
Agent node;
Agent node carries code in the code compilation request for receiving the code compilation request of main controlled node transmission
Mark, the main controlled node are deployed in public cloud;The corresponding configuration file of the marking code is obtained, in the configuration file
Including compilation information;The compilation information and the marking code are sent to the working node being deployed in private clound;
Working node is generated for being compiled using compilation information code to be compiled corresponding to the marking code
Corresponding image file.
11. a kind of computer equipment, including memory and processor, the memory are stored with computer program, feature exists
In the processor realizes the step of any one of Claims 1-4 or 5 to 7 the method when executing the computer program
Suddenly.
12. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the computer program
The step of method described in any one of Claims 1-4 or 5 to 7 is realized when being executed by processor.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201910729495.4A CN110531984B (en) | 2019-08-08 | 2019-08-08 | Code compiling method, device, system, computer equipment and storage medium |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201910729495.4A CN110531984B (en) | 2019-08-08 | 2019-08-08 | Code compiling method, device, system, computer equipment and storage medium |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN110531984A true CN110531984A (en) | 2019-12-03 |
| CN110531984B CN110531984B (en) | 2023-06-23 |
Family
ID=68662181
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201910729495.4A Active CN110531984B (en) | 2019-08-08 | 2019-08-08 | Code compiling method, device, system, computer equipment and storage medium |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN110531984B (en) |
Cited By (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN112558983A (en) * | 2020-12-24 | 2021-03-26 | 微医云(杭州)控股有限公司 | Executable file generation and execution method, device, electronic terminal and medium |
| CN113031960A (en) * | 2021-03-18 | 2021-06-25 | 北京达佳互联信息技术有限公司 | Code compiling method, device, server and storage medium |
| CN113342370A (en) * | 2021-05-25 | 2021-09-03 | 北京小米移动软件有限公司 | Configuration updating method and device, electronic equipment and storage medium |
| CN113434146A (en) * | 2021-06-22 | 2021-09-24 | 青岛海尔科技有限公司 | Code compilation method, device, storage medium and electronic device |
| CN113741905A (en) * | 2021-09-15 | 2021-12-03 | 北京沃东天骏信息技术有限公司 | Interface file scanning method and device, electronic equipment and computer readable medium |
| CN115552369A (en) * | 2020-06-04 | 2022-12-30 | 深圳市欢太科技有限公司 | Compiling method, compiling device, compiling system, storage medium and electronic equipment |
| CN119271246A (en) * | 2024-12-09 | 2025-01-07 | 中航(成都)无人机系统股份有限公司 | A software storage method, device, equipment and storage medium |
| WO2025138390A1 (en) * | 2023-12-27 | 2025-07-03 | 江南大学 | Code property rights management system based on cloud smart contract compilation |
Citations (9)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US9038038B1 (en) * | 2010-06-01 | 2015-05-19 | Google Inc. | Just in time cloud compilation |
| CN107145377A (en) * | 2017-03-17 | 2017-09-08 | 广州视源电子科技股份有限公司 | Software compiling method and system |
| CN107168765A (en) * | 2017-07-07 | 2017-09-15 | 惠州Tcl移动通信有限公司 | A kind of method and system of remote compilation software |
| CN107465548A (en) * | 2017-08-17 | 2017-12-12 | 北京云纵信息技术有限公司 | The dispositions method and device of code |
| CN107766126A (en) * | 2017-11-15 | 2018-03-06 | 腾讯科技(深圳)有限公司 | Construction method, system, device and the storage medium of container mirror image |
| CN108196915A (en) * | 2018-02-06 | 2018-06-22 | 杭州朗和科技有限公司 | Code process method, equipment and storage medium based on application container engine |
| CN108958927A (en) * | 2018-05-31 | 2018-12-07 | 康键信息技术(深圳)有限公司 | Dispositions method, device, computer equipment and the storage medium of container application |
| CN109324799A (en) * | 2018-09-25 | 2019-02-12 | 珠海市筑巢科技有限公司 | A kind of code compiling method, computer installation and computer readable storage medium |
| CN109725909A (en) * | 2018-05-07 | 2019-05-07 | 中国平安人寿保险股份有限公司 | Code file is packaged dispositions method, continuous integrating server and system |
-
2019
- 2019-08-08 CN CN201910729495.4A patent/CN110531984B/en active Active
Patent Citations (9)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US9038038B1 (en) * | 2010-06-01 | 2015-05-19 | Google Inc. | Just in time cloud compilation |
| CN107145377A (en) * | 2017-03-17 | 2017-09-08 | 广州视源电子科技股份有限公司 | Software compiling method and system |
| CN107168765A (en) * | 2017-07-07 | 2017-09-15 | 惠州Tcl移动通信有限公司 | A kind of method and system of remote compilation software |
| CN107465548A (en) * | 2017-08-17 | 2017-12-12 | 北京云纵信息技术有限公司 | The dispositions method and device of code |
| CN107766126A (en) * | 2017-11-15 | 2018-03-06 | 腾讯科技(深圳)有限公司 | Construction method, system, device and the storage medium of container mirror image |
| CN108196915A (en) * | 2018-02-06 | 2018-06-22 | 杭州朗和科技有限公司 | Code process method, equipment and storage medium based on application container engine |
| CN109725909A (en) * | 2018-05-07 | 2019-05-07 | 中国平安人寿保险股份有限公司 | Code file is packaged dispositions method, continuous integrating server and system |
| CN108958927A (en) * | 2018-05-31 | 2018-12-07 | 康键信息技术(深圳)有限公司 | Dispositions method, device, computer equipment and the storage medium of container application |
| CN109324799A (en) * | 2018-09-25 | 2019-02-12 | 珠海市筑巢科技有限公司 | A kind of code compiling method, computer installation and computer readable storage medium |
Cited By (10)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN115552369A (en) * | 2020-06-04 | 2022-12-30 | 深圳市欢太科技有限公司 | Compiling method, compiling device, compiling system, storage medium and electronic equipment |
| CN112558983A (en) * | 2020-12-24 | 2021-03-26 | 微医云(杭州)控股有限公司 | Executable file generation and execution method, device, electronic terminal and medium |
| CN113031960A (en) * | 2021-03-18 | 2021-06-25 | 北京达佳互联信息技术有限公司 | Code compiling method, device, server and storage medium |
| CN113031960B (en) * | 2021-03-18 | 2024-04-30 | 北京达佳互联信息技术有限公司 | Code compiling method, device, server and storage medium |
| CN113342370A (en) * | 2021-05-25 | 2021-09-03 | 北京小米移动软件有限公司 | Configuration updating method and device, electronic equipment and storage medium |
| CN113434146A (en) * | 2021-06-22 | 2021-09-24 | 青岛海尔科技有限公司 | Code compilation method, device, storage medium and electronic device |
| CN113741905A (en) * | 2021-09-15 | 2021-12-03 | 北京沃东天骏信息技术有限公司 | Interface file scanning method and device, electronic equipment and computer readable medium |
| CN113741905B (en) * | 2021-09-15 | 2024-12-10 | 北京沃东天骏信息技术有限公司 | Interface file scanning method, device, electronic device and computer readable medium |
| WO2025138390A1 (en) * | 2023-12-27 | 2025-07-03 | 江南大学 | Code property rights management system based on cloud smart contract compilation |
| CN119271246A (en) * | 2024-12-09 | 2025-01-07 | 中航(成都)无人机系统股份有限公司 | A software storage method, device, equipment and storage medium |
Also Published As
| Publication number | Publication date |
|---|---|
| CN110531984B (en) | 2023-06-23 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN110531984A (en) | Code compiling method, device, system, computer equipment and storage medium | |
| CN111625452B (en) | Flow playback method and system | |
| CN109656538B (en) | Application program generation method, device, system, equipment and medium | |
| CA2915619C (en) | Method and apparatus for customized software development kit (sdk) generation | |
| CN108958927A (en) | Dispositions method, device, computer equipment and the storage medium of container application | |
| US10305962B1 (en) | Unit testing clients of web services | |
| CN108959455A (en) | Single page Web application implementation method, device, computer equipment and storage medium | |
| CN112395039B (en) | Method and device for managing Kubernetes cluster | |
| CN112615759B (en) | Full link voltage measurement assembly, full link voltage measurement method and device | |
| CN108959385A (en) | Database portion arranging method, device, computer equipment and storage medium | |
| CN114328217B (en) | Applied testing methods, devices, equipment, media and computer program products | |
| CN110399159A (en) | Dispositions method, device, computer equipment and the storage medium of operating system | |
| CN106980501A (en) | A kind of software package management method, device and system | |
| CN112035163A (en) | Software development kit configuration method, device and storage medium | |
| CN109891415A (en) | Web server is protected for unwarranted client application | |
| CN108418797A (en) | Web access method, device, computer equipment and storage medium | |
| CN118259922B (en) | Compiling method, compiling device, compiling product, compiling device, compiling equipment and compiling medium for application program | |
| CN109766361A (en) | Data cached read method, device, computer equipment and storage medium | |
| CN113259320A (en) | Verification mode dynamic installation method, system, electronic device and storage medium | |
| WO2024239757A1 (en) | Sub-application running method and apparatus, and computer device and storage medium | |
| CN109144575A (en) | Device, method, electronic equipment and the memory of cross operating system operation application | |
| Lettner et al. | Enabling A/B testing of native mobile applications by remote user interface exchange | |
| CN113608745B (en) | Method for initializing user permission and storage medium | |
| CN109614188A (en) | A kind of page online help method, apparatus, computer equipment and storage medium | |
| CN113886245A (en) | System acceptance method, device, computer equipment and medium based on artificial intelligence |
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 |