CN109976774A - Block chain node deployment method, device, equipment and storage medium - Google Patents

Block chain node deployment method, device, equipment and storage medium Download PDF

Info

Publication number
CN109976774A
CN109976774A CN201910288932.3A CN201910288932A CN109976774A CN 109976774 A CN109976774 A CN 109976774A CN 201910288932 A CN201910288932 A CN 201910288932A CN 109976774 A CN109976774 A CN 109976774A
Authority
CN
China
Prior art keywords
container
block chain
block
node
destination node
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.)
Granted
Application number
CN201910288932.3A
Other languages
Chinese (zh)
Other versions
CN109976774B (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.)
Beijing Qidi Block Chain Technology Development Co Ltd
Original Assignee
Beijing Qidi Block Chain Technology Development 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 Beijing Qidi Block Chain Technology Development Co Ltd filed Critical Beijing Qidi Block Chain Technology Development Co Ltd
Priority to CN201910288932.3A priority Critical patent/CN109976774B/en
Publication of CN109976774A publication Critical patent/CN109976774A/en
Application granted granted Critical
Publication of CN109976774B publication Critical patent/CN109976774B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • G06F8/63Image based installation; Cloning; Build to order
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45595Network integration; Enabling network access in virtual machine instances

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the invention discloses a kind of block chain node deployment method, device, equipment and storage mediums.It is communicated to connect this method comprises: Ansible tool and destination node is called to establish, and builds Kubernetes cluster in the destination node;It calls the Ansible tool to obtain target block chain release image file and creates container in the Kubernetes cluster of Xiang Suoshu destination node according to the target block chain release image file, and dispose block chain node in the above-described container.The embodiment of the present invention passes through the calling of Ansible tool, avoid the invasion for treating deployment node, simultaneously by building Kubernetes cluster in destination node, the characteristic of a variety of container techniques is supported using Kubernetes cluster, it realizes cross-platform block chain node deployment, improves the deployment efficiency of block chain node.

Description

