[go: up one dir, main page]

CN113064698A - Method for providing product environment and corresponding device, system, equipment and medium - Google Patents

Method for providing product environment and corresponding device, system, equipment and medium Download PDF

Info

Publication number
CN113064698A
CN113064698A CN202110368272.7A CN202110368272A CN113064698A CN 113064698 A CN113064698 A CN 113064698A CN 202110368272 A CN202110368272 A CN 202110368272A CN 113064698 A CN113064698 A CN 113064698A
Authority
CN
China
Prior art keywords
virtual machine
environment
machine
configuration
template
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110368272.7A
Other languages
Chinese (zh)
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.)
Beijing Yuannian Technology Co ltd
Original Assignee
Beijing Yuannian Technology 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 Beijing Yuannian Technology Co ltd filed Critical Beijing Yuannian Technology Co ltd
Priority to CN202110368272.7A priority Critical patent/CN113064698A/en
Publication of CN113064698A publication Critical patent/CN113064698A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • G06F9/4451User profiles; Roaming
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45562Creating, deleting, cloning virtual machine instances

Landscapes

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

Abstract

Methods for providing a production environment and corresponding apparatuses, systems, devices, and media are provided. The method comprises the following steps: generating a virtual machine having an initial environment on an available physical machine in response to a triggering event associated with creating a production environment; accessing a virtual machine such that at least one command to be executed in a predetermined order indicated by a machine-readable portal profile is executed on the virtual machine to create a production environment on the virtual machine, execution of the at least one command in the predetermined order resulting in a change to an initial environment on the virtual machine required to generate the production environment from the initial environment, wherein the triggering event indicates a configuration requirement of the production environment, the virtual machine and the machine-readable portal profile being generated based on the configuration requirement. The scheme of the invention can improve the efficiency of creating product environment, is beneficial to rapidly and stably providing various expected product environments according to the requirement, and creates conditions for conveniently and efficiently copying and transplanting specific product environment.

Description

