CN111813419B - Method for managing life cycle of bare computer based on kubernetes declaration - Google Patents

Method for managing life cycle of bare computer based on kubernetes declaration Download PDF

Info

Publication number
CN111813419B
CN111813419B CN202010654896.0A CN202010654896A CN111813419B CN 111813419 B CN111813419 B CN 111813419B CN 202010654896 A CN202010654896 A CN 202010654896A CN 111813419 B CN111813419 B CN 111813419B
Authority
CN
China
Prior art keywords
ironicmeta
ironic
baremeta
kubernetes
crd
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010654896.0A
Other languages
Chinese (zh)
Other versions
CN111813419A (en
Inventor
潘峰
赵美如
唐航
蔡卫卫
高传集
唐晓东
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Inspur Cloud Information Technology Co Ltd
Original Assignee
Inspur Cloud Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Inspur Cloud Information Technology Co Ltd filed Critical Inspur Cloud Information Technology Co Ltd
Priority to CN202010654896.0A priority Critical patent/CN111813419B/en
Publication of CN111813419A publication Critical patent/CN111813419A/en
Application granted granted Critical
Publication of CN111813419B publication Critical patent/CN111813419B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention provides a method for managing life cycle of bare metal based on kubernetes declaration, which is based on an open source Operator technical framework in kubernetes and realizes an IronicMeta-Operator tool, wherein the IronicMeta-Operator tool monitors and calls services of an ironic-api through a resource object state to realize automation of the bare metal. The method can code the experience of operation and maintenance into a tool, and a plurality of new bare computers can be quickly installed only by the operation and maintenance personnel who understand the related parameter configuration. Through the improvement of the degree of automation, the real condition of the bare computer can be known by checking the resource state in kubernetes without manual intervention by using the Ironic command line operation tool for the original man-machine interaction, and the bare computer is convenient, quick and clear at a glance.

Description

Method for managing life cycle of bare computer based on kubernetes declaration
Technical Field
The invention belongs to the technical field of kubernetes cloud primary cluster external resource management, and relates to a RAID card of a bare computer (physical machine) and a declarative automatic management method of related devices of an operating system.
Background
At present, the bare metal installation is basically managed by an Ironic component in an OpenStack open source project, but the automation management degree of the Ironic is not high, and operation and maintenance personnel are required to master the bare metal installation flow of the Ironic and related technical terms more skillfully.
The installation of the Ironic management bare metal supports the command line and API mode, but the steps are more, referring to fig. 1, and if the manual operation is adopted, the command needs to be executed step by step according to the above-mentioned flow, and the steps are complicated. If bare metal is mass-mounted, the efficiency is very low. Because man-machine interaction time is more and not suitable for script realization automation, operation and maintenance cost is high, the degree of difficulty is big, is difficult to be promoted to all operation and maintenance implementation personnel in a large scale fast.
Disclosure of Invention
The invention provides a method for managing a bare metal life cycle based on kubernetes declaration, which aims at the problems that the installation of the existing Ironic management bare metal is slow, the implementation and maintenance difficulties are high, and the cloud platform infrastructure cannot be promoted in a large scale.
The method can code the experience of operation and maintenance into a tool, and a plurality of new bare computers can be quickly installed only by the operation and maintenance personnel who understand the related parameter configuration. Through the improvement of the degree of automation, the Ironic command line operation tool for the original man-machine interaction is realized, manual intervention is not needed, the real condition of the bare computer can be known only by checking the resource state in kubernetes, the operation is convenient and quick, the operation is clear at a glance, and personnel who do not understand the complex operation of the Ironic are convenient to manage the bare computer. The bare computer resource is used as a new resource for kubernetes management, is convenient for unified management plane, and does not need additional switching management tools.
The technical scheme adopted for solving the technical problems is as follows:
a method for declaratively managing bare metal lifecycle based on kubernetes is based on an open-source Operator technical framework in kubernetes, and realizes an IronicMeta-Operator tool, wherein the IronicMeta-Operator tool realizes an automatic device bare metal in a mode of monitoring and calling services of an ironic-api through a resource object state.
Optionally, the IronicMeta-Operator tool IronicMeta Controller + IronicMeta (CRD) +IronicMeta-sync, bareMeta Controller +BareMeta (CRD) components. Both the Controller and the CRD in the Operator require their own design to implement.
Alternatively, the CRD is: user-defined resource types in kubernetes;
IronicMeta (CRD): metadata declaratively defining the Ironic service;
IronicMeta Controller: with the mechanism of Kubernetes Controller, the coordination logic is triggered by monitoring IronicMeta (CRD) the state of a resource object;
IronicMeta-sync: periodically pulling a node list of the Ironic-API, and synchronously updating or creating a BareMeta (CRD) resource object list;
BareMeta (CRD): declaratively defining metadata for the bare metal;
BareMeta Controller: with the mechanism of Kubernetes Controller, coordination logic is triggered by monitoring the state of BareMeta (CRD) resource objects, and different install logic is executed according to different states.
Optionally, the implementation procedure of BareMeta Controller is as follows:
step 1) creating an IronicMeta resource object
apiVersion:infra.x.com/v1alpha1
kind:IronicMeta
metadata:
name:example-ironicmeta
spec:
#Add fields here
ironic_api_address:10.0.10.1:8080
...
The coordination logic of step 2) IronicMeta Controller is triggered, according to the property ironic_api_address in the ironicmea resource object and related parameters, the Ironic-api is called to create a network required by bare metal installation, and then all bare metal nodes are set to restart once in a p-xe starting mode through a command line tool (existing tool) of ipmi, so that the bare metal can be conveniently and rapidly registered to the nodes in the Ironic service for discovery.
Creating a secondary resource kubernetes pod (IronicMeta-sync) of an IronicMeta object, wherein the IronicMeta-sync is responsible for periodically calling an interface of an ironic-api, inquiring the found node list information, and updating or creating a resource object of BareMeta with a corresponding name;
the coordination logic of step 3) BareMeta Controller is triggered to determine whether to perform raid or system loading on the bare computer according to the properties ironic_api_address and status in the resource object of BareMeta.
Optionally, when step 3) is performed, the BareMeta object or update state is synchronously created, and the iri-api node list is periodically synchronized.
Optionally, the IronicMeta (CRD) declaratively defined metadata for the Ironic service includes information about the Ironic-api component address.
Optionally, the BareMeta (CRD) declarative metadata defines that the bare metal includes an installation source address, a host name, and a management ip used by the bare metal.
Optionally, the BareMeta Controller uses Kubernetes Controller mechanisms to trigger coordination logic by calling the interface of the irinic-api to monitor the state of the BareMeta (CRD) resource object, and different installation logic may be executed according to different states.
Compared with the prior art, the method for managing the life cycle of the bare metal based on kubernetes declaration has the following beneficial effects:
1. according to the kubernetes cloud native technology disclosed by the invention, bare computer resources are managed, and the life cycle of the bare computer resources is managed by using a kubernetes CRD+ kubernetes Controller + external resource state monitoring component.
2. The bare metal flow of the automatic device is realized in a state monitoring bare metal mode, and the operation and maintenance personnel can use the bare metal flow conveniently through state simplification and automatic driving;
3. the method can realize various management functions of bare metal automation devices, updating and the like.
The method can code the experience of operation and maintenance into a tool, and a plurality of new bare computers can be quickly installed only by the operation and maintenance personnel who understand the related parameter configuration. Through the improvement of the degree of automation, the operation of the Ironic command line which is originally man-machine interactive is shielded, manual intervention is not needed, the real condition of the bare computer can be known only by checking the resource state in kubernetes, the method is convenient and quick, and the method is clear at a glance, and is convenient for personnel who do not understand the complex operation of the Ironic to manage the bare computer. The bare computer resource is used as a self-defined resource for kubernetes management, is convenient for unified management of cloud primordia, and does not need an additional switching management tool.
Drawings
In order to more clearly describe the working principle of the method for managing the life cycle of the bare metal based on kubernetes declaration, the following is further explained by attaching a schematic diagram.
FIG. 1 is a state flow diagram of an Ironic managed bare metal in the prior art;
FIG. 2 is a diagram of the composition of an IronicMeta-Operator of the present invention;
FIG. 3 is a business flow diagram of BareMeta of the present invention;
FIG. 4 is a business flow diagram of BareMeta of the present invention;
FIG. 5 is a business flow diagram of an IronicMeta-Operator of the present invention;
in fig. 5, the active network: network for bare metal installation in ironic service
bm: abbreviation of BareMeta, bare metal metadata
The native port: assigning ip usage to bare metal
The steps in fig. 5 are all necessary for the ironic to install the operating system on the bare metal.
Detailed Description
The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to fig. 1 to 5 of the embodiments of the present invention, and it is obvious that the described embodiments are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
At present, the installation of the bare metal is basically the management of the Ironic component in the open source project of OpenStack, but the automation management degree is not high, and operation and maintenance personnel are required to master the process of installing the bare metal of Ironic and related technical terms more skillfully. The installation of the Ironic management bare computer supports the command line and API modes, but the steps are more, the man-machine interaction time is more, and the method is not suitable for script realization automation, the operation and maintenance cost is high, the difficulty is high, and the method is not easy to be rapidly popularized to all operation and maintenance implementation personnel in a large range.
According to the method for managing the life cycle of the bare metal based on the kubernetes declaration, an IronicMeta-Operator tool is realized based on an open-source Operator technical framework in the kubernetes, and the IronicMeta-Operator tool is used for realizing the automation of the bare metal of the device in a mode of monitoring and calling the services of the ironic-api through the resource object state.
With reference to FIGS. 2 and 5, the IronicMeta-Operator tool IronicMeta Controller + IronicMeta (CRD) +IronicMeta-sync, bareMeta Controller +BareMeta (CRD) components. Both the Controller and the CRD in the Operator require their own design to implement.
Alternatively, the CRD is: user-defined resource types in kubernetes;
IronicMeta (CRD): metadata declaratively defining the Ironic service;
IronicMeta Controller: with the mechanism of Kubernetes Controller, the coordination logic is triggered by monitoring IronicMeta (CRD) the state of a resource object;
IronicMeta-sync: periodically pulling a node list of the Ironic-API, and synchronously updating or creating a BareMeta (CRD) resource object list;
BareMeta (CRD): declaratively defining metadata for the bare metal;
BareMeta Controller: with the mechanism of Kubernetes Controller, the coordination logic is triggered by monitoring the state of the BareMeta (CRD) resource object, and different installation logic is executed according to different states, as shown in fig. 3.
BareMeta Controller is realized as follows:
step 1) creating an IronicMeta resource object
apiVersion:infra.x.com/v1alpha1
kind:IronicMeta
metadata:
name:example-ironicmeta
spec:
#Add fields here
ironic_api_address:10.0.10.1:8080
...
The coordination logic of step 2) IronicMeta Controller is triggered, according to the property ironic_api_address in the ironicmea resource object and related parameters, the Ironic-api is called to create a network required by bare metal installation, and then all bare metal nodes are set to restart once in a p-xe starting mode through a command line tool (existing tool) of ipmi, so that the bare metal can be conveniently and rapidly registered to the nodes in the Ironic service for discovery.
Creating a secondary resource kubernetes pod (IronicMeta-sync) of an IronicMeta object, wherein the IronicMeta-sync is responsible for periodically calling an interface of IronicMeta-api, querying the discovered node list information, and updating or creating a resource object of BareMeta with a corresponding name.
The coordination logic of step 3) BareMeta Controller is triggered, and according to the attributes ironic_api_address and status in the resource object of BareMeta, the logic of raid or system loading is determined for the bare metal, and the specific flow refers to fig. 4:
when step 3) is performed, the BareMeta object or update state is synchronously created, and the ironic-api node list is periodically synchronized.
The IronicMeta (CRD) declarative definition metadata for an Ironic service contains information about the Ironic-api component address.
The above-described metadata for BareMeta (CRD) declaratively defines that the bare metal includes an installation source address, a host name, and a management ip used by the bare metal.
The BareMeta Controller described above uses the Kubernetes Controller mechanism to trigger the coordinator logic by calling the interface of the iric-api to monitor the state of the BareMeta (CRD) resource object, and different install logic will be executed according to different states.
It is noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus.
Although embodiments of the present invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made therein without departing from the principles and spirit of the invention, the scope of which is defined in the appended claims and their equivalents.