Block chain node deployment method, device, equipment and storage medium
Technical field
The present embodiments relate to block chain technical field more particularly to a kind of block chain node deployment method, device, set Standby and storage medium.
Background technique
With the continuous development of Internet technology, a kind of decentralization and open and clear block chain technology is come into being. Block chain is the new application mould of the computer technologies such as Distributed Storage, point-to-point transmission, common recognition mechanism, Encryption Algorithm Formula.
The deployment of block chain node can be carried out, to user or enterprise using container technique at present to mention to user or enterprise For block chain service.Platform end can use Saltstack management tool, by installing in advance wait dispose in node Saltstack agency is managed node to be disposed in a manner of invasion and called wait dispose the agency in node, and deployment is treated in realization Node is managed.The layout and calling of container cross-node are realized using Docker Swarm container orchestration technology simultaneously.
However, the prior art is too strong for the invasive of node to be disposed, the stability of node to be disposed is reduced, and for The degree of support of container technique is limited, cannot achieve cross-platform block chain node deployment, reduces the deployment effect of block chain node Rate.
Summary of the invention
The embodiment of the invention provides a kind of block chain node deployment method, device, equipment and storage mediums, can be avoided Cross-platform block chain node deployment is realized in the invasion for treating deployment node, improves the deployment efficiency of block chain node.
In a first aspect, the embodiment of the invention provides a kind of block chain node deployment methods, comprising:
It calls Ansible tool and destination node to establish to communicate to connect, and is built in the destination node Kubernetes cluster;
The Ansible tool is called to obtain target block chain release image file, according to the target block chain version Image file creates container in the Kubernetes cluster of Xiang Suoshu destination node, and disposes block chain link in the above-described container Point.
Second aspect, the embodiment of the invention provides a kind of block chain node deployment devices, comprising:
K8s cluster building module is communicated to connect for calling Ansible tool and destination node to establish, and in the mesh Kubernetes cluster is built in mark node;
Block chain node deployment module, for calling the Ansible tool to obtain target block chain release image file, According to the target block chain release image file, container is created in the Kubernetes cluster of Xiang Suoshu destination node, and Block chain node is disposed in the container.
The third aspect, the embodiment of the invention provides a kind of equipment, comprising:
One or more processors;
Memory, for storing one or more programs;
When one or more of programs are executed by one or more of processors, so that one or more of processing Device realizes block chain node deployment method described in any embodiment of that present invention.
Fourth aspect, the embodiment of the invention provides a kind of computer readable storage mediums, are stored thereon with computer journey Sequence realizes block chain node deployment method described in any embodiment of that present invention when the program is executed by processor.
The embodiment of the present invention is established with destination node and is communicated to connect by calling Ansible tool, and in destination node Build Kubernetes cluster.To call Ansible tool to obtain based on the Kubernetes cluster built in destination node After taking target block chain release image file, according to target block chain release image file, in destination node Container is created in Kubernetes cluster, and disposes block chain node in a reservoir.The embodiment of the present invention passes through Ansible tool Calling, avoid the invasion for treating deployment node, while by building Kubernetes cluster in destination node, utilize Kubernetes cluster supports the characteristic of a variety of container techniques, realizes cross-platform block chain node deployment, improves block chain link The deployment efficiency of point.
Detailed description of the invention
Fig. 1 is a kind of flow chart for block chain node deployment method that the embodiment of the present invention one provides;
Fig. 2 is the topology example figure for the block chain node deployment system that the embodiment of the present invention one provides;
Fig. 3 is a kind of flow chart of block chain node deployment method provided by Embodiment 2 of the present invention;
Fig. 4 is a kind of flow chart for block chain node deployment method that the embodiment of the present invention three provides;
Fig. 5 is a kind of structural schematic diagram for block chain node deployment device that the embodiment of the present invention four provides;
Fig. 6 is a kind of structural schematic diagram for equipment that the embodiment of the present invention five provides.
Specific embodiment
The embodiment of the present invention is described in further detail with reference to the accompanying drawings and examples.It is understood that this Locate described specific embodiment and is used only for explaining the embodiment of the present invention, rather than limitation of the invention.It further needs exist for Bright, only parts related to embodiments of the present invention are shown for ease of description, in attached drawing rather than entire infrastructure.
Embodiment one
Fig. 1 is a kind of flow chart for block chain node deployment method that the embodiment of the present invention one provides, and the present embodiment can fit The case where disposing block chain node for remote batch, this method can be executed by a kind of block chain node deployment device, the dress Setting can be realized by the way of software and/or hardware, preferably be arranged in remote deployment platform.This method specifically include as Under:
Step 110 is called Ansible tool and destination node to establish communication connection, and is built in destination node Kubernetes cluster.
In the specific embodiment of the invention, it is equipped in the remote deployment platform for remote batch deployment block chain node Ansible tool.Wherein, Ansible tool is a simply without the automation operation and maintenance tools for acting on behalf of IT, is integrated with numerous fortune Dimension tool, such as puppet, cfengine, chef, func and fabric etc., for realizing batch system deployment, batch journey The functions such as prelude administration or batch operation order.
In the present embodiment, destination node refers to the destination node of the remote deployment platform block of being carried out chain node deployment, Destination node can be physical node, such as computer etc. can also be virtual machine node, such as cloud.Ansible work can be passed through Host inventory in tool determines destination node.Wherein, the node of the specified operation of host inventory, is at one The node of definition monitoring inside configuration file.
The destination node of the present embodiment carries out the scheduling and layout of container using Kubernetes cluster.Wherein, container is Refer to the user's space run directly on operating system nucleus, container is equivalent to container, wherein being deployed with application program, holds Device technology can allow multiple independent user's spaces to operate on same host, thus can be with container by container technique Mode will be applied to operating system in, promote right deployment efficiency.Kubernetes (abbreviation K8s) is a kind of open source One container orchestration engine, for managing the application of the containerization in multiple main frames, target is to make the application of deployment container simple It is single and efficient, automatic deployment, extension, planning, update and a kind of mechanism of maintenance across mainframe cluster are provided, is supported a variety of Container technique, such as Docker and RKT etc..Inside provides the functions such as load balancing, service discovery, registration, meets distributed frame Structure characteristic.
It can be stored in advance the maintenance information of each node to be safeguarded in the present embodiment, in Ansible tool, such as IP Location can also include the version information etc. for having disposed block chain.Ansible tool does not need to dispose agency on the target node, After installing Ansible tool in remote deployment platform, Ansible tool can pre-generate key pair, and key pair includes public affairs Key and private key, and public key is distributed to each node to be safeguarded, it is stored in the memory space of node to be safeguarded, so that IP address of the Ansible tool based on node to be safeguarded is established by public and private key mode with corresponding destination node to be safeguarded Communication connection.To which on the basis of remote deployment platform and destination node are established and communicated to connect, remote deployment platform is called Ansible tool, generates Kubernetes configuration file, and Kubernetes cluster is built in realization in destination node.
Specifically, Ansible tool is called to generate Kubernetes configuration file, and it is added to the of Ansible tool In one drama component;Start the first drama component in Ansible tool, so that destination node is according to the first drama component, Kubernetes configuration file is executed in destination node, and Kubernetes cluster is built in destination node.Kubernetes collection The mode of building of group will carry out specifically explaining explanation in the following embodiments.
Step 120 calls Ansible tool to obtain target block chain release image file, according to target block chain version Image file creates container into the Kubernetes cluster of destination node, and disposes block chain node in a reservoir.
In the specific embodiment of the invention, mirror image is building or packing stage in container life cycle, and container is then It is starting or execution stage.Container is based on image starting, after container start completion, so that it may answer what is disposed in container With being logged in, accessed and used.What is disposed in the present embodiment is block chain node, and block chain is equivalent in container The application of deployment.Since block chain may be simultaneously present multiple versions, in advance by different blocks chain release image file into Row storage, constitutes container mirror site.Wherein, based on the difference of container technique, which can be the mirror image of different vessels technology File.
Specifically, target block chain version refers to the block chain version to be disposed of destination node, can be existed by user Operation in remote deployment platform operation interface determines target block chain version.Remote deployment platform calls Ansible tool, Target block chain release image file is obtained from container mirror site, according to target block chain release image file, to target section Container is created in the Kubernetes cluster of point, and starts container, to dispose block chain node in a reservoir.Wherein, after deployment Container in be deployed with block, since container is in each creation, changes will occur for the IP address of container, therefore can be based on Information in block constructs the connection relationship between different blocks, completes block chain building, realizes the deployment of block chain node. Deployment about block chain node in Kubernetes cluster will carry out specifically explaining explanation in the following embodiments.
In addition, container monitoring plug-in unit can also be installed in destination node, for the Kubernetes cluster to destination node The container of middle deployment is monitored, and determines the container state of each container.To which Kubernetes cluster can hold according to each deployment The container state of device, is scheduled container and layout.
Illustratively, Fig. 2 is the topology example figure of block chain node deployment system.As shown in Fig. 2, block chain node deployment System includes remote deployment platform and at least one destination node to be safeguarded.Remote deployment platform passes through Ansible tool pair Destination node is remotely managed, and Kubernetes cluster is built in destination node, based on what is stored in remote deployment platform Or the corresponding container image file of each block chain version obtained from cloud, it is disposed in a manner of container into destination node Block chain node.
The technical solution of the present embodiment is established with destination node and is communicated to connect, and in mesh by calling Ansible tool Kubernetes cluster is built in mark node.To call based on the Kubernetes cluster built in destination node After Ansible tool obtains target block chain release image file, according to target block chain release image file, in target section Container is created in the Kubernetes cluster of point, and disposes block chain node in a reservoir.The embodiment of the present invention passes through Ansible The calling of tool avoids the invasion for treating deployment node, while by building Kubernetes cluster in destination node, benefit The characteristic that a variety of container techniques are supported with Kubernetes cluster realizes cross-platform block chain node deployment, improves block chain The deployment efficiency of node.
Embodiment two
The present embodiment on the basis of the above embodiment 1, provides a preferred implementation of block chain node deployment method Mode can remotely manage node to be disposed by Ansible tool in remote deployment platform.Wherein, step 110 is specific It may include steps of 310-320, step 120 may include steps of 330-350.Fig. 3 is that the embodiment of the present invention two mentions A kind of flow chart of the block chain node deployment method supplied, as shown in figure 3, this method includes in detail below:
Step 310 calls Ansible tool to generate Kubernetes configuration file, and is added to the of Ansible tool In one drama component.
In the specific embodiment of the invention, Ansible tool further includes drama component, i.e. playbooks, for carrying out pair The component that long-range node is configured, in the step of operating to long-range ground connection, can be described, solve complicated IT Problem is called between resource dispersion, service in environment, needs to manage all kinds of decentralized resources in a uniform manner to resource, service thus And concentrate layout.The present embodiment is not distinguished drama component specifically, and different drama components can specify that different task Processing rule.Wherein it is possible to which the execution for being managed and disposing block chain node to destination node according to Ansible tool is suitable The drama component for carrying out Kubernetes cluster building first is determined as the first drama component, wherein defining by sequence Kubernetes cluster builds step.
Specifically, remote deployment platform calls on the basis of remote deployment platform and destination node are established and communicated to connect Ansible tool, according to Kubernetes template generation Kubernetes configuration file preset in Ansible tool.And it will Kubernetes configuration file is added in the first drama component of Ansible tool, in specified succeeding target node Kubernetes cluster builds rule.
Wherein, preset Kubernetes template can be pre-set script file, script text in Ansible tool Part is the combination that a series of determining control computers carry out arithmetic operation movement, and logic branch may be implemented wherein.Due to Ansible tool can be developed using any language, and corresponding script file can also be suitable for writing script text using any The language of part is write, such as can preferentially select Shell language to write.And then it is carried out based on destination node During Kubernetes cluster building, it can determine that is corresponding with target earth from pre-stored multiple script files Script file, and execute the script file.During execution, it can also match what user in remote deployment platform inputted It sets parameter to be written in configuration template, automatically generates Kubernetes configuration file.
The first drama component in step 320, starting Ansible tool, so that Ansible tool is acute according to described first This component executes Kubernetes configuration file in destination node, and builds Kubernetes cluster in destination node.
In the specific embodiment of the invention, after destination node and determining Kubernetes configuration file, remote deployment is flat Platform starts the first drama component in Ansible tool automatically, according to the parameter created in Kubernetes configuration file, in mesh It marks and executes Kubernetes configuration file in node, realize that Kubernetes cluster is built in destination node.
Step 330 calls Ansible tool, and target block chain release image file is obtained from container mirror site.
In the specific embodiment of the invention, Kubernetes supports a variety of container techniques, such as Docker and RKT etc., because This can will be according to various container techniques and each block chain version, in advance by different vessels technology and different blocks chain version Corresponding container mirror image is configured to container mirror site, is stored in remote deployment platform or remote deployment platform can communicate Cloud.After building Kubernetes cluster in destination node, remote deployment platform is believed according to target block chain version Breath, it is automatic to call Ansible tool, target block chain release image file is obtained from container mirror site.
Step 340 passes through Ansible tool according to target block chain release image file, determines destination node maintenance letter The block chain version information of breath generates container deployment configuration file and is added in the second drama component of Ansible tool.
In the specific embodiment of the invention, drama component is not distinguished specifically, different drama components can specify that The processing rule of different task.Wherein it is possible to which block chain link is managed and disposed to destination node according to Ansible tool Point executes sequence, the drama component for carrying out container deployment is determined as the second drama component, wherein defining the deployment of container Step.
Specifically, the maintenance information of each node to be safeguarded, such as IP address can be stored in advance in Ansible tool, It can also include the version information etc. for having disposed block chain.Therefore, Ansible tool can be according to the target block chain version of acquisition This image file, determines the version information of block chain to be disposed, and is added to the maintenance letter of destination node in Ansible tool It in breath, or updates destination node in Ansible tool and has disposed the version information of block chain, to generate container deployment configuration File, and be added in the second drama component of Ansible tool.
It is worth noting that, the execution sequence between step 310-320 and step 330-340 is unrestricted.
The second drama component in step 350, starting Ansible tool, so that Ansible tool is according to the second drama group Part is based on target block chain release image file, creates and start target container in the Kubernetes cluster of destination node, To dispose block chain node into the target container of Kubernetes cluster.
In the specific embodiment of the invention, after Kubernetes cluster and determining container deployment configuration file, long-range portion Administration's platform starts the 2nd 1 drama component in Ansible tool automatically, according to the parameter created in container deployment configuration file And target block chain release image file, container deployment configuration file is executed in the Kubernetes cluster of destination node, By the way that target container is created and started in Kubernetes cluster, realizes and disposed into the target container of Kubernetes cluster Block chain node.To which block separate configurations in a manner of container break the limitation of node environment in destination node.About The deployment of block chain node will carry out specifically explaining explanation in the following embodiments in Kubernetes cluster.
The technical solution of the present embodiment calls Ansible tool, on the basis of establishing communication connection with destination node, leads to It crosses calling Ansible tool and generates Kubernetes configuration file, to build Kubernetes cluster in destination node.To It is automatic that Ansible tool is called to obtain target block chain release image file from container mirror site, container deployment configuration is generated, To create container in the Kubernetes cluster of destination node, and block chain node is disposed in a reservoir.The embodiment of the present invention By the calling of Ansible tool, the invasion for treating deployment node is avoided, while by building in destination node Kubernetes cluster supports the characteristic of a variety of container techniques using Kubernetes cluster, realizes cross-platform block chain link Point deployment, improves the deployment efficiency of block chain node.
Embodiment three
The present embodiment provides a preferred implementation of block chain node deployment method on the basis of above-described embodiment two Mode can be scheduled container and layout in destination node by the Kubernetes cluster constructed.Wherein, step 350 can specifically include following steps 440-460.Fig. 4 is a kind of block chain node deployment side that the embodiment of the present invention three provides The flow chart of method, as shown in figure 4, this method includes in detail below:
Step 410 is called Ansible tool and destination node to establish communication connection, and is built in destination node Kubernetes cluster.
Step 420 calls Ansible tool, and target block chain release image file is obtained from container mirror site.
Step 430 passes through Ansible tool according to target block chain release image file, determines destination node maintenance letter The block chain version information of breath generates container deployment configuration file and is added in the second drama component of Ansible tool.
The second drama component in step 440, starting Ansible tool, the Kubernetes cluster into destination node Block is disposed in target container, so that the target block in Kubernetes cluster dynamic crawl container.
In the specific embodiment of the invention, after Kubernetes cluster and determining container deployment configuration file, long-range portion Administration's platform starts the 2nd 1 drama component in Ansible tool automatically, according to the parameter created in container deployment configuration file And target block chain release image file, container deployment configuration file is executed in the Kubernetes cluster of destination node, By the way that target container is created and started in Kubernetes cluster, realize into each target container of Kubernetes cluster Dispose block.Wherein, an independent block is all deployed in each container after deployment, since container is in each creation, Changes will occur for the IP address of container, therefore the connection relationship in original mirror image based on newly-built container between each block is changed Become.To which in the present embodiment, Kubernetes cluster dynamically grabs in any one container from the container that block is disposed Block obtains target block information, such as IP address etc. as target block.
Step 450 generates configuration file between block chain link point by the IP of Kubernetes cluster foundation target block, and It is added in the global configuration center of Kubernetes cluster.
In the specific embodiment of the invention, Kubernetes cluster includes global configuration center, i.e. ConfigMap.It is global Configuration center is used to separate using required configuration information with program, is multiplexed application program preferably, extensive In container cluster environment, unified configuration management is carried out to application.Kubernetes cluster is realized pair by global configuration center The configuration management of block in container.
Specifically, IP of the Kubernetes cluster according to target block, generates configuration file between block chain link point, the block Configuration file includes configuration information needed for block connection between chain node, for allowing each remaining block to communicate with target block foundation Connection.Configuration file can be script file, such as Shell script file between block chain node.
Step 460 starts the block in each remaining container by Kubernetes cluster, so that each remaining area block access is complete Office's configuration center, reads configuration file between block chain link point, constructs the connection relationship between each block.
In the specific embodiment of the invention, the Kubernetes cluster overall situation controls each container, starting target block place The block in remaining container except container.To each remaining area block access global configuration center, and read block chain link point Between configuration file, it is each residue block know with target block establish communicate to connect, for constructing the connection relationship of block chain.
Optionally, the block in each remaining container is started by Kubernetes cluster, so that each remaining area block access is complete Office's configuration center is registered according to configuration file between the block chain node read to target block, so that target block obtains Block information in each block;The block information in each block is sent to each remaining block by target block, so that each residue Block obtains the block information in each block, and constructs the connection relationship between each block according to the block information in each block.
In the present embodiment, each remaining area block access global configuration center, and configuration file between block chain link point is read, respectively A residue block is registered according to configuration file between block chain node to target block, is established and is communicated to connect with target block, To which target block can obtain the block information recorded in all blocks, and the area in all blocks is sent to each remaining block Block message, so that the block information in each block is shared.Due to having the record of message, example in each block to block information Such as in some time, some block is handled the affairs in block chain as accounting nodes, and is able to other blocks and is tested Card, is recorded in block, or generates new block and be connected in block chain.Therefore it is obtained in each block in each remaining block Block information after, can determine the connection relationship between block and block according to all block informations, constitute block Chain, to complete deployment of the block chain node in destination node, configuration file will individually be write to each block by avoiding.
Step 470 monitors container progress of the plug-in unit to disposing in Kubernetes cluster by the container in destination node Monitoring, determines the container state of each container.
Container monitoring plug-in unit can also be installed in the specific embodiment of the invention, in destination node, for destination node Kubernetes cluster in the container disposed be monitored.Plug-in unit is monitored to disposing in Kubernetes cluster by container Container is carried out in real time or is periodically monitored, and Kubernetes cluster can determine the container state of each container.Wherein, container state Data at least may include performance data and status data etc..Performance data can be CPU usage and memory usage etc., shape State data may include active state and crash state etc..
Step 480, the container state by Kubernetes cluster according to each deployment container, are scheduled container and compile Row.
In the specific embodiment of the invention, container state of the Kubernetes cluster according to each deployment container, to container into Row scheduling and layout.Illustratively, container state of the Kubernetes cluster according to each container, if judging the CPU of a certain container Occupancy is higher, then a new container can be divided out for the container, to share the task treating capacity of the container;For another example If judging, a certain container for crash state, can restart the container, to improve the processing capacity of affairs.
The technical solution of the present embodiment, by calling Ansible tool to build Kubernetes cluster in destination node, Based on the Kubernetes cluster built in destination node, container, foundation are created in the Kubernetes cluster of destination node Target block chain release image file disposes block in a reservoir.To pass through Kubernetes cluster dynamic crawl block and life It at configuration file between block chain node, and is added in the global configuration center of Kubernetes cluster, realizes between block Dynamic Discovery, configuration file will individually be write to each block by avoiding, and whole operation process is idempotent, be increased substantially The deployment efficiency of block chain node.In the present embodiment, entire batch deployment process is automated completion, avoids artificial Inefficient configuration, so that the block chain node of container technique encapsulation gets rid of the dependence to platform environment, deployment way is cleverer It is living.
Example IV
Fig. 5 is a kind of structural schematic diagram for block chain node deployment device that the embodiment of the present invention four provides, the present embodiment The case where being applicable to remote batch deployment block chain node, which can realize block chain described in any embodiment of that present invention Node deployment method.The device specifically includes:
K8s cluster building module 510 is communicated to connect for calling Ansible tool and destination node to establish, and described Kubernetes cluster is built in destination node;
Block chain node deployment module 520, for calling the Ansible tool to obtain target block chain release image text Part creates container in the Kubernetes cluster of Xiang Suoshu destination node according to the target block chain release image file, and Block chain node is disposed in the above-described container.
Optionally, the K8s cluster building module 510 is specifically used for:
It calls the Ansible tool to generate Kubernetes configuration file, and is added to the of the Ansible tool In one drama component;
Start the first drama component in the Ansible tool, so that the Ansible tool is according to described One drama component executes the Kubernetes configuration file in the destination node, and builds in the destination node Kubernetes cluster.
Optionally, the block chain node deployment module 520 is specifically used for:
The Ansible tool is called, the target block chain release image file is obtained from container mirror site;
By the Ansible tool according to the target block chain release image file, destination node maintenance letter is determined The block chain version information of breath generates container deployment configuration file and is added to the second drama component of the Ansible tool In;
Start the second drama component in the Ansible tool, so that the Ansible tool is according to described Two drama components are based on the target block chain release image file, create in the Kubernetes cluster of the destination node Target container is built and starts, to dispose block chain node into the target container of the Kubernetes cluster.
Optionally, the block chain node deployment module 520 is specifically used for:
Start the second drama component in the Ansible tool, Kubernetes collection in Xiang Suoshu destination node Block is disposed in the target container of group, so that the target block in Kubernetes cluster dynamic crawl container, passes through institute Kubernetes cluster is stated according to configuration file between the IP generation block chain link point of the target block, and is added to described In the global configuration center of Kubernetes cluster;
Start the block in each remaining container by the Kubernetes cluster, so that complete described in each remaining area block access Office's configuration center, reads configuration file between the block chain node, constructs the connection relationship between each block.
Optionally, the block chain node deployment module 520 is specifically used for:
Start the block in each remaining container by the Kubernetes cluster, so that complete described in each remaining area block access Office's configuration center, according to configuration file between the block chain node read, Xiang Suoshu target block is registered, so that described Target block obtains the block information in each block;
The block information in each block is sent to each remaining block by the target block, so that each residue block obtains Block information in each block, and the connection relationship between each block is constructed according to the block information in each block.
Optionally, the block chain node deployment module 520 is specifically used for:
Container is created in the Kubernetes cluster to the destination node, and disposes block in the above-described container After chain node, plug-in unit is monitored by the container in the destination node, to the container disposed in the Kubernetes cluster It is monitored, determines the container state of each container;
Container state by the Kubernetes cluster according to each deployment container, is scheduled container and layout.
Optionally, the destination node is physical node or virtual machine node.
The technical solution of the present embodiment is realized and is connected with destination node by the mutual cooperation between each functional module The generation of the foundation, Kubernetes configuration file that connect, Kubernetes cluster building in destination node, container mirror image text Deployment in destination node of the acquisition of part, the generation, container of container deployment configuration file, block chain node are in destination node Deployment and container the functions such as monitoring and layout.The embodiment of the present invention passes through the calling of Ansible tool, avoids and treats The invasion of node is disposed, while by building Kubernetes cluster in destination node, is supported using Kubernetes cluster The characteristic of a variety of container techniques realizes cross-platform block chain node deployment.Pass through Kubernetes cluster dynamic crawl block And generate configuration file between block chain link point, and be added in the global configuration center of Kubernetes cluster, realize block it Between Dynamic Discovery, configuration file will individually be write to each block by avoiding, and whole operation process is idempotent, significantly Improve the deployment efficiency of block chain node.In the present embodiment, entire batch deployment process is automated completion, avoids Artificial inefficient configuration, so that the block chain node of container technique encapsulation gets rid of the dependence to platform environment, deployment way is more Add flexibly.
Embodiment five
Fig. 6 is a kind of structural schematic diagram for equipment that the embodiment of the present invention five provides.As shown in fig. 6, the equipment is specifically wrapped It includes: one or more processors 610, in Fig. 6 by taking a processor 610 as an example;Memory 620, for storing one or more Program, when one or more programs are executed by one or more processors 610, so that one or more processors 610 realize this Block chain node deployment method described in invention any embodiment.Processor 610 and memory 620 can by bus or other Mode connects, in Fig. 6 for being connected by bus.
It is executable to can be used for storing software program, computer as a kind of computer readable storage medium for memory 620 Program and module, if the corresponding program instruction of block chain node deployment method in the embodiment of the present invention is (for example, Ansible The calling of tool and the deployment of Kubernetes cluster built with block chain node).Processor 610 is stored in by operation Software program, instruction and module in memory 620, thereby executing the various function application and data processing of equipment, i.e., Realize above-mentioned block chain node deployment method.
Memory 620 can mainly include storing program area and storage data area, wherein storing program area can store operation system Application program needed for system, at least one function;Storage data area, which can be stored, uses created data etc. according to equipment.This Outside, memory 620 may include high-speed random access memory, can also include nonvolatile memory, for example, at least one Disk memory, flush memory device or other non-volatile solid state memory parts.In some instances, memory 620 can be into one Step includes the memory remotely located relative to processor 610, these remote memories can pass through network connection to equipment.On The example for stating network includes but is not limited to internet, intranet, local area network, mobile radio communication and combinations thereof.
Embodiment six
The embodiment of the present invention six also provides a kind of computer readable storage medium, be stored thereon with computer program (or For computer executable instructions), for executing a kind of block chain node deployment method, this method when which is executed by processor Include:
It calls Ansible tool and destination node to establish to communicate to connect, and is built in the destination node Kubernetes cluster;
The Ansible tool is called to obtain target block chain release image file, according to the target block chain version Image file creates container in the Kubernetes cluster of Xiang Suoshu destination node, and disposes block chain link in the above-described container Point.
Certainly, a kind of computer readable storage medium provided by the embodiment of the present invention, computer executable instructions are not It is limited to method operation as described above, can also be performed in block chain node deployment method provided by any embodiment of the invention Relevant operation.
By the description above with respect to embodiment, it is apparent to those skilled in the art that, the present invention Embodiment can be realized by software and required common hardware, naturally it is also possible to by hardware realization, but in many cases before Person is more preferably embodiment.Based on this understanding, the technical solution of the embodiment of the present invention is substantially in other words to existing skill The part that art contributes can be embodied in the form of software products, which can store in computer Floppy disk, read-only memory (Read-Only Memory, ROM), random access memory in readable storage medium storing program for executing, such as computer (Random Access Memory, RAM), flash memory (FLASH), hard disk or CD etc., including some instructions are used so that one Computer equipment (can be personal computer, server or the network equipment etc.) executes described in each embodiment of the present invention Method.
It is worth noting that, included each unit and module are only patrolled according to function in the embodiment of above-mentioned apparatus It volume is divided, but is not limited to the above division, as long as corresponding functions can be realized;In addition, each function list The specific name of member is also only for convenience of distinguishing each other, the protection scope being not intended to restrict the invention.
Note that the above is only a better embodiment of the present invention and the applied technical principle.It will be appreciated by those skilled in the art that The invention is not limited to the specific embodiments described herein, be able to carry out for a person skilled in the art it is various it is apparent variation, It readjusts and substitutes without departing from protection scope of the present invention.Therefore, although being implemented by above embodiments to the present invention Example is described in further detail, but the embodiment of the present invention is not limited only to above embodiments, is not departing from structure of the present invention It can also include more other equivalent embodiments in the case where think of, and the scope of the present invention is determined by scope of the appended claims It is fixed.

