IP Library › Granted Patent US 11,307,849
Granted Patent B2
US 11,307,849 · App. 16/691,353 · Granted Apr 19, 2022

Method for creating hyperledger fabric network, controller and storage medium

Inventors: Hang Zhou (Beijing, CN); Yuxiao Song (Beijing, CN); Hongbin Mao (Beijing, CN); Siyuan Pan (Beijing, CN); Haodong Chen (Beijing, CN); Hui Wang (Beijing, CN)
Assignee: BEIJING BAIDU NETCOM SCIENCE AND TECHNOLOGY CO., LTD.
G06F8/71G06F8/60G06F16/27
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 11,307,849
App. No.
16/691,353
Granted
Apr 19, 2022
Kind
B2
Abstract

Embodiments of the present disclosure relates to the field of block chain technology, and provides a method for creating a Hyperledger Fabric network, a controller and a storage medium. The method may include: acquiring a configuration file required to create a Hyperledger Fabric network in a Kubernetes cluster; and creating the Hyperledger Fabric network in the Kubernetes cluster according to the configuration file and a preset state machine. Embodiments of the present disclosure are applicable to the procedure of creating the Hyperledger Fabric network.

Claims (62)

1. A method for automatically creating a Hyperledger Fabric network in a Kubernetes cluster, applied to a fabric operator, the fabric operator being a controller deployed in the Kubernetes cluster to monitor and manage the Hyperledger Fabric network, the method comprising:

acquiring, by the fabric operator, a configuration file required to create the Hyperledger Fabric network in the Kubernetes cluster, wherein the configuration file comprising information of components; and

creating, by the fabric operator, the Hyperledger Fabric network in the Kubernetes cluster according to the configuration file and a preset state machine, the preset state machine comprising a preset creation order of the components,

wherein creating the Hyperledger Fabric network in the Kubernetes cluster comprises:

creating by the fabric operator the Hyperledger Fabric network in the Kubernetes cluster according to the information of the components and the preset creation order of the components in the preset state machine.

2. The method according to claim 1 , wherein the information of components comprises information of certificate authority (CA) component, information of MySQL component, information of Orderer component, and information of Peer component.

3. The method according to claim 1 , wherein the creating the Hyperledger Fabric network in the Kubernetes cluster according to the information of the components and the preset creation order of the components in the preset state machine includes:

acquiring meta information from the information of the components, and initializing the meta information;

creating a component relevant file according to the initialized meta information;

creating a My SQL component according to information of the My SQL component in the information of the components, after the component relevant file is successfully created;

creating a CA component according to information of the CA component in the information of the components, after the MySQL component is successfully created;

creating a certificate file according to the information of the components, after the CA component is successfully created;

creating an Orderer component according to information of the Orderer component in the information of the components, after the certificate file is successfully created;

creating a Peer component according to information of the Peer component in the information of the components, after the Orderer component is successfully created; and

determining the Hyperledger Fabric network being successfully created in the Kubernetes cluster and the Hyperledger Fabric network being in a running state, after the Peer component is successfully created.

4. The method according to claim 1 , wherein after the creating the Hyperledger Fabric network in the Kubernetes cluster, the method further comprises:

monitoring running states of the components in the Hyperledger Fabric network; and

in response detecting that a component stopping running is presented in the Hyperledger Fabric network, recreating the component stopping running according to component information corresponding to the component stopping running in the information of the components.

5. The method according to claim 1 , further comprising:

in response to acquiring an upgraded configuration file, recreating, by the fabric operator, the Hyperledger Fabric network in the Kubernetes cluster according to the upgraded configuration file and the preset state machine.

6. A controller for automatically creating a Hyperledger Fabric network in a Kubernetes cluster, applied to a fabric operator, the controller being deployed in the Kubernetes cluster to monitor and manage the Hyperledger Fabric network, the controller comprising:

at least one processor; and

a memory storing a set of instructions, the set of instructions when executed by the at least one processor, cause the at least one processor to perform operations, the operations comprise:

acquiring, by the processor, a configuration file required to create a Hyperledger Fabric network in the Kubernetes cluster, wherein the configuration file comprising information of components; and

creating, by the processor, the Hyperledger Fabric network in the Kubernetes cluster according to the configuration file and a preset state machine, the preset state machine comprising a preset creation order of the components,

wherein creating the Hyperledger Fabric network in the Kubernetes cluster comprises:

creating by the fabric operator, the Hyperledger Fabric network in the Kubernetes cluster according to the information of the components and the preset creation order of the components in the preset state machine.

7. The controller according to claim 6 , wherein the information of components comprises information of certificate authority (CA) component, information of MySQL component, information of Orderer component, and information of Peer component.

8. The controller according to claim 6 , wherein the creating the Hyperledger Fabric network in the Kubernetes cluster according to the information of the components and the preset creation order of the components in the preset state machine includes:

acquiring meta information from the information of the components, and initializing the meta information;

creating a component relevant file according to the initialized meta information;

creating a My SQL component according to information of the My SQL component in the information of the components, after the component relevant file is successfully created;

creating a CA component according to information of the CA component in the information of the components, after the MySQL component is successfully created;

creating a certificate file according to the information of the components, after the CA component is successfully created;

creating an Orderer component according to information of the Orderer component in the information of the components, after the certificate file is successfully created;

creating a Peer component according to information of the Peer component in the information of the components, after the Orderer component is successfully created; and

determining the Hyperledger Fabric network being successfully created in the Kubernetes cluster and the Hyperledger Fabric network being in a running state, after the Peer component is successfully created.

9. The controller according to claim 6 , wherein after the creating the Hyperledger Fabric network in the Kubernetes cluster, the operations further comprise:

monitoring running states of the components in the Hyperledger Fabric network; and

in response detecting that a component stopping running is presented in the Hyperledger Fabric network, recreating the component stopping running according to component information corresponding to the component stopping running in the information of the components.

10. The controller according to claim 6 , wherein the operations further comprise:

in response to acquiring an upgraded configuration file, recreating, by the fabric operator, the Hyperledger Fabric network in the Kubernetes cluster according to the upgraded configuration file and the preset state machine.

11. A non-transitory storage medium, storing an instruction, wherein the instruction, when executed on a computer, causes the computer to perform operations:

acquiring, by a fabric operator, a configuration file required to create a Hyperledger Fabric network in a Kubernetes cluster, wherein the fabric operator is a controller deployed in the Kubernetes cluster to monitor and manage the Hyperledger Fabric network, wherein the configuration file comprising information of components; and

automatically creating, by the fabric operator, the Hyperledger Fabric network in the Kubernetes cluster according to the configuration file and a preset state machine, the preset state machine comprising a preset creation order of the components,

wherein creating the Hyperledger Fabric network in the Kubernetes cluster comprises:

creating, by the fabric operator, the Hyperledger Fabric network in the Kubernetes cluster according to the information of the components and the preset creation order of the components in the preset state machine.

12. The non-transitory storage medium according to claim 11 , wherein the information of components comprises information of certificate authority (CA) component, information of MySQL component, information of Orderer component, and information of Peer component.

13. The non-transitory storage medium according to claim 11 , wherein the creating the Hyperledger Fabric network in the Kubernetes cluster according to the information of the components and the preset creation order of the components in the preset state machine includes:

acquiring meta information from the information of the components, and initializing the meta information;

creating a component relevant file according to the initialized meta information;

creating a My SQL component according to information of the My SQL component in the information of the components, after the component relevant file is successfully created;

creating a CA component according to information of the CA component in the information of the components, after the MySQL component is successfully created;

creating a certificate file according to the information of the components, after the CA component is successfully created;

creating an Orderer component according to information of the Orderer component in the information of the components, after the certificate file is successfully created;

creating a Peer component according to information of the Peer component in the information of the components, after the Orderer component is successfully created; and

determining the Hyperledger Fabric network being successfully created in the Kubernetes cluster and the Hyperledger Fabric network being in a running state, after the Peer component is successfully created.

14. The non-transitory storage medium according to claim 11 , wherein after the creating the Hyperledger Fabric network in the Kubernetes cluster, the operations further comprise:

monitoring running states of the components in the Hyperledger Fabric network; and

in response detecting that a component stopping running is presented in the Hyperledger Fabric network, recreating the component stopping running, according to component information corresponding to the component stopping running in the information of the components.

15. The non-transitory storage medium according to claim 11 , wherein the operations further include:

in response to acquiring an upgraded configuration file, recreating, by the fabric operator, the Hyperledger Fabric network in the Kubernetes cluster according to the upgraded configuration file and the preset state machine.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Nov 21, 2019
From: ZHOU, HANG; SONG, YUXIAO; MAO, HONGBIN; PAN, SIYUAN; CHEN, HAODONG; WANG, HUI
To: BEIJING BAIDU NETCOM SCIENCE AND TECHNOLOGY CO., LTD.
Reel/Frame 051081/0861 →
Priority Claims (1)
CN 201910251318.X · Mar 29, 2019 · national
Continuity (1)
Related Publication 20200310789A1 · Oct 1, 2020