Claims (4)

1. A method for declaratively managing bare metal lifecycle based on kubernetes is characterized in that the method is based on an open-source Operator technical framework in kubernetes, and an IronicMeta-Operator tool is realized, wherein the IronicMeta-Operator tool monitors and invokes services of an ironic-api through resource object states to realize automatic bare metal devices;
the IronicMeta-Operator tool IronicMeta Controller + IronicMeta (CRD) +IronicMeta-sync, bareMeta Controller +BareMeta (CRD) components;
CRD is: user-defined resource types in kubernetes;
IronicMeta (CRD): metadata declaratively defining the Ironic service;
IronicMeta Controller: with the mechanism of Kubernetes Controller, the coordination logic is triggered by monitoring IronicMeta (CRD) the state of a resource object;
IronicMeta-sync: periodically pulling a node list of the Ironic-API, and synchronously updating or creating a BareMeta (CRD) resource object list;
BareMeta (CRD): declaratively defining metadata for the bare metal;
BareMeta Controller: with the mechanism of Kubernetes Controller, the coordination logic is triggered by monitoring the state of the BareMeta (CRD) resource object, and different installation logic is executed according to different states;
the implementation process of IronicMeta Controller is as follows:
step 1) creating an IronicMeta resource object
apiVersion:infra.x.com/v1alpha1
kind:IronicMeta
metadata:
name:example-ironicmeta
spec:
ironic_api_address:10.0.10.1:8080
Step 2) IronicMeta Controller is triggered, according to the property ironic_api_address in the ironicmea resource object and related parameters, calling Ironic-api to create a network required by bare metal installation, and then setting all bare metal nodes to restart once in a p-xe starting mode through a command line tool (existing tool) of ipmi, so that the bare metal can be conveniently and rapidly registered to the nodes in the Ironic service to find;
creating a secondary resource kubernetes pod (IronicMeta-sync) of an IronicMeta object, wherein the IronicMeta-sync is responsible for periodically calling an interface of an ironic-api, inquiring the found node list information, and updating or creating a resource object of BareMeta with a corresponding name;
step 3) BareMeta Controller is triggered to determine whether to perform raid or system loading on the bare computer according to the properties ironic_api_address and status in the resource object of BareMeta; and 3) synchronously creating BareMeta objects or updating states and periodically synchronizing the ironic-api node list when the step 3) is executed.
2. The method of claim 1, wherein the IronicMeta (CRD) declaratively defines metadata for an Ironic service to include Ironic-api component address related information.
3. A method of managing a bare metal lifecycle based on kubernetes declaration as recited in claim 2, wherein the BareMeta (CRD) declaration defines metadata of the bare metal including an installation source address, a host name, and a management ip used by the bare metal.
4. A method of managing a bare metal lifecycle based on kubernetes declaration as claimed in claim 3, wherein the BareMeta Controller uses Kubernetes Controller mechanism to trigger the coordination logic by calling the interface of the irinic-api to monitor the state of the BareMeta (CRD) resource object, and different installation logic is executed according to different states.
CN202010654896.0A 2020-07-09 2020-07-09 Method for managing life cycle of bare computer based on kubernetes declaration Active CN111813419B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010654896.0A CN111813419B (en) 2020-07-09 2020-07-09 Method for managing life cycle of bare computer based on kubernetes declaration

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010654896.0A CN111813419B (en) 2020-07-09 2020-07-09 Method for managing life cycle of bare computer based on kubernetes declaration