Claims (10)

1. a kind of block chain node deployment method characterized by comprising
It calls Ansible tool and destination node to establish to communicate to connect, and builds Kubernetes collection in the destination node Group;
The Ansible tool is called to obtain target block chain release image file, according to the target block chain release image File creates container in the Kubernetes cluster of Xiang Suoshu destination node, and disposes block chain node in the above-described container.
2. the method according to claim 1, wherein the calling Ansible tool and destination node are established and are led to Letter connection, and Kubernetes cluster is built in the destination node, comprising:
It calls the Ansible tool to generate Kubernetes configuration file, and is added to the first play of the Ansible tool In this component;
Start the first drama component in the Ansible tool, so that the Ansible tool is acute according to described first This component executes the Kubernetes configuration file in the destination node, and builds in the destination node Kubernetes cluster.
3. the method according to claim 1, wherein described call the Ansible tool to obtain target block Chain release image file, according to the target block chain release image file, the Kubernetes cluster of Xiang Suoshu destination node Middle creation container, and block chain node is disposed in the above-described container, comprising:
The Ansible tool is called, the target block chain release image file is obtained from container mirror site;
By the Ansible tool according to the target block chain release image file, destination node maintenance information is determined Block chain version information generates container deployment configuration file and is added in the second drama component of the Ansible tool;
Start the second drama component in the Ansible tool, so that the Ansible tool is acute according to described second This component is based on the target block chain release image file, creates simultaneously in the Kubernetes cluster of the destination node Start target container, to dispose block chain node into the target container of the Kubernetes cluster.
4. according to the method described in claim 3, it is characterized in that, starting second drama in the Ansible tool Component disposes block chain node in the target container of Xiang Suoshu Kubernetes cluster, comprising:
Start the second drama component in the Ansible tool, Kubernetes cluster in Xiang Suoshu destination node Block is disposed in target container, so that the target block in Kubernetes cluster dynamic crawl container, by described Kubernetes cluster is added to described according to configuration file between the IP generation block chain link point of the target block In the global configuration center of Kubernetes cluster;
Start the block in each remaining container by the Kubernetes cluster, so that the overall situation described in each remaining area block access is matched Center is set, configuration file between the block chain node is read, constructs the connection relationship between each block.
5. according to the method described in claim 4, it is characterized in that, described start each residue by the Kubernetes cluster Block in container, so that global configuration center described in each remaining area block access, reads configuration file between the block chain node, Construct the connection relationship between each block, comprising:
Start the block in each remaining container by the Kubernetes cluster, so that the overall situation described in each remaining area block access is matched Center is set, according to configuration file between the block chain node read, Xiang Suoshu target block is registered, so that the target Block obtains the block information in each block;
The block information in each block is sent to each remaining block by the target block, so that each residue block obtains each area Block information in block, and the connection relationship between each block is constructed according to the block information in each block.
6. the method according to claim 1, wherein in the Kubernetes cluster to the destination node Middle creation container, and dispose after block chain node in the above-described container, further includes:
Plug-in unit is monitored by the container in the destination node, the container disposed in the Kubernetes cluster is supervised It surveys, determines the container state of each container;
Container state by the Kubernetes cluster according to each deployment container, is scheduled container and layout.
7. method according to claim 1 to 6, which is characterized in that the destination node is physical node or void Quasi- machine node.
8. a kind of block chain node deployment device characterized by comprising
K8s cluster building module is communicated to connect for calling Ansible tool and destination node to establish, and in the target section Kubernetes cluster is built in point;
Block chain node deployment module, for calling the Ansible tool to obtain target block chain release image file, foundation The target block chain release image file creates container in the Kubernetes cluster of Xiang Suoshu destination node, and described Block chain node is disposed in container.
9. a kind of equipment characterized by comprising
One or more processors;
Memory, for storing one or more programs;
When one or more of programs are executed by one or more of processors, so that one or more of processors are real Now such as block chain node deployment method of any of claims 1-7.
10. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the program is by processor Such as block chain node deployment method of any of claims 1-7 is realized when execution.
CN201910288932.3A 2019-04-11 2019-04-11 Block link point deployment method, device, equipment and storage medium Active CN109976774B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910288932.3A CN109976774B (en) 2019-04-11 2019-04-11 Block link point deployment method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910288932.3A CN109976774B (en) 2019-04-11 2019-04-11 Block link point deployment method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN109976774A true CN109976774A (en) 2019-07-05
CN109976774B CN109976774B (en) 2022-07-26