Method for providing product environment and corresponding device, system, equipment and medium
Technical Field
The present invention relates to the field of computer software development, and more particularly to a method for providing a production environment, and corresponding apparatus, system, computer device and medium.
Background
Today, for software development, the production environment is a resource necessary for personnel in each stage of design, development, test, release, delivery, and the like. People in different roles need to use respective customized environments, and even different people in the same role need different respective environments. Due to the numerous personnel and links involved in the whole software life cycle, how to quickly and stably provide various environments on demand is a difficult point in the industry, which is particularly obvious when the requirement of high-frequency iteration of software development is met.
The existing product environment development and supply schemes are mainly divided into two categories: a physical host-based environment provisioning scheme; an environment provisioning scheme based on virtualization technology. For the environment supply scheme based on the physical host, the development cycle is long, the configuration process is complex, the configuration needs to be performed in sequence from a hardware level, a system level, a software level and an application level, and the copy and the transplantation of the customized environment are difficult to realize. The environment provisioning solution based on virtualization technology solves the problem of physical host virtualization, but for higher level customization, it needs to be configured in a way based on manual operation. With the large environmental demands, manual configuration is still inefficient.
Disclosure of Invention
It is an object of the present invention to provide a solution that solves or alleviates at least some of the above mentioned problems.
Specifically, according to a first aspect of the present invention, there is provided a method for providing a product environment, comprising:
generating a virtual machine on an available physical machine in response to a triggering event associated with creating a production environment, wherein the virtual machine has an initial environment; and
accessing the virtual machine such that at least one command to be executed in a predetermined order indicated by a machine-readable portal profile is executed on the virtual machine to create the production environment on the virtual machine, wherein the at least one command is derived by parsing the machine-readable portal profile, execution of the at least one command in the predetermined order resulting in a change to the initial environment on the virtual machine required to generate the production environment from the initial environment,
wherein the triggering event indicates a configuration requirement of the production environment, the virtual machine and the machine-readable portal configuration file being generated based on the configuration requirement.
According to a second aspect of the present invention, there is provided an apparatus for providing a production environment, the apparatus comprising a processor configured to execute computer instructions to:
generating a virtual machine on an available physical machine in response to a triggering event associated with creating a production environment, wherein the virtual machine has an initial environment; and
accessing the virtual machine such that at least one command to be executed in a predetermined order indicated by a machine-readable portal profile is executed on the virtual machine to create the production environment on the virtual machine, wherein the at least one command is derived by parsing the machine-readable portal profile, execution of the at least one command in the predetermined order resulting in a change to the initial environment on the virtual machine required to generate the production environment from the initial environment,
wherein the triggering event indicates a configuration requirement of the production environment, the virtual machine and the machine-readable portal configuration file being generated based on the configuration requirement.
According to a third aspect of the present invention, there is provided a system for providing a product environment, comprising: the apparatus for providing a product environment described above; and, the available physical machines.
According to a fourth aspect of the present invention, there is provided a computer device comprising a memory and a processor, the memory having stored thereon computer instructions which, when executed by the processor, cause the method for providing a production environment described above to be performed.
According to a fifth aspect of the present invention, there is provided a non-transitory computer readable storage medium having stored thereon computer instructions which, when executed by a processor, cause the method for providing a production environment described above to be performed.
With the solution of the present invention, after the virtual machine is generated, the virtual machine can be automatically configured based on the machine-readable portal configuration file to create a desired production environment. Thus, the efficiency of creating a product environment can be improved, it is advantageous to provide various desired product environments quickly and stably as needed, and conditions are created for reproducing and transplanting a specific product environment conveniently and efficiently.
Drawings
Non-limiting and non-exhaustive embodiments of the present invention are described by way of example with reference to the following drawings, in which:
FIG. 1 is a flow diagram that schematically illustrates a method for providing a product environment, in accordance with an embodiment of the present invention; and
fig. 2 schematically shows a system comprising the apparatus for providing a production environment of the present invention.
Detailed Description
In order to make the above and other features and advantages of the present invention more apparent, the present invention is further described below with reference to the accompanying drawings. It is understood that the specific embodiments described herein are for purposes of illustration only and are not intended to be limiting.
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present invention. However, it will be apparent to one of ordinary skill in the art that the specific details need not be employed to practice the present invention. In other instances, well-known steps or operations are not described in detail to avoid obscuring the invention.
The general concept of the invention is as follows: and converting the operation of manually configuring the product environment into the operation of automatically configuring the virtual machine by utilizing the machine readable configuration file based on the virtual machine technology.
FIG. 1 schematically illustrates a method 100 for providing a product environment in accordance with an embodiment of the invention. The method 100 may include step S101 and step S102.
In step S101, a virtual machine is generated on an available physical machine in response to a triggering event associated with creating a production environment. The generated virtual machine may have an initial environment. The triggering event may indicate a configuration requirement of the production environment. Virtual machines may be generated based on the configuration requirements.
Herein, the term "physical machine" is a reference to a physical computer, processor, or server, with respect to a virtual machine. A physical machine may provide a hardware environment for a virtual machine, and should be broadly understood to encompass various possible forms of electronic devices, such as computers, processors, servers, etc., capable of providing the necessary hardware resources and processing power.
In step S102, accessing the virtual machine causes at least one command indicated by a machine-readable entry profile to be executed in a predetermined order to be executed on the virtual machine to create the production environment on the virtual machine. The machine-readable portal configuration file may be generated based on the configuration requirements. Here, the at least one command may be obtained by parsing the machine-readable portal configuration file. Execution of the at least one command in the predetermined order results in a change to the initial environment on the virtual machine that is required to generate the production environment from the initial environment. The product environment ultimately runs within this virtual machine.
The execution body of the method of the invention may be or be located on a further physical machine adapted to communicate with the above-mentioned available physical machine. The triggering event may occur in response to an input to the execution principal or another physical machine. Further, it is possible that the execution body or the physical machine in which it is located comprises the above-mentioned available physical machine, i.e. the latter is part of the former. For convenience of description, the execution subject or the physical machine on which the execution subject is located may also be referred to as a "host", and the available physical machine may also be referred to as a "physical server".
In step S101, the host may identify and allocate an available physical machine for creating a virtual machine based on the configuration requirement, find or generate a mirror template for creating a virtual machine based on the configuration requirement, and create a virtual machine on the available physical machine using the mirror template via a virtualization tool. The virtualization tool may be located on one of the host and the physical server, or on a third party physical machine. The host may communicate with the physical server via a network interface provided by the virtualization appliance. "mirroring" is a form of file storage that is a type of redundancy, where data on one disk has an identical copy on another disk, i.e., mirroring. Multiple files may be made into one image file. Herein, the terms "mirror template" and "mirror" are used interchangeably to mean a collection of files that can be used to generate a virtual machine based on virtualization technology. The mirror template may be stored in a library of virtual machine mirror templates. As desired, a particular virtual machine image template may be selected and invoked from a library of virtual machine image templates for creating a corresponding virtual machine. Such a library of virtual machine image templates may be configured to be accessible and/or operable by a host and/or virtualization tool.
In step S101, after the physical server for creating the virtual machine is allocated and the mirror template for creating the virtual machine is obtained, the host may generate a command for creating the virtual machine, and the network interface calling the virtualization tool executes the command for creating the virtual machine on the physical server according to the mirror template, thereby implementing the creation of the virtual machine on the physical server. In the case of creating a virtual machine using a virtualization tool, the host needs to provide an image template for creating the virtual machine, including relevant parameters (e.g., parameters at a hardware level and/or parameters at an operating system level, etc.) as input, to an interface of the virtualization tool in the form of a command to create the virtual machine, so that the virtualization tool can create the virtual machine accordingly. After the virtual machine creation is completed, the virtual machine may be operated and configured, such as software installation, configuration, and the like.
After the virtual machine creation is completed, step S102 may be performed. At step S102, the host may start the virtual machine and log in and access the virtual machine to cause the virtual machine to execute the executable commands indicated by the machine-readable entry profile, thereby creating the production environment on the virtual machine. The host may start the virtual machine by calling a command to start the virtual machine, and may additionally record an IP address of the virtual machine when the virtual machine is started, and then may log in and access the virtual machine by inputting the IP address. In addition, a user account and a password may be created for a user applying for a product environment, so that the user may log in and access the virtual machine by inputting the IP address of the virtual machine and the corresponding user account and password, use the product environment created in the virtual machine, such as performing a product test, and the like.
The portal configuration file may be parsed on the host machine and the executable commands derived therefrom are then provided to the virtual machine for execution on the virtual machine. Alternatively, the portal configuration file may be provided to the virtual machine, parsed and translated by the virtual machine into executable commands, and then executed.
In one embodiment, aspects of the invention relate to a host, a physical server, and a third party physical machine as described above. This is illustrated in fig. 2, showing: a host 201 adapted to perform the method of the present invention or comprising an execution body adapted to perform the method of the present invention as an example given to the host; a physical server 202 on which a virtual machine VM is created as an example of the physical server; and, as an example of the third-party physical machine, the third-party physical machine 203 on which the virtualization tool 2031 is installed. Host 201, physical server 202, and third party physical machine 203 are communicatively coupled to each other. The physical server 202 may include a processor and is capable of providing a hardware environment for generating virtual machine VMs thereon.
Although it is described above that the virtualization tool 2031 is installed on the third-party physical machine 203, it is possible that the virtualization tool is installed on the host 201 or the physical server 202 as long as the virtualization tool can cooperate with the host 201 to generate a virtual machine on the physical server 202 and manage the virtual machine generated based on the physical server 202.
The host computer can be in butt joint with a virtualization platform where a third-party physical machine is located, so that parameters and configuration (such as system software, application software and the like) related to a product environment can be adjusted through the virtualization platform in a command mode without using an operation interface of the virtualization platform. In addition, by creating virtual machines using virtualization tools, the requirements and configurations of the physical level required to provide a production environment (e.g., requirements and configurations in terms of underlying physical devices, power supplies, racks, wiring, etc.) can be met by pre-configuring the virtualization tools by the host, and environment developers need not consider these, but need only focus on the virtual machines. Such pre-configuration of the virtualization tool by the host may be accomplished using a variety of possible techniques and instrumentalities, including those known in the art, and will not be described in detail herein.
The trigger event may occur in various possible ways, and may take various possible forms, depending on the circumstances.
In one embodiment, the triggering event includes the host receiving an environment application from a user, the environment application indicating configuration requirements of the production environment.
The configuration requirements may be represented by configuration requirements information, which may include: hardware configuration information defining a hardware configuration of the production environment, operating system configuration information defining an operating system configuration of the production environment, software configuration information defining a software configuration of the production environment. Here, "software configuration information" should be understood broadly to encompass a variety of information relating to the software configuration of a desired product environment, including software configuration-related information relating to a particular software product for which the product environment is intended, such as the software on which the particular software product depends, the code file for the particular software product, the version number of the particular software product, and so forth. Herein, a "software product" is to be understood broadly as encompassing a variety of possible software-based implementation products, such as applications, software-based tools, software-based business systems, such as websites, etc.
The triggering event may occur, for example, when one or more of the selectable configuration items are selected by a user. In this case, the configuration requirement information is indicated by the selected configuration item. Alternative configuration items may be pre-set, may be presented by the host, and may include, for example and without limitation: one or more hardware configuration items associated with a hardware configuration, one or more operating system configuration items associated with an operating system configuration, one or more software configuration items associated with a software configuration, one or more image template items defining a virtual machine image template, one or more template profile items defining a machine-readable template profile, one or more portal profile items defining a machine-readable portal profile, and/or any combination thereof. The hardware configuration items may indicate hardware resources, such as names, specifications, and/or other possible information of the hardware resources, which may include, for example and without limitation: a CPU (central processing unit) 2 core, a CPU 4 core, and the like; memory 2G, memory 4G, memory 8G, etc.; hard disk 128G, hard disk 256G, etc. The operating system configuration items may indicate the type and possible version of the operating system, etc., and may include, for example but not limited to: CentOS7, Linux, Windows7, etc. The software configuration item may indicate the name and possible version of the software, etc., and may include, for example but not limited to: mysql8, tomcat 1.0, etc. The mirror template entry may indicate the name of the mirror template used to generate the virtual machine and possibly related information, which may include, for example and without limitation: a CentOS template, a Windows7 template, a Mysql template, a product A server template, a product B server template, a file server template, and the like. The machine-readable template profile entry may indicate a name of the template profile, an operation corresponding to a template command included in the template profile or a function to be performed, and possibly related information, and may include, for example and without limitation: template configuration file A-creates a virtual machine of CPU 2 core, memory 8G, hard disk 256G, CentOS 7; template configuration file B-install mysql 8; template configuration file C-install tomacat 1.0; d, downloading a product code and deploying the product code by using a template configuration file; and the like. Each template profile may include one or more template commands, and different template profiles may include different template commands. The portal profile entry may indicate the name of the machine-readable portal profile for the virtual machine, possible descriptions of the machine-readable portal profile, and other relevant information, which may include, for example but not limited to: portal configuration file X-portal file, reference template configuration file A, B; portal configuration file Y-portal file, reference template configuration file A, B, C, D; the method comprises the following steps of (1) installing mysql8, installing tomacat 1.0, downloading a product code and deploying an entry configuration file Z-entry file; and the like. Depending on the case, a single machine-readable template profile may constitute one machine-readable portal profile, or one machine-readable portal profile may include or reference one or more machine-readable template profiles. For each machine-readable template profile, the machine-readable entry profile may indicate the template commands included in the machine-readable template profile by including or referencing the machine-readable template profile. In a similar manner, one machine-readable portal profile may include or reference another machine-readable portal profile. The template configuration file is set to record and include the template command, so that the multiplexing of the common configuration operation command under different scenes and different requirements can be realized conveniently by designing the structure and the dependency relationship of the configuration file, and the efficiency and the convenience of generating the entry configuration file are improved.
According to a possible first embodiment, part of the configuration requirement information is indicated by a mirror template, for example when the alternative configuration items include a mirror template item indicating the mirror template. In this case, generating the virtual machine may include: generating the virtual machine directly based on the mirror image template. At this time, the initial environment is defined by the mirror template, and the machine-readable portal configuration file may be generated based on the remaining configuration requirement information.
According to a possible second embodiment, generating the virtual machine may comprise: and generating a mirror image template based on part of the configuration requirement information and generating the virtual machine based on the mirror image template. At this time, the initial environment is defined by the mirror template, and the machine-readable configuration file may be generated based on the remaining configuration requirement information.
The first embodiment corresponds to a case where there is a required mirror template available. The second embodiment corresponds to a case where there is no available required mirror image template, and at this time, a mirror image template may be generated based on part of the configuration requirement information, and then the virtual machine may be generated based on the mirror image template. Here, "part of the configuration requirement information" refers to a part of the configuration requirement information of the product environment, and may include the hardware configuration information in the configuration requirement information, or include the hardware configuration information and the operating system configuration information in the configuration requirement information, or include the hardware configuration information, the operating system configuration information, and part of the software configuration information in the configuration requirement information. The "remaining configuration requirement information" refers to configuration requirement information of the product environment, except for configuration requirement information for generating the virtual machine image template.
By way of illustration only and not limitation, one specific embodiment is provided herein in which the user's desired configuration requirements of the product environment are as follows: CPU 2 core, memory 8G, hard disk 256G, operating system CentOS7, software mysql8 and tomcat 1.0.
According to a possible first scenario, the configuration requirement may be indicated by a user selection of the following alternative configuration items: hardware configuration items: CPU 2 core, memory 8G, hard disk 256G; operating system configuration items: operating system CentOS 7; software configuration item: software mysql8, tomcat 1.0. In this case, the method of the present invention may include: finding a mirror template (such as a CentOS7 template) in an existing mirror template library, wherein the mirror template matches the hardware configuration and the operating system configuration indicated by the selected hardware configuration item and the selected operating system configuration item, or automatically generating a mirror template based on the hardware configuration and the operating system configuration indicated by the selected hardware configuration item and the selected operating system configuration item; a machine-readable portal configuration file is automatically generated based on the software configuration indicated by the selected software configuration item. The machine-readable entry profile may indicate the following commands executed in order: install mysql8, install tomacat 1.0, download the product code and deploy to the specified directory of the virtual machine. The method may further comprise: finding an available physical server from the currently available physical server resources based on the hardware configuration and the operating system configuration indicated by the selected hardware configuration item and the operating system configuration item; invoking a network interface of a virtualization tool, such as a Vsphere tool, to execute a command to create a virtual machine using the found or generated mirror template; after the virtual machine is established, calling a command for starting the virtual machine to start the virtual machine; logging in and accessing the virtual machine causes the commands indicated by the machine-readable portal profile to be executed on the virtual machine to create the desired production environment. The IP address of the virtual machine may be recorded when the virtual machine is started, and then the virtual machine may be logged in and accessed by entering the IP address. In addition, a user account and password may be created for a user who applies for a product environment so that the user can log in and use the virtual machine by inputting the IP address of the virtual machine and the user account and password.
According to a second possible scenario, the configuration requirement may be indicated by a user selection of the following alternative template file configuration items: template configuration file A-creates a virtual machine of CPU 2 core, memory 8G, hard disk 256G, CentOS 7; template configuration file B-install mysql 8; template configuration file C-install tomacat 1.0; the template configuration file D-downloads the product code and deploys. In this case, the method of the present invention may include: finding a mirror template (e.g., CentOS7 template) in an existing mirror template library that matches the hardware configuration and operating system configuration indicated by the selected template configuration file A, or automatically generating a mirror template based on the hardware configuration and operating system configuration indicated by the selected template configuration file A; a machine-readable portal configuration file is automatically generated based on the software configuration indicated by the selected template configuration file B, C, D. The machine-readable portal configuration file may include or reference the template configuration file B, C, D to indicate the following template commands to be executed in order: install mysql8, install tomacat 1.0, download the product code and deploy to the specified directory of the virtual machine. At this point, the three commands, i.e., the command to install mysql8, the command to install tomcat 1.0, the command to download the product code and deploy the product code, constitute the at least one command to be executed on the virtual machine to create the product environment as described above. The three commands are dispersed among three different machine-readable template profiles as template commands. Further steps, aspects and details may refer to the description above regarding the first scenario.
According to a possible third scenario, the configuration requirement may be indicated by a user selection of the following alternative configuration items: mirror template configuration item-CentOS 7 template (for creating a virtual machine of CPU 2 core, memory 8G, hard disk 256G, CentOS 7); template profile entry: the template configuration file B, C, D described above. In this case, the method of the present invention may include: a machine-readable portal configuration file is automatically generated based on the software configuration indicated by the selected template configuration file B, C, D. The machine-readable portal configuration file may include or reference the template configuration file B, C, D to indicate the following template commands to be executed in order: install mysql8, install tomacat 1.0, download the product code and deploy to the specified directory of the virtual machine. The virtual machine may be created directly with the selected mirror template, i.e., the CentOS7 template, by calling a network interface of a virtualization tool, such as a Vsphere tool. Further steps, aspects and details may refer to the description above regarding the first scenario and the second scenario.
It may be advantageous to incorporate a portion of the software configuration information included with the configuration requirement information into the mirror template. For example, when a particular software product requires multiple similar application scenarios or software environments, a software configuration that is common to the multiple similar application scenarios or software environments may be incorporated into the mirror template. In this manner, a mirror template generated for a first application scenario or software environment may be used to generate a virtual machine for a similar second application scenario or software environment, and then minimal commands and operations are executed on the generated virtual machine to cause the required changes from the first application scenario or software environment to the second application scenario or software environment, thereby improving environment creation efficiency.
In addition, the virtual machine that has been generated in response to the user application and has had the end product environment desired by the user may be used as an image in its entirety for subsequent environment creation. For example, as the version of the software product is updated or the product is adjusted, the configuration upgrade may need to be performed on the virtual machines generated historically as needed, and at this time, the environment state can be unified by performing incremental change on the older virtual machines. The modifications may be to the operating system, system software, application software, and the like. As another example, when two versions of the same software product need to be tested for application environments, it may be possible to create an environment for the newer version by making incremental configuration upgrades based on the environment required by the older version. Of course, the mirroring, creation environment may also be generated separately for each version.
In any applicable case, the generated image template may optionally be added to a library of virtual machine image templates for later selection and use as needed.
Alternatively, a unified machine-readable environment configuration requirements file may be generated based on configuration requirements information for the production environment, such as the selected configuration items. In this case, the "part of the configuration requirement information" described above (i.e., the configuration requirement information for generating the virtual machine image template) may be extracted from the machine-readable environment configuration requirement file for the generation of the virtual machine, and the "remaining part of the configuration requirement information" described above (i.e., the configuration requirement information other than the configuration requirement information for generating the virtual machine image template) may be extracted as or for the generation of the machine-readable portal configuration file.
In another embodiment, the triggering event may include the host receiving a machine-readable environment configuration requirements file. At this time, the configuration requirement information of the product environment may be indicated by the machine-readable environment configuration requirement file, which may indicate hardware configuration information, operating system configuration information, and software configuration information. In this case, part of the configuration requirement information (such as hardware configuration information in the configuration requirement information, or hardware configuration information and operating system configuration information in the configuration requirement information, or hardware configuration information, operating system configuration information and part of software configuration information in the configuration requirement information) may be extracted from the machine-readable environment configuration requirement file for identifying or generating a virtual machine image template to create a virtual machine; the remaining configuration requirement information may be extracted from the machine-readable environment configuration requirement file as or used to generate a machine-readable portal configuration file.
In yet another embodiment, the triggering event may include receiving a user selection of an alternative configuration item (e.g., a hardware configuration item, an operating system configuration item, and/or an image template configuration item, etc.) and receiving a supplemental machine-readable environment configuration requirements file. At this time, the supplementary environment configuration requirement file may indicate one or more of hardware configuration information, operating system configuration information, and software configuration information, as the case may be, as a supplement to the configuration information indicated by the selected configuration item. For example, the selected configuration items may indicate hardware configuration information and operating system configuration information that may be used to generate an image template for virtual machine creation; the supplemental environment configuration requirement file may simply indicate software configuration information that may be used to generate or directly as a machine-readable entry configuration file for the virtual machine.
The machine-readable files described above, including the portal configuration file, template configuration file, environment configuration requirements file described above, may be generated by means of various possible editing tools, and may be organized in a manner corresponding to the particular editing tool used, as defined by the particular editing tool. Such editing tools include, for example and without limitation, various text editing tools such as notepad, notepad + + and the like for the Windows operating system. The machine-readable file may be parsed, interpreted, and transformed using a variety of possible techniques and instrumentalities, including those known in the art, which are not described in detail herein.
The following is an example of one possible machine-readable file, such as an entry profile, x.yml:
Figure BDA0003008283910000111
Figure BDA0003008283910000121
in this example, using standard ymal syntax, x.yml includes references to three template profiles a.yml, b.yml, c.yml. These three template profiles may correspond to template profile A, B, C described above, respectively. At this point, x.yml may be designated as an entry file, thereby indicating that x.yml is an entry profile for the virtual machine. Configuration files that are not designated as portal files, such as template configuration files, are not to be considered as portal configuration files for the virtual machine.
The method of the invention may optionally comprise: a setup is made to an external system, such as a DevOps system, such that after the product environment is created on the virtual machine, the product environment is accessible through the DevOps system and/or a DevOps task from the DevOps system is triggerable on the virtual machine. Such an arrangement may integrate or correlate tasks from external systems (e.g., DevOps tasks from an external DevOps system) into the created virtual machine and product environment. In this manner, triggering tasks from external systems, such as DevOps tasks, in a created production environment can be accomplished without the need to define and develop the tasks themselves. The DevOps system is well known to those skilled in the art and can be used to facilitate communication, cooperation and integration between development, technical operation and quality assurance departments, which will not be described herein.
In one embodiment, the setup for the external DevOps system may proceed as follows: in response to receiving an address of the DevOps system input by a user and a user account and password thereof in the DevOps system, settings are made to enable integration of the DevOps system so that the user can trigger the DevOps task in a created product environment by inputting the address of the DevOps system and the corresponding user account and password in a host and indicating the DevOps task from the DevOps system to be triggered. For example, when a user initiates an environment application, a particular DevOps task to be triggered may be indicated by a task ID indicating the particular DevOps task. Depending on the circumstances, this particular DevOps task may be triggered immediately after the product environment creation is complete or at a particular time node, e.g., specified by a user. Such a DevOps task may be various possible tasks defined and developed in the DevOps system, such as but not limited to: a notification sending task, a mail sending task, an automation testing task, a file backup initiating task and the like. In one embodiment, after the creation of the product environment is completed, a notification is sent to the DevOps system to inform the DevOps system that the product environment has been created in the virtual machine, which may include information needed to enable a user to access and use the product environment via the DevOps system. For example, after the product environment is created, information such as an IP address of the virtual machine, a user account and a password of a user applying for the product environment, etc. may be transmitted to the DevOps system in the form of a notification so that the DevOps system knows that the product environment has been created in the virtual machine, and selectively set up so that the DevOps system runtime user can access and use the product environment, for example, to conduct product testing, by inputting the virtual machine address and the corresponding user account and password in the DevOps system. By providing an integrated interface and an integrated DevOps task aiming at an external DevOps system, automation of a complete process from environment creation, reminding of created environment to environment use can be realized, each stage related to environment requirements in a software product production and development process is flexibly accessed, functions of the existing DevOps system are rapidly expanded, and the capability of an enterprise for providing environment management and configuration management is improved.
The invention may be implemented as an apparatus for providing a production environment comprising a processor configured to execute computer instructions to perform some or all of the steps of the method for providing a production environment of the invention.
Referring to fig. 2, the apparatus according to an embodiment of the present invention may correspond to the host 201 or be located on the host 201, and may have an environment application management module for managing transactions related to the environment application, such as receiving the environment application, managing the environment application, maintaining a record of the environment application, and the like. The environment application record may include various information related to the environment application, such as the environment requirement information, the machine-readable entry profile, the machine-readable environment configuration requirement profile, the IP address of the created virtual machine, the user account and password, etc. The device may also optionally have other modules as desired, such as but not limited to: the environment management module is used for operating and managing the created virtual machine and product environment, for example, starting/stopping the physical server where the virtual machine or virtual machine is located, starting/stopping the operating system, starting/stopping the database software, starting/stopping the application program, refreshing the application program, recovering the product environment and the like; the personnel/role management module is used for creating a user account, deleting the user account, modifying the user account and a password, performing authority management on personnel applying and/or using the product environment and the like; a task integration module for integrating or associating tasks from external systems (such as DevOps tasks from an external DevOps system) into the created virtual machine and the production environment to enable triggering of the tasks in the production environment, for example, after the production environment is created in the virtual machine to complete.
By using the scheme of the invention, the support of the configuration of each layer of the product environment can be provided, including the customization of hardware level, operating system level and software level, including application level.
Compared with the original mode of carrying out environment configuration by manual operation, the method can improve the efficiency of creating the product environment, is beneficial to rapidly and stably providing various expected product environments according to requirements, is convenient for recording, tracing and managing the environment application, and creates conditions for conveniently and efficiently copying and transplanting the specific product environment.
It will be appreciated by persons skilled in the art that the schematic diagram shown in fig. 2 is merely an exemplary illustration of some of the structures associated with the aspects of the present invention and does not constitute a limitation of the computer devices, processors or computer programs embodying the aspects of the present invention. A particular computer device, processor or computer program may include more or fewer components or modules than shown in the figures, or may combine or split certain components or modules, or may have a different arrangement of components or modules.
It should be understood that the various modules/units of the apparatus and system of the present invention may be implemented in whole or in part by software, hardware, firmware, or a combination thereof. The modules/units may be embedded in the processor of the computer device in the form of hardware or firmware or independent from the processor, or may be stored in the memory of the computer device in the form of software for being called by the processor to execute the operations of the modules/units. Each of the modules/units may be implemented as a separate component or module, or two or more modules/units may be implemented as a single component or module.
In one embodiment, a computer device is provided that includes a memory and a processor, the memory having stored thereon computer instructions that, when executed by the processor, cause the method for providing a production environment of the present invention to be performed. The computer device may broadly be a server, a terminal, or any other electronic device having the necessary computing and/or processing capabilities. In one embodiment, the computer device may include a processor, memory, a network interface, a communication interface, etc., connected by a system bus. The processor of the computer device may be used to provide the necessary computing, processing and/or control capabilities. The memory of the computer device may include non-volatile storage media and internal memory. An operating system, a computer program, and the like may be stored in or on the non-volatile storage medium. The internal memory may provide an environment for the operating system and the computer programs in the non-volatile storage medium to run. The network interface and the communication interface of the computer device may be used to connect and communicate with an external device through a network. The computer program, when executed by a processor, performs the steps of the method for providing a production environment of the present invention.
The present invention may be embodied as a computer-readable storage medium having stored thereon computer instructions that, when executed by a processor, cause the method for providing a production environment of the present invention to be performed. In one embodiment, the computer program is distributed across a plurality of computer devices or processors coupled by a network such that the computer program is stored, accessed, and executed by one or more computer devices or processors in a distributed fashion. A single method step/operation, or two or more method steps/operations, may be performed by a single computer device or processor or by two or more computer devices or processors. One or more method steps/operations may be performed by one or more computer devices or processors, and one or more other method steps/operations may be performed by one or more other computer devices or processors. One or more computer devices or processors may perform a single method step/operation, or perform two or more method steps/operations.
It will be understood by those of ordinary skill in the art that all or part of the steps of the method for providing a product environment of the present invention may be directed to relevant hardware, such as a computer device or a processor, by a computer program, which may be stored in a non-transitory computer readable storage medium and when executed, cause the steps of the method for providing a product environment of the present invention to be performed. Any reference herein to memory, storage, databases, or other media may include non-volatile and/or volatile memory, as appropriate. Examples of non-volatile memory include read-only memory (ROM), programmable ROM (prom), electrically programmable ROM (eprom), electrically erasable programmable ROM (eeprom), flash memory, magnetic tape, floppy disk, magneto-optical data storage device, hard disk, solid state disk, and the like. Examples of volatile memory include Random Access Memory (RAM), external cache memory, and the like.
The respective technical features described above may be arbitrarily combined. Although not all possible combinations of features are described, any combination of features should be considered to be covered by the present specification as long as there is no contradiction between such combinations.
While the present invention has been described in connection with the embodiments, it is to be understood by those skilled in the art that the foregoing description and drawings are merely illustrative and not restrictive of the broad invention, and that this invention not be limited to the disclosed embodiments. Various modifications and variations are possible without departing from the spirit of the invention.

