CN113805858A - 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
CN113805858A
CN113805858A CN202110182495.4A CN202110182495A CN113805858A CN 113805858 A CN113805858 A CN 113805858A CN 202110182495 A CN202110182495 A CN 202110182495A CN 113805858 A CN113805858 A CN 113805858A
Authority
CN
China
Prior art keywords
server
code
target
software
push
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
Application number
CN202110182495.4A
Other languages
Chinese (zh)
Other versions
CN113805858B (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

Images

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 the basis of the target scripting language; deploying the container mirror image to a server, and mounting a target directory on the server to the container mirror image; acquiring a pre-compiled push script; in response to detecting that a user submits a code of target software to a code library, calling the push script to push the submitted code 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 transplantation, 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 means that the program change of the developer is automatically released and deployed from a storage library (Git or SVN, etc.) to a server for a quick verification function, so that the feedback of a user can be continuously received. The method mainly solves the problems that the software delivery speed is low and the actual effect of the software deviates from the expectation due to manual deployment.
The script language is a programming language which does not need to be compiled, is operated by an interpreter, has the characteristics of simplicity, easy learning and easy use, and the current more common script languages comprise: python, JavaScript, etc.
Due to the language characteristics of software written by using a script language, the software can normally run only when corresponding dependent software is required to be ensured on a server during starting. Taking an example of software written in a Python language, if the software written in Python is to be run, firstly, a Python interpreter is installed, and then other Python software depended on by the software is installed, so that the software can be run normally.
At present, methods for continuously deploying scripting language software all need to install a scripting language environment and relevant dependencies on a server in advance or install a Docker environment and a Docker mirror repository.
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, an embodiment of the present disclosure provides a method for continuously deploying software developed by a scripting language, including: constructing a container mirror image of the basis of the target scripting language; deploying the container mirror image to a server, and mounting a target directory on the server to the container mirror image; acquiring a pre-compiled push script; in response to detecting that a user submits a code of target software to a code library, calling the push script to push the submitted code 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 push script to push the updated code to a 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 to push the latest code into the target directory on the server through a preset file transfer command.
In some embodiments, the push script comprises code to push the latest code onto the target service on the server via a call command of the target service, wherein the target service is to receive the latest code and push the latest code into the target directory.
In some embodiments, the container image contains only the dependencies required by the software runtime 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 hooks.
In a second aspect, an embodiment of the present disclosure provides an apparatus for continuously deploying software developed by a scripting language, including: a build unit configured to build a container image of a basis of a target scripting language; the deployment unit is configured to deploy the container mirror image to a server and mount a target directory on the server into the container mirror image; an acquisition unit configured to acquire a push script written in advance; the calling unit is configured to call the pushing script to push the submitted codes to a target directory on the server in response to detecting that a user submits the codes of the target software to a code library; a start unit configured to notify the server to start the target software using the submitted code.
In a third aspect, an embodiment of the present disclosure provides an electronic device for continuously deploying software developed by a scripting language, including: one or more processors; storage means having one or more programs stored thereon which, when executed by the one or more processors, cause the one or more processors to carry out the method according to any one 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 of any one of the first aspect.
According to the method and the device for continuously deploying the software developed by the script language, the efficiency of continuously deploying the software written by the script language is simply and effectively improved by using a mode of combining the script with the container mounting. The continuous deployment of the software written in the script language is realized under the condition that no external continuous deployment tool is introduced, and because no external continuous deployment tool such as Jenkins, Gitlib-CI and the like is introduced, the problems encountered in the installation and use process of the deployment tool and the like are avoided.
Drawings
Other features, objects and advantages of the disclosure will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, made with reference to the accompanying drawings in which:
FIG. 1 is an exemplary system architecture diagram in which one embodiment of the present disclosure may be applied;
FIG. 2 is a flow diagram of one embodiment of a method for persistently deploying software developed in a scripting language, according to the present disclosure;
FIG. 3 is a flow diagram of yet another embodiment of a method of persistently 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 persistently deploying software developed in a scripting language according to the present disclosure;
FIG. 5 is a schematic structural diagram illustrating one embodiment of an apparatus for persistently deploying software developed in a scripting language according to the present disclosure;
FIG. 6 is a schematic block diagram of a computer system suitable for use with an electronic device implementing embodiments of the present disclosure.
Detailed Description
The present disclosure is described in further detail below with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the relevant invention and not restrictive of the invention. It should be noted that, for convenience of description, only the portions related to the related invention are shown in the drawings.
It should be noted that, in the present disclosure, the embodiments and features of the embodiments may be combined with each other without conflict. 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 or apparatus for continuously deploying software developed by a scripting language, to which the present disclosure may be applied.
As shown in fig. 1, system architecture 100 may include clients 101, network 102, and server 105. Network 102 serves as a medium for providing 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, to name a few.
A user may use a client 101 to interact with a server 103 over a network 102 to receive or send messages and the like. The client 101 may have various communication client applications installed thereon, such as a compiling application, code version control software (e.g., Git, SVN, etc.), a web browser application, a shopping application, a search application, an instant messaging tool, a mailbox client, social platform software, and the like.
The client 101 may be hardware or software. When the client 101 is hardware, it may be various electronic devices having a display screen and supporting a code version control function, including but not limited to a smart phone, a tablet computer, a laptop portable computer, a desktop computer, and the like. When the client 101 is software, it can be installed in the electronic devices listed above. It may be implemented as multiple pieces of software or software modules (e.g., to provide distributed services) or as a single piece of software or software module. And is not particularly limited herein.
The server 103 may be a server that provides various services, such as a background application server that provides deployment support for software written on the client 101. The background application server can analyze and process the received data of the software to be released 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 distributed server cluster/distributed device cluster formed by a plurality of servers/devices can be realized, and the distributed server cluster/distributed device cluster can also be realized as a single server/single device. When the server and the client are software, they may be implemented as multiple pieces of software or software modules (for example, multiple pieces of software or software modules for providing distributed services), or as a single piece of software or software module. And is not particularly limited herein. The server may also be a server of a distributed system, or a server incorporating 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 a scripting language provided by the embodiment of the present disclosure may be executed by the client 101 or the server 103. Accordingly, a device for continuously deploying software developed by a scripting language may be provided in the client 101 or the server 103. And 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 an implementation.
With continued reference to FIG. 2, a flow 200 of one embodiment of a method of persistently deploying software developed in a scripting language according to the present disclosure is shown. The method for continuously deploying the software developed by the script language comprises the following steps:
step 201, constructing a container mirror image of the basis of the target scripting language.
In this embodiment, the executing agent (e.g., the client shown in FIG. 1) of the method of continuously deploying software developed by a scripting language may build a container image of the basis of the target scripting language. The container image encapsulates the runtime environment of the target scripting language. Due to the language characteristics of software written by using a script language, the software can normally run only when corresponding dependent software is required to be ensured on a server during starting. Taking an example of software written in a Python language, if the software written in Python is to be run, firstly, a Python interpreter is installed, and then other Python software depended on by the software is installed, so that the software can be run normally.
Containers herein include, but are not limited to, Docker. The application takes a Docker mirror image as an example to explain how to construct a container mirror image based on a target scripting language. The Docker related software is installed first. And after the Docker related software is installed, beginning to construct a Docker mirror image: after the Docker is used, the Docker pull < mirror name > can be obtained from a mirror library through a command, but sometimes network problems or other reasons occur, so that the Docker pull cannot be achieved. In the present application, however, a Dockerfile may be used to construct the base image ubuntu 16.04 (xenial). The relevant commands in Dockerfile are explained as follows:
FROM refers to the base image of the dependency, as scratch indicates is blank, starting FROM zero. The dependent image can be local, or ADD of a remote library refers to adding a local file to the image, and if a linux uncompressible format file is encountered, the local file is automatically decompressed, which is why tar.gz is not explicitly decompressed in the whole file
RUN commands, e.g. commands related to the installation of software
CMD sets commands to execute by default when initiating Container, which can be overridden when initiating Container
The image is built from Dockerfile using build commands. The mirror is then run. Basic mirror image construction is basically completed, and later environment construction is based on the mirror image construction.
In some alternative implementations of the present embodiment, the container image only contains the dependencies required for the software runtime written in the target scripting language. This avoids conflicts between software on which multiple scripting language software depends.
Step 202, deploying the container mirror image to a server, and mounting a target directory on the server to the container mirror image.
In this embodiment, the container image constructed by the client may be uploaded to the server. Then, the directory on the server is mapped with the directory in the container, so that the container can be influenced by modifying the file of a certain directory of the host.
Step 203, acquiring a pre-written push script.
In this embodiment, the purpose of the push script is to trigger an operation to push the code to the server when the code is pushed to the code library. The push script may be a script template carried by a code library, for example, the code library is a Git code library, and the push script is a pre-push script in Git hooks. Git hooks are a function that Git itself carries, and no additional tools are required. And is therefore simple to implement. The user may modify according to a template provided by the codebase, for example, adding a target directory of the server as the destination address. The push script can also be a script written by the user according to the code library, and is used for triggering the changed code to be pushed to the server when the change of the code is monitored. The code is pushed to the server, and the operation is realized in various ways.
In some optional implementations of this embodiment, the pushing script includes pushing the latest code to a code in the target directory on the server through a preset file transfer command. For example, the local update code may be pushed to the server's A directory using SCP or SFTP commands.
The SCP is short for secure copy, a command for remote copying files under Linux, and its analogous commands have cp, but cp is only copied locally and cannot cross servers, and SCP transmission is encrypted. The speed may be slightly affected. When the server hard disk becomes a read only system, the SCP can be used to move the file out. In addition, SCP occupies less resources and has little influence on the system, and at this point, rsync is far from other points. Although rsync is faster than SCP, in case of many small files, rsync will cause the hard disk I/O to be very high, and SCP does not affect the normal use of system.
SFTP is an abbreviation of Secure File Transfer Protocol, Secure File Transfer Protocol. A secure encryption method may be provided for transferring files. SFTP has almost 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, a data stream connection. In fact, in the SSH software package, a secure File Transfer subsystem called SFTP (secure File Transfer protocol) is already included, and SFTP itself has no separate daemon process, and it must use sshd daemon process (port number is default 22) to complete the corresponding connection operation, so in a certain sense, SFTP is not like a server program but rather like a client program. SFTP is also used to encrypt authentication information and transmitted data, and therefore, it is very secure to use SFTP. However, since this transmission method uses encryption/decryption technology, the transmission efficiency is much lower than that of ordinary FTP, and if you have higher requirements on network security, SFTP can be used instead of FTP.
In some optional implementations of this embodiment, the push script includes code for pushing the latest code onto the 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, the code from the client may be received at 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 also be received through a common network service such as a mail service.
And step 204, in response to detecting that the user submits the code of the target software to the code library, calling a push script to push the submitted code to a target directory on the server.
In this embodiment, a task running on the client may detect a change in the code library, and if the code is updated, call the push script in step 203 to push the submitted code to the target directory on the server.
Step 205, the server is notified to launch 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 all the relevant codes are complete, and then the target software can be started.
In some optional implementations of this embodiment, the method further includes: and in response to detecting the code update of the target software, calling the push script to push the updated code to a 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 codes and submits the codes to the code library, the client detects the updated codes and can call the push script to push the updated codes to the target directory on the server. At this time, the server does not need to receive a starting command, and the target software can be automatically restarted by using the updated code.
Alternatively, different container images may be established for different target scripting languages. For example, container images are established for perl, python, and JavaScript, respectively. Collisions between dependent software are avoided. And analyzing the dependent software of the scripting languages to determine the non-conflicting scripting languages, and combining the non-conflicting scripting languages into a container mirror image.
With further reference to FIG. 3, a flow 300 of yet another embodiment of a method of persistently deploying software developed by a scripting language is illustrated. The flow 300 of the method for continuously deploying software developed by a script language is applied to a server and comprises the following steps:
step 301, receiving a container image from a client.
In the present embodiment, an execution subject (for example, a server shown in fig. 1) of the method of continuously deploying software developed by a scripting language may receive a container image from a client in a wired manner or a wireless manner. The container image is constructed by the client through the method described in step 201. The detailed process is not described again.
Step 302, receiving the code of the target software from the client.
In the present embodiment, this step corresponds to step 204. The server supports two ways of receiving the code. Both of these two ways can be implemented by the push script of the client. One way is that a client calls a push script, which includes codes for pushing the latest codes to a target directory on the server through a preset file transfer command. And the pushing of the code can be realized by executing the pushing script. The other mode is that a client side calls a push script, the push script comprises codes for pushing the latest codes to the target service on the server through a call command of the target service, and the target service is used for receiving the latest codes and pushing the latest codes to the target directory. The server needs to start a resident service (e.g., a web service such as HTTP, mail, etc.) for receiving the file, invoke the service locally and remotely, and implement pushing the local update code to the target directory of the server.
Step 303, receiving a start command of the target software from the client, and running a code to start the target software.
In the present embodiment, this step corresponds to step 205. And after the uploading of the client codes is finished, the server is informed to run the codes. So that the functionality of the software can be verified.
Step 304, receiving the updated code from the client, and automatically starting the target software according to the updated code.
In this embodiment, once the code of the client is updated, the server can receive the new code, overlay the original code, and automatically start the target software according to the updated code. Therefore, software updating is carried out at the fastest speed so as to provide a quick verification function, and the feedback of the user can be received continuously. The problem of use script language development software meet last deployment is solved, mainly solve installation script language and rely on the difficulty, inconvenient transplantation, install and use deployment instrument complicacy scheduling problem.
With continued reference to fig. 4, fig. 4 is a schematic diagram of an application scenario of the method of continuously deploying software developed by 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 code libraries are used in fig. 4 to represent different scripting languages. For example, the code library 1 stores code written in python language, and the code library 2 stores code written in perl language. A software developer may write a script for performing steps 201 and 205. After the client executes the script, the client builds the underlying container images, such as container image 1 and container image 2, for python and perl, respectively. And then deploying the container image 1 and the container image 2 to a server. A server to be deployed can be specified, the container mirror image 1 and the container mirror image 2 can be deployed to different directories of the same server, and the container mirror image 1 and the container mirror image 2 can also be deployed to different servers to respectively specify the directories. 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, calling a push script comprising codes for pushing the latest codes to the target directory on the server through a 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 calling command of the target service. In any way, the server can store the received codes in the appointed directory for the container mirror image. And after the client sends all the codes to the server, the client informs the server to run the codes to start the software and perform the function test. If the programmer submits the changed code to the code library, the client automatically sends the updated code to the server, and the server automatically restarts the software by using the updated code.
The scheme also supports container mirror image transplantation, and can be transplanted only by modifying the address and the directory of the deployed server and the address and the directory of the server in the push script into the addresses and the directories of other servers. For example, 2 container images originally deployed on server 1, container image 1 and container image 2, container image 1 may be migrated to server 2.
This solution also supports repeated deployment in different servers, e.g., there are 2 container images on server 1, and both container image 1 and container image 2 can be replicated on other servers.
The scheme of this application possesses following advantage:
1. simple to implement
According to the technical scheme, continuous deployment of software written in the script language is achieved under the condition that no external continuous deployment tool is introduced, and the problems encountered in installation and use processes of using the deployment tool and the like are avoided because no external continuous deployment tool such as Jenkins, Gitlib-CI and the like is introduced. The tool adopted by the scheme can be a function of the existing software, for example, the Git hooks are the function of Git and can be used only by compiling a simple shell script; the SCP or SFTP is a command carried by the Linux operating system.
2. Easy to transplant
For the environment problem that software written by installing scripting language depends on, the scheme can be solved by adopting a Docker container mode, only one basic mirror image container needs to be deployed on a server, and due to the characteristics of the Docker, a plurality of scripting languages do not depend on environment conflicts, and the Docker can be conveniently transplanted to other operating systems or servers.
3. Fast and low-cost continuous deployment
In addition, because the scheme adopts the mode of mounting the script language codes to run the software, the processes of repeatedly imaging and repeatedly deploying are not needed to be repeated in each deployment, the time for imaging and repeatedly deploying the container is reduced, and in addition, the cost for maintaining a mirror image warehouse is also reduced because the characteristic of repeatedly imaging is not needed.
With further reference to fig. 5, as an implementation of the method shown in the above 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 may be applied to various electronic devices.
As shown in fig. 5, the apparatus 500 for continuously deploying software developed by a scripting language of the present embodiment includes: the system comprises 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 basis of a 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 push script written in advance; a calling unit 504 configured to, in response to detecting that a user submits a code of target software into a code library, call the push script to push the submitted code into a target directory on the server; a starting unit 505 configured to notify the server to start the target software using the submitted code.
In this embodiment, specific processes of the constructing unit 501, the deploying unit 502, the obtaining 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 step 201, step 202, step 203, step 204 and step 205 in the corresponding embodiment of fig. 2.
In some optional implementations of this embodiment, the invoking unit 504 is further configured to: and in response to detecting the code update of the target software, calling the push script to push the updated code to a target directory on the server, so that the server automatically restarts the target software by using the updated code. The purpose of the push script is to trigger operation when pushing the code to the code library, and the code is pushed to the server. The push script may be a script template carried by a code library, for example, the code library is a Git code library, and the push script is a pre-push script in Git hooks. The user may modify according to a template provided by the codebase, such as adding a target directory of servers as the destination address. The pushing script can also be a script written by the user according to the code library, and is used for monitoring the code change, namely triggering the changed code to be pushed to the server. The code is pushed to the server, and the operation is realized in various ways.
In some optional implementations of this embodiment, the push script includes code for pushing the latest code to the target directory on the server through a preset file transfer command. For example, the local update code may be pushed to the server's A directory using SCP or SFTP commands.
In some optional implementations of this embodiment, the push script includes code for pushing the latest code onto the 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, the code from the client may be received at 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 also be received through a common network service such as a mail service.
In some optional implementations of this embodiment, the container image only contains dependencies required for the runtime of software written in the target scripting language. This avoids conflicts between software on which multiple scripting language software depends.
In some optional implementations of this embodiment, the file transfer command is an SCP command or an SFTP command. SCP transmission is encrypted and also occupies very little resources and does not increase much system load. SFTP is also used to encrypt authentication information and transmitted data, and therefore, it is very secure to use SFTP. However, since this transmission method uses encryption/decryption technology, the transmission efficiency is much lower than that of ordinary FTP, and if you have higher requirements on network security, SFTP can be used instead of FTP.
In some optional implementation manners 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 a function that Git itself carries, and no additional tools are required. And is therefore simple to implement.
According to an embodiment of the present disclosure, the present disclosure also provides an electronic device and a readable storage medium.
FIG. 6 illustrates a schematic block diagram of an example electronic device 600 that can 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 phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples 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, which 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 can also be stored. The calculation unit 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
A number of components in the device 600 are connected to the I/O interface 605, including: an input unit 606 such as a keyboard, a mouse, or the like; 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 the computing unit 601 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various dedicated Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, and so forth. The computing unit 601 performs the various methods and processes described above, such as methods that continuously deploy software developed in a scripting language. For example, in some embodiments, software developed by the method continuous deployment scripting language may be implemented as a computer software program tangibly embodied in 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 loaded into RAM 603 and executed by computing unit 601, the computer program may perform one or more steps of the above-described method for continuously deploying software developed in a scripting language. Alternatively, in other embodiments, the computing unit 601 may be configured by any other suitable means (e.g., by means of firmware) to execute the method-continuous deployment scripting language developed software.
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), system on a 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 that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes 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 codes, when executed by the processor or controller, cause the functions/operations specified in the flowchart and/or block diagram to be performed. 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. A 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 a pointing device (e.g., a mouse or a 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 can 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, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end 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 back-end, 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 clients and servers. A client and server are generally 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 incorporating 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 incorporating 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 understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present disclosure may be executed in parallel, sequentially, or in different orders, as long as the desired results of the technical solutions disclosed in the present disclosure can be achieved, and the present disclosure is not limited herein.
The above detailed description should not be construed as limiting the scope of the disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present disclosure should be included in the scope of protection 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 the basis of the target scripting language;
deploying the container mirror image to a server, and mounting a target directory on the server to the container mirror image;
acquiring a pre-compiled push script;
in response to detecting that a user submits a code of target software to a code library, calling the push script to push the submitted code to a target directory on the server;
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 push script to push the updated code to a 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 to push the latest code into a target directory on the server through a preset file transfer command.
4. The method of claim 1, wherein the push script comprises code to push the latest code onto a target service on the server via a call command of 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. The method of 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 codebase is a Git codebase and the push script is a pre-push script in Git hooks.
8. An apparatus for persistently deploying software developed in a scripting language, comprising:
a build unit configured to build a container image of a basis of a target scripting language;
the deployment unit is configured to deploy the container mirror image to a server and mount a target directory on the server into the container mirror image;
an acquisition unit configured to acquire a push script written in advance;
the calling unit is configured to call the pushing script to push the submitted codes to a target directory on the server in response to detecting that a user submits the codes of the target software to a code library;
a start unit configured to notify the server to start the target software using the submitted code.
9. 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,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-7.
10. A computer-readable medium, on which a computer program is stored, wherein the program, when executed by a processor, implements the method of any one 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 true CN113805858A (en) 2021-12-17
CN113805858B 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)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114912632A (en) * 2022-05-24 2022-08-16 京东科技控股股份有限公司 Machine learning model reasoning method and device