Family

ID=67084065

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910288932.3A Active CN109976774B (en) 2019-04-11 2019-04-11 Block link point deployment method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN109976774B (en)

Cited By (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110430248A (en) * 2019-07-23 2019-11-08 平安科技(深圳)有限公司 Block chain building method, apparatus, medium and electronic equipment based on cloud service
CN110601896A (en) * 2019-09-20 2019-12-20 腾讯科技(深圳)有限公司 Data processing method and equipment based on block chain nodes
CN110650193A (en) * 2019-09-20 2020-01-03 腾讯科技(深圳)有限公司 Node management method, cluster management device and storage medium
CN110865835A (en) * 2019-10-15 2020-03-06 网联清算有限公司 Configuration file updating method and device, computer equipment and storage medium
CN110933189A (en) * 2020-02-10 2020-03-27 北京启迪区块链科技发展有限公司 Fabric-based block chain network deployment method, device, equipment and medium
CN111130841A (en) * 2019-11-21 2020-05-08 深圳壹账通智能科技有限公司 Block chain network deployment method, electronic device and computer readable storage medium
CN111245910A (en) * 2019-12-31 2020-06-05 杭州趣链科技有限公司 Block chain light node multi-copy deployment method
CN111324599A (en) * 2020-01-20 2020-06-23 中国科学院计算技术研究所 Block chain experiment system and management method
CN111399987A (en) * 2020-03-26 2020-07-10 国金公用通链(海南)信息科技有限公司 Universal block chain sandbox supervision technology
CN111459573A (en) * 2020-04-01 2020-07-28 济南浪潮高新科技投资发展有限公司 Method and device for starting intelligent contract execution environment
CN111610985A (en) * 2020-05-13 2020-09-01 麒麟软件有限公司 Kubernet cluster rapid deployment method on domestic platform
CN111708608A (en) * 2020-06-19 2020-09-25 浪潮云信息技术股份公司 Container large cluster rapid deployment method and system based on infrastructure
CN112333244A (en) * 2020-10-16 2021-02-05 济南浪潮数据技术有限公司 Cluster mutual trust method, system, equipment and computer readable storage medium
CN112732677A (en) * 2021-01-12 2021-04-30 成都库珀区块链科技有限公司 Block link point deployment method, device, equipment and storage medium
CN112732332A (en) * 2021-04-02 2021-04-30 北京易捷思达科技发展有限公司 Software package management method and device suitable for koji management system and electronic equipment
CN113239118A (en) * 2021-05-31 2021-08-10 广州宏算信息科技有限公司 Block chain training system and method
CN113312429A (en) * 2021-06-22 2021-08-27 工银科技有限公司 Intelligent contract management system, method, medium, and article in a blockchain
CN113572643A (en) * 2021-07-24 2021-10-29 上海边界智能科技有限公司 Block chain multi-chain and cross-chain network deployment method based on containerization technology

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107579931A (en) * 2017-09-08 2018-01-12 杭州云象网络技术有限公司 A kind of block chain based on Kubernetes is Service Source adaptation method
US20180232413A1 (en) * 2017-02-13 2018-08-16 International Business Machines Corporation Node characterization in a blockchain
CN108694053A (en) * 2018-05-14 2018-10-23 平安科技(深圳)有限公司 Build the method and terminal device of Kubernetes host nodes automatically based on Ansible tools
CN109194506A (en) * 2018-08-16 2019-01-11 北京京东尚科信息技术有限公司 Block chain network dispositions method, platform and computer storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180232413A1 (en) * 2017-02-13 2018-08-16 International Business Machines Corporation Node characterization in a blockchain
CN107579931A (en) * 2017-09-08 2018-01-12 杭州云象网络技术有限公司 A kind of block chain based on Kubernetes is Service Source adaptation method
CN108694053A (en) * 2018-05-14 2018-10-23 平安科技(深圳)有限公司 Build the method and terminal device of Kubernetes host nodes automatically based on Ansible tools
CN109194506A (en) * 2018-08-16 2019-01-11 北京京东尚科信息技术有限公司 Block chain network dispositions method, platform and computer storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
李杰等: "Hadoop分布式集群的自动化容器部署研究", 《计算机应用研究》 *

Cited By (28)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110430248A (en) * 2019-07-23 2019-11-08 平安科技(深圳)有限公司 Block chain building method, apparatus, medium and electronic equipment based on cloud service
CN110601896A (en) * 2019-09-20 2019-12-20 腾讯科技(深圳)有限公司 Data processing method and equipment based on block chain nodes
CN110650193A (en) * 2019-09-20 2020-01-03 腾讯科技(深圳)有限公司 Node management method, cluster management device and storage medium
CN110865835A (en) * 2019-10-15 2020-03-06 网联清算有限公司 Configuration file updating method and device, computer equipment and storage medium
WO2021098140A1 (en) * 2019-11-21 2021-05-27 深圳壹账通智能科技有限公司 Blockchain network deployment method, electronic device, and computer-readable storage medium
CN111130841A (en) * 2019-11-21 2020-05-08 深圳壹账通智能科技有限公司 Block chain network deployment method, electronic device and computer readable storage medium
CN111130841B (en) * 2019-11-21 2022-07-08 深圳壹账通智能科技有限公司 Block chain network deployment method, electronic device and computer-readable storage medium
CN111245910A (en) * 2019-12-31 2020-06-05 杭州趣链科技有限公司 Block chain light node multi-copy deployment method
CN111324599B (en) * 2020-01-20 2023-04-07 中国科学院计算技术研究所 Block chain experiment system and management method
CN111324599A (en) * 2020-01-20 2020-06-23 中国科学院计算技术研究所 Block chain experiment system and management method
CN110933189A (en) * 2020-02-10 2020-03-27 北京启迪区块链科技发展有限公司 Fabric-based block chain network deployment method, device, equipment and medium
CN111399987A (en) * 2020-03-26 2020-07-10 国金公用通链(海南)信息科技有限公司 Universal block chain sandbox supervision technology
CN111399987B (en) * 2020-03-26 2023-04-18 海口海辰宇信息科技有限公司 Universal block chain sandbox supervision technology
CN111459573A (en) * 2020-04-01 2020-07-28 济南浪潮高新科技投资发展有限公司 Method and device for starting intelligent contract execution environment
CN111459573B (en) * 2020-04-01 2023-09-15 山东浪潮科学研究院有限公司 Method and device for starting intelligent contract execution environment
CN111610985A (en) * 2020-05-13 2020-09-01 麒麟软件有限公司 Kubernet cluster rapid deployment method on domestic platform
CN111610985B (en) * 2020-05-13 2023-05-05 麒麟软件有限公司 Kubernetes cluster rapid deployment method on domestic platform
CN111708608A (en) * 2020-06-19 2020-09-25 浪潮云信息技术股份公司 Container large cluster rapid deployment method and system based on infrastructure
CN111708608B (en) * 2020-06-19 2023-04-25 浪潮云信息技术股份公司 Container large cluster rapid deployment method and system based on stable
CN112333244A (en) * 2020-10-16 2021-02-05 济南浪潮数据技术有限公司 Cluster mutual trust method, system, equipment and computer readable storage medium
CN112732677A (en) * 2021-01-12 2021-04-30 成都库珀区块链科技有限公司 Block link point deployment method, device, equipment and storage medium
CN112732677B (en) * 2021-01-12 2023-10-13 库珀科技集团有限公司 Block chain link point deployment method, device, equipment and storage medium
CN112732332B (en) * 2021-04-02 2021-07-23 北京易捷思达科技发展有限公司 Software package management method and device suitable for koji management system and electronic equipment
CN112732332A (en) * 2021-04-02 2021-04-30 北京易捷思达科技发展有限公司 Software package management method and device suitable for koji management system and electronic equipment
CN113239118A (en) * 2021-05-31 2021-08-10 广州宏算信息科技有限公司 Block chain training system and method
CN113312429A (en) * 2021-06-22 2021-08-27 工银科技有限公司 Intelligent contract management system, method, medium, and article in a blockchain
CN113572643A (en) * 2021-07-24 2021-10-29 上海边界智能科技有限公司 Block chain multi-chain and cross-chain network deployment method based on containerization technology
CN113572643B (en) * 2021-07-24 2024-04-26 上海边界智能科技有限公司 Block chain multi-chain and cross-chain network deployment method based on containerization technology

Also Published As

Publication number Publication date
CN109976774B (en) 2022-07-26

Similar Documents

Publication Publication Date Title
CN109976774A (en) Block chain node deployment method, device, equipment and storage medium
US20210314276A1 (en) System and method to control a cross domain workflow based on a hierachical engine framework
CN108924217B (en) Automatic deployment method of distributed cloud system
CN106227605B (en) A kind of the dynamic micro services expansion method and device of multilingual cloud compiling
CN112035228B (en) Resource scheduling method and device
US7165087B1 (en) System and method for installing and configuring computing agents
JP6572330B2 (en) Robot application management apparatus, system, method and program
KR20080038350A (en) Component architecture
Gogouvitis et al. Seamless computing in industrial systems using container orchestration
CN110673923A (en) XWIKI system configuration method, system and computer equipment
CN107479984B (en) Distributed spatial data processing system based on message
WO2022061235A1 (en) System and method for a hybrid development platform
CN114040009A (en) Method for implementing micro-service management platform gateway, storage medium and electronic equipment
US11146658B2 (en) Enhanced self-assembling and self-configuring microservices
Kirchhof et al. Simulation as a service for cooperative vehicles
CN113419818B (en) Basic component deployment method, device, server and storage medium
CN115248692A (en) Device and method for supporting cloud deployment of multiple deep learning framework models
CN112015371B (en) Software development device under non-embedded software platform
CN109032674B (en) Multi-process management method, system and network equipment
Aguzzi et al. Towards pulverised architectures for collective adaptive systems through multi-tier programming
CN113312148B (en) Big data service deployment method, device, equipment and medium
CN112698916B (en) Multi-container cluster management and control system, method and storage medium
CN112269634B (en) Method and system for deploying Ambari component based on Docker container
CN113031977A (en) Software batch installation method and related device
Chen et al. An Innovative Self-Configuration Approach for Networked Systems and Applications.

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