Research and development environment deployment method, system, computer device and storage medium
Patent Information
- Application Number
- CN202210816079.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-12
- Publication Date
- 2026-10-27
- Estimated Expiration
- 2042-07-12
AI Technical Summary
[0004]然而,发明人发现,传统研发环境的搭建是由研发人员或者运维人员执行创建的,通常需要针对不同研发人员的需求,比如开发环境、测试环境、集成测试环境、演示环境、客户体验环境以及正式环境等不同环境需求,搭建一套完整的研发环境,其搭建流程繁琐,且搭建周期较长,十分耗费时间,导致研发效率低下
[0042]上述研发环境部署方法、系统、计算机设备、存储介质和计算机程序产品中,通过接收业务服务处理请求,并获取业务服务处理请求携带的研发环境需求,进而根据研发环境需求,确定对应的目标资源池和目标环境模板,可为不用研发人员的研发环境需求,分别确定出对应的目标资源池和目标环境模板,以构建得到符合各自的研发环境需求的目标研发环境,避免多个研发人员使用同一套研发环境导致的冲突问题。而通过获取目标资源池对应的集群访问信息配置文件,可根据集群访问信息配置文件,确定目标资源池所在的集群命名空间,进而可基于目标环境模板、目标资源池中的环境组件和业务组件,获得对应的目标研发环境,以将目标研发环境部署至目标资源池所在的集群命名空间中,通过对集群的有效利用,减少研发过程的资源消耗。而由于无需针对每个研发人员在不同研发阶段分别搭建完整的研发环境,可减少研发环境的搭建时间,进一步提升研发效率。
Smart Images

