CN112748936B - Service integration method, system, device and storage medium for container - Google Patents

Service integration method, system, device and storage medium for container Download PDF

Info

Publication number
CN112748936B
CN112748936B CN202110068135.1A CN202110068135A CN112748936B CN 112748936 B CN112748936 B CN 112748936B CN 202110068135 A CN202110068135 A CN 202110068135A CN 112748936 B CN112748936 B CN 112748936B
Authority
CN
China
Prior art keywords
service
user
text file
container
configuration data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110068135.1A
Other languages
Chinese (zh)
Other versions
CN112748936A (en
Inventor
冯东来
肖小龙
周光明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ctrip Travel Network Technology Shanghai Co Ltd
Original Assignee
Ctrip Travel Network Technology Shanghai 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 Ctrip Travel Network Technology Shanghai Co Ltd filed Critical Ctrip Travel Network Technology Shanghai Co Ltd
Priority to CN202110068135.1A priority Critical patent/CN112748936B/en
Publication of CN112748936A publication Critical patent/CN112748936A/en
Application granted granted Critical
Publication of CN112748936B publication Critical patent/CN112748936B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • G06F8/63Image based installation; Cloning; Build to order
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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; CALCULATING OR 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/45587Isolation or security of virtual machine instances

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a service integration method, a system, equipment and a storage medium for a container, wherein the method comprises the following steps: receiving service configuration data of a service input by a user; generating text file fragments of the service for constructing mirror images according to the service configuration data and a preset text file template; and constructing a container mirror image based on the text file fragments. The invention can freely select the needed service by the user, thereby meeting the customization demands of different users, ensuring that the service can be shared, increasing the reusability of the service, realizing the one-time configuration and the repeated utilization of the service, avoiding repeated development and improving the efficiency of the configuration of the container service; furthermore, the invention can configure the custom service from the dimension of the environment and the application, thereby effectively solving the storage problem caused by a plurality of images of a plurality of environments.

Description

Service integration method, system, device and storage medium for container
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a service integration method, system, device, and storage medium for a container.
Background
In the conventional virtual machine mode, when a user needs to customize a service, the user basically installs the service on the machine manually, which requires a relatively large amount of time and labor, and the process is complex and is very prone to error. At present, the traditional virtual machine mode gradually shifts to a container deployment mode, and a very convenient user-defined service mode does not exist in the prior art. The existing mode is generally that a user manually operates a container to install services, so that on one hand, the operation is very complicated, on the other hand, each time the services are customized, the services are required to be independently operated, and the reusability of the services cannot be realized.
Disclosure of Invention
Aiming at the problems in the prior art, the invention aims to provide a service integration method, a system, equipment and a storage medium for a container, which can meet the customization demands of different users, ensure that services can be shared, increase reusability, avoid repeated development and improve efficiency.
The embodiment of the invention provides a service integration method for a container, which comprises the following steps:
receiving service configuration data of a service input by a user;
Generating text file fragments of the service for constructing mirror images according to the service configuration data and a preset text file template;
and constructing a container mirror image based on the text file fragments.
In some embodiments, the receiving service configuration data of a service input by a user includes the following steps:
providing a service configuration editing page;
Service configuration data input by a user in a service configuration editing page is received, wherein the service configuration data comprises one or more of a service name, a service type, service description information and a service icon.
In some embodiments, after the providing of the service configuration editing page, the method further includes receiving environment configuration data of the service input by the user in the service configuration editing page;
Generating a text file segment of the service for constructing an image, comprising: and generating a text file segment of the service for constructing the mirror image according to the service configuration data, the environment configuration data and the preset text file template, wherein the text file segment comprises the environment conditions of the service allowed to run.
In some embodiments, after constructing the container image based on the text file segment, the method further comprises the steps of:
when the container is started, judging whether the environment variable when the container is started meets the environment condition that the service defined in the text file fragment allows operation, if so, allowing the service to be started, and otherwise, refusing to start the service.
In some embodiments, constructing a container image based on the text file segments includes the steps of:
Providing a service selection page;
Acquiring selection data of a user for services in the service selection page;
A container image is constructed based on the text file fragments of the user-selected service.
In some embodiments, the providing a service selection page includes providing a service selection page of an application;
The constructing a container image based on the text file segments of the user-selected service includes constructing a container image based on the text file segments of the user-selected service of the respective application.
In some embodiments, the providing the service selection page of the application includes the steps of:
providing an application selection page;
Providing an application service viewing page according to the selection of the user on the application in the application selection page;
Receiving a service editing request of a user;
A service selection page of the user-selected application is provided.
In some embodiments, the service integration method for a container further includes the steps of:
receiving a service query request of a user;
providing a configuration information viewing page of the queried service;
Receiving a service editing request of a user;
providing a service configuration editing page;
Receiving service configuration data and/or environment configuration data updated by a user in a service configuration editing page;
And updating the text file fragments of the service for constructing the mirror image according to the service configuration data and/or the environment configuration data updated by the user and a preset text file template.
The embodiment of the invention also provides a service integration system for the container, which is used for realizing the service integration method for the container, and comprises the following steps:
The data receiving module is used for receiving service configuration data of a service input by a user;
the file generation module is used for generating text file fragments of the service for constructing images according to the service configuration data and a preset text file template;
and the image construction module is used for constructing the container image based on the text file fragments.
In some embodiments, the data receiving module is further configured to provide a service configuration editing page, and receive environment configuration data of a service input by a user in the service configuration editing page;
the file generation module generates a text file segment of the service for constructing an image, including: and generating a text file segment of the service for constructing the mirror image according to the service configuration data, the environment configuration data and the preset text file template, wherein the text file segment comprises the environment conditions of the service allowed to run.
In some embodiments, the system further comprises a service selection module for providing a service selection page and obtaining selection data of a user for a service in the service selection page;
The image construction module constructs a container image including constructing the container image from text file fragments of a service selected by a user.
In some embodiments, the service selection module is configured to provide a service selection page for an application; the image construction module constructs a container image based on the text file segments, including constructing a container image based on text file segments of a user-selected service of each application.
The embodiment of the invention also provides service integration equipment for the container, which comprises the following steps:
A processor;
A memory having stored therein executable instructions of the processor;
wherein the processor is configured to perform the steps of the service integration method for a container via execution of the executable instructions.
The embodiment of the invention also provides a computer readable storage medium for storing a program which, when executed by a processor, implements the steps of the service integration method for containers.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
The service integration method, system, equipment and storage medium for the container have the following beneficial effects:
The invention can freely select the needed service by the user, thereby meeting the customization demands of different users, ensuring that the service can be shared, increasing the reusability of the service, realizing the one-time configuration and the repeated utilization of the service, avoiding the repeated development and improving the efficiency of the configuration of the container service. Furthermore, the invention can configure the custom service from the dimension of the environment and the application, and can realize the problem of single mirror image and multiple environments through the environment variable, and for the same service, only one text file fragment is needed to be stored, and the text file fragments are not needed to be stored for multiple environments respectively, thereby effectively solving the storage problem caused by multiple mirrors of multiple environments.
Drawings
Other features, objects and advantages of the present invention will become more apparent upon reading of the detailed description of non-limiting embodiments, made with reference to the following drawings.
FIG. 1 is a flow chart of a service integration method for a container according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a service selection page according to an embodiment of the invention;
FIG. 3 is a schematic diagram of a service configuration editing page according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of a service selection page of an application of an embodiment of the invention;
FIG. 5 is a schematic diagram of a service integration system for containers according to one embodiment of the invention;
FIG. 6 is a schematic diagram of a service integration apparatus for a container according to an embodiment of the present invention;
Fig. 7 is a schematic structural view of a computer-readable storage medium according to an embodiment of the present invention.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. However, the exemplary embodiments may be embodied in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of the example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
Furthermore, the drawings are merely schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus a repetitive description thereof will be omitted. Some of the block diagrams shown in the figures are functional entities and do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in software or in one or more hardware modules or integrated circuits or in different networks and/or processor devices and/or microcontroller devices.
The flow diagrams depicted in the figures are exemplary only and not necessarily all steps are included. For example, some steps may be decomposed, and some steps may be combined or partially combined, so that the order of actual execution may be changed according to actual situations.
As shown in fig. 1, an embodiment of the present invention provides a service integration method for a container, including the steps of:
s100: receiving service configuration data of a service input by a user;
s200: generating text file fragments of the service for constructing mirror images according to the service configuration data and a preset text file template;
The preset text file template is a pre-defined Dockerfile template, and the service configuration data is filled into the Dockerfile template, namely Dockerfile fragments of the service are generated; dockerfile is a text file for constructing a mirror image, where the text content includes a piece of instruction and description required for constructing the mirror image;
s300: and constructing a container mirror image based on the text file fragments.
By adopting the invention, the user can carry out the self-defined configuration on the service according to the own needs, after the service configuration data of the service input by the user is received through the step S100, dockerfile fragments for constructing the mirror image can be generated through the step S200 according to the preset Dockerfile template, and then the step S300 can realize the construction of the customized container mirror image. Therefore, the invention can freely select the needed service by the user, thereby meeting the customization demands of different users, ensuring that the service can be shared, increasing the reusability of the service, realizing the one-time configuration and the repeated utilization of the service, avoiding repeated development and improving the efficiency of the configuration of the container service.
The step S100 and the step S200 may be implemented locally in the user terminal, and after the Dockerfile fragment is obtained in the step S200, the Dockerfile fragment may be uploaded to a server side of a service integration system for a container, and the server side constructs a Docker container image based on the text file fragment.
In this embodiment, the step S100: receiving service configuration data of a service input by a user, comprising the following steps:
providing a service configuration editing page, for example, as shown in fig. 3, when a user creates a service, the user needs to configure service configuration data related to the service at the same time;
Service configuration data input by a user in a service configuration editing page is received, and as shown in fig. 3, the service configuration data includes one or more of a service name, a service type, service description information and a service icon. The service configuration data may further include setting a showcase mode, and if the showcase setting mode is selected, the service is only used for propaganda display after being opened, and the application cannot open the service. The service description information includes a description of a function of the service or an application limit of the service for providing guidance to a user in a subsequent selection of the service.
Furthermore, the invention can configure the custom service from the dimension of the environment and the application, and can realize the problem of single mirror image and multiple environments through the environment variable, and for the same service, only one text file fragment is needed to be stored, and the text file fragments are not needed to be stored for multiple environments respectively, thereby effectively solving the storage problem caused by multiple mirrors of multiple environments.
The manner in which the custom services are configured from the dimensions of the environment in the present invention is first described below.
As shown in fig. 3, the service configuration editing page further includes an environment configuration editing box, in which a user can perform a component of environment information of an application allowed by the service. Therefore, after the service configuration editing page is provided, the method further comprises the step of receiving the environment configuration data of the service input by the user in the service configuration editing page, wherein the environment configuration data is the data input by the user in the environment configuration editing box.
In the step S200, generating a text file segment for constructing an image of the service includes: and generating a text file segment of the service for constructing the mirror image according to the service configuration data, the environment configuration data and the preset text file template, wherein the text file segment comprises the environment conditions of the service allowed to run.
Based on this, in this embodiment, after constructing the container image based on the text file segment, the steps of:
when the container is started, judging whether the environment variable when the container is started meets the environment condition that the service defined in the text file fragment allows operation, if so, allowing the service to be started, and otherwise, refusing to start the service. Therefore, the invention realizes the automatic injection of the container service by opening the custom service from the environment dimension.
According to the invention, the user-defined service is opened from the environment dimension, on one hand, the service can be used in which environments are predefined, and other undefined environments can not be used, so that the selection of different services in different environments can be realized, for example, the environments are divided into a test environment and a production environment, some services can only be applied in the test environment, and some services can only be applied in the production environment, thereby realizing the effective isolation of the test environment and the production environment. On the other hand, as each service is pre-installed in the container mirror image, when the container is started, according to the environment variable at the time of starting, whether the environment needs to start the service or not can be determined, so that the multiplexing of one service in a plurality of environments is realized, the storage problem of multiple environments of a single mirror image is effectively solved, the same mirror image can be stored for different environments, the services executed by the container are different from each other according to different environment variables, and the storage problem caused by multiple mirror images of the environments in the prior art is also effectively solved.
In this embodiment, the step S300: constructing a container image based on the text file segment, comprising the following steps:
Providing a service selection page, for example, as shown in fig. 2, a user may select a service needing to view detailed service configuration information in the service selection page, or may select the service;
acquiring selection data of a user on a service in the service selection page, for example, the user can select to open a certain service or close a certain service in the service selection page, wherein the selection data comprises the service selected to be opened by the user;
A container image is constructed based on the text file fragments of the user-selected service.
Therefore, the invention further provides the user with more convenient service selection function through the visual service selection page, and the user can check the service configuration data of the service according to the own needs to judge whether to open the service. The user can also input a search keyword in a search box above the service selection page to search for services and find the service which the user wants to view.
Therefore, the service integration method for a container further includes the steps of:
Receiving a service query request of a user, wherein the service query request of the user can be input and acquired through a search box above a service selection page shown in fig. 2;
service configuration data and environment configuration data of the queried service are queried, and configuration information viewing pages of the queried service are provided based on the queried data.
If the user needs to edit the service configuration data and the environment configuration data configured previously, for example, change the environment to which the service is applicable, change the description information of the service, etc., the update service configuration data may be further edited. Specifically, after the configuration information of the queried service is provided to view the page, the service integration method for the container further comprises the following steps:
Receiving a service editing request of a user;
Providing a service configuration editing page, wherein the service configuration editing page can adopt an editing page shown in fig. 3, and service configuration data and environment configuration data which are set before can be displayed in each corresponding frame in advance for a user to check and select;
Receiving service configuration data and/or environment configuration data updated by a user in a service configuration editing page;
And updating the text file fragments of the service for constructing the mirror image according to the service configuration data and/or the environment configuration data updated by the user and a preset text file template.
Therefore, the invention not only can provide the configuration editing function of the service configuration data and the environment configuration data when the new service is created, but also can further self-define and update the service configuration data and the environment configuration data of the service according to the need after the service is created, thereby being more convenient and flexible to use and greatly improving the development and test efficiency.
The following describes the opening of a service through an application dimension.
In this embodiment, the providing a service selection page includes providing a service selection page of an application. Specifically, the service selection page for providing the application includes the following steps:
providing an application selection page comprising an application list for a user to select, or providing an application search page for the user to search for the application needing to be configured;
providing an application service viewing page according to the selection of the user on the application in the application selection page; for example, after a user selects a certain application, the existing service in the application is displayed; the user can learn about the services involved in the application by looking at the page; when the application opens a service, the application can only select a preset environment;
Receiving a service editing request of a user;
Providing a service selection page of the application selected by the user, for example, displaying the service selection page as shown in fig. 4, wherein the service names, the service description information, the service icons and the opening buttons which can be selected are displayed, and the user can easily open the corresponding service by clicking the opening buttons, so that the operation is very convenient, and the user-defined service is opened based on the application dimension. .
As shown in fig. 5, an embodiment of the present invention further provides a service integration system for a container, for implementing the service integration method for a container, where the system includes:
A data receiving module M100 for receiving service configuration data of a service input by a user;
the file generation module M200 is used for generating text file fragments of the service for constructing images according to the service configuration data and a preset text file template;
The image construction module M300 is configured to construct a container image based on the text file segment.
By adopting the invention, a user can carry out self-defined configuration on the service according to the own needs, after the data receiving module M100 receives the service configuration data of the service input by the user, the file generating module M200 can generate Dockerfile fragments for constructing the mirror image according to the preset Dockerfile template, and then the mirror image constructing module M300 can realize the construction of the customized container mirror image. Therefore, the invention can freely select the needed service by the user, thereby meeting the customization demands of different users, ensuring that the service can be shared, increasing the reusability of the service, realizing the one-time configuration and the repeated utilization of the service, avoiding repeated development and improving the efficiency of the configuration of the container service.
The service integration system for the container can be realized by adopting a user terminal and a server. The data receiving module M100 and the file generating module M200 may be implemented locally in a user terminal, and after the Dockerfile segments are obtained by the file generating module M200, the Dockerfile segments may be uploaded to a server side of a service integration system for containers, and a mirror image building module M300 at the server side builds a mirror image of a container based on the text file segments.
In this embodiment, the data receiving module M100 receives service configuration data of a service input by a user, including that the data receiving module M100 provides a service configuration editing page, and when a user creates a service, the user needs to configure service configuration data related to the service at the same time; and receiving service configuration data input by a user in a service configuration editing page, wherein the service configuration data comprises one or more of a service name, a service type, service description information and a service icon. The service configuration data may further include setting a showcase mode, and if the showcase setting mode is selected, the service is only used for propaganda display after being opened, and the application cannot open the service.
The service configuration editing page also comprises an environment configuration editing frame, and a user can perform the component of the environment information of the application allowed by the service in the environment configuration editing frame. Therefore, the data receiving module M100 is further configured to receive environment configuration data of a service input by a user in a service configuration editing page.
The file generation module M200 generates a text file fragment of the service for constructing an image, including: and generating a text file segment of the service for constructing the mirror image according to the service configuration data, the environment configuration data and the preset text file template, wherein the text file segment comprises the environment conditions of the service allowed to run.
Based on the above, when the container is started, judging whether the environment variable when the container is started meets the environment condition that the service defined in the text file fragment allows operation, if so, allowing the service to be started, otherwise, refusing to start the service. Therefore, the invention realizes the automatic injection of the container service by opening the custom service from the environment dimension.
According to the invention, the user-defined service is opened from the environment dimension, on one hand, the service can be used in which environments are predefined, and other undefined environments can not be used, so that the selection of different services in different environments can be realized, for example, the environments are divided into a test environment and a production environment, some services can only be applied in the test environment, and some services can only be applied in the production environment, thereby realizing the effective isolation of the test environment and the production environment. On the other hand, as each service is pre-installed in the container mirror image, when the container is started, according to the environment variable at the time of starting, whether the environment needs to start the service or not can be determined, so that the multiplexing of one service in a plurality of environments is realized, the storage problem of multiple environments of a single mirror image is effectively solved, the same mirror image can be stored for different environments, the services executed by the container are different from each other according to different environment variables, and the storage problem caused by multiple mirror images of the environments in the prior art is also effectively solved.
In this embodiment, the system further includes a service selection module M400, configured to provide a service selection page, and obtain selection data of a service in the service selection page by a user. For example, the user may choose to open a service or close a service in a service selection page, where selecting data includes the service the user chooses to open. Therefore, the invention further provides the user with more convenient service selection function through the visual service selection page, and the user can check the service configuration data of the service according to the own needs to judge whether to open the service. The user can also input a search keyword in a search box above the service selection page to search for services and find the service which the user wants to view.
Further, the service selection module M400 is further configured to query service configuration data and environment configuration data of the queried service when receiving a service query request from a user, and provide configuration information of the queried service to view a page based on the queried data. If the user needs to edit the service configuration data and the environment configuration data configured previously, for example, change the environment to which the service is applicable, change the description information of the service, etc., the update service configuration data may be further edited. Specifically, the data receiving module M100 is further configured to receive a service editing request from a user; providing a service configuration editing page; receiving service configuration data and/or environment configuration data updated by a user in a service configuration editing page; and updating the text file fragments of the service for constructing the mirror image according to the service configuration data and/or the environment configuration data updated by the user and a preset text file template.
The image construction module M300 constructs a container image including constructing a container image from text file fragments of a service selected by a user. Therefore, the invention not only can provide the configuration editing function of the service configuration data and the environment configuration data when the new service is created, but also can further self-define and update the service configuration data and the environment configuration data of the service according to the need after the service is created, thereby being more convenient and flexible to use and greatly improving the development and test efficiency.
In this embodiment, the service selection module M400 is configured to provide a service selection page of an application; the image construction module M300 constructs a container image based on the text file segments, including constructing a container image based on text file segments of the user-selected service of the respective application. Specifically, the service selection module M400 provides an application selection page including an application list for the user to select, or provides an application search page for the user to search for the application to be configured; then, an application service viewing page can be provided according to the selection of the application in the application selection page by the user; for example, after a user selects a certain application, the existing service in the application is displayed; the user can learn about the services involved in the application by looking at the page; when an application opens a service, the application can only select a predetermined environment. When the service selection module M400 receives a service editing request of a user; a service selection page of the user-selected application is provided. The image construction module M300 constructs a container image based on the text file segments of the user-selected service, including constructing a container image based on the text file segments of the user-selected service of the respective applications. Thus realizing opening of custom services based on application dimensions.
The embodiment of the invention also provides service integration equipment for the container, which comprises a processor; a memory having stored therein executable instructions of the processor; wherein the processor is configured to perform the steps of the service integration method for a container via execution of the executable instructions.
Those skilled in the art will appreciate that the various aspects of the invention may be implemented as a system, method, or program product. Accordingly, aspects of the invention may be embodied in the following forms, namely: an entirely hardware embodiment, an entirely software embodiment (including firmware, micro-code, etc.) or an embodiment combining hardware and software aspects may be referred to herein as a "circuit," module "or" platform.
An electronic device 600 according to this embodiment of the invention is described below with reference to fig. 6. The electronic device 600 shown in fig. 6 is merely an example, and should not be construed as limiting the functionality and scope of use of embodiments of the present invention.
As shown in fig. 6, the electronic device 600 is in the form of a general purpose computing device. Components of electronic device 600 may include, but are not limited to: at least one processing unit 610, at least one memory unit 620, a bus 630 connecting the different system components (including the memory unit 620 and the processing unit 610), a display unit 640, etc.
Wherein the storage unit stores program code that is executable by the processing unit 610 such that the processing unit 610 performs the steps according to various exemplary embodiments of the present invention described in the service integration method section for containers described above in the present specification. For example, the processing unit 610 may perform the steps as shown in fig. 1.
The memory unit 620 may include readable media in the form of volatile memory units, such as Random Access Memory (RAM) 6201 and/or cache memory unit 6202, and may further include Read Only Memory (ROM) 6203.
The storage unit 620 may also include a program/utility 6204 having a set (at least one) of program modules 6205, such program modules 6205 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of which may include an implementation of a network environment.
Bus 630 may be a local bus representing one or more of several types of bus structures including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or using any of a variety of bus architectures.
The electronic device 600 may also communicate with one or more external devices 700 (e.g., keyboard, pointing device, bluetooth device, etc.), one or more devices that enable a user to interact with the electronic device 600, and/or any device (e.g., router, modem, etc.) that enables the electronic device 600 to communicate with one or more other computing devices. Such communication may occur through an input/output (I/O) interface 650. Also, electronic device 600 may communicate with one or more networks such as a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the Internet, through network adapter 660. The network adapter 660 may communicate with other modules of the electronic device 600 over the bus 630. It should be appreciated that although not shown, other hardware and/or software modules may be used in connection with electronic device 600, including, but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, data backup storage systems, and the like.
In the service integration apparatus for a container, the program in the memory realizes the steps of the service integration method for a container when being executed by the processor, and therefore, the computer storage medium can also obtain the technical effects of the service integration method for a container.
The embodiment of the invention also provides a computer readable storage medium for storing a program which, when executed by a processor, implements the steps of the service integration method for containers. In some possible embodiments, the various aspects of the invention may also be implemented in the form of a program product comprising program code for causing a terminal device to carry out the steps according to the various exemplary embodiments of the invention as described in the service integration method section for containers herein above, when said program product is executed on the terminal device.
Referring to fig. 7, a program product 800 for implementing the above-described method according to an embodiment of the present invention is described, which may employ a portable compact disc read only memory (CD-ROM) and include program code, and may be executed on a terminal device, such as a personal computer. However, the program product of the present invention is not limited thereto, and in this document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium would include the following: an electrical connection having one or more wires, a portable disk, a hard disk, random Access Memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The computer readable storage medium may include a data signal propagated in baseband or as part of a carrier wave, with readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A readable storage medium may also be any readable medium that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of remote computing devices, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., connected via the Internet using an Internet service provider).
The steps of the service integration method for a container are implemented when the program in the computer storage medium is executed by the processor, and therefore, the computer storage medium can also obtain the technical effects of the service integration method for a container described above.
The foregoing is a further detailed description of the invention in connection with the preferred embodiments, and it is not intended that the invention be limited to the specific embodiments described. It will be apparent to those skilled in the art that several simple deductions or substitutions may be made without departing from the spirit of the invention, and these should be considered to be within the scope of the invention.