Claims (15)

1. A method for providing a product environment, comprising:
generating a virtual machine on an available physical machine in response to a triggering event associated with creating a production environment, wherein the virtual machine has an initial environment; and
accessing the virtual machine such that at least one command to be executed in a predetermined order indicated by a machine-readable portal profile is executed on the virtual machine to create the production environment on the virtual machine, wherein the at least one command is derived by parsing the machine-readable portal profile, execution of the at least one command in the predetermined order resulting in a change to the initial environment on the virtual machine required to generate the production environment from the initial environment,
wherein the triggering event indicates a configuration requirement of the production environment, the virtual machine and the machine-readable portal configuration file being generated based on the configuration requirement.
2. The method of claim 1, wherein the triggering event comprises receiving an environment application from a user, the environment application indicating configuration requirements of the product environment.
3. The method of claim 1 or 2, wherein the configuration requirements are represented by configuration requirement information, the configuration requirement information comprising: hardware configuration information defining a hardware configuration of the production environment, operating system configuration information defining an operating system configuration of the production environment, and software configuration information defining a software configuration of the production environment, wherein,
part of the configuration requirement information is indicated by a mirror image template, wherein the generating of the virtual machine comprises: generating the virtual machine based on the mirror template, wherein the initial environment is defined by the mirror template, and the machine-readable entry profile is generated based on the remaining configuration requirement information; or
Generating the virtual machine includes: generating a mirror image template based on part of the configuration requirement information and generating the virtual machine based on the mirror image template, wherein the initial environment is defined by the mirror image template, and the machine-readable inlet configuration file is generated based on the rest of the configuration requirement information.
4. The method of claim 3, wherein the portion of the configuration requirement information comprises the hardware configuration information, or comprises the hardware configuration information and the operating system configuration information, or comprises the hardware configuration information, the operating system configuration information, and a portion of the software configuration information.
5. The method of claim 1, wherein the at least one command comprises template commands dispersed among one or more machine-readable template profiles, each of the machine-readable template profiles comprising a different template command, wherein, for each of the machine-readable template profiles, the machine-readable entry profile indicates the template commands included in that machine-readable template profile by including or referencing that machine-readable template profile.
6. The method of any of claims 1-5, further comprising:
a setup is made to an external DevOps system such that after the product environment is created on the virtual machine, the product environment is accessible through and/or DevOps tasks from the DevOps system are triggerable on the virtual machine.
7. An apparatus for providing a production environment, comprising a processor configured to execute computer instructions to:
generating a virtual machine on an available physical machine in response to a triggering event associated with creating a production environment, wherein the virtual machine has an initial environment; and
accessing the virtual machine such that at least one command to be executed in a predetermined order indicated by a machine-readable portal profile is executed on the virtual machine to create the production environment on the virtual machine, wherein the at least one command is derived by parsing the machine-readable portal profile, execution of the at least one command in the predetermined order resulting in a change to the initial environment on the virtual machine required to generate the production environment from the initial environment,
wherein the triggering event indicates a configuration requirement of the production environment, the virtual machine and the machine-readable portal configuration file being generated based on the configuration requirement.
8. The apparatus of claim 7, wherein the triggering event comprises receiving an environment application from a user, the environment application indicating configuration requirements of the product environment.
9. The apparatus of claim 7 or 8, wherein the configuration requirements are represented by configuration requirement information, the configuration requirement information comprising: hardware configuration information defining a hardware configuration of the production environment, operating system configuration information defining an operating system configuration of the production environment, and software configuration information defining a software configuration of the production environment, wherein,
part of the configuration requirement information is indicated by a mirror image template, wherein the generating of the virtual machine comprises: generating the virtual machine based on the mirror template, wherein the initial environment is defined by the mirror template, and the machine-readable entry profile is generated based on the remaining configuration requirement information; or
Generating the virtual machine includes: generating a mirror image template based on part of the configuration requirement information and generating the virtual machine based on the mirror image template, wherein the initial environment is defined by the mirror image template, and the machine-readable inlet configuration file is generated based on the rest of the configuration requirement information.
10. The apparatus of claim 9, wherein the portion of the configuration requirement information comprises the hardware configuration information, or comprises the hardware configuration information and the operating system configuration information, or comprises the hardware configuration information, the operating system configuration information, and a portion of the software configuration information.
11. The apparatus of claim 7, wherein the at least one command comprises template commands dispersed among one or more machine-readable template profiles, each of the machine-readable template profiles comprising a different template command, wherein, for each of the machine-readable template profiles, the machine-readable entry profile indicates the template commands included in that machine-readable template profile by including or referencing that machine-readable template profile.
12. The apparatus of any of claims 7-11, wherein the processor is further configured to execute computer instructions to: a setup is made to an external DevOps system such that after the product environment is created on the virtual machine, the product environment is accessible through and/or DevOps tasks from the DevOps system are triggerable on the virtual machine.
13. A system for providing a production environment, comprising: the apparatus of any one of claims 7-12; and, the available physical machines.
14. A computer device comprising a memory and a processor, the memory having stored thereon computer instructions that, when executed by the processor, cause the method of any of claims 1-6 to be performed.
15. A non-transitory computer readable storage medium having stored thereon computer instructions which, when executed by a processor, cause the method according to any one of claims 1-6 to be performed.
CN202110368272.7A 2021-04-06 2021-04-06 Method for providing product environment and corresponding device, system, equipment and medium Pending CN113064698A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110368272.7A CN113064698A (en) 2021-04-06 2021-04-06 Method for providing product environment and corresponding device, system, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110368272.7A CN113064698A (en) 2021-04-06 2021-04-06 Method for providing product environment and corresponding device, system, equipment and medium

