CN117908914A - Component deployment upgrading method and device, computer equipment and storage medium - Google Patents

Component deployment upgrading method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN117908914A
CN117908914A CN202311691012.9A CN202311691012A CN117908914A CN 117908914 A CN117908914 A CN 117908914A CN 202311691012 A CN202311691012 A CN 202311691012A CN 117908914 A CN117908914 A CN 117908914A
Authority
CN
China
Prior art keywords
container
component
deployment
file system
upgrading
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
CN202311691012.9A
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.)
Tianyi Cloud Technology Co Ltd
Original Assignee
Tianyi Cloud 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 Tianyi Cloud Technology Co Ltd filed Critical Tianyi Cloud Technology Co Ltd
Priority to CN202311691012.9A priority Critical patent/CN117908914A/en
Publication of CN117908914A publication Critical patent/CN117908914A/en
Pending legal-status Critical Current

Links

Landscapes

  • Stored Programmes (AREA)

Abstract

The embodiment of the application belongs to the technical field of artificial intelligence cloud computing container arrangement and scheduling, and relates to a component deployment upgrading method, a device, computer equipment and a storage medium, wherein the method comprises the following steps: acquiring a deployment upgrading request sent by a user terminal; calling a dock container, and constructing a multi-dimensional container isolation running environment according to the dock container by using a plurality of nano space capabilities provided by an operating system kernel; configuring the dock container to copy an installation package and an installation script in the container mirror image to a file system of a host machine in a mode of mounting a volume; and executing the copied installation package and the installation script through the file system of the host machine to finish the component upgrading operation. The application copies the installation package and the installation script in the container mirror image to the file system of the host machine in a mode of configuring the container catalog to mount the volume, thereby realizing the sharing of the container and the file system of the host machine.

Description