Citations (13)

* 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
US20190171427A1 (en) * 2017-12-01 2019-06-06 Jpmorgan Chase Bank, N.A. System and method for implementing automated deployment
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
US20200334066A1 (en) * 2019-04-18 2020-10-22 Huazhong University Of Science And Technology Nvm-based method for performance acceleration of containers
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

Patent Citations (13)

* 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
US20190171427A1 (en) * 2017-12-01 2019-06-06 Jpmorgan Chase Bank, N.A. System and method for implementing automated deployment
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
US20200334066A1 (en) * 2019-04-18 2020-10-22 Huazhong University Of Science And Technology Nvm-based method for performance acceleration of containers
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

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114912632A (en) * 2022-05-24 2022-08-16 京东科技控股股份有限公司 Machine learning model reasoning method and device

Also Published As

Publication number Publication date
CN113805858B (en) 2024-04-05

Similar Documents

Publication Publication Date Title
CN109120678B (en) Method and apparatus for service hosting of distributed storage system
CN105740048B (en) A kind of mirror image management method, apparatus and system
TWI705336B (en) Equipment and method for supporting online upgrade
WO2024077885A1 (en) Management method, apparatus and device for container cluster, and non-volatile readable storage medium
CN113656423B (en) Method and device for updating data, electronic equipment and storage medium
CN112965761B (en) Data processing method, system, electronic equipment and storage medium
US20190258534A1 (en) Message oriented middleware with integrated rules engine
CN109828830B (en) Method and apparatus for managing containers
CN113760324A (en) Method and device for constructing micro front-end application
CN112948018B (en) Dynamic library loading method, device, equipment and medium for applet
CN114968406B (en) Plug-in management method and device, electronic equipment and storage medium
CN117112122A (en) Cluster deployment method and device
CN114443076A (en) Mirror image construction method, device, equipment and storage medium
CN110119279B (en) Application and upgrading method and device thereof
CN113805858B (en) Method and device for continuously deploying software developed by scripting language
CN107526838B (en) Method and device for database cluster capacity expansion
CN115167874B (en) Automatic driving software mirror image deployment method and device, electronic equipment and readable medium
CN114157658B (en) Mirror warehouse deployment method, apparatus, electronic device and computer readable medium
US20180341475A1 (en) Just In Time Deployment with Package Managers
CN114070889B (en) Configuration method, traffic forwarding device, storage medium, and program product
CN112181470B (en) Patch deployment method and device
CN111142972B (en) Method, apparatus, system, and medium for extending functions of application program
CN115080077A (en) Plug-in updating method, device, electronic equipment, system and storage medium
CN110445628B (en) NGINX-based server and deployment and monitoring methods and devices thereof
CN114281786B (en) File processing method, device, electronic equipment and storage medium

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