Claims (6)

1. A service integration method for a container, comprising the steps of:
receiving service configuration data of a service input by a user;
Generating text file fragments of the service for constructing mirror images according to the service configuration data and a preset text file template;
constructing a container mirror image based on the text file segment;
Constructing a container image based on the text file segment, comprising the following steps:
providing an application selection page;
Providing an application service viewing page according to the selection of the user on the application in the application selection page;
Receiving a service editing request of a user;
Providing a service selection page of an application selected by a user;
Acquiring selection data of a user for services in the service selection page;
Constructing a container image based on text file fragments of the user-selected service of each application;
the receiving the service configuration data of a service input by a user comprises the following steps:
providing a service configuration editing page;
receiving service configuration data input by a user in a service configuration editing page, wherein the service configuration data comprises one or more of a service name, a service type, service description information and a service icon;
after the service configuration editing page is provided, the method further comprises the step of receiving environment configuration data of the service input by a user in the service configuration editing page;
Generating a text file segment of the service for constructing an image, comprising: and generating a text file segment of the service for constructing the mirror image according to the service configuration data, the environment configuration data and the preset text file template, wherein the text file segment comprises the environment conditions of the service allowed to run.
2. The service integration method for a container according to claim 1, further comprising the steps of, after constructing a container image based on the text file segments:
when the container is started, judging whether the environment variable when the container is started meets the environment condition that the service defined in the text file fragment allows operation, if so, allowing the service to be started, and otherwise, refusing to start the service.
3. The service integration method for a container according to claim 1, further comprising the steps of:
receiving a service query request of a user;
providing a configuration information viewing page of the queried service;
Receiving a service editing request of a user;
providing a service configuration editing page;
Receiving service configuration data and/or environment configuration data updated by a user in a service configuration editing page;
And updating the text file fragments of the service for constructing the mirror image according to the service configuration data and/or the environment configuration data updated by the user and a preset text file template.
4. A service integration system for a container for implementing the service integration method for a container according to any one of claims 1 to 3, characterized in that the system comprises:
The data receiving module is used for receiving service configuration data of a service input by a user;
the file generation module is used for generating text file fragments of the service for constructing images according to the service configuration data and a preset text file template;
The image construction module is used for constructing a container image based on the text file fragments;
the system also comprises a service selection module, a service selection module and a service selection module, wherein the service selection module is used for providing a service selection page and acquiring selection data of a user on the service in the service selection page;
the image construction module constructs a container image, and the container image is constructed according to text file fragments of the service selected by a user;
The service selection module is used for providing a service selection page of the application; the image construction module constructs a container image based on the text file fragments, including constructing a container image based on text file fragments of the service selected by the user of each application;
the service selection page for providing the application comprises the following steps:
providing an application selection page;
Providing an application service viewing page according to the selection of the user on the application in the application selection page;
Receiving a service editing request of a user;
Providing a service selection page of an application selected by a user;
the data receiving module is configured to receive service configuration data of a service input by a user by adopting the following steps:
providing a service configuration editing page;
Receiving service configuration data input by a user in the service configuration editing page, wherein the service configuration data comprises one or more of a service name, a service type, service description information and a service icon;
The data receiving module is also used for receiving environment configuration data of the service input by the user in the service configuration editing page;
the file generation module generates a text file segment of the service for constructing an image, including: and generating a text file segment of the service for constructing the mirror image according to the service configuration data, the environment configuration data and the preset text file template, wherein the text file segment comprises the environment conditions of the service allowed to run.
5. A service integration apparatus for a container, comprising:
A processor;
A memory having stored therein executable instructions of the processor;
wherein the processor is configured to perform the steps of the service integration method for a container of any one of claims 1 to 3 via execution of the executable instructions.
6. A computer-readable storage medium storing a program, characterized in that the program when executed by a processor implements the steps of the service integration method for containers of any one of claims 1 to 3.
CN202110068135.1A 2021-01-19 2021-01-19 Service integration method, system, device and storage medium for container Active CN112748936B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110068135.1A CN112748936B (en) 2021-01-19 2021-01-19 Service integration method, system, device and storage medium for container

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110068135.1A CN112748936B (en) 2021-01-19 2021-01-19 Service integration method, system, device and storage medium for container

