CN113805858B - Method and device for continuously deploying software developed by scripting language - Google Patents

Method and device for continuously deploying software developed by scripting language Download PDF

Info

Publication number
CN113805858B
CN113805858B CN202110182495.4A CN202110182495A CN113805858B CN 113805858 B CN113805858 B CN 113805858B CN 202110182495 A CN202110182495 A CN 202110182495A CN 113805858 B CN113805858 B CN 113805858B
Authority
CN
China
Prior art keywords
code
server
target
software
script
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.)
Active
Application number
CN202110182495.4A
Other languages
Chinese (zh)
Other versions
CN113805858A (en
Inventor
佟铁
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jingdong Technology Holding Co Ltd
Original Assignee
Jingdong Technology Holding Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Jingdong Technology Holding Co Ltd filed Critical Jingdong Technology Holding Co Ltd
Priority to CN202110182495.4A priority Critical patent/CN113805858B/en
Publication of CN113805858A publication Critical patent/CN113805858A/en
Application granted granted Critical
Publication of CN113805858B publication Critical patent/CN113805858B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Stored Programmes (AREA)

Abstract

The embodiment of the disclosure discloses a method and a device for continuously deploying software developed by a scripting language. The specific implementation mode of the method comprises the following steps: constructing a container mirror image of a base of the target scripting language; deploying the container mirror image on a server, and mounting a target directory on the server into the container mirror image; acquiring a pre-written push script; responding to detection that a user submits codes of target software to a code base, and calling the pushing script to push the submitted codes to a target directory on the server; notifying the server to launch the target software using the submitted code. The implementation mode realizes the continuous deployment of the script language software, and the scheme has the characteristics of simple implementation, easy transplanting, quick continuous deployment, convenient use and the like.

Description

Method and device for continuously deploying software developed by scripting language
Technical Field
The embodiment of the disclosure relates to the technical field of computers, in particular to a method and a device for continuously deploying software developed by a scripting language.
Background
The continuous deployment refers to automatically publishing and deploying program changes of developers from a storage library (Git or SVN, etc.) to a server for a rapid verification function, so that the continuous receiving of feedback of users is facilitated. The method mainly solves the problems of slow software delivery speed, and deviation between the actual effect of the software and the expected effect caused by manual deployment.
The script language is a programming language which does not need to be compiled and is interpreted and operated through an interpreter, has the characteristics of simplicity, easy learning and easy use, and the more common script languages at present are as follows: python, javaScript, etc.
Software written by using a script language can normally run only by ensuring that corresponding dependent software exists on a server during starting due to the language characteristics of the software. Taking a software example written in a Python language, if the software written in the Python is to be run, a Python interpreter is installed first, and then other Python software on which the software depends is installed, so that the software can be run normally.
The current method for realizing continuous deployment of the scripting language software all needs to install the scripting language environment and related dependency or install a Docker environment and a Docker mirror warehouse on a server in advance.
Disclosure of Invention
The embodiment of the disclosure provides a method and a device for continuously deploying software developed by a scripting language.
In a first aspect, embodiments of the present disclosure provide a method of continuously deploying software developed in a scripting language, comprising: constructing a container mirror image of a base of the target scripting language; deploying the container mirror image on a server, and mounting a target directory on the server into the container mirror image; acquiring a pre-written push script; responding to detection that a user submits codes of target software to a code base, and calling the pushing script to push the submitted codes to a target directory on the server; notifying the server to launch the target software using the submitted code.
In some embodiments, the method further comprises: and in response to detecting the code update of the target software, calling the pushing script to push the updated code to the target directory on the server, so that the server automatically restarts the target software by using the updated code.
In some embodiments, the push script includes code that pushes the latest code into a target directory on the server through a preset file transfer command.
In some embodiments, the push script includes code to push up-to-date code onto a target service on the server through a call command of the target service, wherein the target service is to receive the up-to-date code and push the up-to-date code into the target directory.
In some embodiments, the container image contains only dependencies required by the software run-time written in the target scripting language.
In some embodiments, the file transfer command is an SCP command or an SFTP command.
In some embodiments, the codebase is a Git codebase and the push script is a pre-push script in Git hops.
In a second aspect, embodiments of the present disclosure provide an apparatus for continuously deploying software developed in a scripting language, comprising: a building unit configured to build a container image of a base of the target scripting language; a deployment unit configured to deploy the container image to a server and mount a target directory on the server into the container image; an acquisition unit configured to acquire a pre-written push script; a calling unit configured to call the pushing script to push the submitted code into a target directory on the server in response to detecting that a user submits the code of target software into a code library; and a starting unit configured to inform the server to start the target software using the submitted code.
In a third aspect, embodiments of the present disclosure provide an electronic device for continuously deploying software developed in a scripting language, comprising: one or more processors; a storage device having one or more programs stored thereon, which when executed by the one or more processors, cause the one or more processors to implement the method of any of the first aspects.
In a fourth aspect, embodiments of the present disclosure provide a computer readable medium having a computer program stored thereon, wherein the program when executed by a processor implements the method according to any of the first aspects.
According to the method and the device for continuously deploying software developed by the scripting language, provided by the embodiment of the invention, the software efficiency of continuously deploying the software written by the scripting language is simply and effectively improved by combining the script with the container mounting mode. The continuous deployment of software written in the scripting language is realized without introducing external continuous deployment tools, and problems encountered in the installation and use process of using the deployment tools and the like are avoided because the external continuous deployment tools such as Jenkins and Gitleb-CI and the like are not introduced.
Drawings
Other features, objects and advantages of the present disclosure will become more apparent upon reading of the detailed description of non-limiting embodiments, made with reference to the following drawings:
FIG. 1 is an exemplary system architecture diagram in which an embodiment of the present disclosure may be applied;
FIG. 2 is a flow chart of one embodiment of a method of continuously deploying software developed in a scripting language according to the present disclosure;
FIG. 3 is a flow chart of yet another embodiment of a method of continuously deploying software developed in a scripting language according to the present disclosure;
FIG. 4 is a schematic illustration of one application scenario of a method of continuously deploying software developed in a scripting language according to the present disclosure;
FIG. 5 is a structural schematic diagram of one embodiment of an apparatus for continuously deploying software developed in a scripting language according to the present disclosure;
fig. 6 is a schematic diagram of a computer system suitable for use in implementing embodiments of the present disclosure.
Detailed Description
The present disclosure is described in further detail below with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be noted that, for convenience of description, only the portions related to the present invention are shown in the drawings.
It should be noted that, without conflict, the embodiments of the present disclosure and features of the embodiments may be combined with each other. The present disclosure will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
FIG. 1 illustrates an exemplary system architecture 100 of an embodiment of a method of or apparatus to which the software developed by the continuous deployment scripting language of the present disclosure may be applied.
As shown in fig. 1, a system architecture 100 may include a client 101, a network 102, and a server 105. Network 102 is the medium used to provide communication links between clients 101 and servers 103. Network 102 may include various connection types such as wired, wireless communication links, or fiber optic cables, among others.
A user may interact with server 103 via network 102 using client 101 to receive or send messages, etc. The client 101 may have installed thereon various communication client applications such as a compilation class application, code version control software (e.g., git, SVN, etc.), web browser application, shopping class application, search class application, instant messaging tool, mailbox client, social platform software, etc.
The client 101 may be hardware or software. When the client 101 is hardware, it may be a variety of electronic devices having a display screen and supporting code versioning functionality, including but not limited to smartphones, tablets, laptop and desktop computers, and the like. When the client 101 is software, it can be installed in the above-listed electronic device. Which may be implemented as multiple software or software modules (e.g., to provide distributed services), or as a single software or software module. The present invention is not particularly limited herein.
The server 103 may be a server providing various services, such as a background application server providing deployment support for software written on the client 101. The background application server can analyze and the like the received data such as the software to be distributed and the like, and run the software on the server.
The server and the client may be hardware or software. When the server and the client are hardware, the server and the client can be realized as a distributed server cluster/distributed device cluster formed by a plurality of servers/devices, and can also be realized as a single server/single device. When the server and client are software, they may be implemented as a plurality of software or software modules (e.g., a plurality of software or software modules for providing distributed services), or as a single software or software module. The present invention is not particularly limited herein. The server may also be a server of a distributed system or a server that incorporates a blockchain. The server can also be a cloud server, or an intelligent cloud computing server or an intelligent cloud host with artificial intelligence technology.
It should be noted that, the method for continuously deploying software developed by the scripting language provided by the embodiments of the present disclosure may be executed by the client 101 or may be executed by the server 103. Accordingly, the device for continuously deploying software developed by the scripting language may be provided in the client 101 or in the server 103. The present invention is not particularly limited herein.
It should be understood that the number of clients, networks, and servers in fig. 1 is merely illustrative. There may be any number of clients, networks, and servers, as desired for implementation.
With continued reference to FIG. 2, a flow 200 of one embodiment of a method of continuously deploying software developed in a scripting language according to the present disclosure is shown. The method for continuously deploying software developed by the scripting language comprises the following steps:
at step 201, a container image of the base of the target scripting language is built.
In this embodiment, an execution subject (e.g., a client shown in fig. 1) of a method of continuously deploying software developed in a scripting language may construct a container image of the base of a target scripting language. The container image packages the runtime environment of the target scripting language. Software written by using a script language can normally run only by ensuring that corresponding dependent software exists on a server during starting due to the language characteristics of the software. Taking a software example written in a Python language, if the software written in the Python is to be run, a Python interpreter is installed first, and then other Python software on which the software depends is installed, so that the software can be run normally.
Containers herein include, but are not limited to, docker. The present application describes how to build a container image of the base of the target scripting language, taking a Docker image as an example. The Docker related software is installed first. After the installation of the Docker related software is completed, the Docker mirror image is built: after the Docker is used, the command Docker pull < mirror name > can be obtained from a mirror library, but network problems or other reasons sometimes occur, so that no faraday fetch is caused, the problem that the Docker cannot be pulled by the Docker official mirror acceleration is introduced in the Docker Chinese official network, and some commands can be directly pulled from the mirror acceleration address. In this application, however, the base image ubuntu 16.04 (xenial) may be constructed using Dockerfile. The relevant commands in Dockerfile are explained as follows:
FROM refers to the dependent base image, which is blank, starting FROM zero, as indicated by scratch. Depending images can be local or remote library ADD refers to adding local files to images, if a linux decompressed format file is encountered, the file will be decompressed automatically, which is why tar gz is not explicitly decompressed in the whole file
RUN commands, e.g. related commands to install software
CMD sets the command to execute by default when the Container is started, which may be overridden when the Container is started
The mirror image is built from Dockerfile using build commands. The mirror is then run. The basic construction of the basic mirror image is completed, and the subsequent environment construction is based on the basic mirror image construction.
In some alternative implementations of the present embodiment, the container image contains only the dependencies required by the software run-time written in the target scripting language. In this way conflicts between software that is dependent on multiple scripting language software can be avoided.
Step 202, deploying the container mirror image on the server, and mounting the target catalog on the server into the container mirror image.
In this embodiment, the container image constructed by the client may be uploaded to the server. The directory on the server is then mapped to the directory in the container, so that the container can be affected by modifying the files of a directory on the host.
Step 203, a pre-written push script is obtained.
In this embodiment, the purpose of the push script is to trigger an operation to push code onto the server when pushing code to the code base. The push script may be a script template of a code base, for example, the code base is a Git code base, and the push script is a pre-push script in a Git hook. Git hooks are self-contained functions of Git and do not require additional tools. And thus is simple to implement. The user may make modifications based on templates provided by the code library, for example adding a target directory of servers as destination addresses. The pushing script can also be a script written by a user according to a code base, and is used for monitoring the code change, and then the changed code is triggered to be pushed to the server. There are various ways to push the code onto the server.
In some optional implementations of this embodiment, the pushing script includes code that pushes the latest code into the target directory on the server through a preset file transfer command. For example, the local update code may be pushed to the a-directory of the server using SCP or SFTP commands.
The SCP is a shorthand for secure copy, a command for remote copying of files under Linux, and its similar command has cp, but cp cannot be copied across servers only locally, and SCP transmission is encrypted. A small speed may be affected. When the server hard disk becomes read only system, the files can be moved out by the SCP. In addition, SCP occupies less resources and has little influence on the system, and in this point, rsync is far less than that. Although rsync is somewhat faster than SCP, in the case of many small files, rsync can result in very high hard disk I/O without SCP substantially affecting normal system usage.
SFTP is an abbreviation for Secure File Transfer Protocol, secure file transfer protocol. A secure encryption method may be provided for the transfer file. SFTP has nearly the same syntax and function as ftp. SFTP is part of SSH and is a network transport protocol that provides file access, transport, and management functions for a data stream connection. It is in fact in the SSH package already contains a secure file transfer subsystem called SFTP (Secure File Transfer Protocol), and SFTP itself does not have a separate daemon, it must use the sshd daemon (port number is by default 22) to complete the corresponding connection operation, so that SFTP does not resemble a server program in a sense, but rather a client program. SFTP also uses encryption to transfer authentication information and transferred data, so it is very secure to use SFTP. However, since this transmission scheme uses encryption/decryption technology, the transmission efficiency is much lower than that of ordinary FTP, and SFTP can be used instead of FTP if you have higher demands on network security.
In some optional implementations of this embodiment, the push script includes code that pushes the latest code onto a target service on the server through a call command of the target service, where the target service is configured to receive the latest code and push the latest code into the target directory. For example, code from the client may be received on the server via an HTTP service. The client needs to send an HTTP request to the server. In addition, the code from the client may be received through a common web service such as a mail service.
In step 204, in response to detecting that the user submits the code of the target software to the code library, the push script is invoked to push the submitted code to the target directory on the server.
In this embodiment, the task running on the client may detect a change in the code library, and if the code is updated, the push script in step 203 may be invoked to push the submitted code to the target directory on the server.
Step 205, the notification server starts the target software using the submitted code.
In this embodiment, when the code of the target software is initially uploaded to the server, after the code is uploaded, a start command needs to be sent to the server, and the server knows that the relevant codes are all complete, so that the target software can be started.
In some optional implementations of the present embodiment, the method further includes: and in response to detecting the code update of the target software, calling the pushing script to push the updated code to the target directory on the server, so that the server automatically restarts the target software by using the updated code. After the target software starts to run, if a developer updates the code and submits the code to a code library, the client detects the updated code, and the pushing script can be called to push the updated code to the target directory on the server. At this time, the server does not need to receive the start command, and can automatically restart the target software by using the updated code.
Alternatively, different container images may be established for different target scripting languages. For example, a container mirror image is established for perl, python, javaScript, respectively. Conflicts between dependent software are avoided. The dependency software of the scripting language can also be analyzed to determine the non-conflicting scripting language, and the non-conflicting scripting language is incorporated into a container image.
With further reference to FIG. 3, a flow 300 of yet another embodiment of a method of continuously deploying software developed in a scripting language is shown. The process 300 of the method for continuously deploying software developed by a scripting language is applied to a server, and comprises the following steps:
step 301 receives a container image from a client.
In this embodiment, an execution body (e.g., a server shown in fig. 1) of a method of continuously deploying software developed in a scripting language may receive a container image from a client in a wired manner or a wireless manner. The container image is built by the client by the method described in step 201. The specific process is not described in detail.
Step 302, code of target software from a client is received.
In this embodiment, this step corresponds to step 204. The server supports two ways of receiving the code. Both of these modes can be realized by the push script of the client. One way is to call a push script by the client, where the push script includes a code that pushes the latest code to the target directory on the server through a preset file transfer command. And executing the pushing script to realize the pushing of the code. Another way is that the client side invokes a pushing script, and the pushing script includes a code for pushing the latest code to the target service on the server through the invoking command of the target service, where the target service is configured to receive the latest code and push the latest code to the target directory. The server needs to initiate a resident service (e.g., HTTP, email, etc. web service) for receiving the file, and remotely invoke the service locally, to push the local latest code to the target directory of the server.
Step 303, receiving a start command of the target software from the client, and running the code to start the target software.
In this embodiment, this step corresponds to step 205. And after the client-side code is uploaded, informing the server of running the code. In this way the functionality of the software can be verified.
Step 304, receiving updated codes from the client and automatically starting the target software according to the updated codes.
In this embodiment, once the code of the client is updated, the server can receive the new code, cover the original code, and automatically start the target software according to the updated code. Thus, the software update is performed at the fastest speed for the quick verification function, and the user feedback is more conveniently and continuously received. The method solves the problem of continuous deployment in developing software by using a scripting language, and mainly solves the problems of difficult dependence of the scripting language, inconvenient transplanting, complex installation and deployment tools and the like.
With continued reference to fig. 4, fig. 4 is a schematic diagram of an application scenario of a method of continuously deploying software developed in a scripting language according to the present embodiment. In the application scenario of fig. 4, a software developer stores code through a code library of a client. Different codebases are used in fig. 4 to represent different scripting languages. For example, code library 1 stores code written in the python language, and code library 2 stores code written in the perl language. A software developer may write a script for performing steps 201-205. After the client executes the script, the client builds the underlying container images, e.g., container image 1, container image 2, for python and perl, respectively. The container mirror 1, 2 is then deployed onto the server. The server to be deployed can be designated, the container mirror image 1 and the container mirror image 2 can be deployed under different catalogues of the same server, or the container mirror image 1 and the container mirror image 2 can be deployed to different servers to respectively designate the catalogues. The client and the server negotiate in advance which way to receive the code. And if the mode of the file transmission command is adopted, invoking a pushing script comprising codes for pushing the latest codes to the target directory on the server through the preset file transmission command. If the target service mode is adopted, the server side is required to start the target service, and then the client side calls a push script comprising codes for pushing the latest codes to the target service on the server through a call command of the target service. In either way, the server can store the received code under the designated directory for use by the container image. After all the codes are sent to the server, the client informs the server to run the codes to start the software, and functional test is carried out. If the programmer submits the changed codes to the code library, the client automatically sends the updated codes to the server, and the server automatically restarts the software by using the updated codes.
The proposal also supports the container mirror image transplanting, and the transplanting can be carried out only by modifying the address and the catalogue of the deployed server and the address and the catalogue of the server in the push script into the addresses and the catalogues of other servers. For example, where there are 2 container images originally deployed on server 1, container image 1 and container image 2, container image 1 may be migrated to server 2.
The solution also supports redeployment in different servers, e.g., 2 container images on server 1, both container image 1 and container image 2 being replicated to other servers.
The scheme of this application possesses following advantage:
1. simple realization
According to the technical scheme, the continuous deployment of software written in the scripting language is realized under the condition that no external continuous deployment tool is introduced, and because no external continuous deployment tool such as Jenkins and Gitlib-CI is introduced, the problems encountered in the installation and use processes of the deployment tool and the like are avoided. The tool adopted by the scheme can be a function of the existing software, for example, the Git hook is a function of the Git, and the tool can be used only by writing a simple shell script; SCP or SFTP is a command carried by Linux operating system.
2. Easy to transplant
For the environment problem on which software written by the script language depends, the scheme can be solved by adopting a Docker container mode, and only one basic mirror image container is required to be deployed on a server, so that the characteristics of the Docker are adopted, a plurality of script language-dependent environment conflicts are avoided, and the method is convenient to transplant to other operating systems or servers.
3. Sustained deployment is fast and low cost
In addition, the software is operated in a mode of mounting the script language code, so that repeated mirror imaging is not needed in each deployment, the deployment process is repeated, mirror imaging is reduced, the time for deploying containers is shortened, and in addition, the cost for maintaining a mirror image warehouse is reduced due to the characteristic of no need of repeated mirror imaging.
With further reference to fig. 5, as an implementation of the method shown in the foregoing figures, the present disclosure provides an embodiment of an apparatus for continuously deploying software developed by a scripting language, where the embodiment of the apparatus corresponds to the embodiment of the method shown in fig. 2, and the apparatus is particularly applicable to various electronic devices.
As shown in fig. 5, the apparatus 500 for continuously deploying software developed in a scripting language according to the present embodiment includes: a construction unit 501, a deployment unit 502, an acquisition unit 503, a calling unit 504, and a starting unit 505. A building unit 501 configured to build a container image of a base of the target scripting language; a deployment unit 502 configured to deploy the container image onto a server and mount a target directory on the server into the container image; an acquisition unit 503 configured to acquire a pre-written push script; a calling unit 504 configured to call the pushing script to push the submitted code into a target directory on the server in response to detecting that the user submitted the code of the target software into the code library; a starting unit 505 configured to inform the server to start the target software using the submitted code.
In this embodiment, specific processes of the construction unit 501, the deployment unit 502, the acquisition unit 503, the calling unit 504, and the starting unit 505 of the apparatus 500 for continuously deploying software developed by a scripting language may refer to steps 201, 202, 203, 204, and 205 in the corresponding embodiment of fig. 2.
In some optional implementations of the present embodiment, the calling unit 504 is further configured to: and in response to detecting the code update of the target software, calling the pushing script to push the updated code to the target directory on the server, so that the server automatically restarts the target software by using the updated code. The push script is intended to trigger an operation to push code onto a server when pushing code to a code base. The push script may be a script template of a code base, for example, the code base is a Git code base, and the push script is a pre-push script in a Git hook. The user may make modifications based on templates provided by the code library, for example adding a target directory of servers as destination addresses. The pushing script can also be a script written by a user according to a code base and used for monitoring code change, namely, the changed code can be triggered to be pushed to a server. There are various ways to push the code onto the server.
In some optional implementations of this embodiment, the pushing script includes code that pushes the latest code into the target directory on the server through a preset file transfer command. For example, the local update code may be pushed to the a-directory of the server using SCP or SFTP commands.
In some optional implementations of this embodiment, the push script includes code that pushes the latest code onto a target service on the server through a call command of the target service, where the target service is configured to receive the latest code and push the latest code into the target directory. For example, code from the client may be received on the server via an HTTP service. The client needs to send an HTTP request to the server. In addition, the code from the client may be received through a common web service such as a mail service.
In some alternative implementations of the present embodiment, the container image contains only dependencies required by the software written in the target scripting language when running. In this way conflicts between software that is dependent on multiple scripting language software can be avoided.
In some optional implementations of this embodiment, the file transfer command is an SCP command or an SFTP command. SCP transmissions are encrypted and do not take up much resources and do not increase the system load. SFTP also uses encryption to transfer authentication information and transferred data, so it is very secure to use SFTP. However, since this transmission scheme uses encryption/decryption technology, the transmission efficiency is much lower than that of ordinary FTP, and SFTP can be used instead of FTP if you have higher demands on network security.
In some optional implementations of this embodiment, the code library is a Git code library, and the push script is a pre-push script in Git hooks. Git hooks are self-contained functions of Git and do not require additional tools. And thus is simple to implement.
According to an embodiment of the disclosure, the disclosure further provides an electronic device, a readable storage medium.
Fig. 6 illustrates a schematic block diagram of an example electronic device 600 that may be used to implement embodiments of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 6, the apparatus 600 includes a computing unit 601 that can perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM) 602 or a computer program loaded from a storage unit 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the device 600 may also be stored. The computing unit 601, ROM 602, and RAM 603 are connected to each other by a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
Various components in the device 600 are connected to the I/O interface 605, including: an input unit 606 such as a keyboard, mouse, etc.; an output unit 607 such as various types of displays, speakers, and the like; a storage unit 608, such as a magnetic disk, optical disk, or the like; and a communication unit 609 such as a network card, modem, wireless communication transceiver, etc. The communication unit 609 allows the device 600 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
The computing unit 601 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of computing unit 601 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 601 performs the various methods and processes described above, such as the method continuously deploying software developed in a scripting language. For example, in some embodiments, software developed in a method continued deployment scripting language may be implemented as a computer software program tangibly embodied on a machine-readable medium, such as storage unit 608. In some embodiments, part or all of the computer program may be loaded and/or installed onto the device 600 via the ROM 602 and/or the communication unit 609. When the computer program is loaded into RAM 603 and executed by computing unit 601, one or more steps of the method described above may be performed to continue deploying software developed in a scripting language. Alternatively, in other embodiments, the computing unit 601 may be configured to execute the method continuously deploying software developed in a scripting language in any other suitable manner (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for carrying out methods of the present disclosure may be written in any combination of one or more programming languages. These program code may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus such that the program code, when executed by the processor or controller, causes the functions/operations specified in the flowchart and/or block diagram to be implemented. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and pointing device (e.g., a mouse or trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), and the internet.
The computer system may include a client and a server. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server may be a server of a distributed system or a server that incorporates a blockchain. The server can also be a cloud server, or an intelligent cloud computing server or an intelligent cloud host with artificial intelligence technology. The server may be a server of a distributed system or a server that incorporates a blockchain. The server can also be a cloud server, or an intelligent cloud computing server or an intelligent cloud host with artificial intelligence technology.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps recited in the present disclosure may be performed in parallel or sequentially or in a different order, provided that the desired results of the technical solutions of the present disclosure are achieved, and are not limited herein.
The above detailed description should not be taken as limiting the scope of the present disclosure. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present disclosure are intended to be included within the scope of the present disclosure.

Claims (10)

1. A method of continuously deploying software developed in a scripting language, comprising:
constructing a container mirror image of a base of the target scripting language;
deploying the container mirror image on a server, and mounting a target directory on the server into the container mirror image;
acquiring a pre-written push script;
in response to detecting that a user submits code of target software to a code base, invoking the pushing script to push the submitted code to a target directory on the server, wherein the code of the target software is written by using the target scripting language;
notifying the server to launch the target software using the submitted code.
2. The method of claim 1, wherein the method further comprises:
and in response to detecting the code update of the target software, calling the pushing script to push the updated code to the target directory on the server, so that the server automatically restarts the target software by using the updated code.
3. The method of claim 1, wherein the push script comprises code that pushes the latest code into a target directory on the server via a preset file transfer command.
4. The method of claim 1, wherein the push script comprises code to push a latest code onto a target service on the server through a call command to the target service, wherein the target service is to receive the latest code and push the latest code into the target directory.
5. The method of claim 1, wherein the container image contains only dependencies required by a software runtime written in a target scripting language.
6. A method according to claim 3, wherein the file transfer command is an SCP command or an SFTP command.
7. The method of any of claims 1-6, wherein the code library is a Git code library and the push script is a pre-push script in Git hops.
8. An apparatus for continuously deploying software developed in a scripting language, comprising:
a building unit configured to build a container image of a base of the target scripting language;
a deployment unit configured to deploy the container image to a server and mount a target directory on the server into the container image;
an acquisition unit configured to acquire a pre-written push script;
a calling unit configured to respond to detection that a user submits codes of target software to a code base, and call the pushing script to push the submitted codes to a target directory on the server, wherein the codes of the target software are codes written by using the target scripting language;
and a starting unit configured to inform the server to start the target software using the submitted code.
9. An electronic device for continuous deployment of software developed in a scripting language, comprising:
one or more processors;
a storage device having one or more programs stored thereon,
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method of any of claims 1-7.
10. A computer readable medium having stored thereon a computer program, wherein the program when executed by a processor implements the method of any of claims 1-7.
CN202110182495.4A 2021-02-10 2021-02-10 Method and device for continuously deploying software developed by scripting language Active CN113805858B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110182495.4A CN113805858B (en) 2021-02-10 2021-02-10 Method and device for continuously deploying software developed by scripting language

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110182495.4A CN113805858B (en) 2021-02-10 2021-02-10 Method and device for continuously deploying software developed by scripting language

Publications (2)

Publication Number Publication Date
CN113805858A CN113805858A (en) 2021-12-17
CN113805858B true CN113805858B (en) 2024-04-05

Family

ID=78892795

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110182495.4A Active CN113805858B (en) 2021-02-10 2021-02-10 Method and device for continuously deploying software developed by scripting language

Country Status (1)

Country Link
CN (1) CN113805858B (en)

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105630488A (en) * 2015-12-18 2016-06-01 上海爱数信息技术股份有限公司 Docker container technology-based continuous integration realizing method
CN105760167A (en) * 2016-02-23 2016-07-13 浪潮软件集团有限公司 Docker-based continuous integration method
CN106933635A (en) * 2017-03-15 2017-07-07 北京搜狐新媒体信息技术有限公司 Docker mirror images generation method and Docker containers
CN109324819A (en) * 2018-09-28 2019-02-12 中国平安财产保险股份有限公司 Code server dispositions method, device, server apparatus and storage medium
CN109597644A (en) * 2018-12-05 2019-04-09 江苏风云科技服务有限公司 Project dispositions method and device
CN110032376A (en) * 2018-12-13 2019-07-19 中国电子科技集团公司电子科学研究院 Automated software dispositions method and device based on Docker
CN110083369A (en) * 2019-04-25 2019-08-02 中电科嘉兴新型智慧城市科技发展有限公司 A kind of continuous integrating and lasting delivery method based on container scheme
CN111008016A (en) * 2019-11-29 2020-04-14 宝付网络科技(上海)有限公司 Multi-environment compiling system and method based on docker container
CN111654531A (en) * 2020-05-22 2020-09-11 国云科技股份有限公司 Container-based mirror image update publishing method and device
CN111857733A (en) * 2019-12-31 2020-10-30 北京嘀嘀无限科技发展有限公司 Construction method, device and system of business environment and readable storage medium
CN112329945A (en) * 2020-11-24 2021-02-05 广州市网星信息技术有限公司 Model deployment and reasoning method and device

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10732948B2 (en) * 2017-12-01 2020-08-04 Jpmorgan Chase Bank, N.A. System and method for implementing automated deployment
CN110096333B (en) * 2019-04-18 2021-06-29 华中科技大学 Container performance acceleration method based on nonvolatile memory

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105630488A (en) * 2015-12-18 2016-06-01 上海爱数信息技术股份有限公司 Docker container technology-based continuous integration realizing method
CN105760167A (en) * 2016-02-23 2016-07-13 浪潮软件集团有限公司 Docker-based continuous integration method
CN106933635A (en) * 2017-03-15 2017-07-07 北京搜狐新媒体信息技术有限公司 Docker mirror images generation method and Docker containers
CN109324819A (en) * 2018-09-28 2019-02-12 中国平安财产保险股份有限公司 Code server dispositions method, device, server apparatus and storage medium
CN109597644A (en) * 2018-12-05 2019-04-09 江苏风云科技服务有限公司 Project dispositions method and device
CN110032376A (en) * 2018-12-13 2019-07-19 中国电子科技集团公司电子科学研究院 Automated software dispositions method and device based on Docker
CN110083369A (en) * 2019-04-25 2019-08-02 中电科嘉兴新型智慧城市科技发展有限公司 A kind of continuous integrating and lasting delivery method based on container scheme
CN111008016A (en) * 2019-11-29 2020-04-14 宝付网络科技(上海)有限公司 Multi-environment compiling system and method based on docker container
CN111857733A (en) * 2019-12-31 2020-10-30 北京嘀嘀无限科技发展有限公司 Construction method, device and system of business environment and readable storage medium
CN111654531A (en) * 2020-05-22 2020-09-11 国云科技股份有限公司 Container-based mirror image update publishing method and device
CN112329945A (en) * 2020-11-24 2021-02-05 广州市网星信息技术有限公司 Model deployment and reasoning method and device

Also Published As

Publication number Publication date
CN113805858A (en) 2021-12-17

Similar Documents

Publication Publication Date Title
CN109120678B (en) Method and apparatus for service hosting of distributed storage system
CN109976667B (en) Mirror image management method, device and system
TWI705336B (en) Equipment and method for supporting online upgrade
CN113312037B (en) Data processing method, device, equipment and storage medium applied to micro-service
US20170154017A1 (en) Web Application Management
US20190258534A1 (en) Message oriented middleware with integrated rules engine
CN113760324A (en) Method and device for constructing micro front-end application
CN112965761B (en) Data processing method, system, electronic equipment and storage medium
CN114968406B (en) Plug-in management method and device, electronic equipment and storage medium
EP4209894A1 (en) Cloud code development system, method, and apparatus, device, and storage medium
EP2951678B1 (en) Remotely executing operations of an application using a schema that provides for executable scripts in a nodal hierarchy
US10013259B2 (en) User initiated data rollback using operating system partitions
CN117112122A (en) Cluster deployment method and device
CN112328301B (en) Method and device for maintaining consistency of operating environments, storage medium and electronic equipment
CN110119279B (en) Application and upgrading method and device thereof
CN112596854A (en) Method and device for continuously integrating running of assembly line
CN115167874B (en) Automatic driving software mirror image deployment method and device, electronic equipment and readable medium
CN113805858B (en) Method and device for continuously deploying software developed by scripting language
CN114157658B (en) Mirror warehouse deployment method, apparatus, electronic device and computer readable medium
CN112181470B (en) Patch deployment method and device
US20180341475A1 (en) Just In Time Deployment with Package Managers
US20230008839A1 (en) Smart environment assessment of prerequisites to private cloud provisioning
CN111142972B (en) Method, apparatus, system, and medium for extending functions of application program
CN110445628B (en) NGINX-based server and deployment and monitoring methods and devices thereof
CN118158236A (en) Computing program calling method based on cloud native environment computing program configuration center

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