Figure CN117435215B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of cloud technology, and in particular to a method, system, computer equipment, and storage medium for deploying a research and development environment. Background Technology
[0002] With the diversified development of the Internet and real-time data streams, as well as the R&D needs for developing, testing, and updating different applications or application platforms, cloud technology has rapidly developed as a system support for various industry data.
[0003] Traditionally, when developing applications or application platforms, different enterprises need to equip their internal R&D personnel with independent R&D environments. Specifically, in response to the environmental requirements during the R&D process, R&D personnel or operations and maintenance personnel can apply for resources based on the environmental requirements, and then deploy business services and related dependent components based on the resources they have applied for. At the same time, they can pull business service code images from the repository for deployment to build a new R&D environment for R&D personnel to use.
[0004] However, the inventors discovered that the traditional R&D environment is built by R&D personnel or operations personnel. It usually requires building a complete R&D environment to meet the needs of different R&D personnel, such as different environment requirements such as development environment, testing environment, integration testing environment, demonstration environment, customer experience environment and production environment. The setup process is cumbersome and the setup cycle is long, which is very time-consuming and leads to low R&D efficiency. Summary of the Invention
[0005] Therefore, it is necessary to provide a method, system, computer equipment, computer-readable storage medium, and computer program product for deploying a research and development environment that can reduce the time required to set up the research and development environment and improve research and development efficiency, in response to the above-mentioned technical problems.
[0006] Firstly, this application provides a method for deploying a research and development environment. The method includes:
[0007] Receive a business service processing request and obtain the R&D environment requirements carried in the business service processing request;
[0008] Based on the aforementioned R&D environment requirements, determine the corresponding target resource pool and target environment template;
[0009] Obtain the cluster access information configuration file corresponding to the target resource pool, and determine the cluster namespace where the target resource pool is located based on the cluster access information configuration file;
[0010] Based on the target environment template, the environment components and business components in the target resource pool, the corresponding target R&D environment is obtained, and the target R&D environment is deployed to the cluster namespace where the target resource pool is located.
[0011] In one embodiment, after classifying the object permissions to obtain their categories, the method further includes:
[0012] If the object's permissions are R&D environment management permissions, then the R&D environment management commands will be detected;
[0013] In response to the R&D environment management instructions, the system executes the corresponding R&D environment management operations. These instructions include environment creation, environment deletion, environment modification, environment upgrade, rollback, and upgrade history query instructions. The corresponding R&D environment management operations include: a R&D environment creation operation (corresponding to the environment creation instruction), a R&D environment deletion operation (corresponding to the environment deletion instruction), a R&D environment modification operation (corresponding to the environment modification instruction), a R&D environment upgrade operation (corresponding to the environment upgrade instruction), a R&D environment rollback operation (corresponding to the rollback instruction), and an environment upgrade history query operation (corresponding to the upgrade history query instruction).
[0014] In one embodiment, after classifying the object permissions to obtain their categories, the method further includes:
[0015] If the object's permissions are enterprise management permissions, then the corresponding enterprise management instructions are detected;
[0016] In response to the enterprise management instructions, execute the enterprise management operations corresponding to the management instructions; wherein, the enterprise management instructions include creation instructions, addition instructions, switching instructions, deletion instructions, transfer instructions, and object permission modification instructions; the enterprise management operations include enterprise creation operations corresponding to the creation instructions, enterprise addition operations corresponding to the addition instructions, enterprise switching operations corresponding to the switching instructions, enterprise deletion operations corresponding to the deletion instructions, enterprise transfer operations and transfer operations of associated objects of the enterprise to be transferred corresponding to the transfer instructions, and object permission modification operations corresponding to the object permission modification instructions.
[0017] In one embodiment, the method further includes:
[0018] If a resource pool details retrieval command is detected, the system responds to the command to retrieve the cluster name of the connected cluster, the list of deployed development environments, details of each processing node in the resource pool, and resource pool management information.
[0019] If a cluster namespace management command is detected, the system responds to the command and performs setting, modification, or management operations on the namespace of the connected cluster.
[0020] If a resource pool detection command is detected, the system responds to the resource pool detection command and performs detection operations on the cluster running status of the connected cluster, the component services, business services, or resource usage details deployed in the resource pool.
[0021] In one embodiment, the environment template management instructions further include: a template access instruction, a template deletion instruction, a template download instruction, and a template distribution instruction; the environment template management operations corresponding to the environment template management instructions include: an environment template access operation corresponding to the template access instruction, an environment template deletion operation corresponding to the template deletion instruction, an environment template download operation corresponding to the template download instruction, and an environment template distribution operation corresponding to the template distribution instruction.
[0022] Secondly, this application also provides a research and development environment deployment system. The system includes:
[0023] The R&D environment requirement acquisition module is used to receive business service processing requests and acquire the R&D environment requirements carried by the business service processing requests.
[0024] The first determining module is used to determine the corresponding target resource pool and target environment template based on the R&D environment requirements;
[0025] The second determining module is used to obtain the cluster access information configuration file corresponding to the target resource pool, and determine the cluster namespace where the target resource pool is located based on the cluster access information configuration file.
[0026] The target R&D environment deployment module is used to obtain the corresponding target R&D environment based on the target environment template, the environment components and business components in the target resource pool, and deploy the target R&D environment to the cluster namespace where the target resource pool is located.
[0027] Thirdly, this application also provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to perform the following steps:
[0028] Receive a business service processing request and obtain the R&D environment requirements carried in the business service processing request;
[0029] Based on the aforementioned R&D environment requirements, determine the corresponding target resource pool and target environment template;
[0030] Obtain the cluster access information configuration file corresponding to the target resource pool, and determine the cluster namespace where the target resource pool is located based on the cluster access information configuration file;
[0031] Based on the target environment template, the environment components and business components in the target resource pool, the corresponding target R&D environment is obtained, and the target R&D environment is deployed to the cluster namespace where the target resource pool is located.
[0032] Fourthly, this application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, performs the following steps:
[0033] Receive a business service processing request and obtain the R&D environment requirements carried in the business service processing request;
[0034] Based on the aforementioned R&D environment requirements, determine the corresponding target resource pool and target environment template;
[0035] Obtain the cluster access information configuration file corresponding to the target resource pool, and determine the cluster namespace where the target resource pool is located based on the cluster access information configuration file;
[0036] Based on the target environment template, the environment components and business components in the target resource pool, the corresponding target R&D environment is obtained, and the target R&D environment is deployed to the cluster namespace where the target resource pool is located.
[0037] Fifthly, this application also provides a computer program product. The computer program product includes a computer program that, when executed by a processor, performs the following steps:
[0038] Receive a business service processing request and obtain the R&D environment requirements carried in the business service processing request;
[0039] Based on the aforementioned R&D environment requirements, determine the corresponding target resource pool and target environment template;
[0040] Obtain the cluster access information configuration file corresponding to the target resource pool, and determine the cluster namespace where the target resource pool is located based on the cluster access information configuration file;
[0041] Based on the target environment template, the environment components and business components in the target resource pool, the corresponding target R&D environment is obtained, and the target R&D environment is deployed to the cluster namespace where the target resource pool is located.
[0042] In the aforementioned R&D environment deployment methods, systems, computer equipment, storage media, and computer program products, by receiving business service processing requests and obtaining the R&D environment requirements carried in the requests, and then determining the corresponding target resource pool and target environment template based on these requirements, the system can identify separate target resource pools and target environment templates for different R&D personnel. This allows for the construction of target R&D environments that meet the specific needs of each individual, avoiding conflicts caused by multiple R&D personnel using the same set of R&D environments. Furthermore, by obtaining the cluster access information configuration file corresponding to the target resource pool, the system can determine the cluster namespace where the target resource pool resides. Based on the target environment template, the environment components, and business components in the target resource pool, the system can obtain the corresponding target R&D environment and deploy it to the cluster namespace where the target resource pool resides. This efficient use of the cluster reduces resource consumption during the R&D process. Since it eliminates the need to build complete R&D environments for each R&D personnel at different R&D stages, the system reduces setup time and further improves R&D efficiency. Attached Figure Description
[0043] Figure 1 This is an application environment diagram of a research and development environment deployment method in one embodiment;
[0044] Figure 2 This is a flowchart illustrating a method for deploying a research and development environment in one embodiment;
[0045] Figure 3 This is a flowchart illustrating the R&D environment deployment method in another embodiment;
[0046] Figure 4 This is a schematic diagram illustrating the forwarding and processing flow of a service request in one embodiment;
[0047] Figure 5 This is a schematic diagram illustrating the resource pool management interaction of a research and development environment deployment method in one embodiment.
[0048] Figure 6 This is a schematic diagram illustrating the environment template management interaction of a research and development environment deployment method in one embodiment;
[0049] Figure 7 This is a schematic diagram illustrating the R&D environment management interaction of a R&D environment deployment method in one embodiment.
[0050] Figure 8 This is a schematic diagram of enterprise management interaction for a research and development environment deployment method in one embodiment;
[0051] Figure 9 This is a flowchart illustrating the R&D environment deployment method in yet another embodiment;
[0052] Figure 10 This is a structural block diagram of a research and development environment deployment system in one embodiment;
[0053] Figure 11 This is a schematic diagram of the architecture of a research and development environment deployment system in one embodiment;
[0054] Figure 12 This is a structural block diagram of the enterprise management module in one embodiment;
[0055] Figure 13 This is a structural block diagram of the resource pool management module in one embodiment;
[0056] Figure 14 This is a structural block diagram of the environment template management module in one embodiment;
[0057] Figure 15 This is a structural block diagram of the R&D environment management module in one embodiment;
[0058] Figure 16 This is a structural block diagram of the access management module in one embodiment;
[0059] Figure 17 This is a structural block diagram of the account management module in one embodiment;
[0060] Figure 18 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0061] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0062] The R&D environment deployment method provided in this application involves cloud technology. Cloud technology refers to a hosting technology that unifies hardware, software, and network resources within a wide area network (WAN) or local area network (LAN) to achieve data computation, storage, processing, and sharing. Cloud technology encompasses network technology, information technology, integration technology, management platform technology, and application technology based on cloud computing business models. These technologies can form resource pools, providing flexible and convenient on-demand access. Since the backend services of different network systems require substantial computing and storage resources—such as video websites, image websites, and many portal websites—cloud computing technology will become a crucial support, providing the necessary resources for computation, storage, processing, and sharing. With the rapid development and application of the internet industry, every item may have its own identification mark in the future, requiring transmission to a backend system for logical processing. Data at different levels will be processed separately; therefore, various industry data require robust system support, which can be achieved through cloud computing.
[0063] Cloud computing is a computing model that distributes computing tasks across a resource pool composed of a large number of computers, enabling various application systems to obtain computing power, storage space, and information services as needed. The network providing these resources is called the "cloud." From the user's perspective, the resources in the "cloud" are infinitely scalable, readily available, on-demand, expandable, and pay-as-you-go. As a provider of fundamental cloud computing capabilities, a cloud resource pool (referred to as a cloud platform, or IaaS (Infrastructure as a Service) platform) is established. Various types of virtual resources are deployed within this pool for external customers to choose from. The cloud resource pool primarily includes computing devices (virtualized machines containing operating systems), storage devices, and network devices. Logically, a PaaS (Platform as a Service) layer can be deployed on top of the IaaS layer, and a SaaS (Software as a Service) layer can be deployed on top of the PaaS layer. Alternatively, SaaS can be directly deployed on top of IaaS. PaaS is a platform for running software, such as databases and web containers, while SaaS comprises various business software, such as web portals and bulk SMS senders. Generally, SaaS and PaaS are upper layers compared to IaaS.
[0064] The R&D environment deployment method provided in this application involves cloud computing in cloud technology and can be applied to, for example... Figure 1The application environment shown is as follows. Terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be integrated onto server 104 or placed on a cloud or other network server. Server 104 receives business service processing requests from terminal 102 and obtains the R&D environment requirements carried in the requests. Then, server 104 can determine the corresponding target resource pool and target environment template based on the R&D environment requirements, and obtain the cluster access information configuration file corresponding to the target resource pool, so as to determine the cluster namespace where the target resource pool is located based on the cluster access information configuration file. The resource pool can be deployed in a cluster (specifically a Kubernetes cluster, i.e., a container orchestrator cluster) and a cluster namespace (specifically a Kubernetes namespace, i.e., the cluster namespace of the container orchestrator cluster, representing the isolated resource type within the container orchestrator cluster) on multiple clouds such as public cloud, private cloud, or hybrid cloud. Furthermore, server 104 can obtain the corresponding target R&D environment based on the target environment template, environment components, and business components in the target resource pool, and then deploy the target R&D environment to the cluster namespace where the target resource pool is located. The R&D environment refers to the platform system where developers build applications or application platforms, including SaaS (Software as a Service) applications and their running PaaS (Platform as a Service) components. Terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, smart in-vehicle devices, etc. Portable wearable devices can include smartwatches, smart bracelets, head-mounted devices, etc. Server 104 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. Terminal 102 and server 104 can be connected directly or indirectly via wired or wireless communication, and this application does not impose any restrictions on this.
[0065] In one embodiment, such as Figure 2 As shown, a method for deploying a research and development environment is provided, which can be applied to... Figure 1 Taking the server in the example, the following steps are included:
[0066] Step S202: Receive the business service processing request and obtain the R&D environment requirements carried in the business service processing request.
[0067] Among them, business service processing requests refer to web requests initiated by browsers. Specifically, these can be requests for access to the development environment initiated by developers using browsers. Different types of development environment access requests correspond to different development environment requirements. For example, in the development process of applications or application platforms, different development stages require different development environment types. For instance, the development stage requires access to the development environment, the testing stage requires access to the testing environment, unit testing environment, or integration testing environment, and the deployment stage requires access to different development environments such as the demo environment, customer experience environment, and production environment.
[0068] It is understandable that the development process of an application or application platform includes development stages, not limited to the development, testing, and deployment stages mentioned above. Other development stages, such as production, simulation, and acceptance stages, can be added depending on the specific project or application development requirements. Similarly, the development environments required for different development stages are not limited to the aforementioned development, testing, or demonstration environments. Other different development environments, such as production, acceptance testing, and simulation environments, can be added based on development requirements.
[0069] Specifically, by receiving and parsing business service processing requests, the development environment requirements carried in the requests are obtained. These requirements can be understood as the development environment that different projects or applications need to access and use at different stages of development. Examples include development needs, version upgrade needs, testing needs, and demonstration needs during the development process of different projects or applications. For different development environment requirements, the corresponding target resource pool and target environment template are the same.
[0070] In one embodiment, the business service processing request initiated by the browser can be, in addition to the R&D environment access request, enterprise management request, management request for various objects under the enterprise, account management request, resource pool access (or management) request, environment template access (or management) request, R&D environment access (or management) request, and template repository access (or management) request, etc.
[0071] Specifically, by obtaining the object identifier carried in the business service request and the object permissions corresponding to the object identifier, the object permissions are categorized and the object permissions are obtained. Based on the object permissions of different object identifiers, it is determined whether to respond to different business service processing requests initiated by the object and whether to allow the execution of each processing operation corresponding to different business service processing requests.
[0072] Furthermore, object permissions are categorized into access permissions and management permissions. Access permissions are used to access resource pools, template repositories, or development environments, while management permissions include enterprise management permissions, resource pool management permissions, environment template management permissions, and development environment management permissions. Enterprise management permissions correspond to enterprise management requests. This means that the permissions of the object initiating the enterprise management request need to be verified. Specifically, it's determined whether the object has enterprise management permissions. If the object does not have enterprise management permissions, the enterprise management request will not be responded to, and a "Does not have operation permissions" message will be displayed. If the object is determined to have enterprise management permissions, the enterprise management request will be responded to, and the corresponding enterprise management operation will be executed, including different processing operations such as enterprise creation, enterprise addition, enterprise switching, enterprise deletion, or enterprise transfer.
[0073] Similarly, for other business service requests, including resource pool access (or management) requests, environment template access (or management) requests, R&D environment access (or management) requests, and template repository access (or management) requests, permission verification is also required. For example, for resource pool access requests, it is necessary to determine whether the object initiating the resource pool access request has resource pool access permissions. Similarly, for environment template management requests, it is necessary to determine whether the object initiating the environment template management request has environment template management permissions. This allows for further processing based on whether the object has the corresponding permissions, including executing processing operations under the corresponding permissions or providing a "no operation permission" message.
[0074] Step S204: Determine the corresponding target resource pool and target environment template based on the R&D environment requirements.
[0075] Here, the target resource pool refers to the resource pool selected from the list of resource pools deployed in the cluster. Specifically, it can be the object initiating the business service processing request, such as the R&D personnel of a project in a company, who select the resource pool from the list of resource pools deployed in the cluster based on the R&D environment requirements. Similarly, the target environment target refers to the environment template corresponding to the target environment template identifier selected from the list of environment versions. Specifically, it can be the object initiating the business service processing request, such as the R&D personnel of a project in a company, who select the environment template corresponding to the target environment template identifier from the list of environment versions based on the R&D environment requirements.
[0076] Specifically, by obtaining the list of resource pools deployed in the cluster and the list of environment versions in the template repository, and based on the development environment requirements, the corresponding target resource pool is determined from the resource pool list, and further based on the development environment requirements, the target environment template identifier is determined from the environment version list, and based on the target environment template identifier, the corresponding target environment template is pulled from the template repository.
[0077] In this embodiment, the cluster can specifically be a Kubernetes cluster, i.e., a container orchestrator cluster, or other clusters of different types capable of providing cloud computing, cloud storage, cloud processing, and other resources. It is understood that by obtaining the list of resource pools deployed in the Kubernetes cluster and the list of environment versions in the template repository, the specific resource pools deployed in the Kubernetes cluster can be identified. Simultaneously, the actual environment templates stored in the template repository can be obtained, which may include default built-in templates, environment templates created by the object initiating the business service processing request, and environment templates created and uploaded by other objects from different or the same enterprise.
[0078] Furthermore, based on the R&D environment requirements, after determining the target environment template identifier from the environment version list, it is necessary to retrieve the corresponding target environment template from the template repository according to the target environment template identifier, which is specifically the target environment template version number, i.e., the target environment template version number. In other words, each environment template and its corresponding environment template version number are stored in the template repository in a one-to-one correspondence.
[0079] Step S206: Obtain the cluster access information configuration file corresponding to the target resource pool, and determine the cluster namespace where the target resource pool is located based on the cluster access information configuration file.
[0080] Specifically, the cluster access information configuration file is used to establish a connection between the resource pool and the cluster, so as to deploy the resource pool on the cluster. In this embodiment, the cluster can be a Kubernetes cluster, and the corresponding cluster access information configuration file can be a KubeConfig file (i.e., the access configuration information file of the container orchestrator cluster). Through the KubeConfig file, it is possible to connect to Kubernetes clusters on multiple clouds such as public cloud, private cloud, or hybrid cloud, as well as the Kubernetes Namespace (i.e., the cluster namespace of the container orchestrator cluster), so as to deploy the resource pool on the Kubernetes cluster.
[0081] Furthermore, the cluster access information configuration file (i.e., the KubeConfig file) can also be used to determine the cluster namespace (i.e., Kubernetes namespace) where the target resource pool resides. Since the target development environment is deployed in the target resource pool, and the target resource pool is deployed on a Kubernetes cluster, by determining the specific cluster namespace of the target resource pool in the Kubernetes cluster, the determined target environment template can be installed into the corresponding cluster namespace.
[0082] The process involves installing the target environment template into the corresponding cluster namespace, then obtaining the environment components and business components associated with the target environment template from the target resource pool, building the target R&D environment based on the target environment template and the associated environment components and business components, and deploying the target R&D environment into the cluster namespace.
[0083] Step S208: Based on the target environment template, the environment components and business components in the target resource pool, obtain the corresponding target R&D environment, and deploy the target R&D environment to the cluster namespace where the target resource pool is located.
[0084] Specifically, by determining whether the target resource pool already contains environment components and business components associated with the target environment template, when it is determined that the target resource pool has already been equipped with environment components and business components associated with the target environment template, the corresponding target R&D environment can be obtained based on the target environment template, the environment components and business components in the target resource pool.
[0085] The R&D environment refers to the platform system on which R&D personnel develop applications or application platforms, including SaaS (Software as a Service) applications and their PaaS (Platform as a Service) components. The environment components in the target resource pool represent the environment configurations required to build the R&D environment, such as the environment configuration parameters for building and running the R&D environment, including the storage locations of temporary files during operation, the environment templates for the R&D environment, and the processing results of business operations performed within the R&D environment.
[0086] Furthermore, business components specifically correspond to the development environment requirements for processing business service requests, in order to provide different business services. For example, different projects or applications at different development stages require access to and use different development environments, including development environments, testing environments, demonstration environments, or simulation environments, and require different business services, such as development services, testing services, demonstration services, and simulation services. Therefore, different business components are needed to provide the corresponding business services.
[0087] In the aforementioned R&D environment deployment method, by receiving business service processing requests and obtaining the R&D environment requirements carried in the requests, the corresponding target resource pool and target environment template are determined based on these requirements. This allows for the identification of separate target resource pools and templates for different R&D personnel, enabling the construction of target R&D environments that meet their individual needs and avoiding conflicts caused by multiple R&D personnel using the same environment. Furthermore, by obtaining the cluster access information configuration file corresponding to the target resource pool, the cluster namespace where the target resource pool resides can be determined. Based on the target environment template, the environment components, and business components within the target resource pool, the corresponding target R&D environment can be obtained and deployed to the cluster namespace where the target resource pool resides. This efficient use of the cluster reduces resource consumption during the R&D process. Since it eliminates the need to build complete R&D environments for each R&D personnel at different R&D stages, the setup time for R&D environments is reduced, further improving R&D efficiency.
[0088] In one embodiment, such as Figure 3 As shown, a method for deploying a research and development environment is provided, which specifically includes the following steps:
[0089] Step S302: Based on the load balancing configuration information corresponding to the target resource pool, distribute the processing requests of each business service to each processing node of the target resource pool in a balanced manner.
[0090] Specifically, after deploying the target R&D environment to the cluster namespace where the target resource pool is located, load balancing configuration information for the target resource pool is added for the corresponding target R&D environment. The load balancing configuration information is used to ensure that when accessing the target R&D environment, business service requests can be evenly distributed to different processing nodes in the target resource pool for processing.
[0091] The load balancing configuration information can be understood as the forwarding rules for requests to each processing node in the resource pool. When a business service request comes in, it will select one of the processing nodes to process the data through the load balancing configuration information. In other words, each request selects only one processing node to obtain and process business data, and there is no situation where one processing node processes multiple requests at the same time, which would cause a conflict.
[0092] Step S304: Obtain the target business data corresponding to the business service processing request through the processing node.
[0093] Specifically, the resources in the resource pool refer to different business services and the related business data stored. Then, through different processing nodes in the target resource pool, the business data related to different business services in the target resource pool can be obtained in a balanced manner, so as to obtain the target business data corresponding to the business service processing request.
[0094] Step S306: Determine the business service address corresponding to each business service processing request based on the business forwarding service deployed on the corresponding processing node.
[0095] The different business forwarding services deployed in the target resource pool can specifically be nginx services. Nginx is a high-performance HTTP and reverse proxy web server that can also provide email (IMAP / POP3) proxy services. The business service address corresponding to the business service processing request represents the service address that the business service processing request needs to access; that is, by accessing the corresponding service address, the business processing operation corresponding to the business service processing request is executed under that service address.
[0096] Specifically, by using the business forwarding service deployed on the processing node, namely the nginx service, the business service address corresponding to each business service processing request can be determined. In other words, based on the forwarding rules configured in the nginx service, the business service address that each business service processing request needs to access is determined, so that the business service processing request is forwarded to the corresponding business service address, and the obtained business data is processed based on the corresponding business service address.
[0097] Step S308: Forward each business service processing request to the target development environment corresponding to the business service address, and process the target business data based on the target development environment.
[0098] Specifically, through the business forwarding service deployed on the processing nodes in the target resource pool, the processing requests of each business service can be forwarded to the target R&D environment corresponding to the business service address, and then the target business data can be processed based on the target R&D environment.
[0099] For example, based on the business service processing request and the forwarding rules configured in the business forwarding service, the business service address to be accessed by the request can be identified and determined to identify the actual target development environment. For instance, if there are two business service processing requests, A and B, when identifying the business service address of request A, if it is determined that the business service address belongs to the resource pool access service, then request A can be forwarded to the development environment corresponding to the resource pool access service. Similarly, when identifying the business service address of request B, if it is determined that the business service address belongs to the environment template management service, then request B can be forwarded to the development environment corresponding to the environment template management service.
[0100] In one embodiment, the above-mentioned R&D environment deployment method further includes:
[0101] Obtain the forwarding template file carried by the business forwarding service and extract forwarding rule information from the forwarding template file; display the forwarding rule information on the forwarding rule management page; if a modification operation is detected on the forwarding rule management page, obtain the modification content of the selected forwarding rule information; modify the forwarding template file of the selected forwarding rule information according to the modification content to update the business forwarding service and obtain the updated business forwarding service; the updated business forwarding service is used to redetermine the business service address corresponding to the business service processing request.
[0102] The forwarding rule information of the business forwarding service can be extracted from the forwarding template file carried by the business forwarding service. The forwarding template file can be used to deploy different configuration information such as rule information, file storage path, maximum number of connections, timeout time, lock file, security-related parameters, and running log file of the business forwarding service.
[0103] Specifically, by displaying forwarding rule information on the forwarding rule management page, the object initiating the business service processing request can trigger a modification operation based on the forwarding rule management page. When triggering a modification operation, the forwarding rule information to be modified must first be selected, and the modification content for that forwarding rule information must be obtained. Then, based on the modification content of the forwarding rule information, the forwarding template file of the selected forwarding rule information is adaptively modified to avoid the problem of asynchronous modification. Furthermore, by modifying the forwarding template file, the business forwarding service is updated and upgraded. Based on the updated and upgraded business forwarding service, the corresponding business service address for the business service processing request is re-determined to ensure that the business service address can be accessed normally and the corresponding business processing can be executed.
[0104] In one embodiment, such as Figure 4 As shown, a process for forwarding and processing business service requests is provided, referring to... Figure 4 It is understood that various entities, such as developers of enterprise applications or platforms, can trigger business service processing requests based on a browser. When initiating a business service processing request, they can obtain the DNS (Domain Name System) information of the host accessing the development environment. The Domain Name System record can include host records, record type, line type, record value, and TTL (Time to Live, in seconds). Based on the host's Domain Name System record, the business service address of the development environment that the host needs to access can be obtained. The nginx service is used to identify and judge the business service address, determine the corresponding target development environment, and forward the business service processing request initiated by the host to the corresponding target development environment.
[0105] Specifically, refer to Figure 4 As can be seen, after creating the development environments env-1 and env-2, nginx services are further deployed using nginx templates. When deploying nginx services, the template file of the nginx service is parsed.
[0106] Extract forwarding rule information (specifically, rule information such as server_name / proxy_name) from the forwarding template file, store the forwarding rule information in a database (such as MySQL, i.e., a relational database management system), and display the forwarding rule information on the forwarding rule management page.
[0107] Specifically, by calling the created DNS and load balancing interfaces, the DNS and load balancing configuration information of the target development environment is added to the target development environment. Through the load balancing configuration information corresponding to the target resource pool, the processing requests of each business service are evenly distributed to each processing node of the target resource pool.
[0108] Furthermore, referring to Figure 4 As can be seen, for example, if development environments env-1 and env-2 are created in the cluster namespace, and forwarding rules are configured in the nginx service of processing node 1, when a business service processing request comes in, the business service processing request is distributed to processing node 1 through load balancing. For the nginx service deployed on processing node 1, the business service address of the business service processing request can be identified and judged through the forwarding rules configured in the nginx service.
[0109] To give a simple example, if the address for a business service to process a request is 123.web1.dev.com (for example, representing the user management service), then the nginx service will forward the request to the business service at http: / / node1.50081 for processing. Or, if the address for a business service to process a request is 234.web2.dev.com (for example, representing the order management service), then the nginx service will forward the request to the business service at http: / / node1:50082 for processing. The address for the business service to process the request, such as 123.web1.dev.com, is obtained through DNS resolution of the host.
[0110] By configuring DNS information, load balancing configuration information, and forwarding rules for the nginx service for the target resource pool and target R&D environment, different R&D personnel or operations personnel can access or process business services through a browser (i.e., the WEB terminal). At the same time, after all kinds of information are configured, business services can also be accessed or processed through the command line.
[0111] In this embodiment, based on the load balancing configuration information corresponding to the target resource pool, the processing requests for each business service are evenly distributed to the processing nodes of the target resource pool. The processing nodes then obtain the target business data corresponding to each processing request. Furthermore, based on the business forwarding service deployed on the corresponding processing node, the business service address corresponding to each processing request is determined. Each business service processing request is then forwarded to the target development environment corresponding to the business service address, and the target business data is processed based on the target development environment. This achieves a balanced distribution of processing requests for each business service, avoiding processing conflicts. Simultaneously, by forwarding each business service processing request to its corresponding target development environment for processing, the system improves the speed and efficiency of processing different business services during development, reduces resource consumption, and further enhances development efficiency.
[0112] In one embodiment, a method for deploying a research and development environment is provided, specifically including:
[0113] Extract the object identifier carried in the business service processing request and obtain the object permissions corresponding to the object identifier; perform category identification on the object permissions to obtain the category of the object permissions; the categories of object permissions include access permissions and management permissions. Access permissions are used to access the resource pool, template repository or development environment, and management permissions include enterprise management permissions, resource pool management permissions, environment template management permissions and development environment management permissions.
[0114] If the object's permissions are resource pool management permissions, then respond to the detected resource pool creation command, create a new resource pool, and add a cluster access information configuration file to the resource pool; trigger a cluster connection operation based on the cluster access information configuration file, and obtain the validity of the cluster access information configuration file through the cluster connection operation; if the cluster access information configuration file is determined to be valid, establish a connection with the cluster based on the cluster access information configuration file, and deploy the resource pool in the connected cluster.
[0115] If a resource pool deletion command is detected, and it is determined that no environment components or business components related to the R&D environment are deployed in the resource pool, the resource pool deletion operation corresponding to the resource pool deletion command is executed; or if it is determined that environment components or business components related to the R&D environment are deployed in the resource pool, a message indicating deletion failure is returned.
[0116] Upon receiving a business service processing request, the system extracts the object identifier carried in the request and obtains the corresponding object permissions to classify the object permissions. These object permission categories include access permissions and management permissions. Access permissions are used to access resource pools, template repositories, or development environments, while management permissions include enterprise management permissions, resource pool management permissions, environment template management permissions, and development environment management permissions.
[0117] Specifically, by determining which type of management permission the current object's permissions belong to, for example, if the object's permissions are determined to be resource pool management permissions, it indicates that the current management operation is being performed on the resource pool according to the resource pool management instructions corresponding to the resource pool management permissions. The resource pool management instructions corresponding to the resource pool management permissions may include resource pool creation instructions, resource pool deletion instructions, resource pool details retrieval instructions, cluster namespace management instructions, and resource pool detection instructions, etc.
[0118] Furthermore, when a resource pool creation command is detected, the system responds to the command by creating a new resource pool and adding a cluster access information configuration file to the resource pool. This configuration file is used to establish a connection with the cluster so that the resource pool can be deployed in the connected cluster.
[0119] Before establishing a connection between the resource pool and the cluster based on the cluster access information configuration file, a cluster connection operation is triggered based on the configuration file. This operation determines the validity of the added cluster access information configuration file. Only when the configuration file is confirmed to be valid will a connection be established with the cluster based on the configuration file, allowing the resource pool to be deployed within the connected cluster.
[0120] In one embodiment, when a resource pool deletion command is detected, it is further checked whether the resource pool has a usable R&D environment deployed. If it is determined that no environment components or business components related to the R&D environment are deployed in the resource pool, the resource pool deletion operation corresponding to the resource pool deletion command is executed. Conversely, if it is determined that environment components or business components related to the R&D environment are deployed in the resource pool, the resource pool cannot be deleted, and a deletion failure message is returned.
[0121] In one embodiment, the resource pool management instructions corresponding to resource pool management permissions further include: resource pool details retrieval instructions, cluster namespace management instructions, and resource pool detection instructions. Therefore, the development environment deployment method may further include the following steps:
[0122] If a resource pool details retrieval command is detected, the system will respond to the resource pool details retrieval command and retrieve the cluster name of the connected cluster, the list of deployed R&D environments, the details of each processing node in the resource pool, and the resource pool management information.
[0123] If a cluster namespace management command is detected, the cluster namespace management command is responded to, and setting, modifying or managing the namespace of the connected cluster is performed.
[0124] If a resource pool detection command is detected, the system will respond to the resource pool detection command and perform detection operations on the cluster running status of the connected cluster, the component services, business services, or resource usage details deployed in the resource pool.
[0125] Specifically, when a resource pool details retrieval command is detected, the system responds to the command and executes the corresponding resource pool details retrieval operation. Specifically, it needs to retrieve the cluster names of connected clusters, the list of deployed development environments, the details of each processing node in the resource pool, and resource pool management information. Among these, the cluster names of connected clusters can be different types of clusters, and cluster names under each type. Specifically, they can be different Kubernetes clusters connected through the KubeConfig file. The list of deployed development environments represents the various accessible and usable development environments deployed in the resource pool. The details of each processing node in the resource pool include the processing performance of each processing node in the resource pool, the supported processing services, and the occupancy status of the processing nodes.
[0126] Similarly, when a cluster namespace management command is detected, the corresponding cluster namespace management operation is executed. Specifically, the cluster namespace management operation can include setting, modifying, and managing the namespace of the connected cluster. In particular, it can be setting, modifying, and managing the namespace of the Kubernetes cluster.
[0127] Furthermore, when a resource pool detection command is detected, the system responds by executing the corresponding resource pool detection operation. Specifically, this involves detecting the cluster running status of the connected cluster, the component services and business services deployed in the resource pool, and resource usage details. The cluster running status includes the Kubernetes cluster's running status, which can include whether the cluster is running normally and details of cluster memory usage. The component services and business services deployed in the resource pool can include environment configurations used to build the development environment and business services supported by the development environment (such as access services and management services for different modules or components). Resource usage details indicate the resource usage in the resource pool deployed within the cluster, such as the usage of component services and business services deployed in the resource pool, i.e., whether they are used to build the development environment, and whether there are idle component services or business services.
[0128] In one embodiment, such as Figure 5 As shown, a resource pool management interaction process for a research and development environment deployment method is provided, referring to... Figure 5 The interaction process for resource pool management is as follows:
[0129] Step S501: Initiate a registration or login request based on the WEB terminal (i.e., browser terminal) and send the registration or login request back to the account system.
[0130] Specifically, this could be initiated by R&D personnel or operations and maintenance personnel, who then initiate a registration or login request via a web application.
[0131] In step S502, when the account system receives a registration or login request, it registers or logs in the object according to the registration or login request. After successful registration or login, it sends the registration or login result back to the web terminal.
[0132] Step S503: After successful login, trigger the new resource pool command based on the WEB terminal, create a new resource pool by responding to the new resource pool command, and add a cluster access information configuration file to the resource pool.
[0133] In step S504, the resource pool management module verifies the object permissions of the currently logged-in object to determine whether the currently logged-in object has the operation permission to connect to the cluster.
[0134] This can also be used to determine whether the currently logged-in object is the owner of the current business, in order to determine whether the currently logged-in object has the necessary operating permissions.
[0135] Step S505: When it is determined that the currently logged-in object has the operation permission to connect to the cluster, the resource pool management module triggers the connection operation with the cluster through the cluster access information configuration file.
[0136] Specifically, the cluster access information configuration file can be a KubeConfig file, and the cluster that can establish a connection can be a Kubernetes cluster.
[0137] In step S506, the resource pool management module receives the connection result from the Kubernetes cluster. When the connection is confirmed to be successful, the resource pool is deployed in the cluster, and the cluster-related information is saved to the database.
[0138] Step S507: The resource pool management module sends the result of the resource pool creation to the web client.
[0139] The creation result can include creation success and creation failure.
[0140] Step S508: Initiate a resource pool deletion command via the web interface.
[0141] In step S509, the resource pool management module verifies the object permissions of the currently logged-in object to determine whether the currently logged-in object has the operation permission to delete the resource pool.
[0142] Step S510: When it is determined that the currently logged-in object has the operation permission to delete the resource pool, the resource management module uses the R&D environment management module to determine whether there are environment components or business components related to the R&D environment deployed in the resource pool.
[0143] In step S511, the R&D environment management module feeds back the judgment result to the resource management module.
[0144] Step S512: When no environment components or business components related to the R&D environment are deployed, the resource pool management module executes the resource pool deletion operation corresponding to the resource pool deletion command.
[0145] Step S513: When there are environment components or business components related to the R&D environment deployed, send a message to the web client indicating that deletion failed.
[0146] In this embodiment, the object identifier carried in the business service processing request is extracted, and the object permissions corresponding to the object identifier are obtained. Then, the object permissions are categorized to obtain their categories, and corresponding processing operations are performed based on the different object permission categories. When the object permission is a resource pool management permission, the system responds to the detected resource pool creation command, creates a new resource pool, adds a cluster access information configuration file to the resource pool, and triggers a cluster connection operation based on the cluster access information configuration file. The validity of the cluster access information configuration file is then determined through the cluster connection operation. If the cluster access information configuration file is determined to be valid, a connection is established with the cluster based on the cluster access information configuration file, and the resource pool is deployed in the connected cluster. Similarly, when a resource pool deletion command is detected, and it is determined that no environment components or business components related to the development environment are deployed in the resource pool, the resource pool deletion operation corresponding to the resource pool deletion command is executed. If it is determined that environment components or business components related to the development environment are deployed in the resource pool, a deletion failure message is returned. It enables the management of corresponding modules or components based on different object permission categories. By managing components, it provides corresponding development environments and business processing addresses for different business service processing requests, avoiding processing conflicts and improving development efficiency and business processing efficiency.
[0147] In one embodiment, a method for deploying a research and development environment is provided, specifically including:
[0148] Extract the object identifier carried in the business service processing request and obtain the object permissions corresponding to the object identifier; perform category identification on the object permissions to obtain the category of the object permissions; the categories of object permissions include access permissions and management permissions. Access permissions are used to access the resource pool, template repository or development environment, and management permissions include enterprise management permissions, resource pool management permissions, environment template management permissions and development environment management permissions.
[0149] If the object's permissions are environment template management permissions, then the environment template management instructions are checked; among which, the environment template management instructions include template creation instructions; responding to the template creation instructions, the corresponding template name is obtained; if it is determined that there is no environment template with the same template name in the template repository, the cluster's package management component is called to create a template data file corresponding to the template name, and the template data file is uploaded to the template repository.
[0150] Specifically, upon receiving a business service processing request, the system extracts the object identifier carried in the request and obtains the corresponding object permissions to classify the permissions. Further, it determines which type of management permission the current object permission belongs to. For example, if the object permission is determined to be an environment template management permission, it indicates that management operations are being performed on various environment templates based on the corresponding environment template management instructions. These environment template management instructions include template creation, modification, access, deletion, download, and distribution instructions.
[0151] Furthermore, when a template creation command is detected, the system responds by obtaining the corresponding template name and determining whether an environment template with the same name exists in the template repository. If it is determined that no environment template with the same name exists in the template repository, the cluster's package management component is invoked to create a template data file corresponding to the template name, and the template data file is uploaded to the template repository as the environment template to be installed, so that the current object or other objects can access, call, and perform other processing operations.
[0152] In one embodiment, the environment template management instruction further includes a template modification instruction; the step of responding to the environment template management instruction and performing the environment template management operation corresponding to the environment template management instruction further includes:
[0153] In response to a template modification command, the system retrieves the target template to be modified and performs a modification permission check on the target template, obtaining the corresponding verification result. If the verification result indicates that the target template is allowed to be modified, the system executes the template modification operation corresponding to the template modification command to obtain the modified environment template. The system then performs a validity check on the modified environment template, obtaining the corresponding verification result. If the verification result is successful, the system submits the modified environment template to the template repository for storage.
[0154] Specifically, when a template modification command is detected, the system responds to the command, retrieves the target template to be modified, performs a modification permission check on the target template, obtains the corresponding verification result, and further determines whether the selected target template is allowed to be modified by the current object based on the verification result. Specifically, for the current object, environment templates that have been pre-created and uploaded to the template repository by this object are allowed to be modified. However, if it is a default template or an environment template created and uploaded to the template repository by another object, it is not allowed to be modified by the current object; that is, the current object does not have modification permissions.
[0155] Furthermore, when the verification result determines that the target template is allowed to be modified, the template modification operation corresponding to the template modification instruction is executed to obtain the modified environment template. The modified environment template is then further validated for legality, specifically to determine whether the modification is malicious, whether it meets the legality requirements of the development environment, and whether it meets the legality requirements of the cluster. Only when the verification result is successful is the modification considered valid, and the modified environment template is submitted to the template repository for storage, for future viewing, retrieval, or modification.
[0156] In one embodiment, the environment template management instructions further include: a template access instruction, a template deletion instruction, a template download instruction, and a template distribution instruction; the environment template management operations corresponding to the environment template management instructions include: an environment template access operation corresponding to the template access instruction, an environment template deletion operation corresponding to the template deletion instruction, an environment template download operation corresponding to the template download instruction, and an environment template distribution operation corresponding to the template distribution instruction.
[0157] Specifically, when a template access command is detected, it is determined whether the environment template to be accessed already exists in the template repository. If it exists, the template access operation is performed. If it is determined that the environment template to be accessed does not exist in the template repository, the corresponding template creation command needs to be triggered to create the required environment template.
[0158] Similarly, when a template download command is detected, it is determined whether the environment template to be downloaded already exists in the template repository. If it exists, the template download operation is performed. If it is determined that the environment template to be downloaded does not exist in the template repository, the corresponding template creation command needs to be triggered to create the required environment template for access and download.
[0159] Furthermore, the template distribution command is used to select the corresponding target template from the template repository for distribution. By distributing the environment template, a development environment can be built in the resource pool. Specifically, when a template distribution command is detected, it is further determined whether the environment template to be distributed already exists in the template repository. If it exists, the template distribution operation is executed; if it does not exist, a corresponding template creation command needs to be triggered to create the required environment template and then distribute the template.
[0160] In one embodiment, when a template deletion command is detected, the system responds to the template deletion command, obtains the target template to be deleted, performs deletion permission verification on the target template, obtains the corresponding verification result, and further determines whether the selected target template is allowed to be deleted by the current object based on the verification result.
[0161] Specifically, for the current object, environment templates that have been pre-created and uploaded to the template repository by this object are allowed to be deleted. However, environment templates created by the default template or other objects and uploaded to the template repository are not allowed to be deleted by this object; that is, the current object does not have deletion permissions. When the verification result determines that the target template is allowed to be deleted, the template deletion operation corresponding to the template modification instruction is executed, deleting the selected target template.
[0162] In one embodiment, the created environment templates need to be uploaded to a template repository for unified storage according to the specified repository namespace. A corresponding repository namespace management module is set up for the template repository. The repository namespace is set when the repository is created; that is, the repository namespace is used to divide the repository and set corresponding namespaces for each, with different environment templates stored in different namespaces. The specified repository namespace indicates the specific storage location in the template repository when uploading the environment template.
[0163] In one embodiment, such as Figure 6 As shown, this provides an environment template management interaction process for a research and development environment deployment method, referring to... Figure 6 It can be seen that the interactive process for managing environment templates includes:
[0164] Step S601: Initiate a registration or login request based on the WEB terminal (i.e., browser terminal) and send the registration or login request back to the account system.
[0165] Specifically, this could be initiated by R&D personnel or operations and maintenance personnel, who then initiate a registration or login request via a web application.
[0166] In step S602, when the account system receives a registration or login request, it registers or logs in the object according to the registration or login request. After successful registration or login, it sends the registration or login result back to the web terminal.
[0167] Step S603: After confirming successful login, trigger the template creation command based on the WEB terminal and send the template creation command to the environment template management module.
[0168] Step S604: The environment template management module verifies the object permissions of the currently logged-in object to determine whether the currently logged-in object has the permission to create a new template.
[0169] This can also be used to determine whether the currently logged-in object is the owner of the current business, in order to determine whether the currently logged-in object has the necessary permissions, such as the permission to create a new environment template.
[0170] Step S605: Obtain the template name corresponding to the template creation instruction, and determine whether there is an environment template with the same template name.
[0171] Step S606: When it is determined that an environment template with the same name exists, a prompt message indicating that the template already exists is sent to the web client.
[0172] Step S607: When it is determined that there is no environment template with the same name as the template, the cluster's package management component is invoked to create a template data file corresponding to the template name.
[0173] In step S608, the package management component uploads the template data file as an environment template to the template repository.
[0174] In step S609, the template repository sends the upload result back to the environment template management module. The upload result includes whether the upload was successful or failed.
[0175] In step S610, the environment template management module sends the upload result of the environment template to the web client.
[0176] Step S611: The environment template management module stores the relevant information of the environment template into the database.
[0177] In step S612, the environment template management module receives a template access request triggered by the web client and determines whether the currently logged-in object has permission to access the template.
[0178] Step S613: When it is determined that the currently logged-in object has permission to access the template, the environment template management module retrieves the corresponding target environment template from the template repository according to the target environment template identifier carried in the template access request.
[0179] In step S614, the environment template management module sends the target environment template and its corresponding content to the web client.
[0180] In step S615, the environment template management module receives a template modification request triggered by the web client and determines whether the currently logged-in object has the permission to modify the template.
[0181] Step S616: When it is determined that the currently logged-in object has the permission to modify the template, the environment template management module obtains the modified environment template and verifies the legality of the modified environment template.
[0182] Step S617: When it is determined that the verification result of the modified environment template is valid, the environment template management module submits the modified environment template to the template repository for storage.
[0183] In step S618, the environment template management module stores the relevant information of the environment template in the database.
[0184] In step S619, the environment template management module sends feedback on the modification results of the environment template to the web client. The modification results include whether the modification was successful or failed.
[0185] In this embodiment, by extracting the object identifier carried in the business service processing request and obtaining the object permissions corresponding to the object identifier, the object permissions are categorized to obtain their categories. Then, corresponding processing operations are performed based on different categories of object permissions. If the object permission is an environment template management permission, a template creation instruction is detected and responded to, and the corresponding template name is obtained. If no environment template with the same name exists in the template repository, the cluster's package management component is invoked to create a template data file corresponding to the template name, and the template data file is uploaded to the template repository. This achieves management of corresponding environment templates or components based on different object permission categories. By managing each template or component, the development environment requirements for different business service processing requests can be met, avoiding requirement processing conflicts and improving development and business processing efficiency.
[0186] In one embodiment, a method for deploying a research and development environment is provided, specifically including:
[0187] Extract the object identifier carried in the business service processing request and obtain the object permissions corresponding to the object identifier; perform category identification on the object permissions to obtain the category of the object permissions; the categories of object permissions include access permissions and management permissions. Access permissions are used to access the resource pool, template repository or development environment, and management permissions include enterprise management permissions, resource pool management permissions, environment template management permissions and development environment management permissions.
[0188] If the object's permissions are for R&D environment management, then the R&D environment management commands are detected; in response to the R&D environment management commands, the corresponding R&D environment management operations are executed; among them, R&D environment management commands include environment creation commands, environment deletion commands, environment modification commands, environment upgrade commands, rollback commands, and upgrade history query commands; the R&D environment management operations corresponding to the R&D environment management commands include: R&D environment creation operation corresponding to the environment creation command, R&D environment deletion operation corresponding to the environment deletion command, R&D environment modification operation corresponding to the environment modification command, R&D environment upgrade operation corresponding to the environment upgrade command, R&D environment rollback operation corresponding to the rollback command, and environment upgrade history query operation corresponding to the upgrade history query command.
[0189] Specifically, upon receiving a business service processing request, the system extracts the object identifier carried in the request and obtains the corresponding object permissions to classify the permissions. Further, it determines which type of management permission the current object permission belongs to. For example, if the object permission is determined to be a development environment management permission, it indicates that management operations are being performed on various development environments based on the corresponding development environment management commands. These development environment management commands include environment creation commands, environment deletion commands, environment modification commands, environment upgrade commands, rollback commands, and upgrade history query commands.
[0190] Furthermore, when an environment creation command is detected, the development environment to be created corresponding to the environment creation command is obtained, and the status of the environment to be created is changed to "creating". By obtaining the environment version list in the template repository, the target environment template identifier is determined from the environment version list, that is, the version of the development environment to be created is determined. Then, according to the target environment template identifier, the corresponding target environment template is pulled from the template repository.
[0191] This process involves determining the target resource pool for deploying the target R&D environment from the resource pool list based on the R&D environment requirements corresponding to the environment creation command, and obtaining the cluster access information configuration file corresponding to the target resource pool. The corresponding cluster namespace is then determined by parsing the cluster access information configuration file. Next, the cluster's package management component is invoked to install the target environment template into the specified cluster namespace. When the cluster's package management component is invoked, it combines the environment components or business components related to the target environment template deployed in the target resource pool with the target environment template to obtain the target R&D environment, which is then deployed to the specified cluster namespace.
[0192] In one embodiment, when an environment deletion command is detected, in response to the command, it is determined whether the development environment to be deleted already exists in the resource pool. If it does, the development environment to be deleted is retrieved, and deletion permission is verified. The corresponding verification result is obtained, and further, based on the verification result, it is determined whether the selected development environment is allowed to be deleted. Specifically, it is necessary to determine whether the development environment has reached its corresponding usage period, or whether the development environment has fulfilled the development needs of different developers. If the development environment has reached its usage period or has fulfilled the development needs of different developers, it indicates that the current development environment is allowed to be deleted, and the corresponding development environment deletion operation is executed, deleting the selected development environment.
[0193] Similarly, when an environment modification command, environment upgrade command, or rollback command is detected, the system responds to the environment modification command, environment upgrade command, or rollback command by determining whether the development environment that needs to be modified, upgraded, or rolled back already exists in the resource pool. If it exists, the system obtains the development environment to be modified, upgraded, or rolled back and executes the corresponding development environment modification operation, development environment upgrade operation, or development environment rollback operation.
[0194] Specifically, when a historical upgrade record query command is detected, it is determined whether the current object has historical record query permission. If it is determined that the current object has historical record query permission, the environment upgrade historical record query operation corresponding to the upgrade historical record query command is executed to obtain the required environment upgrade historical record.
[0195] In one embodiment, such as Figure 7 As shown, a research and development environment deployment method is provided, including the research and development environment management interaction process, referring to... Figure 7 It can be seen that the interactive process for managing the R&D environment includes:
[0196] Step S701: Initiate a registration or login request based on the web interface and send the registration or login request back to the account system.
[0197] In step S702, when the account system receives a registration or login request, it registers or logs in the object according to the registration or login request. After successful registration or login, it sends the registration or login result back to the web terminal.
[0198] Step S703: After successful login, the resource pool management module sends a list of deployed resource pools to the web client.
[0199] Step S704: After successful login, the template management module sends a list of environment versions in the template repository to the web client.
[0200] In step S705, the web client determines the corresponding target resource pool from the resource pool list and the target environment template identifier from the environment version list based on the development environment requirements.
[0201] Step S706: Trigger the command to create a new R&D environment based on the WEB terminal, and send the command to the R&D environment management module.
[0202] In step S707, the R&D environment management module verifies the object permissions of the currently logged-in object based on the instruction to create a new R&D environment, and determines whether the currently logged-in object has the permission to create a new R&D environment.
[0203] The R&D environment management module can also receive environment template issuance instructions triggered by the web terminal, and verify the object permissions of the currently logged-in object to determine whether the currently logged-in object has the permission to issue environment templates.
[0204] Step S708: When it is determined that the developer has permission to create a new R&D environment, the R&D environment management module obtains the cluster access information configuration file corresponding to the target resource pool, and determines the corresponding cluster namespace by parsing the cluster access information configuration file.
[0205] In step S709, the R&D environment management module calls the cluster's package management component and pulls the corresponding target environment template from the template repository according to the target environment template identifier.
[0206] In step S710, the R&D environment management module calls the cluster's package management component to combine the environment components or business components related to the target environment template deployed in the target resource pool with the target environment template to obtain the target R&D environment.
[0207] Step S711: The R&D environment management module calls the cluster's package management component to deploy the target R&D environment to the cluster namespace specified by the cluster.
[0208] In step S712, the cluster sends the deployment results back to the R&D environment management module.
[0209] In step S713, the R&D environment management module sends the deployment results back to the web interface. The deployment results include whether the R&D environment deployment was successful or failed.
[0210] In this embodiment, by extracting the object identifier carried in the business service processing request and obtaining the object permissions corresponding to the object identifier, the object permissions are categorized to obtain their categories. Then, corresponding processing operations are performed based on different categories of object permissions. If the object permission is a development environment management permission, the development environment management command is detected and responded to, and the corresponding development environment management operation is executed. Specifically, this can include creating, deleting, modifying, upgrading, and rolling back the development environment, as well as querying the environment upgrade history. By controlling the entire lifecycle of the development environment, while providing development environments for different developers to perform business service processing and meeting the needs of different development environments, timely deletion of development environments avoids the environment continuously occupying server resources, reducing service resource consumption and lowering the development cost of applications or application platforms.
[0211] In one embodiment, a method for deploying a research and development environment is provided, specifically including:
[0212] Extract the object identifier carried in the business service processing request and obtain the object permissions corresponding to the object identifier; perform category identification on the object permissions to obtain the category of the object permissions; the categories of object permissions include access permissions and management permissions. Access permissions are used to access the resource pool, template repository or development environment, and management permissions include enterprise management permissions, resource pool management permissions, environment template management permissions and development environment management permissions.
[0213] If the object's permissions are enterprise management permissions, then the corresponding enterprise management command is detected; in response to the enterprise management command, the corresponding enterprise management operation is executed; among them, enterprise management commands include creation commands, add commands, switch commands, delete commands, transfer commands, and object permission modification commands; enterprise management operations include enterprise creation operations corresponding to creation commands, enterprise add operations corresponding to add commands, enterprise switch operations corresponding to switch commands, enterprise delete operations corresponding to delete commands, enterprise transfer operations corresponding to transfer commands and transfer operations of associated objects of the enterprise to be transferred, and object permission modification operations corresponding to object permission modification commands.
[0214] Specifically, upon receiving a business service processing request, the system extracts the object identifier carried in the request and obtains the object permissions corresponding to the object identifier to classify the object permissions and determine their category. Further, by determining which type of management permission the current object permission belongs to—for example, if the object permission is determined to be an enterprise management permission—it indicates that the corresponding enterprise management operation is being executed based on the enterprise management instruction corresponding to the enterprise management permission.
[0215] Enterprise management instructions include creation instructions, addition instructions, switching instructions, deletion instructions, transfer instructions, and object permission modification instructions. Enterprise management operations include: enterprise creation operation, enterprise addition operation, enterprise switching operation, enterprise deletion operation, enterprise transfer operation, transfer operation of associated objects of the enterprise to be transferred, and object permission modification operation.
[0216] Furthermore, when a create or delete command is detected, the object level of the current object is obtained. If the object level of the current object is enterprise owner, it indicates that the current object can trigger the corresponding create or delete command, and responds to the corresponding create or delete command by executing the enterprise creation operation or enterprise deletion operation corresponding to the create command. The object level of the current object includes both enterprise owner and ordinary enterprise objects.
[0217] Specifically, if the current object's object level is "Enterprise Owner," it means that the current object has permissions to perform operations such as enterprise creation, enterprise addition, enterprise switching, enterprise deletion, enterprise transfer, transfer of associated objects of the enterprise to be transferred, and modification of object permissions. If the current object's object level is "Ordinary Enterprise Object," it only has permissions to perform operations such as enterprise addition and enterprise switching.
[0218] Furthermore, when an add command is detected, the corresponding add command is responded to, and the current object is added to another enterprise other than the current enterprise. Similarly, when a switch command is detected, the corresponding switch command is responded to, the enterprises to which the current object has been added are obtained, and the object is switched to another enterprise other than the current enterprise, or switched to another enterprise specified by the current object.
[0219] In one embodiment, when a transfer instruction is detected, the object level of the current object is obtained. If the object level of the current object is enterprise owner, it indicates that the current object can trigger a transfer instruction. In response to the corresponding transfer instruction, all objects under the current enterprise are searched, and the target object to be transferred is determined from all objects. The enterprise transfer operation is performed to transfer the enterprise to the selected target object.
[0220] Enterprise transfer refers to the transfer of the enterprise management operation permissions of the current object (which may include the operation permissions to perform enterprise deletion operations, enterprise transfer operations, object permission modification operations, etc.) to the target object under the current enterprise. At the same time, the associated objects of the enterprise to be transferred are also transferred to the target object. After the transfer, the current object becomes an ordinary object of the enterprise, and the target object to be transferred becomes the enterprise owner.
[0221] Furthermore, when the current object is the enterprise owner, it can also trigger object permission modification operations to modify the object permissions of each object within the current enterprise, or trigger object search operations and object permission addition operations to search for other objects to add to the current enterprise, and configure different object permissions and object levels for each object.
[0222] Specifically, when an object permission modification command is detected, and it is determined that the current object's object level is enterprise owner, the object permission modification operation corresponding to the command is executed. Similarly, when object search and object permission addition operations are triggered, other objects can be searched and added to the current enterprise. Each object under the enterprise is assigned as a regular enterprise object or an administrator, and the permissions for other objects added to the enterprise to access resource data within the current enterprise are configured. Administrators have higher object permissions than regular enterprise objects, but lower object permissions than enterprise owners. For example, an administrator can search for regular enterprise objects to determine all regular enterprise objects within the current enterprise.
[0223] In one embodiment, such as Figure 8 As shown, this provides an enterprise management interaction process for a method of deploying a research and development environment, referring to... Figure 8 It can be seen that the interactive process of enterprise management includes:
[0224] Step S801: Initiate a registration or login request based on the web client and send the registration or login request back to the account system.
[0225] Specifically, this could be initiated by R&D personnel or operations and maintenance personnel, who then initiate a registration or login request via a web application.
[0226] In step S802, when the account system receives a registration or login request, it registers or logs in the object according to the registration or login request. After successful registration or login, it sends the registration or login result back to the web terminal.
[0227] Step S803: After confirming successful login, a creation command is triggered based on the web terminal and sent to the enterprise management module.
[0228] In step S804, the enterprise management module receives the creation instruction, creates the corresponding enterprise according to the instruction, and sends the creation result back to the web interface. The creation result includes whether the creation was successful or failed.
[0229] In step S805, upon receiving an add instruction, the enterprise management module adds the current object to the selected enterprise according to the instruction and sends the addition result back to the web interface. The addition result includes whether the addition was successful or failed.
[0230] Step S806: When a deletion command is received, the enterprise management module verifies the object permissions of the currently logged-in object to determine whether the currently logged-in object has the permission to delete the enterprise.
[0231] Step S807: When it is determined that the currently logged-in object has the permission to delete the enterprise, respond to the deletion command, execute the enterprise deletion operation, and send the corresponding deletion result back to the web client. The deletion result includes deletion success and deletion failure.
[0232] Step S808: When a switching instruction is received, the enterprise management module obtains all the enterprises to which the currently logged-in object has joined, and determines the target enterprise to be switched from all the enterprises.
[0233] In step S809, responding to the switching command, the enterprise management module switches the enterprise to which the currently logged-in object belongs to the target enterprise and sends the switching result back to the web client. The switching result includes whether the switching was successful or failed.
[0234] Step S810: When a handover instruction is received, the enterprise management module verifies the object permissions of the currently logged-in object to determine whether the currently logged-in object has the permission to hand over the enterprise.
[0235] Step S811: When it is determined that the currently logged-in object has the authority to transfer the enterprise, the enterprise management module responds to the transfer instruction, searches for all objects under the enterprise to be transferred, identifies the target object from all objects, executes the enterprise transfer operation, transfers the enterprise to be transferred to the target object, and feeds back the transfer result to the web terminal. The transfer result includes successful transfer and failed transfer.
[0236] In step S812, when an object search instruction is received, the enterprise management module searches for registered objects of the current enterprise and other enterprises, obtains the corresponding search results, and feeds the search results back to the WEB terminal.
[0237] In step S813, when an instruction to add an object for a search result is received, the enterprise management module verifies the object permissions of the currently logged-in object to determine whether the currently logged-in object has the permission to add an object.
[0238] Step S814: When it is determined that the currently logged-in object has the permission to add objects, respond to the object addition instruction, add each of the searched registered objects to the current enterprise, and add object permissions to each of the registered objects.
[0239] In step S815, the enterprise management module sends the object addition result corresponding to the object addition command back to the web interface. The object addition result includes whether the addition was successful or failed.
[0240] Step S816: When an object permission modification instruction is received, the enterprise management module verifies the object permissions of the currently logged-in object to determine whether the currently logged-in object has the permission to modify object permissions.
[0241] Step S817: When it is determined that the currently logged-in object has the permission to modify object permissions, the enterprise management module responds to the object permission modification instruction and modifies the object permissions of the selected object to the specified target object permissions.
[0242] In step S818, the enterprise management module sends the permission modification result corresponding to the object permission modification command back to the web client. The permission modification result includes whether the modification was successful or failed.
[0243] In this embodiment, by extracting the object identifier carried in the business service processing request and obtaining the object permissions corresponding to the object identifier, the object permissions are categorized to obtain their categories. Then, corresponding processing operations are performed based on different categories of object permissions. If the object permission is an enterprise management permission, the corresponding enterprise management command is detected and responded to, and the corresponding enterprise management operation is executed. Specifically, this can include enterprise creation, enterprise addition, enterprise switching, enterprise deletion, enterprise transfer, transfer of associated objects of the enterprise to be transferred, and object permission modification. This achieves the execution of corresponding enterprise management operations based on different object permission categories, ensuring the accuracy of object permissions for different objects under different enterprises, avoiding object permission confusion that could lead to internal enterprise management chaos, reducing resource consumption in the enterprise management section, and thus avoiding processing conflicts caused by service memory consumption, thereby improving development efficiency and business processing efficiency.
[0244] In one embodiment, such as Figure 9 As shown, a method for deploying a research and development environment is provided, referring to... Figure 9 It can be seen that the method specifically includes the following steps:
[0245] Step S901: When a registration or login request triggered by the web terminal is detected, the corresponding registration or login operation is executed.
[0246] Step S902: When it is confirmed that the login is successful on the web terminal, execute the enterprise addition operation corresponding to the addition command, and add the currently logged-in object to the selected target enterprise.
[0247] Step S903: When a template creation command is detected, respond to the template creation command, create a custom environment template or modify the default environment template to obtain an available environment template, and store the available environment template in the template repository.
[0248] Step S904: When a business service processing request is detected, obtain the R&D environment requirements corresponding to the business service processing request.
[0249] Step S905: Based on the requirements of the R&D environment, determine the corresponding target resource pool from the list of resource pools deployed in the cluster.
[0250] Step S906: Based on the requirements of the R&D environment, determine the target environment template identifier from the environment version list of the template repository, and pull the corresponding target environment template from the template repository according to the target environment template identifier.
[0251] Step S907: Obtain the cluster access information configuration file corresponding to the target resource pool, and determine the cluster namespace where the target resource pool is located based on the cluster access information configuration file.
[0252] Step S908: Based on the target environment template, the environment components and business components in the target resource pool, obtain the corresponding target R&D environment.
[0253] Step S909: Deploy the target R&D environment to the cluster namespace where the target resource pool is located.
[0254] Step S910: Add corresponding load balancing configuration information to the target resource pool, and distribute the processing requests of each business service to each processing node of the target resource pool in a balanced manner according to the load balancing configuration information.
[0255] Step S911: Obtain the target business data corresponding to the business service processing request through the processing node.
[0256] Step S912: Deploy service forwarding services for each processing node, and determine the service address corresponding to each service processing request based on the service forwarding services deployed on the corresponding processing node.
[0257] Step S913: Forward each business service processing request to the target development environment corresponding to the business service address.
[0258] Step S914: Access the target R&D environment and process the target business data based on the target R&D environment.
[0259] In the aforementioned R&D environment deployment method, by receiving business service processing requests and obtaining the R&D environment requirements carried in the requests, the corresponding target resource pool and target environment template are determined based on these requirements. This allows for the identification of separate target resource pools and templates for different R&D personnel, enabling the construction of target R&D environments that meet their individual needs and avoiding conflicts caused by multiple R&D personnel using the same environment. Furthermore, by obtaining the cluster access information configuration file corresponding to the target resource pool, the cluster namespace where the target resource pool resides can be determined. Based on the target environment template, the environment components, and business components within the target resource pool, the corresponding target R&D environment can be obtained and deployed to the cluster namespace where the target resource pool resides. This efficient use of the cluster reduces resource consumption during the R&D process. Since it eliminates the need to build complete R&D environments for each R&D personnel at different R&D stages, the setup time for R&D environments is reduced, further improving R&D efficiency.
[0260] It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0261] Based on the same inventive concept, this application also provides a research and development environment deployment system for implementing the research and development environment deployment method described above. The solution provided by this system is similar to the solution described in the above method; therefore, the specific limitations in one or more research and development environment deployment system embodiments provided below can be found in the limitations of the research and development environment deployment method described above, and will not be repeated here.
[0262] In one embodiment, such as Figure 10 As shown, a research and development environment deployment system is provided, including: a research and development environment requirements acquisition module 1002, a first determination module 1004, a second determination module 1006, and a target research and development environment deployment module 1008, wherein:
[0263] The R&D environment requirement acquisition module 1002 is used to receive business service processing requests and acquire the R&D environment requirements carried in the business service processing requests.
[0264] The first determination module 1004 is used to determine the corresponding target resource pool and target environment template based on the requirements of the R&D environment.
[0265] The second determining module 1006 is used to obtain the cluster access information configuration file corresponding to the target resource pool, and determine the cluster namespace where the target resource pool is located based on the cluster access information configuration file.
[0266] The target R&D environment deployment module 1008 is used to obtain the corresponding target R&D environment based on the target environment template, the environment components and business components in the target resource pool, and deploy the target R&D environment to the cluster namespace where the target resource pool is located.
[0267] In the aforementioned R&D environment deployment system, by receiving business service processing requests and obtaining the R&D environment requirements carried in those requests, the system determines the corresponding target resource pool and target environment template. This allows for the identification of separate target resource pools and templates for different developers, enabling the construction of target R&D environments that meet their individual needs and avoiding conflicts caused by multiple developers using the same environment. Furthermore, by obtaining the cluster access information configuration file corresponding to the target resource pool, the system determines the cluster namespace where the target resource pool resides. Based on the target environment template, the environment components, and business components within the target resource pool, the system obtains the corresponding target R&D environment and deploys it to the cluster namespace where the target resource pool resides. This efficient use of the cluster reduces resource consumption during the R&D process. Since it eliminates the need to build separate complete R&D environments for each developer at different R&D stages, the system reduces setup time and further improves R&D efficiency.
[0268] In one embodiment, a research and development environment deployment system is provided, further comprising: a request balancing allocation module, configured to evenly allocate each business service processing request to each processing node of the target resource pool according to load balancing configuration information corresponding to the target resource pool; a target business data acquisition module, configured to acquire target business data corresponding to the business service processing request through the processing node; a business service address determination module, configured to determine the business service address corresponding to each business service processing request according to the business forwarding service deployed on the corresponding processing node; and a business service processing request forwarding module, configured to forward each business service processing request to the target research and development environment corresponding to the business service address, and process the target business data based on the target research and development environment.
[0269] In one embodiment, a research and development environment deployment system is provided, further comprising: a forwarding rule information extraction module, used to obtain a forwarding template file carried by a business forwarding service and extract forwarding rule information from the forwarding template file; a forwarding rule information display module, used to display the forwarding rule information on a forwarding rule management page; a modification content acquisition module, used to obtain the modification content of the selected forwarding rule information if a modification operation is detected on the forwarding rule management page; a business forwarding service update module, used to modify the forwarding template file of the selected forwarding rule information according to the modification content to update the business forwarding service and obtain the updated business forwarding service; the updated business forwarding service is used to redetermine the business service address corresponding to the corresponding business service processing request.
[0270] In one embodiment, the first determining module is further configured to: obtain a list of resource pools deployed in the cluster and a list of environment versions in the template repository; determine the corresponding target resource pool from the resource pool list according to the development environment requirements; determine the target environment template identifier from the environment version list based on the development environment requirements, and pull the corresponding target environment template from the template repository according to the target environment template identifier.
[0271] In one embodiment, a research and development environment deployment system is provided, which further includes an object permission category identification module, used to: extract the object identifier carried in the business service processing request and obtain the object permission corresponding to the object identifier; perform category identification on the object permission to obtain the category of the object permission; the categories of object permission include access permission and management permission; wherein, access permission is used to access the resource pool, template repository or research and development environment; management permission includes enterprise management permission, resource pool management permission, environment template management permission and research and development environment management permission.
[0272] In one embodiment, such as Figure 11 As shown, a reference system architecture for deploying a research and development environment is provided. Figure 11 As can be seen, the R&D environment deployment system includes multiple modules such as enterprise management module 1102, resource pool management module 1104, environment template management module 1106, R&D environment management module 1108, repository management module 1110, access management module 1112, and account management module 1114. The R&D environment deployment system can be accessed via a browser (i.e., a web client). Each module within the system is responsible for different business functions, enabling the rapid deployment of multiple R&D environments on Kubernetes clusters across multiple clouds, including public, private, and hybrid clouds, and providing full lifecycle management for these environments.
[0273] The Enterprise Management Module 1102 is used to manage multiple enterprises and the relationships between different enterprises and objects. It is also used to manage the operation permissions of objects under an enterprise to the resource pool, environment templates, R&D environment, and template repository.
[0274] Specifically, the enterprise management module 1102 is used to: if the object's permissions are enterprise management permissions, detect the corresponding enterprise management instructions, respond to the enterprise management instructions, and execute the enterprise management operations corresponding to the management instructions. Enterprise management instructions include creation instructions, add instructions, switch instructions, delete instructions, transfer instructions, and object permission modification instructions; enterprise management operations include enterprise creation operations corresponding to creation instructions, enterprise add operations corresponding to add instructions, enterprise switch operations corresponding to switch instructions, enterprise delete operations corresponding to delete instructions, enterprise transfer operations corresponding to transfer instructions and transfer operations of associated objects of the enterprise to be transferred, and object permission modification operations corresponding to object permission modification instructions.
[0275] In one embodiment, such as Figure 12 As shown, an enterprise management module is provided. The enterprise management module is used to manage the relationship between the enterprise and various objects (i.e., whether an object has joined the enterprise, and which objects are included in the enterprise, etc.). It can also be used to manage the operation permissions of various objects under the enterprise on resource pools, environment templates, R&D environments, and template repositories.
[0276] Specifically, refer to Figure 12 As can be seen, the enterprise management module is used to perform enterprise creation, enterprise addition, enterprise switching, enterprise deletion, enterprise transfer (including the transfer of associated objects of the enterprise to be transferred), object permission modification, and enterprise settings.
[0277] The resource pool management module 1104 is mainly used to manage Kubernetes clusters and Kubernetes cluster namespaces on multiple clouds such as public cloud, private cloud or hybrid cloud connected through the cluster access information configuration file (i.e., KubeConfig file).
[0278] Specifically, the resource pool management module is used to: if the object's permissions are resource pool management permissions, respond to the detected resource pool creation command, create a new resource pool, and add a cluster access information configuration file to the resource pool; trigger a cluster connection operation based on the cluster access information configuration file, and obtain the validity of the cluster access information configuration file through the cluster connection operation; if the cluster access information configuration file is determined to be valid, establish a connection with the cluster based on the cluster access information configuration file, and deploy the resource pool in the connected cluster.
[0279] Furthermore, the resource pool management module is also used to: if a resource pool deletion command is detected and it is determined that no environment components or business components related to the R&D environment are deployed in the resource pool, execute the resource pool deletion operation corresponding to the resource pool deletion command; or if it is determined that environment components or business components related to the R&D environment are deployed in the resource pool, provide a prompt message indicating that the deletion failed.
[0280] In one embodiment, the resource pool management module is further configured to: if a resource pool details retrieval instruction is detected, respond to the resource pool details retrieval instruction to obtain the cluster name of the connected cluster, the list of deployed development environments, the details of each processing node in the resource pool, and the resource pool control information; if a cluster namespace management instruction is detected, respond to the cluster namespace management instruction to perform setting, modification, or management operations on the namespace of the connected cluster; if a resource pool detection instruction is detected, respond to the resource pool detection instruction to perform detection operations on the cluster running status of the connected cluster, the deployed component services, business services, or resource usage details in the resource pool.
[0281] In one embodiment, such as Figure 13 As shown, a resource pool management module is provided, referring to... Figure 13 As can be seen, the resource pool management module is used to perform operations such as creating a new resource pool, deleting a resource pool, obtaining resource pool details, managing cluster namespaces, and detecting resource pools.
[0282] The Environment Template Management Module 1106 is used to manage custom environment templates created by objects based on Helm (the package management component of the cluster), or to modify the default built-in templates to obtain usable environment templates. A set of R&D environment can be quickly deployed through template distribution.
[0283] Specifically, the environment template management module is used to: if the object's permissions are environment template management permissions, detect environment template management instructions, respond to environment template management instructions, and execute environment template management operations corresponding to the environment template management instructions.
[0284] Furthermore, the environment template management instructions include template creation instructions. The environment template management module is also used to: respond to template creation instructions and obtain the corresponding template name; if it is determined that there is no environment template with the same template name in the template repository, the cluster's package management component is called to create a template data file corresponding to the template name, and the template data file is uploaded to the template repository.
[0285] Similarly, the environment template management instructions also include template modification instructions. The environment template management module is also used to: respond to template modification instructions, obtain the target template to be modified, and perform modification permission verification on the target template to obtain the corresponding verification result; if the verification result indicates that the target template is allowed to be modified, then execute the template modification operation corresponding to the template modification instruction to obtain the modified environment template; perform legality verification based on the modified environment template to obtain the corresponding verification result; if the verification result is that the verification passes, submit the modified environment template to the template repository for storage.
[0286] In one embodiment, the environment template management instructions further include template access instructions, template deletion instructions, template download instructions, and template distribution instructions. The environment template management module is also used to: perform the environment template access operation corresponding to the template access instruction, the environment template deletion operation corresponding to the template deletion instruction, the environment template download operation corresponding to the template download instruction, and the environment template distribution operation corresponding to the template distribution instruction.
[0287] In one embodiment, such as Figure 14 As shown, an environment template management module is provided, which is used to perform operations such as creating environment templates, accessing environment templates, modifying environment templates, deleting environment templates, downloading environment templates, distributing environment templates, and retrieving template lists.
[0288] The R&D environment management module 1108 is used to manage R&D environments created through template distribution or new environment creation, and further perform operations such as upgrading, rolling back, deleting, and viewing logs of R&D environments.
[0289] Specifically, the R&D environment management module is used to: detect R&D environment management commands if the object's permissions are R&D environment management permissions; respond to R&D environment management commands and execute R&D environment management operations corresponding to the commands; wherein, R&D environment management commands include environment creation commands, environment deletion commands, environment modification commands, environment upgrade commands, rollback commands, and upgrade history query commands; the R&D environment management operations corresponding to the commands include: R&D environment creation operation corresponding to the environment creation command, R&D environment deletion operation corresponding to the environment deletion command, R&D environment modification operation corresponding to the environment modification command, R&D environment upgrade operation corresponding to the environment upgrade command, R&D environment rollback operation corresponding to the rollback command, and environment upgrade history query operation corresponding to the upgrade history query command.
[0290] In one embodiment, such as Figure 15As shown, a research and development environment management module is provided, which is used to perform operations such as creating a research and development environment, deleting a research and development environment, modifying a research and development environment, upgrading a research and development environment, rolling back a research and development environment, obtaining a list of research and development environments, obtaining detailed information about research and development environments, and querying the environment upgrade history.
[0291] The warehouse management module 1110 is used to manage self-built warehouses and warehouse namespaces. Specifically, for created environment templates, they need to be uploaded to the template warehouse for unified storage according to the specified warehouse namespace. The specified warehouse namespace indicates the specific storage location within the template warehouse when uploading the environment template.
[0292] Specifically, the warehouse management module 1110 is used to manage the template warehouse and set the corresponding warehouse namespace when creating the template warehouse. The warehouse namespace is used to divide the warehouse and set the corresponding namespace as different storage locations, so that different environment templates can be stored in different namespaces.
[0293] The access management module 1112 is based on the deployment of the R&D environment to the cluster. After the R&D environment is deployed, the access management module adds DNS information (domain name resolution records), load balancing configuration information, and forwarding rule information of the business forwarding service (nginx service) so that the created R&D environment can be accessed by different objects such as R&D personnel and operation and maintenance personnel through a browser.
[0294] Specifically, such as Figure 16 As shown, an access management module is provided, which is used to perform DNS information management operations, load balancing configuration operations, and forwarding rule information deployment operations, etc.
[0295] Specifically, based on the access management module, corresponding load balancing configuration information can be added to the target resource pool, and the processing requests of each business service can be evenly distributed to the processing nodes of the target resource pool according to the load balancing configuration information. At the same time, based on the access management module, a business forwarding service can also be deployed for each processing node. Then, based on the business forwarding service deployed on the corresponding processing node, the business service address corresponding to each business service processing request is determined, and the business service processing request is forwarded to the target development environment corresponding to the business service address.
[0296] The account management module 1114 is used to manage different registered objects, and provides basic functions such as account registration, login, cancellation, deletion, viewing and modifying account information.
[0297] Specifically, such as Figure 17 As shown, an account management module is provided, refer to Figure 17As can be seen, the account management module is used to perform operations such as account registration, account login, account cancellation, account deletion, account information viewing, and account information modification.
[0298] The aforementioned R&D environment deployment system adopts a B / S architecture, storing information such as resource pool status, different versions of R&D environment templates, and R&D environment status in MySQL (relational database), while environment template files are stored in COS (object storage). The web interface, i.e., the browser, provides an interface for developers to initiate access requests. The various management modules are used to manage the service components, business information, and data of each R&D environment on the Kubernetes cluster.
[0299] The aforementioned R&D environment deployment system can identify corresponding target resource pools and target environment templates for the different R&D environment needs of different R&D personnel, thereby constructing target R&D environments that meet their respective requirements. This avoids conflicts caused by multiple R&D personnel using the same set of R&D environments. By deploying each R&D environment on a cluster for adaptation, effective cluster utilization can be achieved, reducing resource consumption during the R&D process. Furthermore, since it is not necessary to build complete R&D environments for each R&D personnel at different R&D stages, the setup time for R&D environments can be reduced, further improving R&D efficiency.
[0300] Each module in the aforementioned R&D environment deployment system can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the computer device's memory as software, so that the processor can call and execute the corresponding operations of each module.
[0301] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 18As shown, the computer device includes a processor, memory, input / output interfaces (I / O), and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operating system and computer programs stored in the non-volatile storage media. The database stores data such as R&D environment requirements, target resource pools, target environment template data, cluster access information configuration files, environment components, business components, target R&D environments, and clusters. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communication with external terminals via a network connection. When the computer program is executed by the processor, it implements a R&D environment deployment method.
[0302] Those skilled in the art will understand that Figure 18 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0303] In one embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above method embodiments.
[0304] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the steps in the above method embodiments.
[0305] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.
[0306] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data shall comply with the relevant laws, regulations and standards of the relevant countries and regions.
[0307] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0308] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0309] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A method for deploying a research and development environment, characterized in that, The method includes: Receive a business service processing request and obtain the R&D environment requirements carried in the business service processing request; Obtain the list of resource pools deployed in the cluster and the list of environment versions in the template repository. Based on the development environment requirements, determine the corresponding target resource pool from the list of resource pools. Based on the aforementioned R&D environment requirements, the target environment template identifier is determined from the environment version list, and the corresponding target environment template is retrieved from the template repository according to the target environment template identifier. Obtain the cluster access information configuration file corresponding to the target resource pool, determine the cluster namespace where the target resource pool is located based on the cluster access information configuration file, and call the cluster's package management component to install the target environment template into the cluster namespace; the cluster access information configuration file is the access configuration information file of the container orchestrator cluster, used to establish the connection between the resource pool and the cluster; Based on the target environment template, the environment components and business components in the target resource pool, a corresponding target R&D environment is obtained, and the target R&D environment is deployed to the cluster namespace where the target resource pool is located; corresponding load balancing configuration information is added to the target resource pool, and according to the load balancing configuration information, the processing requests of each business service are evenly distributed to each processing node of the target resource pool; The processing node is used to obtain the target business data corresponding to the business service processing request. Deploy service forwarding services for each of the processing nodes, and determine the service service address corresponding to each service processing request based on the service forwarding services deployed for the corresponding processing nodes; Each of the aforementioned business service processing requests is forwarded to the target development environment corresponding to the business service address, and the target business data is processed based on the target development environment.
2. The method according to claim 1, characterized in that, The method further includes: Obtain the forwarding template file carried by the business forwarding service, and extract forwarding rule information from the forwarding template file; The forwarding rule information is displayed on the forwarding rule management page; If a modification operation is detected on the forwarding rule management page, obtain the modified content of the selected forwarding rule information; Based on the modifications, the forwarding template file of the selected forwarding rule information is modified to update the service forwarding service, resulting in an updated service forwarding service; the updated service forwarding service is used to redetermine the service address corresponding to the service processing request.
3. The method according to claim 1 or 2, characterized in that, The method further includes: Extract the object identifier carried in the business service processing request, and obtain the object permissions corresponding to the object identifier; The object permissions are categorized to obtain the object permission categories; the object permission categories include access permissions and management permissions; wherein, the access permissions are used to access the resource pool, template repository or R&D environment; the management permissions include enterprise management permissions, resource pool management permissions, environment template management permissions and R&D environment management permissions.
4. The method according to claim 3, characterized in that, After classifying the object permissions to obtain their categories, the method further includes: If the object permission is a resource pool management permission, then respond to the detected resource pool creation instruction, create a new resource pool, and add a cluster access information configuration file for the resource pool; A cluster connection operation is triggered based on the cluster access information configuration file, and the validity of the cluster access information configuration file is obtained through the cluster connection operation. If the cluster access information configuration file is determined to be valid, a connection with the cluster is established based on the cluster access information configuration file, and the resource pool is deployed in the connected cluster; If a resource pool deletion command is detected, and it is determined that no environment components or business components related to the R&D environment are deployed in the resource pool, the resource pool deletion operation corresponding to the resource pool deletion command is executed; or if it is determined that environment components or business components related to the R&D environment are deployed in the resource pool, a deletion failure prompt message is returned.
5. The method according to claim 3, characterized in that, After classifying the object permissions to obtain their categories, the method further includes: If the object's permission is environment template management permission, then detect the environment template management command; In response to the environment template management command, perform the environment template management operation corresponding to the environment template management command.
6. The method according to claim 5, characterized in that, The environment template management instructions include template creation instructions; the step of responding to the environment template management instructions and executing the environment template management operation corresponding to the environment template management instructions includes: Responding to the template creation command, obtain the corresponding template name; If it is determined that there is no environment template with the same name as the template in the template repository, the cluster's package management component is invoked to create a template data file corresponding to the template name, and the template data file is uploaded to the template repository.
7. The method according to claim 5, characterized in that, The environment template management command also includes a template modification command; the step of responding to the environment template management command and executing the environment template management operation corresponding to the environment template management command includes: In response to the template modification instruction, the target template to be modified is obtained, and the modification permission of the target template is verified to obtain the corresponding verification result; If the verification result indicates that the target template is allowed to be modified, then the template modification operation corresponding to the template modification instruction is executed to obtain the modified environment template; Based on the modified environment template, a legality check is performed to obtain the corresponding check result; If the verification result is successful, the modified environment template is submitted to the template repository for storage.
8. The method according to claim 3, characterized in that, After classifying the object permissions to obtain their categories, the method further includes: If the object permission is R&D environment management permission, then the R&D environment management command is detected; in response to the R&D environment management command, the corresponding R&D environment management operation is executed; wherein, the R&D environment management command includes environment creation command, environment deletion command, environment modification command, environment upgrade command, rollback command, and upgrade history query command; the R&D environment management operation corresponding to the R&D environment management command includes: R&D environment creation operation corresponding to the environment creation command, R&D environment deletion operation corresponding to the environment deletion command, R&D environment modification operation corresponding to the environment modification command, R&D environment upgrade operation corresponding to the environment upgrade command, R&D environment rollback operation corresponding to the rollback command, and environment upgrade history query operation corresponding to the upgrade history query command.
9. The method according to claim 3, characterized in that, After classifying the object permissions to obtain their categories, the method further includes: If the object permission is an enterprise management permission, then the corresponding enterprise management instruction is detected; in response to the enterprise management instruction, the enterprise management operation corresponding to the instruction is executed; wherein, the enterprise management instruction includes a creation instruction, an add instruction, a switch instruction, a delete instruction, a transfer instruction, and an object permission modification instruction; the enterprise management operation includes an enterprise creation operation corresponding to the creation instruction, an enterprise add operation corresponding to the add instruction, an enterprise switch operation corresponding to the switch instruction, an enterprise delete operation corresponding to the delete instruction, an enterprise transfer operation and a transfer operation of associated objects of the enterprise to be transferred corresponding to the transfer instruction, and an object permission modification operation corresponding to the object permission modification instruction.
10. The method according to claim 1 or 2, characterized in that, The method further includes: If a resource pool details retrieval command is detected, the system responds to the command by retrieving the cluster name of the connected cluster, the list of deployed development environments, the details of each processing node in the resource pool, and the resource pool management information. If a cluster namespace management command is detected, the system responds to the command by setting, modifying, or managing the namespace of the connected cluster. If a resource pool detection command is detected, the system responds to the command by detecting the cluster running status of the connected cluster, the deployed component services, business services, or resource usage details in the resource pool.
11. The method according to claim 5, characterized in that, The environment template management instructions also include: template access instructions, template deletion instructions, template download instructions, and template distribution instructions; the environment template management operations corresponding to the environment template management instructions include: environment template access operation corresponding to the template access instructions, environment template deletion operation corresponding to the template deletion instructions, environment template download operation corresponding to the template download instructions, and environment template distribution operation corresponding to the template distribution instructions.
12. A research and development environment deployment system, characterized in that, The system includes: The R&D environment requirement acquisition module is used to receive business service processing requests and acquire the R&D environment requirements carried by the business service processing requests. The first determining module is used to obtain a list of resource pools deployed in the cluster and a list of environment versions in the template repository; determine the corresponding target resource pool from the list of resource pools according to the development environment requirements; determine the target environment template identifier from the list of environment versions based on the development environment requirements; and pull the corresponding target environment template from the template repository according to the target environment template identifier. The second determining module is used to obtain the cluster access information configuration file corresponding to the target resource pool, determine the cluster namespace where the target resource pool is located based on the cluster access information configuration file, and call the cluster's package management component to install the target environment template into the cluster namespace; the cluster access information configuration file is the access configuration information file of the container orchestrator cluster, used to establish a connection between the resource pool and the cluster. The target R&D environment deployment module is used to obtain the corresponding target R&D environment based on the target environment template, the environment components and business components in the target resource pool, and deploy the target R&D environment to the cluster namespace where the target resource pool is located; The load balancing module is used to add corresponding load balancing configuration information to the target resource pool, and to distribute the processing requests of each business service to each processing node of the target resource pool in a balanced manner according to the load balancing configuration information. The target business data acquisition module is used to acquire the target business data corresponding to the business service processing request through the processing node; The service address determination module is used to deploy service forwarding services for each of the processing nodes, and determine the service address corresponding to each service processing request based on the service forwarding services deployed on the corresponding processing nodes. The business service processing request forwarding module is used to forward each of the business service processing requests to the target development environment corresponding to the business service address, and to process the target business data based on the target development environment.
13. The system according to claim 12, characterized in that, The system also includes: The forwarding rule information extraction module is used to obtain the forwarding template file carried by the business forwarding service and extract forwarding rule information from the forwarding template file; The forwarding rule information display module is used to display the forwarding rule information on the forwarding rule management page; The modification content acquisition module is used to acquire the modification content of the selected forwarding rule information if a modification operation is detected on the forwarding rule management page. The service forwarding service update module is used to modify the forwarding template file of the selected forwarding rule information according to the modified content, so as to update the service forwarding service and obtain the updated service forwarding service; the updated service forwarding service is used to redetermine the service address corresponding to the service processing request.
14. The system according to claim 12 or 13, characterized in that, The system also includes an object permission category recognition module, used for: Extract the object identifier carried in the business service processing request and obtain the object permissions corresponding to the object identifier; perform category identification on the object permissions to obtain the category of the object permissions; The categories of object permissions include access permissions and management permissions; wherein, the access permissions are used to access the resource pool, template repository or R&D environment; the management permissions include enterprise management permissions, resource pool management permissions, environment template management permissions and R&D environment management permissions.
15. The system according to claim 14, characterized in that, The system also includes a resource pool management module, used for: If the object permission is a resource pool management permission, then respond to the detected resource pool creation instruction, create a new resource pool, and add a cluster access information configuration file for the resource pool; trigger a cluster connection operation based on the cluster access information configuration file, and obtain the validity of the cluster access information configuration file through the cluster connection operation. If the cluster access information configuration file is determined to be valid, a connection with the cluster is established based on the cluster access information configuration file, and the resource pool is deployed in the connected cluster; If a resource pool deletion command is detected, and it is determined that no environment components or business components related to the R&D environment are deployed in the resource pool, the resource pool deletion operation corresponding to the resource pool deletion command is executed; or if it is determined that environment components or business components related to the R&D environment are deployed in the resource pool, a deletion failure prompt message is returned.
16. The system according to claim 14, characterized in that, The system also includes an environment template management module, used for: If the object permission is environment template management permission, then detect the environment template management instruction; respond to the environment template management instruction, and execute the environment template management operation corresponding to the environment template management instruction.
17. The system according to claim 16, characterized in that, The environment template management instructions include template creation instructions; the environment template management module is also used for: In response to the template creation command, obtain the corresponding template name; if it is determined that there is no environment template with the same template name in the template repository, call the cluster's package management component to create a template data file corresponding to the template name, and upload the template data file to the template repository.
18. The system according to claim 16, characterized in that, The environment template management instructions also include template modification instructions; the environment template management module is further used for: In response to the template modification instruction, the target template to be modified is obtained, and the modification permission of the target template is verified to obtain the corresponding verification result; If the verification result indicates that the target template is allowed to be modified, then the template modification operation corresponding to the template modification instruction is executed to obtain the modified environment template; Based on the modified environment template, a legality check is performed to obtain the corresponding check result; If the verification result is successful, the modified environment template is submitted to the template repository for storage.
19. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 11.
20. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 11.
21. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 11.
Citation Information
Patent Citations
Development and test environment deployment method and system, electronic equipment and medium
CN113448837A
Container-based multi-machine-room batch automatic application deployment method and system
CN113672240A
Model-based service processing method and device, and server
CN113965563A
User environment delivery method and device for SaaS (Software as Service) and medium
CN114546597A
Business deployment method and device for multiple Kubernetes clusters
CN114625535A