Publications (2)

Publication Number Publication Date
CN112748936A CN112748936A (en) 2021-05-04
CN112748936B true CN112748936B (en) 2024-05-14

Family

ID=75652417

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110068135.1A Active CN112748936B (en) 2021-01-19 2021-01-19 Service integration method, system, device and storage medium for container

Country Status (1)

Country Link
CN (1) CN112748936B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110058863A (en) * 2019-03-16 2019-07-26 平安城市建设科技(深圳)有限公司 Construction method, device, equipment and the storage medium of Docker container
CN110286884A (en) * 2019-06-21 2019-09-27 北京百度网讯科技有限公司 Micro services method of combination, device, equipment and computer readable storage medium
CN112181588A (en) * 2020-09-18 2021-01-05 济南浪潮数据技术有限公司 Application containerization method and device, electronic equipment and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8078671B2 (en) * 2005-09-21 2011-12-13 Sap Ag System and method for dynamic web services descriptor generation using templates

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110058863A (en) * 2019-03-16 2019-07-26 平安城市建设科技(深圳)有限公司 Construction method, device, equipment and the storage medium of Docker container
CN110286884A (en) * 2019-06-21 2019-09-27 北京百度网讯科技有限公司 Micro services method of combination, device, equipment and computer readable storage medium
CN112181588A (en) * 2020-09-18 2021-01-05 济南浪潮数据技术有限公司 Application containerization method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN112748936A (en) 2021-05-04