Publications (2)

Publication Number Publication Date
CN111813419A CN111813419A (en) 2020-10-23
CN111813419B true CN111813419B (en) 2024-04-16

Family

ID=72842030

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010654896.0A Active CN111813419B (en) 2020-07-09 2020-07-09 Method for managing life cycle of bare computer based on kubernetes declaration

Country Status (1)

Country Link
CN (1) CN111813419B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112506477B (en) * 2020-11-09 2023-08-08 麒麟软件有限公司 Method for adding computing nodes in Kubernetes cluster by using RESTful API
CN112667362B (en) * 2021-01-04 2022-06-21 烽火通信科技股份有限公司 Method and system for deploying Kubernetes virtual machine cluster on Kubernetes
US11693649B2 (en) 2021-04-06 2023-07-04 International Business Machines Corporation Autonomous Kubernetes operator creation and management
CN113296809B (en) * 2021-05-21 2023-12-12 南京大学 Declarative general Kubernetes tuning method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018205325A1 (en) * 2017-05-08 2018-11-15 网宿科技股份有限公司 Method and system for use in constructing content delivery network platform on heterogeneous resources
CN110851145A (en) * 2019-09-30 2020-02-28 烽火通信科技股份有限公司 Edge cloud installation and maintenance method and system based on container arrangement
CN111124437A (en) * 2019-11-30 2020-05-08 苏州浪潮智能科技有限公司 Bare computer resource configuration information acquisition method, system and equipment based on OpenStack
CN111200527A (en) * 2019-12-31 2020-05-26 浪潮云信息技术有限公司 Method for automatically discovering and deploying bare computer based on ironic

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018205325A1 (en) * 2017-05-08 2018-11-15 网宿科技股份有限公司 Method and system for use in constructing content delivery network platform on heterogeneous resources
CN110851145A (en) * 2019-09-30 2020-02-28 烽火通信科技股份有限公司 Edge cloud installation and maintenance method and system based on container arrangement
CN111124437A (en) * 2019-11-30 2020-05-08 苏州浪潮智能科技有限公司 Bare computer resource configuration information acquisition method, system and equipment based on OpenStack
CN111200527A (en) * 2019-12-31 2020-05-26 浪潮云信息技术有限公司 Method for automatically discovering and deploying bare computer based on ironic

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
自动化运维平台研究;余痴;李立;任蕾凡;;电子世界(第12期);全文 *