Publications (1)

Publication Number Publication Date
CN113064698A true CN113064698A (en) 2021-07-02

Family

ID=76565785

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110368272.7A Pending CN113064698A (en) 2021-04-06 2021-04-06 Method for providing product environment and corresponding device, system, equipment and medium

Country Status (1)

Country Link
CN (1) CN113064698A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114637666A (en) * 2022-02-10 2022-06-17 阿里巴巴新加坡控股有限公司 Cloud computing environment construction method and device, electronic device and computer-readable storage medium
CN116700897A (en) * 2023-06-12 2023-09-05 北京首都在线科技股份有限公司 Method and device for creating computing environment template, computing equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103186407A (en) * 2011-12-28 2013-07-03 鸿富锦精密工业(深圳)有限公司 Virtual machine application system and method
US20150033282A1 (en) * 2013-07-24 2015-01-29 At&T Intellectual Property I.L.P. Decoupling Hardware and Software Components of Network Security Devices to Provide Security Software as a Service in a Distributed Computing Environment
CN104699508A (en) * 2015-03-25 2015-06-10 南京大学 System and method for quickly arranging and updating virtual environment in cloud computing platform

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103186407A (en) * 2011-12-28 2013-07-03 鸿富锦精密工业(深圳)有限公司 Virtual machine application system and method
US20150033282A1 (en) * 2013-07-24 2015-01-29 At&T Intellectual Property I.L.P. Decoupling Hardware and Software Components of Network Security Devices to Provide Security Software as a Service in a Distributed Computing Environment
CN104699508A (en) * 2015-03-25 2015-06-10 南京大学 System and method for quickly arranging and updating virtual environment in cloud computing platform

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114637666A (en) * 2022-02-10 2022-06-17 阿里巴巴新加坡控股有限公司 Cloud computing environment construction method and device, electronic device and computer-readable storage medium
CN116700897A (en) * 2023-06-12 2023-09-05 北京首都在线科技股份有限公司 Method and device for creating computing environment template, computing equipment and storage medium