Component deployment upgrading method and device, computer equipment and storage medium
Technical Field
The application relates to the technical field of artificial intelligence cloud computing container arrangement and scheduling, in particular to a component deployment upgrading method, a device, computer equipment and a storage medium.
Background
With the rise of cloud native technology, more and more enterprises issue and manage service versions through devops technology and Kubernetes containerization technology by using own IT service systems. Kubernetes serves as an industrial-level container orchestration platform that provides various forms of application orchestration capabilities, business parties can access Kubernetes in a very flexible, low cost manner, and containers to publish and manage business versions.
For various systems and container management components on the Kubernetes managed node, such as operating system kernel, kernel module, various operating system management components, service component non-containerized components, etc., the conventional script or command mode is still used for deployment and upgrading in most cases.
However, by default, applicants have found that each container is isolated by a mount nano space in a separate container file system and that the component mount files in the container image cannot be mounted to the host's file system.
Disclosure of Invention
The embodiment of the application aims to provide a component deployment upgrading method, a device, computer equipment and a storage medium, which are used for solving the problem that a component installation file in a container mirror image cannot be installed in a file system of a host machine in the traditional technical scheme.
In order to solve the above technical problems, the embodiment of the present application provides a component deployment upgrade method, which adopts the following technical scheme:
Acquiring a deployment upgrading request sent by a user terminal;
Calling a dock container, and constructing a multi-dimensional container isolation running environment according to a plurality of nano space capabilities provided by an operating system kernel, wherein the plurality of nano space capabilities at least comprise a host domain space, a message queue, a file system, a process space, a network stack and a user space;
configuring the dock container to copy an installation package and an installation script in the container mirror image to a file system of a host machine in a mode of mounting a volume;
and executing the copied installation package and the installation script through the file system of the host machine to finish the component upgrading operation.
Further, the deployment upgrade request carries the component container identifier to be processed, and the step of executing the copied installation package and the installation script by the file system of the host machine to complete the component upgrade operation specifically includes the following steps:
Backing up key data corresponding to the component container identification, wherein the key data comprises application program data, configuration files and important persistent storage;
managing the application code and configuration files according to a version control tool;
And gradually updating the container corresponding to the component container identification according to a rolling updating mechanism.
Further, the step of gradually updating the container corresponding to the component container identifier according to the rolling updating mechanism specifically includes the following steps:
And updating the container corresponding to the component container identifier according to the bluish green deployment strategy.
Further, the deployment upgrade request carries a non-component container identifier to be processed, and the step of executing the copied installation package and the installation script by the file system of the host machine to complete the component upgrade operation specifically includes the following steps:
Acquiring a custom resource definition sent by the user terminal, wherein the custom resource definition is used for describing the state and behavior of a non-containerized component;
expanding a Kubernetes API according to the custom resource definition;
Non-containerized components corresponding to the non-component container identifications are managed and upgraded according to the Kubernetes API.
Further, the deployment upgrade request carries a non-component container identifier to be processed, and the step of executing the copied installation package and the installation script by the file system of the host machine to complete the component upgrade operation specifically includes the following steps:
And acquiring a custom controller sent by the user terminal, wherein the custom controller is used for processing NonContainerComponent' resources. ;
and managing and upgrading the non-containerized components corresponding to the non-component container identifications according to the custom controller.
In order to solve the technical problems, the embodiment of the application also provides a component deployment upgrading device, which adopts the following technical scheme:
the request acquisition module is used for acquiring a deployment upgrading request sent by the user terminal;
The environment construction module is used for calling a dock container and constructing a multi-dimensional container isolation running environment according to the dock container by a plurality of nano space capabilities provided by an operating system kernel, wherein the plurality of nano space capabilities at least comprise a host domain space, a message queue, a file system, a process space, a network stack and a user space;
The copying module is used for configuring the dock container to copy the installation package and the installation script in the container mirror image to a file system of the host machine in a mode of mounting volume;
And the upgrading module is used for executing the copied installation package and the installation script through the file system of the host machine so as to finish the component upgrading operation.
Further, the deployment upgrade request carries a component container identifier to be processed, and the upgrade module includes:
the backup sub-module is used for backing up key data corresponding to the component container identifier, wherein the key data comprises application program data, configuration files and important persistent storage;
a management sub-module for managing the application code and configuration file according to a version control tool;
And the updating sub-module is used for updating the container corresponding to the component container identifier step by step according to a rolling updating mechanism.
Further, the update submodule includes:
And the updating unit is used for updating the container corresponding to the component container identifier according to the blue-green deployment strategy.
In order to solve the above technical problems, the embodiment of the present application further provides a computer device, which adopts the following technical schemes:
Comprising a memory having stored therein computer readable instructions which when executed by a processor implement the steps of the component deployment upgrade method as described above.
In order to solve the above technical problems, an embodiment of the present application further provides a computer readable storage medium, which adopts the following technical schemes:
the computer readable storage medium has stored thereon computer readable instructions which when executed by a processor implement the steps of the component deployment upgrade method as described above.
The application provides a component deployment upgrading method, which comprises the following steps: acquiring a deployment upgrading request sent by a user terminal; calling a dock container, and constructing a multi-dimensional container isolation running environment according to a plurality of nano space capabilities provided by an operating system kernel, wherein the plurality of nano space capabilities at least comprise a host domain space, a message queue, a file system, a process space, a network stack and a user space; configuring the dock container to copy an installation package and an installation script in the container mirror image to a file system of a host machine in a mode of mounting a volume; and executing the copied installation package and the installation script through the file system of the host machine to finish the component upgrading operation. Compared with the prior art, the method for configuring the container catalog to mount the volume copies the installation package and the installation script in the container mirror image to the file system of the host machine. Finally, when the file system of the host machine is switched to, the component installation/upgrade script of the host machine is executed and copied, the upgrade of the system component can be completed, and the problem that the component installation file in the container mirror image cannot be installed in the file system of the host machine in the traditional technical scheme is effectively solved.
Drawings
In order to more clearly illustrate the solution of the present application, a brief description will be given below of the drawings required for the description of the embodiments of the present application, it being apparent that the drawings in the following description are some embodiments of the present application, and that other drawings may be obtained from these drawings without the exercise of inventive effort for a person of ordinary skill in the art.
FIG. 1 is an exemplary system architecture diagram in which the present application may be applied;
FIG. 2 is a flowchart of an implementation of a component deployment upgrade method according to a first embodiment of the present application;
fig. 3 is a schematic structural diagram of a component deployment upgrade apparatus according to a second embodiment of the present application;
FIG. 4 is a schematic structural diagram of one embodiment of a computer device in accordance with the present application.
Detailed Description
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs; the terminology used in the description of the applications herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application; the terms "comprising" and "having" and any variations thereof in the description of the application and the claims and the description of the drawings above are intended to cover a non-exclusive inclusion. The terms first, second and the like in the description and in the claims or in the above-described figures, are used for distinguishing between different objects and not necessarily for describing a sequential or chronological order.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the application. The appearances of such phrases in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. Those of skill in the art will explicitly and implicitly appreciate that the embodiments described herein may be combined with other embodiments.
In order to make the person skilled in the art better understand the solution of the present application, the technical solution of the embodiment of the present application will be clearly and completely described below with reference to the accompanying drawings.
As shown in fig. 1, a system architecture 100 may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 is used as a medium to provide communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
The user may interact with the server 105 via the network 104 using the terminal devices 101, 102, 103 to receive or send messages or the like. Various communication client applications, such as a web browser application, a shopping class application, a search class application, an instant messaging tool, a mailbox client, social platform software, etc., may be installed on the terminal devices 101, 102, 103.
The terminal devices 101, 102, 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smartphones, tablet computers, electronic book readers, MP3 players (Moving Picture Experts Group Audio Layer III, dynamic video expert compression standard audio plane 3), MP4 (Moving Picture Experts Group Audio Layer IV, dynamic video expert compression standard audio plane 4) players, laptop and desktop computers, and the like.
The server 105 may be a server providing various services, such as a background server providing support for pages displayed on the terminal devices 101, 102, 103.
It should be noted that, the method for upgrading component deployment provided by the embodiment of the present application is generally executed by a server/terminal device, and accordingly, the device for upgrading component deployment is generally disposed in the server/terminal device.
It should be understood that the number of terminal devices, networks and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
With continued reference to FIG. 2, a flow diagram of one embodiment of a component deployment upgrade method according to the present application is shown. The component deployment upgrading method comprises the following steps: step S201, step S202, step S203, step S204, step S205, step S206, and step S207.
In step S201, a deployment upgrade request sent by a user terminal is acquired.
In the embodiment of the present application, a user terminal refers to a terminal device for performing the image processing method for preventing document abuse provided by the present application, and the user terminal may be a mobile terminal such as a mobile phone, a smart phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet personal computer), a PMP (portable multimedia player), a navigation device, etc., and a fixed terminal such as a digital TV, a desktop computer, etc., it should be understood that the examples of the user terminal herein are merely for convenience of understanding and are not intended to limit the present application.
In step S202, a dock container is called, and a multidimensional container isolation running environment is constructed according to the dock container by using a plurality of nano space capabilities provided by an operating system kernel, where the plurality of nano space capabilities at least includes a host domain space, a message queue, a file system, a process space, a network stack, and a user space.
In the embodiment of the application, the Docker container constructs a multi-dimensional container isolation running environment through a plurality of nano space capabilities provided by an operating system kernel, such as UTS (host domain space), IPC (message queue), mount (file system), PID (process space), network, user (User space) and the like. Meanwhile, if privileges are set for the container, and the process space of the container is shared with the host process space, an independent process number 1 cannot be generated in the container, and meanwhile, the complete process tree of the host can be seen, and the daemon number 1 of the operating system can be seen. At this point, if the container is set to privileged mode, it can switch to the file system space of process number 1 of the operating system via operating system command nsenter. The complete command is as follows: nsenter-p-m-t 1 can be switched to the host's file system space.
In step S203, the dock container is configured to copy the installation package and the installation script in the container image to the file system of the host in a manner of mounting the volume.
In the embodiment of the application, the installation package and the installation script in the container mirror image are copied into the file system of the host machine in a mode of configuring the container catalog to mount the volume. Finally, when the file system of the host machine is switched to, the component installation/upgrade script copied to the host machine is executed, and the upgrade of the system component can be completed.
In step S204, the copied installation package and installation script are executed by the file system of the host machine to complete the component upgrade operation.
In practical application, a dock command is used to simulate the kernel image upgrading process in centos environments:
1) Container mirror image construction mode
Container mirror image construction dockerfile template
FROM aline:latest
COPY kernel-4.18.rpm/root/kernel/
ENTRYPOINT“/root/upgrade.sh”
Upgrade.sh example:
#!/bin/bash
cp/root/kernel/kernel-4.18.rpm/container/
nsenter–p–m–t 1rpm–Uvh/mnt/share/kernel-4.18.rpm
2) Boot kernel upgrade container
docker run–host=pid–privileged–v/host/:/container/kernel-update:test
In an embodiment of the present application, a method for upgrading component deployment is provided, including: acquiring a deployment upgrading request sent by a user terminal; calling a dock container, and constructing a multi-dimensional container isolation running environment according to the dock container by using a plurality of Namespace capabilities provided by an operating system kernel, wherein the plurality of Namespace capabilities at least comprise a host domain space, a message queue, a file system, a process space, a network stack and a user space; configuring a dock container to copy an installation package and an installation script in the container mirror image to a file system of a host machine in a mode of mounting a volume; and executing the copied installation package and the installation script through the file system of the host machine to finish the component upgrading operation. Compared with the prior art, the method for configuring the container catalog to mount the volume copies the installation package and the installation script in the container mirror image to the file system of the host machine. Finally, when the file system of the host machine is switched to, the component installation/upgrade script of the host machine is executed and copied, the upgrade of the system component can be completed, and the problem that the component installation file in the container mirror image cannot be installed in the file system of the host machine in the traditional technical scheme is effectively solved.
In some optional implementations of the embodiment of the present application, the deploying upgrade request carries a component container identifier to be processed, and the step S204 includes the following steps:
backing up key data corresponding to the component container identification, wherein the key data includes application data, configuration files, and important persistent storage;
Managing application code and configuration files according to the version control tool;
the containers corresponding to the component container identifications are updated step by step according to a rolling update mechanism.
In an embodiment of the present application, the version control tool may be git.
In the embodiment of the application, considering the flow before and after component upgrading, the configuration consistency, the component stability and the like, the execution in the container is required according to the front, middle and back flow, when all the steps are successfully completed, the successful return failure of the container is determined, wherein:
before upgrading: before-upgrade environment, component version inspection, before-upgrade tangential flow, and before-upgrade stain printing;
Waiting period: installing the image after the completion of the tangential flow may cause a machine to restart and a base component to restart;
after upgrading: component function check, configuration consistency check, business function check, traffic switch back.
In some optional implementations of the embodiments of the present application, the step of gradually updating the container corresponding to the component container identifier according to the rolling update mechanism specifically includes the following steps:
the container corresponding to the component container identification is updated according to the cyan deployment policy.
In the embodiment of the application, a Blue-green deployment (Blue-Green Deployment) strategy is considered to be used in the upgrading process, namely, traffic switching is performed between new and old versions. This allows you to smoothly switch traffic from old to new and roll back quickly when needed.
In some optional implementations of the embodiments of the present application, the deploying upgrade request carries a non-component container identifier to be processed, and the step S204 includes the following steps:
Acquiring a user-defined resource definition sent by a user terminal, wherein the user-defined resource definition is used for describing the state and behavior of a non-containerized component;
Expanding the Kubernetes API according to the custom resource definition;
Non-containerized components corresponding to non-component container identifications are managed and upgraded according to the Kubernetes API.
In some optional implementations of the embodiments of the present application, the deploying upgrade request carries a non-component container identifier to be processed, and the step S204 includes the following steps:
And acquiring a custom controller sent by the user terminal, wherein the custom controller is used for processing NonContainerComponent' resources. ;
Non-containerized components corresponding to the non-component container identifications are managed and upgraded according to the custom controller.
In embodiments of the present application, kubernetes was originally designed to manage the workload of containerized operations, but non-containerized components may also be managed through some techniques and resource adaptations. You can extend the kubernetes API using custom resource definitions (Custom Resource Definitions, CRDs) and custom controllers to manage and upgrade non-containerized components. Wherein: custom Resource Definitions (CRDs) that can be defined to describe the state and behavior of non-containerized components, e.g., a CRD named NonContainerComponent can be created to define the specification and state of the component; custom controllers, which may be written to handle NonContainerComponent resources, may monitor and respond to CRD object creation, update, and deletion events, and may perform any logic, including deployment, management, and upgrades of components.
In the embodiment of the application, the processes of managing the non-container components and upgrading the tasks through the Kubernetes can be as follows:
1) The user control plane self-defines an upgrade task ComponentUpdateTask and an upgrade task by the Kubernetes, and the component upgrade controller taskController creates or updates a task of NodeComponent based on Node granularity according to machines of the current batch and considering the concurrency ratio in the group and the maximum unavailable service number in the group;
2) NodeComponent resources describe the current component version on the node and the upgrade case. taskController searching the current upgrading machine, and updating NodeComponent component information, such as version information and upgrading status fields, on the corresponding machine;
3) When nodeComponentController encounters that the component upgrade condition of the component is pending, and the corresponding upgrade Job task is not created, creating a task Job on the corresponding machine;
4) Creating a corresponding pod task by the component upgrading job, and starting upgrading operation after a container is pulled up by using a self-defined mirror image of each component in the pod;
5) The complete upgrade operation has container control, including node container expelling by the controller before upgrade, various package installation in the upgrade process, platform consistency check after upgrade, etc.;
6) After the pos created by job is complete, status feedback is sent to Kubernetes Apiserver. NodeComponent controller complete the component status update, taskController continues to advance the upgrade task.
In the embodiment of the application, the cloud infrastructure Kubernetes working node system component cannot be upgraded by using the container control and scheduling capability of the Kubernetes. The application provides a method for breaking through the sharing of a container and a host file system, and also provides a method for defining a system component to be upgraded, an upgrading task and upgrading policy control through a resource abstract interface of a Kubernetes CRD.
The embodiment of the application can acquire and process the related data based on the artificial intelligence technology. Wherein artificial intelligence (ARTIFICIAL INTELLIGENCE, AI) is the theory, method, technique, and application system that uses a digital computer or a digital computer-controlled machine to simulate, extend, and expand human intelligence, sense the environment, acquire knowledge, and use knowledge to obtain optimal results.
Artificial intelligence infrastructure technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technologies, operation/interaction systems, mechatronics, and the like. The artificial intelligence software technology mainly comprises a computer vision technology, a robot technology, a biological recognition technology, a voice processing technology, a natural language processing technology, machine learning/deep learning and other directions. Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by computer readable instructions stored in a computer readable storage medium that, when executed, may comprise the steps of the embodiments of the methods described above. The storage medium may be a nonvolatile storage medium such as a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (Random Access Memory, RAM).
It should be understood that, although the steps in the flowcharts of the figures are shown in order as indicated by the arrows, these steps are not necessarily performed in order as indicated by the arrows. The steps are not strictly limited in order and may be performed in other orders, unless explicitly stated herein. Moreover, at least some of the steps in the flowcharts of the figures may include a plurality of sub-steps or stages that are not necessarily performed at the same time, but may be performed at different times, the order of their execution not necessarily being sequential, but may be performed in turn or alternately with other steps or at least a portion of the other steps or stages.
Example two
With further reference to fig. 3, as an implementation of the method shown in fig. 2, the present application provides an embodiment of a component deployment upgrade apparatus, where the embodiment of the apparatus corresponds to the embodiment of the method shown in fig. 2, and the apparatus is particularly applicable to various electronic devices.
As shown in fig. 3, the component deployment upgrade apparatus 200 of the present embodiment includes: request acquisition module 210, environment construction module 220, copy module 230, and upgrade module 240.
Wherein:
A request acquisition module 210, configured to acquire a deployment upgrade request sent by a user terminal;
The environment construction module 220 is configured to invoke a dock container, and construct a multidimensional container isolation running environment according to the dock container by using a plurality of nano space capabilities provided by an operating system kernel, where the plurality of nano space capabilities at least includes a host domain space, a message queue, a file system, a process space, a network stack, and a user space;
A copy module 230, configured to configure a dock container to copy an installation package and an installation script in the container image to a file system of the host in a manner of mounting a volume;
Upgrade module 240 is configured to execute the copied installation package and installation script through the file system of the host machine, so as to complete the component upgrade operation.
In this embodiment, there is provided a component deployment upgrade apparatus 200, including: a request acquisition module 210, configured to acquire a deployment upgrade request sent by a user terminal; the environment construction module 220 is configured to invoke a dock container, and construct a multidimensional container isolation running environment according to the dock container by using a plurality of nano space capabilities provided by an operating system kernel, where the plurality of nano space capabilities at least includes a host domain space, a message queue, a file system, a process space, a network stack, and a user space; a copy module 230, configured to configure a dock container to copy an installation package and an installation script in the container image to a file system of the host in a manner of mounting a volume; upgrade module 240 is configured to execute the copied installation package and installation script through the file system of the host machine, so as to complete the component upgrade operation. Compared with the prior art, the method for configuring the container catalog to mount the volume copies the installation package and the installation script in the container mirror image to the file system of the host machine. Finally, when the file system of the host machine is switched to, the component installation/upgrade script of the host machine is executed and copied, the upgrade of the system component can be completed, and the problem that the component installation file in the container mirror image cannot be installed in the file system of the host machine in the traditional technical scheme is effectively solved.
In some optional implementations of this embodiment, the deployment upgrade request carries a component container identifier to be processed, and the upgrade module 240 includes:
The backup sub-module is used for backing up key data corresponding to the component container identifier, wherein the key data comprises application program data, configuration files and important persistent storage;
a management sub-module for managing application code and configuration files according to the version control tool;
and the updating sub-module is used for gradually updating the container corresponding to the component container identifier according to the rolling updating mechanism.
In some optional implementations of this embodiment, the update submodule includes:
And the updating unit is used for updating the container corresponding to the component container identifier according to the blue-green deployment strategy.
In order to solve the technical problems, the embodiment of the application also provides computer equipment. Referring specifically to fig. 4, fig. 4 is a basic structural block diagram of a computer device according to the present embodiment.
The computer device 300 includes a memory 310, a processor 320, and a network interface 330 communicatively coupled to each other via a system bus. It should be noted that only computer device 300 having components 310-330 is shown in the figures, but it should be understood that not all of the illustrated components need be implemented, and that more or fewer components may be implemented instead. It will be appreciated by those skilled in the art that the computer device herein is a device capable of automatically performing numerical calculation and/or information processing according to a preset or stored instruction, and its hardware includes, but is not limited to, a microprocessor, an Application SPECIFIC INTEGRATED Circuit (ASIC), a Programmable gate array (Field-Programmable GATE ARRAY, FPGA), a digital Processor (DIGITAL SIGNAL Processor, DSP), an embedded device, and the like.
The computer equipment can be a desktop computer, a notebook computer, a palm computer, a cloud server and other computing equipment. The computer equipment can perform man-machine interaction with a user through a keyboard, a mouse, a remote controller, a touch pad or voice control equipment and the like.
The memory 310 includes at least one type of readable storage medium including flash memory, hard disk, multimedia card, card memory (e.g., SD or DX memory, etc.), random Access Memory (RAM), static Random Access Memory (SRAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), programmable Read Only Memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 310 may be an internal storage unit of the computer device 300, such as a hard disk or a memory of the computer device 300. In other embodiments, the memory 310 may also be an external storage device of the computer device 300, such as a plug-in hard disk, a smart memory card (SMART MEDIA CARD, SMC), a Secure Digital (SD) card, a flash memory card (FLASH CARD) or the like, which are provided on the computer device 300. Of course, the memory 310 may also include both internal storage units and external storage devices of the computer device 300. In this embodiment, the memory 310 is typically used to store an operating system and various application software installed on the computer device 300, such as computer readable instructions of a component deployment upgrade method. In addition, the memory 310 may also be used to temporarily store various types of data that have been output or are to be output.
The processor 320 may be a central processing unit (Central Processing Unit, CPU), controller, microcontroller, microprocessor, or other data processing chip in some embodiments. The processor 320 is generally used to control the overall operation of the computer device 300. In this embodiment, the processor 320 is configured to execute computer readable instructions stored in the memory 310 or process data, such as computer readable instructions for executing the component deployment upgrade method.
The network interface 330 may include a wireless network interface or a wired network interface, the network interface 330 typically being used to establish communication connections between the computer device 300 and other electronic devices.
The application provides computer equipment, wherein the method for configuring the container catalog to mount volume copies the installation package and the installation script in the container mirror image into the file system of the host machine. Finally, when the file system of the host machine is switched to, the component installation/upgrade script of the host machine is executed and copied, the upgrade of the system component can be completed, and the problem that the component installation file in the container mirror image cannot be installed in the file system of the host machine in the traditional technical scheme is effectively solved.
The present application also provides another embodiment, namely, a computer-readable storage medium storing computer-readable instructions executable by at least one processor to cause the at least one processor to perform the steps of the component deployment upgrade method as described above.
The application provides a computer readable storage medium, wherein a mode of configuring a container catalog to mount volume copies an installation package and an installation script in a container mirror image into a file system of a host machine. Finally, when the file system of the host machine is switched to, the component installation/upgrade script of the host machine is executed and copied, the upgrade of the system component can be completed, and the problem that the component installation file in the container mirror image cannot be installed in the file system of the host machine in the traditional technical scheme is effectively solved.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising instructions for causing a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the method according to the embodiments of the present application.
It is apparent that the above-described embodiments are only some embodiments of the present application, but not all embodiments, and the preferred embodiments of the present application are shown in the drawings, which do not limit the scope of the patent claims. This application may be embodied in many different forms, but rather, embodiments are provided in order to provide a thorough and complete understanding of the present disclosure. Although the application has been described in detail with reference to the foregoing embodiments, it will be apparent to those skilled in the art that modifications may be made to the embodiments described in the foregoing description, or equivalents may be substituted for elements thereof. All equivalent structures made by the content of the specification and the drawings of the application are directly or indirectly applied to other related technical fields, and are also within the scope of the application.

