Patent ID: 12260204

DETAILED DESCRIPTION

A software developer may develop program code using a software development environment and then deploy the program code into a test environment for use in testing the program code. The test environment may include one or more virtual guests, such as virtual machines or containers, running on one or more host machines. In some circumstances, the test environment may be designed to mimic a production environment to help the software developer understand how their software might perform in production. Typically, the test environment is remote from the software developer's local machine and separate from the software development environment. For example, the software development environment may be local to the software developer's personal computer and the test environment may include one or more virtual machines running in a cloud computing environment. As a result, the test environment may lack certain characteristics or features that may be present in the software development environment, particularly if the software development environment is native or local to the software developer's personal computer. Such characteristics or features may be referred to herein as software development features. For example, the test environment may lack software packages, source code editors, build automation tools, integrated development environments, plugins, shortcuts, or other software development features that may be present in the software development environment. Differences between the test environment and a software development environment can make it difficult for a software developer to debug or develop their program code in the test environment. For example, the software developer may be familiar with an integrated development environment, editor, or build automation tool that may be present on the software developer's local machine but may not be present in the test environment.

Some examples of the present disclosure can overcome one or more of the abovementioned problems by providing a deployment engine that can automatically replicate aspects of a software development environment that is located on one computing device within a test environment that is located on another computing device. This can provide the test environment with software development features that are present in the software development environment. By using the deployment engine to automatically deploy aspects of the software development environment in the test environment, the software developer may be better equipped to perform debugging and development within the test environment. The automation can also expedite the setup process, so that the software developer does not need to manually set up and configure software development tools in the test environment.

In some examples, the deployment engine can include a container deployment engine, such as Docker, Podman, LXC, Containerd, or any other suitable container deployment engine. Additionally or alternatively, the deployment engine can include a virtual machine (VM) deployment engine such as a hypervisor. Examples of a hypervisor can include Oracle VM VirtualBox, VMware Server and Workstation, Microsoft Virtual PC, KVM, and QEMU. The deployment engine may be modified to include the functionality described herein, in addition to its usual functionality. For example, the deployment engine may include a command line interface for use in deploying a virtual guest on a remote computing device. The command line interface can be modified to accept a new argument (e.g., flag), where the argument can be issued by a user as part of a command to deploy a virtual guest on a remote machine. The virtual guest may be for testing purposes and correspond to a test environment. The argument can be for replicating one or more aspects of a software development environment inside the virtual guest, for example as part of the process for deploying the virtual guest on the remote machine. In response to receiving the argument, the deployment engine can facilitate a process for automatically deploying the virtual guest on the remote machine, such that the virtual guest is configured with one or more characteristics of the software development environment.

In some examples, the deployment engine can determine which features of the software development environment are to be replicated in the virtual guest based on configuration data. The configuration data can characterize aspects and features of the software development environment. For example, the configuration data can describe the software characteristics of the software development environment, such as its packages and libraries. The configuration data can also include settings for the packages and libraries. The configuration data may further include values of environment variables associated with the software development environment.

The development engine can obtain the configuration data in any suitable manner. For example, the deployment engine can read a predefined configuration file associated with the software development environment. The predefined configuration file may be drafted by the software developer or another user. As another example, the user can provide the configuration data to the deployment engine directly. Additionally or alternatively, the deployment engine can perform introspection operations to automatically analyze the characteristics of the software development environment and automatically determine the configuration data.

In some examples, the deployment engine can build an image file based on the configuration data. The deployment engine may automatically build the image file in response to receiving the command with the argument from the user. The image file can be configured for deploying some or all of the software development environment inside the virtual guest on the remote computing device. As noted above, the virtual guest can include a virtual machine or a container that is executable on the remote computing device. In some examples, the deployment engine can use the image file to deploy and configure the virtual guest on the remote computing device. For example, the deployment engine can use the image file to deploy and configure a container (e.g., a Docker container) on the remote computing device so that the container mimics aspects of the software development environment.

These illustrative examples are given to introduce the reader to the general subject matter discussed here and are not intended to limit the scope of the disclosed concepts. The following sections describe various additional features and examples with reference to the drawings in which like numerals indicate like elements but, like the illustrative examples, should not be used to limit the present disclosure.

FIG.1is a block diagram of an example of a system with a deployment engine110for deploying a software development environment116on a target system according to some aspects of the present disclosure. In particular, the deployment engine110can be located on a computing device100, such as a laptop computer, desktop computer, tablet, or mobile device. The computing device100may be a personal computer of a software developer, in some examples. The deployment engine100can receive a command106from a user and, in response, automatically replicate aspects of the software development environment116within a virtual guest122on a remote computing device120.

More specifically, the deployment engine110can receive a command106from a user130via a command line interface112of the deployment engine110. The command106can include a predesignated flag108or other argument for instructing the deployment engine110to replicate a software development environment116that may be local to the computing device100. In response to receiving the command106with the predesignated flag108, the deployment engine110can perform a replication process.