Similar Documents

Publication Publication Date Title
RU2429529C2 (en) Dynamic configuration, allocation and deployment of computer systems
US20200125352A1 (en) SYSTEMS AND METHODS FOR IMPLEMENTING GOLD IMAGE AS A SERVICE (GIaaS)
US9588752B2 (en) Performing unattended software installation
US5867713A (en) Committing an install plan object for the network installation of application programs
US7530079B2 (en) Managing application customization
US8621419B2 (en) Automating the life cycle of a distributed computing application
US7966612B2 (en) Method, system and computer program for installing shared software components
US9880836B2 (en) System and method for deploying a software program
US20050262501A1 (en) Software distribution method and system supporting configuration management
US9053236B1 (en) Automated directory services test setup utility
US20100325624A1 (en) Method and System for Application Portability
CN109947773A (en) Deploying changes to key schemas in a multitenant database system
KR102214139B1 (en) Management system for cloud infrastructure template
CN110727575B (en) Information processing method, system, device and storage medium
CN107608681A (en) Installation method of operating system, device and server
US9542173B2 (en) Dependency handling for software extensions
CN111737227A (en) Data modification method and system
CN113064698A (en) Method for providing product environment and corresponding device, system, equipment and medium
US10514940B2 (en) Virtual application package reconstruction
CN113760306A (en) Method, device, electronic device and storage medium for installing software
US9760364B2 (en) Checks for software extensions
WO2021174756A1 (en) Application system deployment method and apparatus, and computer device and storage medium
US12093686B2 (en) Code maintenance system
US11500646B1 (en) Tracking heterogeneous operating system installation status during a manufacturing process
CN113031964B (en) Big data application management method, device, 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
RJ01 Rejection of invention patent application after publication

Application publication date: 20210702

RJ01 Rejection of invention patent application after publication