Also Published As

Publication number Publication date
CN111813419A (en) 2020-10-23

Similar Documents

Publication Publication Date Title
CN111813419B (en) Method for managing life cycle of bare computer based on kubernetes declaration
US20220091834A1 (en) Method, apparatus, electronic device and readable storage medium for deploying application
CN104360878B (en) A kind of method and device of application software deployment
CN104021078B (en) Software supervision device and method
CN112235130A (en) Method and device for realizing operation and maintenance automation based on SDN network
CN113485786B (en) Method and system for realizing pod mounting of finder volume based on cloud physical machine
CN110532322B (en) Operation and maintenance interaction method, system, computer readable storage medium and equipment
CN102664758B (en) Method for binding and automatically recovering network configuration
CN106293847B (en) A kind of method of virtual platform supporting
EP3869336A1 (en) Method and apparatus for processing development machine operation task, device and storage medium
CN111367618A (en) Code management method, system, terminal and medium based on docker
CN101699403A (en) Method for graphically installing distributed system
KR20220151585A (en) Business data processing method, apparatus, electronic apparatus, storage media and computer program
CN113778486A (en) Containerization processing method, device, medium and equipment for code pipeline
CN105404530B (en) It is a kind of to realize easy deployment and the system and method using private clound
CN114385126B (en) K8 s-based multi-tenant deep learning model research and development system and method
CN110609656A (en) Storage management method, electronic device and computer program product
CN116192961A (en) Efficient adaptation method for multi-center heterogeneous multi-cloud environment
CN111339055B (en) Big data cluster capacity expansion method and device
CN107124292B (en) Method for dynamically generating incidence relation of information system operation modes
CN104298745A (en) Electric power information communication machine room basic resource model
CN109324892B (en) Distributed management method, distributed management system and device
CN106354612A (en) Service-oriented packaging method and system of cloud diagnosis resource
EP4106293A2 (en) Network configuring method and apparatus for cloud mobile phone, device and storage medium
CN116155978A (en) Multi-registry adaptation method, device, electronic equipment and storage medium

Legal Events

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