To help with the replication process, the deployment engine110can obtain configuration data117associated with the software development environment116. For example, a user120can be prompted to provide the configuration data117to the deployment engine110. In some examples, the user130can provide the configuration data117to the deployment engine110via the command line interface112. In some examples, the deployment engine110can retrieve the configuration data117from a predefined configuration file102. In some examples, the predefined configuration file102can be stored on the computing device100prior to receiving the command106. In some examples, the deployment engine110may prompt the user120for the location of the predefined configuration file102via the command line interface112. Additionally or alternatively, the deployment engine110can perform an introspection process on the computing device100to determine the configuration data117. The introspection process can involve collecting data from the about a software configuration of the computing device100.

The configuration data117can include characteristics118of the software development environment116. For example, the characteristics118can include values for environment variables associated with the software development environment116. Additionally or alternatively, the characteristics118can include information associated with software packages that are installed on the local version of the software development environment116. In some examples, the characteristics118can include a computing architecture associated with the local version of the software development environment116on the computing device100.

In response to receiving the command106, the deployment engine110can build an image file114based on the configuration data117. In some examples, building the image file114can involve incorporating a set of software components into the image file114. For example, the deployment engine110can determine a set of software components to incorporate into the image file114, and build the image file114by incorporating the software components into the image file114. In some examples, the set of software components can include one or more packages, libraries, data files, directories, or any combination of these. The image file114can be configured for deploying the software development environment116inside a virtual guest122on the remote computing device120. In some examples, the virtual guest122can include a container.

A container can be a relatively isolated virtual environment that can be created by leveraging the resource isolation features of a kernel. The container can be allotted computing resources for executing processes, such as running software programs. Deploying software programs inside containers can help isolate the software programs from one another and provide other benefits. A container can be deployed by a container engine from an image file114, so in some cases the image file114may be referred to as a container image. A container image can be conceptualized as a stacked arrangement of layers in which a base layer is positioned at the bottom and other layers are positioned above the base layer. In some examples, the base layer may include operating system files for deploying a guest operating system inside the container. The guest operating system may be different from the underlying host operating system of the physical machine on which the container is deployed. The other layers may include other libraries, binaries, and configuration files. In some examples, the deployment engine110can build the image file114based on the configuration data117by incorporating one or more layers into the image file114. The layers can include a set of software components and settings selected based on the configuration data117.

Additionally or alternatively, the virtual guest122can include a virtual machine (VM). The virtual machine can be a virtual emulation of a computer system created using software on the remote computing device120in order to emulate the functionality of a separate physical computer. For example, the virtual machine can execute on an operating system, such as Red Hat Enterprise Linux (RHEL). The virtual machine can be allotted an amount of computing resources, such as processing power and memory, that the virtual machine can use to perform operations. The virtual machine can include an operating system that can execute computer programs and provide services for the computer programs. The virtual machine can be deployed by and managed by a hypervisor, or other similar software program. In some examples, the command-line interface112can include a tool for interfacing with the hypervisor. For example, the command-line interface112can include virsh for managing the hypervisor, managing the virtual machine, or managing both.

The image file114can be used to deploy the virtual guest122on the remote computing device120. In some examples, the deployment engine110can cause the computing device100to transmit the image file114to the remote computing device120. The remote computing device120can use the image file114to configure a container or virtual machine on the remote computing device120that has at least some of the characteristics of the software development environment116. In some examples, the remote computing device120can use the image file114to replicate the software development environment116on the remote computing device120. For example, the remote computing device120can use the image file114to generate a copy of the software development environment116on the remote computing device120with the software packages, environment variables, files, and other characteristics118that are present in the software development environment116that is local to the computing device100.

In some examples, the computing device100can manage the deployment process. For example, the computing device100use the image file114to deploy the software development features within the virtual guest122on the remote computing device120. This may involve transmitting one or more commands to the remote computing device120for controlling deployment of the software development features on the remote computing device120.

Once the software development environment116has been replicated on the remote computing device120, the software developer or another user130can access the software development features now present on the remote computing device120. For example, the user130can access the virtual guest122over a network (e.g., the Internet) using a secure shell (SSH) connection or another mechanism. Once the user130has obtained access to the virtual guest122, the user130can use any of the tools, packages, libraries, files, or other software development features that are now present in the virtual guest122. The virtual guest122can be intended to be primarily used for testing purposes, but the ability to perform debugging and further development right inside the virtual guest122can be enhanced by the presence of the additional software development features. For example, a software developer can use testing software within the virtual guest122to test source code. If the testing software detects one or more errors in the source code, the software developer can then leverage the software development tools to assist with debugging.

FIG.2is a block diagram of another example of a system for deploying a software development environment116on a target system according to some aspects of the present disclosure. The system can include a processor202and a memory204. The processor202and memory204can be integrated into a single housing or can be distributed from one another.

The processor202can include one processor or multiple processors. Non-limiting examples of the processor202include a Field-Programmable Gate Array (FPGA), an application-specific integrated circuit (ASIC), and a microprocessor. The processor202can execute instructions206stored in the memory204to perform one or more operations. In some examples, the instructions206can include processor-specific instructions generated by a compiler or an interpreter from code written in any suitable computer-programming language, such as C, C++, C #, and Java.