Claims (10)

1. A method for component deployment upgrade, comprising the steps of:
Acquiring a deployment upgrading request sent by a user terminal;
Calling a dock container, and constructing a multi-dimensional container isolation running environment according to a plurality of nano space capabilities provided by an operating system kernel, wherein the plurality of nano space capabilities at least comprise a host domain space, a message queue, a file system, a process space, a network stack and a user space;
configuring the dock container to copy an installation package and an installation script in the container mirror image to a file system of a host machine in a mode of mounting a volume;
and executing the copied installation package and the installation script through the file system of the host machine to finish the component upgrading operation.
2. The method for upgrading the deployment of the component according to claim 1, wherein the deployment upgrading request carries the identification of the component container to be processed, and the step of executing the copied installation package and the installation script by the file system of the host machine to complete the component upgrading operation specifically comprises the following steps:
Backing up key data corresponding to the component container identification, wherein the key data comprises application program data, configuration files and important persistent storage;
managing the application code and configuration files according to a version control tool;
And gradually updating the container corresponding to the component container identification according to a rolling updating mechanism.
3. The component deployment upgrade method according to claim 2, wherein the step of gradually updating the container corresponding to the component container identifier according to a rolling update mechanism, comprises the steps of:
And updating the container corresponding to the component container identifier according to the bluish green deployment strategy.
4. The method for upgrading the deployment of the component according to claim 1, wherein the deployment upgrading request carries a non-component container identifier to be processed, and the step of executing the copied installation package and the installation script by the file system of the host machine to complete the component upgrading operation specifically comprises the following steps:
Acquiring a custom resource definition sent by the user terminal, wherein the custom resource definition is used for describing the state and behavior of a non-containerized component;
expanding a Kubernetes API according to the custom resource definition;
Non-containerized components corresponding to the non-component container identifications are managed and upgraded according to the Kubernetes API.
5. The method for upgrading the deployment of the component according to claim 1, wherein the deployment upgrading request carries a non-component container identifier to be processed, and the step of executing the copied installation package and the installation script by the file system of the host machine to complete the component upgrading operation specifically comprises the following steps:
And acquiring a custom controller sent by the user terminal, wherein the custom controller is used for processing NonContainerComponent' resources. ;
and managing and upgrading the non-containerized components corresponding to the non-component container identifications according to the custom controller.
6. A component deployment upgrade apparatus, comprising:
the request acquisition module is used for acquiring a deployment upgrading request sent by the user terminal;
The environment construction module is used for calling a dock container and constructing a multi-dimensional container isolation running environment according to the dock container by a plurality of nano space capabilities provided by an operating system kernel, wherein the plurality of nano space capabilities at least comprise a host domain space, a message queue, a file system, a process space, a network stack and a user space;
The copying module is used for configuring the dock container to copy the installation package and the installation script in the container mirror image to a file system of the host machine in a mode of mounting volume;
And the upgrading module is used for executing the copied installation package and the installation script through the file system of the host machine so as to finish the component upgrading operation.
7. The component deployment upgrade apparatus of claim 7, wherein the deployment upgrade request carries a component container identification to be processed, the upgrade module comprising:
the backup sub-module is used for backing up key data corresponding to the component container identifier, wherein the key data comprises application program data, configuration files and important persistent storage;
a management sub-module for managing the application code and configuration file according to a version control tool;
And the updating sub-module is used for updating the container corresponding to the component container identifier step by step according to a rolling updating mechanism.
8. The component deployment upgrade apparatus of claim 7, wherein the upgrade sub-module comprises:
And the updating unit is used for updating the container corresponding to the component container identifier according to the blue-green deployment strategy.
9. A computer device comprising a memory having stored therein computer readable instructions which when executed by a processor implement the steps of the component deployment upgrade method of any one of claims 1 to 5.
10. A computer readable storage medium having stored thereon computer readable instructions which when executed by a processor implement the steps of the component deployment upgrade method of any one of claims 1 to 5.
CN202311691012.9A 2023-12-11 2023-12-11 Component deployment upgrading method and device, computer equipment and storage medium Pending CN117908914A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311691012.9A CN117908914A (en) 2023-12-11 2023-12-11 Component deployment upgrading method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311691012.9A CN117908914A (en) 2023-12-11 2023-12-11 Component deployment upgrading method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117908914A true CN117908914A (en) 2024-04-19

