Block chain multi-chain and cross-chain network deployment method based on containerization technologyTechnical Field
The invention relates to a deployment method of a blockchain multi-chain and cross-chain network based on a containerization technology, and belongs to the technical field of blockchains.
Background
The technique of containerization refers to packaging software code and the required environment such as libraries, applications, etc. necessary for operation, and partitioning into separate groups. The containerization technology can realize isolation between application environments, avoid mutual influence, and facilitate transplanting, deployment and management of applications on different environments and infrastructures. The containerization technique can further realize better resource scheduling and allocation management.
IRITA is an enterprise-level alliance chain product which is created and supports the next generation of distributed business systems by taking block chain cross-chain, privacy calculation and big data analysis technology innovation as cores for boundary intelligence. IRITA has the advantages of privacy-protecting data encryption sharing, efficient consensus protocol, leading cross-chain technology, extremely strong practical interactive capability of a chain up-chain and down-chain system, flexible digital asset modeling and transaction support and large data technology supported business analysis 6 large core technology, can be widely applied to various business scenes such as finance, medical health, supply chains, internet of vehicles and the like, and provides value energization based on block chain trust machines for entity economy.
IRITA supports the international standard of China, has perfect SDK and operation and maintenance tool support, and meets the requirements of enterprise-level application in aspects of performance, safety and reliability, authentication and authority, maintainability, expandability, operation and maintenance monitoring and the like.
Aiming at common problems of unstable nodes, downtime, network blocking and the like in a blockchain, the IRITA containerization technology realizes a safety mechanism of automatic error correction and restarting of the nodes. The method has the advantages that the container management visualization and the free pluggable of the node online and offline deployment are realized in the aspect of operation and maintenance tools. The container manager can customize each authority management control of the node. The management and deployment labor cost of the traditional block chain cluster is greatly saved, and the overall operation efficiency of the block chain is improved.
The Docker in Fabric, FISCOBCOS adopts script to rapidly deploy the blockchain environment to deploy multiple nodes only aiming at a single type of blockchain, and the communication capability among the nodes of the blockchains of different types and supporting the blockchains of different types is still blank. The present invention is now autonomous with respect to these drawbacks.
Disclosure of Invention
The invention provides a deployment method of a blockchain multi-link and cross-link network based on a containerization technology, which solves the problem that the communication capability between the nodes of different types of blockchains and supporting the nodes of different types of blockchains in the existing blockchain system is still blank.
The invention relates to a deployment method of a blockchain multi-chain and cross-chain network based on a containerization technology, which comprises the following steps: s1, installing a container cluster management tool Kubernetes and a Helm script tool on a local or remote server;
S2, running a Helm script tool;
S3, based on the computing resources and the block chain initialization configuration information required by the user, filling in by the user in a self-defined manner according to the terminal prompt information;
S4, each node pulls a corresponding mirror image from the container mirror image management server, and starts a virtual machine container, and when the running dependent environment is automatically packaged, a restarting mechanism is automatically started once an abnormality occurs;
S5, after the environment-dependent encapsulation is completed, running helminstall a command line can start a plurality of corresponding blockchain networks on each remote server according to a configuration plan, wherein the corresponding blockchain networks comprise a plurality of blockchain nodes and cross-chain links among the blockchain networks.
Further preferably, the step S1 may use an allowable script writing tool to implement unified deployment and management of the remote server cluster environment.
It is further preferred that step S2 includes constructing a blockchain source code image using Kubernetes containerized clustering techniques and triggering an operating mechanism, the entire process being automated by the Helm scripting tool.
Further preferably, wherein step S3 includes configuration of the base environment, including: initialization configuration of executable files, CPU, memory, network and storage space.
Wherein step S3 further comprises configuring a blockchain environment, comprising: blockchain ID, number of nodes, designated account and mnemonic, custom assets, module parameters, verifier commission rate, blockout time, etc.
Further preferably, the number of nodes in the step S3 includes a verifier node, sentry nodes and a full node.
Further preferably, the account designated in the step S3 includes an identifier and a tap account.
The S3 step also comprises the configuration of a cross-chain environment, including the configuration of links, channels and the like of the blockchain; configuration of necessary inter-blockchain applications or components includes client, account, and commission configurations of relay nodes.
Further preferably, the step S4 includes integrating service, configMap, secret, statefulSet, volumeClaimTemplates resources of Kubernetes into the file set chart by Helm.
The invention has the beneficial effects that: the invention breaks through the traditional blockchain script, can only deploy and manage the single type blockchain node server cluster in the local server, and can realize the one-key deployment of different types of blockchain node server clusters; the blockchain of different types can be deployed on line conveniently by one key only through remote control.
Drawings
FIG. 1 is a schematic flow diagram of a method for deploying a blockchain multi-link and cross-link network based on a containerization technique of the present invention;
fig. 2 is a block chain initialization configuration information structure diagram in step s3 of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described 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.
Referring to fig. 1, the embodiment of the invention provides a deployment method of a blockchain multi-chain and cross-chain network based on a containerization technology, which comprises the following steps: s1, installing a container cluster management tool Kubernetes and a Helm script tool on a local or remote server;
S2, running a Helm script tool;
S3, based on the computing resources and the block chain initialization configuration information required by the user, filling in by the user in a self-defined manner according to the terminal prompt information;
S4, each node pulls a corresponding mirror image from a container mirror image management server, wherein the special mirror image server is deployed in the embodiment 1 disclosed DockerHub or private environment, and starts a virtual machine container, and when the automation encapsulation operation depends on the environment, a restarting mechanism is automatically started once an abnormality occurs;
After the S5-dependent environment is encapsulated, the command line is run helminstall to start a corresponding plurality of blockchain networks on each remote server according to the configured plan, including a plurality of blockchain nodes, and cross-chain links between the blockchain networks, etc.
As an illustration, step s1 of embodiments of the present invention may use an allowable script writing tool to achieve unified deployment and management of a remote server cluster environment.
As an illustration, step S2 of an embodiment of the present invention includes constructing a blockchain source code image using a Kubernetes containerized clustering technique and triggering an operating mechanism, the entire process being automated by a Helm scripting tool.
As an illustration, referring to fig. 2, step S3 of the embodiment of the present invention includes configuration of a base environment, including: initialization configuration of executable file, CPU, memory, network and storage space
As an illustration, step S3 of an embodiment of the present invention further includes configuration of a blockchain environment, including: blockchain ID, number of nodes (including verifier node, sentry node, full node), designated account (including verifier, tap account), mnemonic, custom assets, module parameters, verifier commission rate, blockout time, etc.
As an illustration, step S3 of embodiments of the present invention further includes configuration of the cross-chain environment, including configuration of links, channels, etc. of the blockchain itself; configuration of necessary inter-blockchain applications or components, such as clients, accounts, commission configurations, etc., of relay nodes.
As an illustration, the step S4 of the embodiment of the invention comprises integrating service, configMap, secret, statefulSet, volumeClaimTemplates of resources such as Kubernetes into a file collection chart through Helm, and pushing the resources to a remote warehouse based on a local storage or mirror image packaging mode.
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.