The memory204can include one memory device or multiple memory devices. The memory204can be volatile or non-volatile, in that the memory204can retain stored information when powered off. Non-limiting examples of the memory204include electrically erasable and programmable read-only memory (EEPROM), flash memory, or any other type of non-volatile memory. At least a portion of the memory device includes a non-transitory computer-readable medium. A computer-readable medium can include electronic, optical, magnetic, or other storage devices capable of providing the processor202with the instructions206or other program code. Non-limiting examples of a computer-readable medium include magnetic disks, memory chips, ROM, random-access memory (RAM), an ASIC, a configured processor, optical storage, or any other medium from which a computer processor can read the instructions206.

In some examples, the memory204can include the deployment engine110. The deployment engine110can include a command line interface112. The deployment engine110can receive a command106via the command line interface112. For example, a user130can input the command106to the command line interface112. The command106can include a pre-designated flag108or other argument for replicating a software development environment116that is local to the computing device100. In some examples, the deployment engine110can deploy the software development environment116inside a virtual guest122of the remote computing device120in response to receiving the command106. For example, the deployment engine110can obtain configuration data117describing characteristics118of the software development environment116. In response to receiving the command106, the deployment engine110can build an image file114based on the configuration data117. The image file114can be configured for deploying the software development environment116inside a virtual guest122on a remote computing device120.

FIG.3is a flow chart of a process for deploying a software development environment116on a target system according to some aspects of the present disclosure. Other examples may include more steps, fewer steps, different steps, or a different order of steps than is shown inFIG.3. The steps ofFIG.3will be described below with reference to the components ofFIG.2described above.

At block302, a deployment engine110executing on a computing device can receive a command106from a user via a command line interface112of the deployment engine110. The command106can include a predesignated flag108(e.g. ‘-r’) or other argument for replicating a software development environment116that is local to the computing device100. The predesignated flag108can be a modifier that can be appended to the command106. For example, the predesignated flag108can be a character or series of characters. The predesignated flag108can modify the command106such that the command106causes the deployment engine110to replicate the software development environment116.

For example, the deployment engine110can include internal program logic that can initiate a process for replicating the software development environment116in response to receiving the command106when the predesignated flag108or other argument is present. The predesignated flag108can be used in conjunction with other arguments or modifiers that can further configure the process of replicating the software development environment116. For example, the predesignated flag108can be used in conjunction with a verbose flag for causing the command line interface112to display information that may be associated with the process of replicating the software development environment116while the software development environment116is being replicated.

At block304, the deployment engine110obtains configuration data117describing characteristics118of the software development environment116. For example, the configuration data117can be stored in a predefined configuration file102. The predefined configuration file102can be generated prior to the execution of the command106. In some examples, the predefined configuration file102can be a text file, or a file of any other suitable file format that is capable of containing structured data. In some examples, the predefined configuration file102can include a lightweight data interchange format, such as JSON. Additionally or alternatively, the predefined configuration file can include a data serialization language, such as YAML. In some examples, the configuration data117can include environment variables associated with the software development environment116. For example, the configuration data117may include key-value pairs that can include the variables and their respective values. In some examples, the user130can be prompted to enter the configuration data117manually via the command line interface112. Additionally or alternatively, the configuration data117can include information associated with software packages that are installed on the local software development environment116or any other suitable characteristics118that are associated with the local software development environment116.

For example, the configuration data117can include a list of software packages that are installed on the local software development environment116. The deployment engine110can use the list of software packages to instruct the remote computing device120to initiate a download or a series of downloads for receiving the software packages. Alternatively, the deployment engine110can cause the computing device100to transmit the software packages directly to the remote computing device120. Once the remote computing device120has received the software packages, the remote computing device120can install the software packages. The characteristics118can also include hardware characteristics, operating system characteristics, a computing architecture, or other information associated with the software development environment116.

At block306, the deployment engine110builds an image file114based on the configuration data117, in response to receiving the command. The image file114can be configured for deploying the software development environment116inside a virtual guest on a remote computing device120. For example, the computing device120can incorporate a software package or a series of software packages into the image file114in order to build the image file114. Building the image file114can involve incorporating the contents of one or more software packages into a tarball or any other suitable file format that can incorporate a collection of several files into one file. Once the image file114has been built, the computing device100can transmit the image file114to the remote computing device120. Prior to transmitting the image file114, the computing device can compress the contents of the image file114to decrease a file size associated with the image file. For example, the image file114can be contained within a zip file or other suitable compressed data format. The remote computing device120can include programs or software for decompressing the image file114once it has been received.

The remote computing device120can deploy the software development environment116on the virtual guest122of the remote computing device120based on the contents of the image file114. For example, the software development environment116can include software packages, programs, environment variables, text editors, or any other suitable features or characteristics118that are specified in the image file114.

The foregoing description of certain examples, including illustrated examples, has been presented only for the purpose of illustration and description and is not intended to be exhaustive or to limit the disclosure to the precise forms disclosed. Numerous modifications, adaptations, and uses thereof will be apparent to those skilled in the art without departing from the scope of the disclosure. For instance, any examples described herein can be combined with any other examples to yield further examples.