Family

ID=90696595

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311691012.9A Pending CN117908914A (en) 2023-12-11 2023-12-11 Component deployment upgrading method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117908914A (en)

Similar Documents

Publication Publication Date Title
US8327350B2 (en) Virtual resource templates
CN105765534A (en) Virtual computing systems and methods
US10684838B2 (en) Dynamic application deployment
CN113312037A (en) Data processing method, device and equipment applied to microservice and storage medium
CN110520844A (en) Cloud management platform, virtual machine management method and its system
CN111984269A (en) Method for providing application construction service and application construction platform
CN111984270A (en) Application deployment method and system
JP2021121921A (en) Method and apparatus for management of artificial intelligence development platform, and medium
CN112286633A (en) Virtual machine creating method, device, equipment and storage medium based on CloudStack platform
CN112199200B (en) Resource scheduling method and device, computer equipment and storage medium
CN113204368B (en) Application processing method, server and storage medium
CN113626095A (en) Switching method and switching system of configuration center, electronic equipment and storage medium
CN116483425A (en) Micro-service gray level edition issuing method, device, equipment and storage medium thereof
CN115794253A (en) Application integration method and device, electronic equipment and computer readable storage medium
CN117908914A (en) Component deployment upgrading method and device, computer equipment and storage medium
CN110599112A (en) Method and device for developing and maintaining network page
CN111722888B (en) Operation execution method, device, equipment and readable storage medium
CN115756692A (en) Method for automatically combining and displaying pages based on style attributes and related equipment thereof
US20220318049A1 (en) Program context migration
CN110249305A (en) Shell operation browser extension when browser crash or hang-up
CN112181401A (en) Application construction method and application construction platform
JP5317182B2 (en) POS terminal, module update method and module update program
CN111400058A (en) Method and device for calling message, computer equipment and storage medium
CN113835846B (en) Method and device for creating k8s cluster and computer-readable storage medium
US11836523B2 (en) Introspection of a containerized application in a runtime environment

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