Similar Documents

Publication Publication Date Title
US20210034336A1 (en) Executing a process-based software application in a first computing environment and a second computing environment
CN102520841B (en) Collection user interface
US10088980B2 (en) Method and system for providing menu data for mobile applications
WO2020263573A1 (en) Systems and methods for seamlessly integrating multiple products by using a common visual modeler
US8046736B1 (en) Generated code from graphical user interface
US7992128B2 (en) Computer software adaptation method and system
CN101535934A (en) Methods and systems for providing a customized user interface for viewing and editing meta-data
US20200356469A1 (en) Test automation systems and methods using logical identifiers
CN112016128A (en) Vue development method and device based on CRUD and authority management
US20110126171A1 (en) Dynamic native editor code view facade
WO2022184077A1 (en) Document editing method and apparatus, and terminal and non-transitory storage medium
US11449313B2 (en) System and method applied to integrated development environment
CN112748936B (en) Service integration method, system, device and storage medium for container
US8495519B2 (en) Methods and apparatus for displaying interprocess communication thumbnails
CN113535037B (en) Command line terminal interaction display method and device, computer readable medium and equipment
KR101154717B1 (en) A method and apparatus for managing multiple languages in a data language
KR102062069B1 (en) Apparatus for mash-up service generation based on voice command and method thereof
CN113467772B (en) Project template generation method and device, electronic equipment and storage medium
US11372627B2 (en) System and method for providing integrated development environment (IDE) for programmable software system
CN112988139B (en) Method and device for developing event processing file
CN111666068A (en) Platform development framework, construction method, equipment and medium
CN106547847B (en) Electronic reading material tracing and updating method and equipment
US9710582B1 (en) Delivering circuit designs for programmable integrated circuits
CN113791827B (en) Page loading method, service processing method, device, storage medium and equipment
US20150277723A1 (en) Exporting a component of a currently displayed user interface to a development system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant