CN116974594A - Method for automatically deploying codes from private cloud to public cloud - Google Patents
Method for automatically deploying codes from private cloud to public cloud Download PDFInfo
- Publication number
- CN116974594A CN116974594A CN202311116971.8A CN202311116971A CN116974594A CN 116974594 A CN116974594 A CN 116974594A CN 202311116971 A CN202311116971 A CN 202311116971A CN 116974594 A CN116974594 A CN 116974594A
- Authority
- CN
- China
- Prior art keywords
- program
- gitlab
- public cloud
- private cloud
- software
- 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 30
- 238000004088 simulation Methods 0.000 claims description 49
- 230000001419 dependent effect Effects 0.000 claims description 6
- 238000004891 communication Methods 0.000 claims description 3
- 239000004744 fabric Substances 0.000 abstract description 10
- 230000008569 process Effects 0.000 description 10
- 238000013515 script Methods 0.000 description 7
- 238000004806 packaging method and process Methods 0.000 description 3
- 238000012360 testing method Methods 0.000 description 3
- 230000000694 effects Effects 0.000 description 2
- 230000004044 response Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000004422 calculation algorithm Methods 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000010354 integration Effects 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 239000010979 ruby Substances 0.000 description 1
- 229910001750 ruby Inorganic materials 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/61—Installation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
- G06F8/36—Software reuse
-
- 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)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
Abstract
The application provides a method for automatically deploying codes from private cloud to public cloud, which comprises the following steps: deploying the gitlab software on the private cloud server, adding the shell program and the fabric program into CICD configuration of the gitlab software, and configuring a runner tool of the gitlab software on a designated private cloud server; creating tasks in CICD of the gitlab software; after the code is pushed to the gitlab warehouse, triggering the CICD to execute the created task, and enabling the run scheduling shell program of the gitlab software to automatically update the code to a designated private cloud server to finish automatic code deployment to the private cloud; the shell program schedules fabric programs to pack codes, and the packed codes are deployed, environment functions are deployed and images are created on a public cloud server; the shell program also schedules the fabric program to create a container on the public cloud server according to the latest mirror image, and performs task operation; after the task is run, the fabric program notifies the runner tool of the gitlab software to complete automatic code deployment to public cloud.
Description
Technical Field
The application is used in the field of automatic driving automobile simulation test, and particularly relates to a method for automatically deploying codes from private cloud to public cloud.
Background
The autopilot simulation execution flow is a highly automated process that simulates the behavior of an autopilot vehicle in the real world and measures and evaluates its performance. The execution flow generally comprises setting simulation environment including parameters, road conditions, weather, time and the like of the automatic driving automobile. These parameters will affect the performance of the autopilot. The tasks to be performed by the autopilot are then imported into the simulation environment. The task may be single or multiple. And then, the automatic driving automobile is assigned with tasks, and the initial position, the speed, the direction and the like of the automatic driving automobile are set. And then the automatic driving automobile runs in the simulation environment according to the task requirements. During execution, the simulator tracks the state of the autopilot and responds accordingly to the autopilot inputs. After the simulation execution is finished, the simulator can measure the performance of the automatic driving automobile in the task and generate a corresponding result. These results may include mileage, test related information, and so forth. And finally, analyzing and evaluating the simulation result. This may help developers improve algorithms and designs for autopilot vehicles to improve their performance and performance.
With the continuous development of autopilot technology, the demand for autopilot simulation is increasing. However, the existing manual execution process has the following problems:
(1) consuming a lot of time and labor costs. The automatic driving simulation execution flow needs to run the simulation task multiple times, which consumes a great deal of time and labor cost. Each simulation task execution needs multiple steps of setting a simulation environment, loading a task, initializing simulation, performing simulation, measuring results, analyzing results and the like, is complex in operation, and needs multiple workers to finish cooperatively.
(2) Is easy to make mistakes and has low reliability. Manual execution is prone to errors, especially when setting up simulation environments and loading tasks. The staff needs to carefully check the parameters to ensure the correctness of the loading task, otherwise, errors are easy to occur. Furthermore, due to the complexity of the simulation environment, the manual execution process is also prone to omission or errors.
(3) The code change cannot be monitored in real time, and the response speed is slow. The manual execution process requires a worker to manually update the simulation environment and then re-run the simulation tasks. This means that once the code changes, the simulation environment needs to be manually updated and then the simulation tasks re-run. This process requires time and effort and has a slow response speed.
Disclosure of Invention
The application provides a method for automatically deploying codes from private cloud to public cloud, which can automatically execute the deployment process of automatic driving simulation execution flow codes between the private cloud and the public cloud, thereby saving time and labor cost. In addition, the CICD function of the GitLab software is used, so that the automatic driving simulation execution flow codes can be conveniently and rapidly deployed on private cloud and public cloud. The Python script uses an automatic deployment tool Fabric program to automatically execute the deployment process, so that the efficiency is improved.
The specific technical scheme is as follows:
the application provides a method for automatically deploying codes from private cloud to public cloud, which comprises the following steps:
deploying the gitlab software on a private cloud server, adding a shell program and an automatic deployment tool fabric program into CICD configuration of the gitlab software, and configuring a runner tool of the gitlab software on a designated private cloud server;
creating tasks in CICD of the gitlab software;
after pushing the automatic driving simulation execution flow code to a gitlab warehouse, triggering CICD to execute the created task, and enabling the shell program to automatically update the automatic driving simulation execution flow code to a designated private cloud server by the runner scheduling shell program of the gitlab software to finish automatic code deployment to the private cloud;
the shell program schedules the fabric program to package the automatic driving simulation execution flow codes, and the packaged automatic driving simulation execution flow codes, the environment function deployment and the mirror image creation are carried out on the public cloud server;
the shell program also schedules the fabric program to create a container on the public cloud server according to the latest mirror image, and performs task operation;
after the task is run, the fabric program notifies the runner tool of the gitlab software to complete automatic code deployment to public cloud.
Preferably, the shell program uploads the packaged codes to a designated folder on the public cloud server through a scheduling fabric program, so that automatic driving simulation execution flow code deployment after packaging is realized.
Preferably, the shell program uploads an environment dependent package related to the version of the autopilot simulation execution flow code to the public cloud server through a scheduling fabric program, so that environment function deployment is realized.
Preferably, the shell program installs the environment dependent package on the public cloud server by scheduling the fabric program, and then copies the autopilot simulation execution flow code uploaded to the designated folder on the public cloud server to the mirror image to realize the creation of the mirror image.
Preferably, before the shell program and the fabric program are configured, the method further includes:
the firewall of the private cloud is configured to allow the ip address of the public cloud to access the 22 ports of the private cloud to facilitate automated deployment tool communications.
The beneficial effects of the application are as follows:
by using the CICD function of the GitLab software, the automatic driving simulation execution flow codes can be conveniently and rapidly deployed on private cloud and public cloud. The Python script uses an automatic deployment tool Fabric program to automatically execute the deployment process, so that the efficiency is improved.
Drawings
FIG. 1 is a flowchart of a method for automatically executing CICD process based on private cloud to public cloud in an embodiment of the application;
FIG. 2 is a flowchart of interactions among a runner tool, shell program, and fabric program of the gitlab software in an embodiment of the present application;
fig. 3 is a flowchart of a method for automatically deploying code from a private cloud to a public cloud in an embodiment of the present application.
Detailed Description
Further advantages and effects of the present application will become readily apparent to those skilled in the art from the disclosure herein, by referring to the accompanying drawings and the preferred embodiments. The application may be practiced or carried out in other embodiments that depart from the specific details, and the details of the present description may be modified or varied from the spirit and scope of the present application. It should be understood that the preferred embodiments are presented by way of illustration only and not by way of limitation.
It should be noted that the illustrations provided in the following embodiments merely illustrate the basic concept of the present application by way of illustration, and only the components related to the present application are shown in the drawings and are not drawn according to the number, shape and size of the components in actual implementation, and the form, number and proportion of the components in actual implementation may be arbitrarily changed, and the layout of the components may be more complicated.
In the following description, numerous details are discussed to provide a more thorough explanation of embodiments of the present application, however, it will be apparent to one skilled in the art that embodiments of the present application may be practiced without these specific details.
The GitLab software is an open-source Git warehouse management tool, provides powerful CI/CD functions, and can enable an issuer to easily realize automatic code deployment and continuous integration. The GitLabCI/CD function means that the GitLab software can automatically detect code changes in the warehouse, then automatically deploy and build the code, and release the build results into the target container. The method supports various deployment modes, such as local deployment, remote deployment, container deployment and the like, and can conveniently customize deployment scripts and execution flows.
Fabric is an open-source automated deployment tool that is used primarily for automated deployment, configuration, and management of applications. It supports a variety of programming languages and frameworks including Python, ruby, java, PHP, etc., and can be integrated with many platforms and cloud services. Fabric provides a number of functions including automated deployment, testing, monitoring, logging, and the like. It supports multiple deployment modes, such as local deployment, remote deployment, container deployment, etc., and can customize deployment scripts and execution flows. Fabric also provides a number of powerful features such as task scheduling, log collection, security authentication, etc., that can be easily integrated into an enterprise's automation process.
The application provides a method for automatically deploying and executing codes from private cloud to public cloud, which comprises the following steps of: the shell program running in the gitlab CICD configuration, CICD, automatically deploys the executing python program. The shell program is added into the gitlab CICD configuration, so that after the automatic driving simulation execution flow program is automatically released, the automatic driving simulation execution flow program is automatically updated to a designated private cloud server, compiled and packaged. The shell program also comprises a scheduling fabric program, and the fabric program realizes the automatic driving simulation execution flow program after local packaging and uploads the automatic driving simulation execution flow program to public cloud. After uploading, the shell program can execute the method of executing the automatic driving simulation execution flow program by the public cloud in the fabric program. Thereby realizing the automatic deployment execution from private cloud to public cloud.
In this embodiment, to implement deployment operation using Fabric in the GitLab CI/CD, it is necessary to install the Fabric library first and write the Fabric deployment script. A function named duplicate is defined that implements the function of deploying code to a remote server. In this function, the environment object is used to configure connection parameters of the remote server, and then a run () function is used to execute commands on the remote server, including pull code, install dependencies, restart services, and the like. The function of executing the command on the remote server may be implemented. A task named duplicate is defined that uses a Docker mirror to perform the task. In the script of the task, a decode function is executed using the fab command, which connects to a remote server and performs a code deployment operation. In the GitLab CI/CD, the connection parameters of the Fabric are configured by setting environment variables and the like, such as the IP address, port number, SSH key and the like of a remote server. After configuration is completed, the Fabric can be used in the GitLab CI/CD to implement the operation of automatic deployment.
As shown in fig. 1 and fig. 2, in this embodiment, the method for automatically deploying codes from private cloud to public cloud specifically includes:
101. configuring a private cloud 22 port of a firewall to communicate with a public cloud 22 port: firewall rules are configured on the private cloud server, allowing the public cloud IP address to access the private cloud 22 ports for Fabric program communications.
102. Private cloud deployment of GitLab software: the GitLab software is installed and deployed on the private cloud server.
103. Configuring a runner tool in GitLab software to a private cloud platform server: the runner tool is configured in the GitLab to point to a server on the private cloud.
104. Edit the GitLab CI/CD task: a new task was created in the GitLab CI/CD.
105. Pushing an automatic driving simulation execution flow program to a warehouse: the code is pushed in the GitLab CI/CD to the Gitlab repository.
106. GitLab CI/CD execution the GitLab CI/CD will perform build and deployment tasks on the private cloud server.
107. The Runner tool dispatches shell programs, updates the latest autopilot simulation execution flow code in a folder specified on the private cloud server.
108. And the shell program schedules a Fabric program deployment script, namely packaging the automatic driving simulation execution flow codes of the designated folder into a ZIP format, and uploading the ZIP format to the designated folder of the public cloud server.
109. Shell program scheduling Fabric program deployment environment functions: the version-dependent environment-dependent package is uploaded to the public.
110. Shell program schedule Fabric program image creation function: and installing the related dependencies on the public cloud server, copying the running codes to the mirror image, and completing the creation of the mirror image.
111. Shell program scheduling Fabric program running task functions: and creating a container on the public cloud server according to the latest mirror image, and running tasks.
112. After the task is completed, the Fabric program will notify the Runner tool, which in turn notifies the members of the project via mail.
As shown in fig. 3, the above flow is summarized as:
s301, configuring a firewall of the private cloud, and allowing an ip address of the public cloud to access a 22 port of the private cloud so as to facilitate automated deployment tool communication;
s302, performing the deployment of the gitlab software on a private cloud server, adding a shell program and an automatic deployment tool fabric program into CICD configuration of the gitlab software, and configuring a runner tool of the gitlab software on a designated private cloud server;
s303, creating a task in CICD of the gitlab software;
s304, triggering CICD to execute the created task after the automatic driving simulation execution flow code is pushed to a gitlab warehouse, enabling the shell program to automatically update the automatic driving simulation execution flow code to a designated private cloud server, and completing automatic code deployment to the private cloud;
s305, the shell program schedules the fabric program to package the automatic driving simulation execution flow codes, and the packaged automatic driving simulation execution flow codes, the environment function deployment and the mirror image creation are carried out on the public cloud server;
s306, the shell program also schedules fabric programs to create containers on the public cloud server according to the latest mirror images, and performs task operation;
s307, after the task is run, the fabric program notifies the runner tool of the gitlab software to complete automatic code deployment to the public cloud.
Therefore, by utilizing the flow, the effect of automatically deploying codes from private cloud to public cloud is realized.
The embodiments described above are preferred embodiments of the present application, but the embodiments of the present application are not limited to the embodiments described above, and any other changes, modifications, substitutions, combinations, and simplifications that do not depart from the spirit and principles of the present application should be made in the equivalent manner, and are included in the scope of the present application.
Claims (5)
1. A method for automatically deploying code from a private cloud to a public cloud, the method comprising:
deploying the gitlab software on a private cloud server, adding a shell program and an automatic deployment tool fabric program into CICD configuration of the gitlab software, and configuring a runner tool of the gitlab software on a designated private cloud server;
creating tasks in CICD of the gitlab software;
after pushing the automatic driving simulation execution flow code to a gitlab warehouse, triggering CICD to execute the created task, and enabling the shell program to automatically update the automatic driving simulation execution flow code to a designated private cloud server by the runner scheduling shell program of the gitlab software to finish automatic code deployment to the private cloud;
the shell program schedules the fabric program to package the automatic driving simulation execution flow codes, and the packaged automatic driving simulation execution flow codes, the environment function deployment and the mirror image creation are carried out on the public cloud server;
the shell program also schedules the fabric program to create a container on the public cloud server according to the latest mirror image, and performs task operation;
after the task is run, the fabric program notifies the runner tool of the gitlab software to complete automatic code deployment to public cloud.
2. The method for automatically deploying codes from private cloud to public cloud according to claim 1, wherein the shell program uploads the packaged codes to a designated folder on a public cloud server through a scheduling fabric program, so that the deployment of the packaged automatic driving simulation execution flow codes is realized.
3. The method for automatically deploying codes from private cloud to public cloud according to claim 2, wherein the shell program uploads an environment dependent package related to the version of the autopilot simulation execution flow code to the public cloud server through a scheduling fabric program to realize environment function deployment.
4. The method for automatically deploying codes from private cloud to public cloud according to claim 3, wherein the shell program installs the environment dependent package on the public cloud server by scheduling fabric program, and then copies the autopilot simulation execution flow codes uploaded to the designated folder on the public cloud server to the mirror image to realize the creation of the mirror image.
5. The method for automated deployment of code from private cloud to public cloud of claim 1, wherein prior to shell program and fabric program configuration, the method further comprises:
the firewall of the private cloud is configured to allow the ip address of the public cloud to access the 22 ports of the private cloud to facilitate automated deployment tool communications.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311116971.8A CN116974594A (en) | 2023-08-31 | 2023-08-31 | Method for automatically deploying codes from private cloud to public cloud |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311116971.8A CN116974594A (en) | 2023-08-31 | 2023-08-31 | Method for automatically deploying codes from private cloud to public cloud |
Publications (1)
Publication Number | Publication Date |
---|---|
CN116974594A true CN116974594A (en) | 2023-10-31 |
Family
ID=88473232
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202311116971.8A Pending CN116974594A (en) | 2023-08-31 | 2023-08-31 | Method for automatically deploying codes from private cloud to public cloud |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116974594A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117493186A (en) * | 2023-11-06 | 2024-02-02 | 中科驭数(北京)科技有限公司 | Code testing method, device, electronic equipment and readable storage medium |
-
2023
- 2023-08-31 CN CN202311116971.8A patent/CN116974594A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117493186A (en) * | 2023-11-06 | 2024-02-02 | 中科驭数(北京)科技有限公司 | Code testing method, device, electronic equipment and readable storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7865350B1 (en) | Partitioning a model in modeling environments | |
US10423571B2 (en) | Method for configuring a real or virtual electronic control unit | |
US8930758B2 (en) | Automated testing of mechatronic systems | |
CN109753430B (en) | Interface test method of ground data processing system | |
CN116974594A (en) | Method for automatically deploying codes from private cloud to public cloud | |
CN112639734A (en) | Simulation task scheduling method, execution method, simulation implementation method and device | |
Giaimo et al. | Design criteria to architect continuous experimentation for self-driving vehicles | |
CN116069648A (en) | Software testing method, system, equipment and storage medium | |
CN113254054A (en) | Intelligent contract one-stop development system and method | |
Czarnecki | Software engineering for automated vehicles: Addressing the needs of cars that run on software and data | |
CN115033471A (en) | Method and system for automatically generating integrated test program by using system test program | |
Lúcio et al. | The formalism transformation graph as a guide to model driven engineering | |
Kaijser et al. | Towards simulation-based verification for continuous integration and delivery | |
CN115495111A (en) | Application deployment method, system, equipment and storage medium | |
US10488835B2 (en) | Method for configuring a tester equipped for testing an electronic control unit | |
Ciarletta et al. | Development of a safe CPS component: the hybrid parachute, a remote termination add-on improving safety of UAS | |
Brusaferri et al. | Enabling agile manufacturing through reconfigurable control solutions | |
Kanchana et al. | Automated Development and Testing of ECUs in Automotive Industry with Jenkins | |
Vitale et al. | The Software-Defined Vehicle: How to Verify and Validate Software Functions | |
US20240094694A1 (en) | Virtual Deployment of Distributed Control Systems for Control Logic Testing | |
Wehrmeister et al. | Framework to simulate the behavior of embedded real-time systems specified in UML models | |
Kovalev et al. | On the problem of predicting meantime between failures on the basis of data from automated testing of on-board software components | |
Orjala | Unit testing methods for Internet of Things Mbed OS operating system | |
CN113961174B (en) | Model development and deployment method based on cloud native microservice | |
Greenyer et al. | Scenario-based Specification of Car-to-X systems. |
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 |