CN109933338B - Block chain deployment method, device, computer equipment and storage medium - Google Patents

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

Info

Publication number
CN109933338B
CN109933338B CN201910087407.5A CN201910087407A CN109933338B CN 109933338 B CN109933338 B CN 109933338B CN 201910087407 A CN201910087407 A CN 201910087407A CN 109933338 B CN109933338 B CN 109933338B
Authority
CN
China
Prior art keywords
block chain
blockchain
component
deployment
configuration file
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
CN201910087407.5A
Other languages
Chinese (zh)
Other versions
CN109933338A (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.)
Zhejiang Shulian Technology Co ltd
Original Assignee
Zhejiang Shulian 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 Zhejiang Shulian Technology Co ltd filed Critical Zhejiang Shulian Technology Co ltd
Priority to CN201910087407.5A priority Critical patent/CN109933338B/en
Publication of CN109933338A publication Critical patent/CN109933338A/en
Application granted granted Critical
Publication of CN109933338B publication Critical patent/CN109933338B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The application relates to a blockchain deployment method, a blockchain deployment device, computer equipment and a storage medium. The method comprises the following steps: acquiring a configuration file of each block chain component in a plurality of block chain components; combining configuration files of each of a plurality of blockchain components into a modular installation package; the blockchain is deployed in the container according to a modular installation package. By adopting the scheme, the block chain deployment efficiency can be improved.

Description

Block chain deployment method, device, computer equipment and storage medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a blockchain deployment method, a blockchain deployment device, a computer device, and a storage medium.
Background
With the development of computer technology, blockchain technology has emerged. Public chains, private chains, and federated chains are roughly divided according to the type of blockchain. The public chain is completely opened to the outside, the private chain is only used in enterprises and is not opened to the outside, and the alliance chain has authority to be opened to part of members. Regardless of the type of blockchain, conventional blockchain deployment is primarily to install individual components one by one in a containerized manner. However, current blockchain deployment approaches are inefficient to handle.
Disclosure of Invention
Accordingly, it is necessary to provide a blockchain deployment method, a blockchain deployment device, a computer device, and a computer storage medium capable of improving the blockchain deployment efficiency, in order to solve the problem of low processing efficiency of the blockchain deployment method.
A blockchain deployment method, the method comprising: acquiring a configuration file of each block chain component in a plurality of block chain components; combining configuration files of each of a plurality of blockchain components into a modular installation package; the blockchain is deployed in the container according to a modular installation package.
In one embodiment, a blockchain is deployed in a container according to a modular installation package, comprising: when the configuration file of a block chain component in the installation package is successfully operated, the configuration file of the block chain component with a dependency relationship with the block chain component is operated; when the configuration file of each block chain component in the plurality of block chain components is finished, the block chain deployment is completed in the container.
In one embodiment, when a configuration file of a blockchain component in an installation package is successfully executed, executing the configuration file of the blockchain component having a dependency relationship with the blockchain component includes: acquiring a configuration file of each block chain component and an operation sequence of the configuration file of the block chain component with the dependency relation with each block chain component according to the dependency relation; when the configuration file of a block chain component in the installation package is successfully operated, the configuration file of the block chain component with a dependency relationship with the block chain component is operated according to the operation sequence.
In one embodiment, the blockchain deployment method further includes: generating a deployment version of the blockchain according to the modularized installation package; acquiring a rollback instruction or a revocation operation instruction; backing to a deployment version corresponding to the modularized installation package according to the backing instruction; or, according to the revocation operation instruction, the deployment version corresponding to the modularized installation package is revoked.
In one embodiment, the blockchain deployment method further includes: displaying version records of the deployment versions of all the blockchains at the terminal; backing to a deployment version corresponding to the modularized installation package according to the backing instruction, wherein the method comprises the following steps: and backing to the deployment version of the blockchain corresponding to the rollback instruction according to the rollback instruction.
In one embodiment, the blockchain deployment method further includes: generating a deployment version of the blockchain according to the modularized installation package; acquiring a cancel version instruction; and according to the revocation version instruction, the deployment version corresponding to the modularized installation package is revoked.
In one embodiment, the blockchain deployment method further includes: obtaining common parameter files corresponding to a plurality of block chain components; acquiring a metadata information file; combining the configuration files of each of the plurality of blockchain components into a modular installation package, comprising: and storing the common parameter file, the metadata information file and the configuration file of each block chain component in the plurality of block chain components into the same folder, and combining the common parameter file, the metadata information file and the configuration file into a modularized installation package.
A blockchain deployment device, the device comprising: the acquisition module is used for acquiring the configuration file of each block chain component in the plurality of block chain components; the combination module is used for combining the configuration file of each block chain component in the plurality of block chain components into a modularized installation package; a deployment module for deploying blockchains in the container according to the modular installation packages.
A computer device comprising a memory storing a computer program and a processor which when executing the computer program performs the steps of: acquiring a configuration file of each block chain component in a plurality of block chain components; combining configuration files of each of a plurality of blockchain components into a modular installation package; the blockchain is deployed in the container according to a modular installation package.
A computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of: acquiring a configuration file of each block chain component in a plurality of block chain components; combining configuration files of each of a plurality of blockchain components into a modular installation package; the blockchain is deployed in the container according to a modular installation package.
According to the block chain deployment method, the device, the computer equipment and the storage medium, the configuration files of the block chain components are obtained and combined into the modularized installation package, the block chain is deployed in the container according to the modularized installation package, the block chain can be deployed in the container in a modularized mode, a plurality of components can be installed at one time, and the block chain deployment efficiency is improved.
Drawings
FIG. 1 is an application environment diagram of a block chain deployment method in one embodiment;
FIG. 2 is a flow diagram of a block chain deployment method in one embodiment;
FIG. 3 is a schematic diagram of an architecture of a Kubernetes packet manager in one embodiment;
FIG. 4 is a flow chart of a block chain deployment method in another embodiment;
FIG. 5 is a block diagram of a block chain deployment device in one embodiment;
fig. 6 is an internal structural diagram of a computer device in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the present application.
The blockchain deployment method provided by the embodiment of the application can be applied to an application environment shown in fig. 1. The terminal 102 communicates with the server 104 via a network, and the server 104 and the server 106 are equipped with the same system. The terminal 102 may be, but not limited to, various personal computers, notebook computers, smartphones, tablet computers, and portable wearable devices, and the server 104 and the server 106 may be implemented by a separate server or a server cluster formed by a plurality of servers.
In one embodiment, as shown in fig. 2, a blockchain deployment method is provided, and the method is applied to the server 104 in fig. 1 for illustration, and includes the following steps:
step 202, obtaining a configuration file of each blockchain component in the plurality of blockchain components.
Wherein the component is a simple package of data and methods. Blockchain components refer to components that make up a blockchain. The blockchain components include a Zookeeper component, a Kafka component, an Orderer component, and a Peer component. The configuration file of the blockchain component refers to a file for configuring the blockchain component. Each blockchain component has a configuration file, which may be, for example, a YAML (YAML Ain't Markup Language, another markup language) file.
The Zookeeper component is mainly a distributed service coordination framework and can realize distributed applications such as synchronous service, configuration maintenance and naming service. The yaml file configuration of the Zookeeper mainly agrees with port information in the cluster.
The Kafka component is used to support data transfer of mass data, persist messages to disk, and create backup files for messages. The Orderer component can provide ordering services in a network. Taking super ledgers as an example, the Peer component has both ledgers and chain codes. Since the ledger and the chain code are in the Peer component, the terminal can access the resource through the Peer component.
Specifically, there is one configuration file for each blockchain component. The configuration file may be configured on the terminal. The server obtains a configuration file for each of a plurality of blockchain components from the terminal.
In this embodiment, the blockchain component may further include one or more of a CouchDB (Cluster Of Unreliable Commodity Hardware, distributed database) component, CLI (Command-line interface) component, and CA (Certificate Authority, authorization authentication) component. Wherein the CouchDB (Cluster Of Unreliable Commodity Hardware, distributed database) component is used to store data.
Step 204, combining the configuration file of each of the plurality of blockchain components into a modular installation package.
The modularization refers to a process of dividing a system into a plurality of modules layer by layer from top to bottom when solving a complex problem. Each module completes a specific sub-function, and all modules are assembled according to a certain method to form a whole to complete the functions required by the whole system. A modular mounting package refers to a mounting package assembled from individual modules.
Specifically, the server may save the configuration file of each of the plurality of blockchain components and the same common parameter file corresponding to the plurality of blockchain components to the same folder through a command line tool provided by the package manager, and combine the configuration file and the common parameter file into a modularized installation package.
Step 206, deploying blockchains in the container according to the modular installation package.
Wherein, the Container (Container) can be transplanted into the Container and then be issued on any Linux machine, and the virtualization can be realized. Each container is isolated from each other, each container has its own file system, and processes between containers do not affect each other, so that computing resources can be distinguished. Compared with a virtual machine, the container can be rapidly deployed, and can migrate among different cloud and different version operating systems due to decoupling of the container from underlying facilities and machine file systems. Containers may also be referred to as Kubernetes and Docker, among others. Wherein Kubernetes is abbreviated as K8s, is an application for managing containerization on multiple hosts in a cloud platform. The main responsibility of K8s is container orchestration (Container Orchestration), i.e. the starting, monitoring or recycling of containers on a set of servers.
Specifically, the server deploys blockchains in the container according to a modular installation package that is composed of multiple configuration files.
In this embodiment, the server deploys blockchains in Kubernetes according to a modular installation package. Specifically, the server submits an installation package to the Kubernetes cluster through the Kubernetes package manager client command line and deploys a blockchain within the Kubernetes cluster. Where Kubernetes typically deploys blockchains in clusters, which include at least one master node and a plurality of working nodes. Each node may be a physical server or virtual machine or the like running a Kubernetes platform. The master node provides a unique perspective of the cluster and has a series of components that provide an external application program interface.
In the block chain deployment method, the block chain can be deployed in a modularized mode in the container according to the modularized installation package by acquiring the configuration file of the block chain components and combining the configuration file into the modularized installation package, and the block chain deployment efficiency can be improved by installing a plurality of components at one time.
In one embodiment, as shown in FIG. 3, a diagram of the Kubernetes packet manager is shown in one embodiment. Including a Zookeeper component, a Kafka component, an Orderer component, a Peer component, a CouchDB component, a CLI component, a CA component, and the like. The Kubernetes packet manager has three important concepts: (1) Chart: a software package format is defined that can be deployed on Kubernetes. A hart contains a profile that can describe Kubernetes related resources. (2) Config: to store configuration information for the software, along with Chart to create Release. (3) Release: is an example of the operation of Chart.
The Kubernetes package manager consists of two important functional components: the package manager client and the package manager server. Wherein, the package management client is a command line tool for the end user, mainly used for: developing a local Chart, managing a Chart warehouse and interacting with a package manager server. The package management server is installed in the Kubernetes cluster, and receives the request sent by the package manager client on one hand, and interacts with the Kubernetes API SERVER on the other hand, including responding to the package manager client request, combining Chart and Config to create Release, installing Chart into Kubernetes, and continuously tracking state, upgrading, and uninstalling the installed Chart. Peer0 represents the 1 st or 0 th blockchain node, and PeerN represents the N-th or N+1-th blockchain node. Orderer0 represents the 1 st or 0 th blockchain consensus node, orderem represents the M+1st or M-th blockchain consensus node.
Pod (Plain old data structure,) is the most basic unit of operation of Kubernetes, and contains one or more closely related containers, one Pod can be viewed as a "logical host" of the application layer by a containerized environment. The containers in the same Pod can communicate with each other only by localhost (hostname). Service refers to a Service and can also be viewed as an external access interface to a group of Pod providing the same Service. PVC (Persistent Volume Claim, persistent volume application) is a resource in a Namespace describing requests for PVs. The PV (Persistent Volume ) represents a block of storage area request information in the cluster including storage size, access mode, etc. The life cycle of the PV is independent of Pod, e.g. has no effect on the PV when Pod destruction of the PV is used. NFS (Network File System), a network file system, is one of the file systems that allows for sharing of resources across a network between computers in the network.
In the block chain deployment method, the block chains in the architecture diagram shown in fig. 3 can be deployed in a modularized mode in the container according to the modularized installation package by acquiring the configuration files of the block chain components and combining the configuration files into the modularized installation package, so that the block chain deployment efficiency is improved.
In one embodiment, a blockchain is deployed in a container according to a modular installation package, comprising: when the configuration file of a block chain component in the installation package is successfully operated, the configuration file of the block chain component with a dependency relationship with the block chain component is operated; when the configuration file of each block chain component in the plurality of block chain components is finished, the block chain deployment is completed in the container.
Wherein, the dependency relationship refers to the connection between classes, which means that one class depends on the definition of another class, and the dependency relationship is unidirectional. A simple understanding is that class a uses class B, and that this dependency is occasional and temporary. But class B changes affect class a. The blockchain component with dependencies is also a blockchain component and may refer to a Kafka component that depends on a Zookeeper component, an Orderer component that depends on a Kafka component, and a Peer component that depends on an Orderer component.
Specifically, when the configuration file of a certain blockchain component in the installation package is successfully executed, the server executes the configuration file of the blockchain component with a dependency relationship with the blockchain component. When the configuration file of each blockchain component in the plurality of blockchains is running, it is determined that the blockchain deployment is completed in the container. For example, when a Zookeeper component in an installation package runs successfully, the server runs and the Zookeeper component has a Kafka component of dependency. When the Kafka component runs successfully, the server runs an Orderer component that has a dependency on the Kafka component. When the Orderer component runs successfully, the server runs a Peer component that has a dependency relationship with the Orderer component. When the Zookeeper component, the Kafka component, the Orderer component, and the Peer component are all running, then it is determined that the server has completed the blockchain deployment in the container.
In this embodiment, the plurality of blockchain components may also include one or more of a CouchDB component, CLI component, and CA component. The server completes the blockchain deployment in the container when the configuration files of the Zookeeper component, the Kafka component, the Orderer component, the Peer component, and one or more of the CouchDB component, the CLI component, and the CA component are all running.
In the block chain deployment method, when the configuration file of one block chain component in the modularized installation package is successfully operated, the block chain component with the dependency relationship is operated, and when the configuration files of all the components are operated, the block chain deployment is completed, the block chain deployment can be automatically carried out according to the dependency relationship, and the block chain deployment efficiency is improved.
In one embodiment, when a configuration file of a blockchain component in an installation package is successfully run, running the configuration file of the blockchain component having a dependency relationship with the blockchain component includes: acquiring a configuration file of each block chain component and an operation sequence of the configuration file of the block chain component with the dependency relation with each block chain component according to the dependency relation; when the configuration file of a block chain component in the installation package is successfully operated, the configuration file of the block chain component with a dependency relationship with the block chain component is operated according to the operation sequence.
Specifically, the server obtains the configuration file of each blockchain component according to the dependency relationship between the blockchain components, and the running sequence of the configuration file of the blockchain component having the dependency relationship with the blockchain component. When the configuration file of a certain blockchain component in the installation package is successfully operated, the server operates the configuration file of the blockchain component with a dependency relationship with the blockchain component according to the operation sequence.
In the block chain deployment method, the configuration file of each block chain component and the operation sequence of the configuration file with the dependency relationship are obtained according to the dependency relationship, and when one block chain configuration file in the installation package is successfully operated, the configuration file of the block chain component with the dependency relationship is operated according to the operation sequence, so that the block chain deployment can be automatically performed according to the operation sequence, and the block chain deployment efficiency is improved.
In one embodiment, the blockchain deployment method further includes: generating a deployment version of the blockchain according to the modularized installation package; acquiring a rollback instruction or a revocation operation instruction; backing to a deployment version corresponding to the modularized installation package according to the backing instruction; or, according to the revocation operation instruction, the deployment version corresponding to the modularized installation package is revoked.
The deployed version of the blockchain refers to that each time the server obtains a modularized installation package, a deployed version of the blockchain is generated. Rollback refers to an action of changing or editing a version to an earlier version. The rollback operation refers to a process of withdrawing the last operation or a series of operations under a certain condition, such as a limitation of a period of time, and returning to a previously known state. The undo operation instruction refers to an instruction to undo a previous operation.
Specifically, the server generates a deployed version of the blockchain from the modular installation package. When the server acquires a rollback instruction from the terminal, the server rolls back to a deployment version corresponding to the modularized installation package through a Kubernetes package manager command line according to the rollback instruction. The server may roll back to the last deployment version corresponding to the modularized installation package according to the roll-back instruction, or may roll back to the installation package deployment version corresponding to the roll-back instruction, which is not limited thereto. When the server acquires the revocation operation instruction from the terminal, the server is revoked to the deployment version corresponding to the modularized installation package through a Kubernetes package manager command line according to the revocation operation instruction.
According to the block chain deployment method, the deployment version of the block chain can be generated according to the modularized installation package, the rollback instruction or the revocation operation instruction is acquired, the deployment version of the block chain corresponding to the modularized installation package can be rolled back according to the rollback instruction, the deployment version of the block chain corresponding to the modularized installation package can be revoked according to the revocation operation instruction, the deployment version of the block chain corresponding to the whole modularized installation package can be rolled back or revoked at one time, rather than rolling back or revocation operation of versions is carried out on the block chain components one by one, and efficiency of rollback and revocation operation of the deployment version of the block chain is improved.
In one embodiment, the blockchain deployment method further includes: displaying version records of the deployment versions of all the blockchains at the terminal; backing to a deployment version corresponding to the modularized installation package according to the backing instruction, wherein the method comprises the following steps: and backing to the deployment version of the blockchain corresponding to the rollback instruction according to the rollback instruction.
Specifically, the server displays, at the terminal, version records of the deployed versions of all blockchains corresponding to the modular installation package. The terminal can inquire all Release list version records through a Kubernetes packet manager command line. When the rollback instruction carries the appointed version, the server returns to the deployment version of the blockchain corresponding to the rollback instruction through the command line of the Kubernetes packet manager according to the rollback instruction after acquiring the rollback instruction.
According to the blockchain deployment method, the version records of the deployment versions of all blockchains are displayed at the terminal, the deployment histories of the blockchains can be displayed more comprehensively and intuitively according to the rollback instruction and the deployment versions of the blockchains corresponding to the rollback instruction, the deployment versions of the blockchains designated by the rollback instruction can be rolled back, and the rollback efficiency of the deployment versions of the blockchains is improved.
In one embodiment, the blockchain deployment method further includes: generating a deployment version of the blockchain according to the modularized installation package; acquiring a cancel version instruction; and according to the revocation version instruction, the deployment version corresponding to the modularized installation package is revoked.
Wherein, the cancel version instruction refers to delete version instruction.
Specifically, the server generates a deployed version of the blockchain from the modular installation package. The server acquires the revocation version instruction, and revokes the deployment version corresponding to the modularized installation package according to the revocation version instruction.
According to the block chain deployment method, the deployment version of the block chain can be generated according to the modularized installation package, the revocation instruction is obtained, the deployment version of the block chain corresponding to the whole modularized installation package is revoked at one time according to the revocation instruction, rather than the version revocation is performed on the block chain components one by one, and therefore the revocation efficiency of the deployment version of the block chain is improved.
In one embodiment, the blockchain deployment method further includes: obtaining common parameter files corresponding to a plurality of block chain components; acquiring a metadata information file; combining the configuration files of each of the plurality of blockchain components into a modular installation package, comprising: and storing the common parameter file, the metadata information file and the configuration file of each block chain component in the plurality of block chain components into the same folder, and combining the common parameter file, the metadata information file and the configuration file into a modularized installation package.
Wherein the common parameter file is a file that can configure common parameters of a plurality of blockchain components, such as a value. Metadata (Metadata), also called intermediate data and relay data, is data (data about data) describing data, mainly describing data attribute (property) information, and is used to support functions such as indicating storage location, history data, resource searching, file recording, and the like. The metadata information file may be a Chart. Yaml file.
Specifically, the terminal configures a common parameter file, a metadata information file, and a configuration file corresponding to parameters of each component, such as a Zookeeper component, a Kafka component, an Orderer component, a couchDB component, a Peer component, a CLI component, and a CA component, according to the syntax of the package manager. Where some components need to set additional parameters or tune refined parameters to adapt operation in a container environment, such as in a Kubernetes environment. The server obtains the same common parameter file corresponding to the plurality of block chain components with the configured parameters. The server obtains the metadata information file. The server saves the common parameter file, the metadata information file and the configuration file of each of the plurality of blockchain components to the same folder and combines the same into a modularized installation package.
In the above-mentioned block chain deployment method, the public parameter files and metadata information files corresponding to the plurality of components are obtained, the public parameter files, metadata information files and configuration files of each block chain component are stored in the same folder, and are combined into a modularized installation package, so that the block chain can be deployed, and metadata information corresponding to the installation package can be displayed according to the installation package.
In one embodiment, the blockchain deployment method, as shown in FIG. 4, includes the steps of:
step 402, obtaining a common parameter file corresponding to a plurality of blockchain components.
Step 404, a metadata information file is obtained.
Step 406, save the common parameter file, metadata information file and configuration file of each of the plurality of blockchain components to the same folder, and combine into a modularized installation package.
Step 408, obtaining the configuration file of each blockchain component and the operation sequence of the configuration file of the blockchain component with the dependency relationship with each blockchain component according to the dependency relationship;
in step 410, when the configuration file of a blockchain component in the installation package is successfully run, the configuration files of the blockchain components having a dependency relationship with the blockchain component are run according to the running order.
At step 412, when the configuration file of each of the plurality of blockchain components is running, the blockchain deployment is completed in the container.
At step 414, a version record of the deployed version of all blockchains is exposed at the terminal.
In step 416, a rollback instruction is obtained.
Step 418, backing to the deployment version of the blockchain corresponding to the rollback instruction according to the rollback instruction.
According to the blockchain deployment method, the configuration files of the blockchain components are obtained and combined into the modularized installation package, the blockchains can be deployed in the container in a modularized mode according to the modularized installation package, a plurality of components can be installed at one time according to the sequence, the deployment history of the blockchains can be displayed more comprehensively and intuitively, the deployment version of the blockchains appointed by the rollback instruction can be rolled back, and the blockchain deployment efficiency is improved.
It should be understood that, although the steps in the flowcharts of fig. 2 and 4 are shown in order as indicated by the arrows, these steps are not necessarily performed in order as indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in fig. 2 and 4 may include multiple sub-steps or stages that are not necessarily performed at the same time, but may be performed at different times, nor does the order in which the sub-steps or stages are performed necessarily occur in sequence, but may be performed alternately or alternately with at least a portion of the other steps or sub-steps of other steps.
In one embodiment, as shown in FIG. 5, there is provided a blockchain deployment device, comprising: an acquisition module 502, a combination module 504, and a deployment module 506, wherein:
an obtaining module 502 is configured to obtain a configuration file of each blockchain component in the plurality of blockchain components.
A combining module 504 for combining the configuration file of each of the plurality of blockchain components into a modular installation package.
A deployment module 506 for deploying blockchains in the container according to the modular installation packages.
In the block chain deployment device, the block chain can be deployed in a modularized mode in the container according to the modularized installation package by acquiring the configuration file of the block chain components and combining the configuration file into the modularized installation package, and the block chain deployment efficiency is improved.
In one embodiment, the deployment module 506 is configured to run a configuration file of a blockchain component having a dependency relationship with the blockchain component when the configuration file of a blockchain component in the installation package is run successfully; when the configuration file of each block chain component in the plurality of block chain components is finished, the block chain deployment is completed in the container.
In the block chain deployment device, when the configuration file of one block chain component in the modularized installation package is successfully operated, the block chain component with the dependency relationship is operated, and when the configuration files of all the components are operated, the block chain deployment is completed, the block chain deployment can be automatically carried out according to the dependency relationship, and the block chain deployment efficiency is improved.
In one embodiment, the deployment module 506 is further configured to obtain, according to the dependency relationship, a configuration file of each blockchain component and an operation order of the configuration files of the blockchain components having the dependency relationship with each blockchain component; when the configuration file of a block chain component in the installation package is successfully operated, the configuration file of the block chain component with a dependency relationship with the block chain component is operated according to the operation sequence.
In the block chain deployment device, the configuration file of each block chain component and the operation sequence of the configuration file with the dependency relationship are obtained according to the dependency relationship, and when one block chain configuration file in the installation package is successfully operated, the configuration file of the block chain component with the dependency relationship is operated according to the operation sequence, so that the block chain deployment can be automatically performed according to the operation sequence, and the block chain deployment efficiency is improved.
In one embodiment, the blockchain deployment device further includes a generation module for generating a deployed version of the blockchain from the modular installation package. The obtaining module 502 is configured to obtain a rollback instruction or a revocation operation instruction, and rollback to a deployment version corresponding to the modularized installation package according to the rollback instruction. The obtaining module 502 is further configured to revoke, according to the revocation operation instruction, the deployment version corresponding to the modularized installation package.
According to the block chain deployment device, the deployment version of the block chain can be generated according to the modularized installation package, the rollback instruction or the revocation operation instruction is acquired, the deployment version of the block chain corresponding to the modularized installation package can be rolled back according to the rollback instruction, the deployment version of the block chain corresponding to the modularized installation package can be revoked according to the revocation operation instruction, the deployment version of the block chain corresponding to the whole modularized installation package can be rolled back or revoked at one time, rather than rolling back or revocation operation of versions is carried out on the block chain components one by one, and the rollback and revocation operation efficiency of the deployment version of the block chain is improved.
In one embodiment, the blockchain deployment device further comprises a presentation module, wherein the presentation module is configured to present a version record of the deployed version of all blockchains at the terminal. The obtaining module 502 is configured to rollback to a deployed version of the blockchain corresponding to the rollback instruction according to the rollback instruction.
According to the blockchain deployment device, the version records of the deployment versions of all blockchains are displayed at the terminal, the deployment histories of the blockchains can be displayed more comprehensively and intuitively according to the rollback instruction and the deployment versions of the blockchains corresponding to the rollback instruction, the deployment versions of the blockchains designated by the rollback instruction can be rolled back, and the rollback efficiency of the deployment versions of the blockchains is improved.
In one embodiment, the blockchain deployment device further includes a generation module. The generation module is used for generating a deployment version of the blockchain according to the modularized installation package. The obtaining module 502 is configured to obtain an undo version instruction, and undo a deployment version corresponding to the modularized installation package according to the undo version instruction.
In the block chain deployment device, the deployment version of the block chain can be generated according to the modularized installation package, the revocation instruction is obtained, the deployment version of the block chain corresponding to the whole modularized installation package is revoked at one time according to the revocation instruction instead of the version revocation of the block chain component by component, and therefore the revocation efficiency of the deployment version of the block chain is improved.
In one embodiment, the obtaining module 502 is further configured to obtain a common parameter file corresponding to the plurality of blockchain components, and obtain a metadata information file. The assembly module 504 is further configured to save the common parameter file, the metadata information file, and the configuration file of each of the plurality of blockchain components to the same folder and to combine into a modular installation package.
In the above-mentioned block chain deployment device, the public parameter files and metadata information files corresponding to the plurality of components are obtained, the public parameter files, metadata information files and configuration files of each block chain component are stored in the same folder, and are combined into a modularized installation package, so that the block chain can be deployed, and metadata information corresponding to the installation package can be displayed according to the installation package.
Specific limitations regarding the blockchain deployment device may be found in the above description of the blockchain deployment device and are not described in detail herein. The various modules in the blockchain deployment device described above may be implemented in whole or in part in software, hardware, and combinations thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be a server, the internal structure of which may be as shown in fig. 6. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the computer device is for storing blockchain deployment data. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program, when executed by a processor, implements a blockchain deployment method.
It will be appreciated by those skilled in the art that the structure shown in fig. 6 is merely a block diagram of some of the structures associated with the present application and is not limiting of the computer device to which the present application may be applied, and that a particular computer device may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided comprising a memory and a processor, the memory having stored therein a computer program, the processor when executing the computer program performing the steps of: acquiring a configuration file of each block chain component in a plurality of block chain components; combining configuration files of each of a plurality of blockchain components into a modular installation package; the blockchain is deployed in the container according to a modular installation package.
In one embodiment, the processor when executing the computer program further performs the steps of: when the configuration file of a block chain component in the installation package is successfully operated, the configuration file of the block chain component with a dependency relationship with the block chain component is operated; when the configuration file of each block chain component in the plurality of block chain components is finished, the block chain deployment is completed in the container.
In one embodiment, the processor when executing the computer program further performs the steps of: acquiring a configuration file of each block chain component and an operation sequence of the configuration file of the block chain component with the dependency relation with each block chain component according to the dependency relation; when the configuration file of a block chain component in the installation package is successfully operated, the configuration file of the block chain component with a dependency relationship with the block chain component is operated according to the operation sequence.
In one embodiment, the processor when executing the computer program further performs the steps of: generating a deployment version of the blockchain according to the modularized installation package; acquiring a rollback instruction or a revocation operation instruction; backing to a deployment version corresponding to the modularized installation package according to the backing instruction; or, according to the revocation operation instruction, the deployment version corresponding to the modularized installation package is revoked.
In one embodiment, the processor when executing the computer program further performs the steps of: displaying version records of the deployment versions of all the blockchains at the terminal; and backing to the deployment version of the blockchain corresponding to the rollback instruction according to the rollback instruction.
In one embodiment, the processor when executing the computer program further performs the steps of: generating a deployment version of the blockchain according to the modularized installation package; acquiring a cancel version instruction; and according to the revocation version instruction, the deployment version corresponding to the modularized installation package is revoked.
In one embodiment, the processor when executing the computer program further performs the steps of: obtaining common parameter files corresponding to a plurality of block chain components; acquiring a metadata information file; and storing the common parameter file, the metadata information file and the configuration file of each block chain component in the plurality of block chain components into the same folder, and combining the common parameter file, the metadata information file and the configuration file into a modularized installation package.
In one embodiment, a computer readable storage medium is provided having a computer program stored thereon, which when executed by a processor, performs the steps of: acquiring a configuration file of each block chain component in a plurality of block chain components; combining configuration files of each of a plurality of blockchain components into a modular installation package; the blockchain is deployed in the container according to a modular installation package.
In one embodiment, the computer program when executed by the processor further performs the steps of: when the configuration file of a block chain component in the installation package is successfully operated, the configuration file of the block chain component with a dependency relationship with the block chain component is operated; when the configuration file of each block chain component in the plurality of block chain components is finished, the block chain deployment is completed in the container.
In one embodiment, the computer program when executed by the processor further performs the steps of: acquiring a configuration file of each block chain component and an operation sequence of the configuration file of the block chain component with the dependency relation with each block chain component according to the dependency relation; when the configuration file of a block chain component in the installation package is successfully operated, the configuration file of the block chain component with a dependency relationship with the block chain component is operated according to the operation sequence.
In one embodiment, the computer program when executed by the processor further performs the steps of: generating a deployment version of the blockchain according to the modularized installation package; acquiring a rollback instruction or a revocation operation instruction; backing to a deployment version corresponding to the modularized installation package according to the backing instruction; or, according to the revocation operation instruction, the deployment version corresponding to the modularized installation package is revoked.
In one embodiment, the computer program when executed by the processor further performs the steps of: displaying version records of the deployment versions of all the blockchains at the terminal; and backing to the deployment version of the blockchain corresponding to the rollback instruction according to the rollback instruction.
In one embodiment, the computer program when executed by the processor further performs the steps of: generating a deployment version of the blockchain from the modularized installation package; acquiring a cancel version instruction; and according to the revocation version instruction, the deployment version corresponding to the modularized installation package is revoked.
In one embodiment, the computer program when executed by the processor further performs the steps of: obtaining common parameter files corresponding to a plurality of block chain components; acquiring a metadata information file; and storing the common parameter file, the metadata information file and the configuration file of each block chain component in the plurality of block chain components into the same folder, and combining the common parameter file, the metadata information file and the configuration file into a modularized installation package.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the various embodiments provided herein may include non-volatile and/or volatile memory. The nonvolatile memory can include Read Only Memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), memory bus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), among others.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples merely represent a few embodiments of the present application, which are described in more detail and are not to be construed as limiting the scope of the invention. It should be noted that it would be apparent to those skilled in the art that various modifications and improvements could be made without departing from the spirit of the present application, which would be within the scope of the present application. Accordingly, the scope of protection of the present application is to be determined by the claims appended hereto.

Claims (7)

1. A blockchain deployment method, the method comprising:
obtaining common parameter files corresponding to a plurality of block chain components;
acquiring a metadata information file;
acquiring a configuration file of each block chain component in the plurality of block chain components; wherein the configuration file of the blockchain component refers to a file for configuring the blockchain component;
Storing the common parameter file of the block chain assembly, the metadata information file and the configuration file of each block chain assembly in the plurality of block chain assemblies into the same folder, and combining the common parameter file, the metadata information file and the configuration file into a modularized installation package;
acquiring a configuration file of each block chain component and an operation sequence of the configuration file of the block chain component with the dependency relation with each block chain component according to the dependency relation;
when the configuration file of a block chain component in the installation package is successfully operated, operating the configuration file of the block chain component with a dependency relationship with the block chain component according to the operation sequence;
and when the configuration file of each blockchain component in the plurality of blockchain components is operated, completing the blockchain deployment in the container.
2. The method according to claim 1, wherein the method further comprises:
generating a deployment version of the blockchain according to the modularized installation package;
acquiring a rollback instruction or a revocation operation instruction;
backing back to a deployment version corresponding to the modularized installation package according to the backing-back instruction;
or, according to the revocation operation instruction, revoked to the deployment version corresponding to the modularized installation package.
3. The method according to claim 2, wherein the method further comprises:
displaying version records of the deployment versions of all the blockchains at the terminal;
the rollback to the deployment version corresponding to the modularized installation package according to the rollback instruction comprises:
and backing to a deployment version of the blockchain corresponding to the rollback instruction according to the rollback instruction.
4. The method according to claim 1, wherein the method further comprises:
generating a deployment version of the blockchain according to the modularized installation package;
acquiring a cancel version instruction;
and according to the revocation version instruction, the deployment version corresponding to the modularized installation package is revoked.
5. A blockchain deployment device, the device comprising:
the acquisition module is used for acquiring the public parameter file, the metadata information file and the configuration file of each block chain component in the plurality of block chain components, which correspond to the plurality of block chain components; wherein the configuration file of the blockchain component refers to a file for configuring the blockchain component;
the combination module is used for storing the public parameter file of the block chain assembly, the metadata information file and the configuration file of each block chain assembly in the plurality of block chain assemblies into the same folder, and combining the public parameter file, the metadata information file and the configuration file into a modularized installation package;
The deployment module is used for acquiring the configuration file of each block chain component and the running sequence of the configuration file of the block chain component with the dependency relation with each block chain component according to the dependency relation; when the configuration file of a block chain component in the installation package is successfully operated, the configuration file of the block chain component with a dependency relationship with the block chain component is operated; and when the configuration file of each blockchain component in the plurality of blockchain components is operated, completing the blockchain deployment in the container.
6. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any of claims 1 to 4 when the computer program is executed.
7. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 4.
CN201910087407.5A 2019-01-29 2019-01-29 Block chain deployment method, device, computer equipment and storage medium Active CN109933338B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910087407.5A CN109933338B (en) 2019-01-29 2019-01-29 Block chain deployment method, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910087407.5A CN109933338B (en) 2019-01-29 2019-01-29 Block chain deployment method, device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN109933338A CN109933338A (en) 2019-06-25
CN109933338B true CN109933338B (en) 2023-06-06

Family

ID=66985316

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910087407.5A Active CN109933338B (en) 2019-01-29 2019-01-29 Block chain deployment method, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN109933338B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20210029163A1 (en) * 2019-07-24 2021-01-28 International Business Machines Corporation Security layer for configuring blockchain
CN110601896B (en) * 2019-09-20 2021-08-24 腾讯科技(深圳)有限公司 Data processing method and equipment based on block chain nodes
CN112486518B (en) * 2020-12-01 2024-03-12 北京微芯区块链与边缘计算研究院 Consensus algorithm assembling method and device
CN112445865B (en) * 2021-01-29 2021-05-18 支付宝(杭州)信息技术有限公司 Method and device for automatically deploying block chain network and cloud computing platform
CN114253628A (en) * 2021-12-22 2022-03-29 金蝶软件(中国)有限公司 Automatic deployment device and automatic deployment method for middleware

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018053048A1 (en) * 2016-09-13 2018-03-22 Nutanix, Inc. Massively parallel autonomous reimaging of nodes in a computing cluster
US9983891B1 (en) * 2017-03-21 2018-05-29 Veritas Technologies Llc Systems and methods for distributing configuration templates with application containers

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9880836B2 (en) * 2010-10-26 2018-01-30 Hewlett Packard Enterprise Development Lp System and method for deploying a software program
US9189257B2 (en) * 2011-11-08 2015-11-17 Pivotal Software, Inc. Computer device and method of providing configuration files in a computer device
CN105704188B (en) * 2014-11-27 2019-04-12 华为软件技术有限公司 Using the dispositions method and device with service
US10831463B2 (en) * 2017-03-08 2020-11-10 International Business Machines Corporation Intelligent software deployment on an IaaS platform
CN108762769B (en) * 2018-06-04 2022-06-21 万惠投资管理有限公司 Microservice application arranging and deploying method and device and computer terminal
CN109062655B (en) * 2018-06-05 2021-05-14 腾讯科技(深圳)有限公司 Containerized cloud platform and server
CN108964982B (en) * 2018-06-13 2021-07-09 众安信息技术服务有限公司 Method, apparatus and storage medium for enabling deployment of multiple nodes of a blockchain
CN109165020A (en) * 2018-07-25 2019-01-08 山东中创软件商用中间件股份有限公司 Using method of combination, device, equipment and computer readable storage medium
CN109194506B (en) * 2018-08-16 2021-10-15 北京京东尚科信息技术有限公司 Block chain network deployment method, platform and computer storage medium
CN109271170B (en) * 2018-09-05 2020-04-28 杭州数梦工场科技有限公司 Distributed system deployment method, system, electronic device and storage medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018053048A1 (en) * 2016-09-13 2018-03-22 Nutanix, Inc. Massively parallel autonomous reimaging of nodes in a computing cluster
US9983891B1 (en) * 2017-03-21 2018-05-29 Veritas Technologies Llc Systems and methods for distributing configuration templates with application containers

Also Published As

Publication number Publication date
CN109933338A (en) 2019-06-25

Similar Documents

Publication Publication Date Title
CN109933338B (en) Block chain deployment method, device, computer equipment and storage medium
CN107515776B (en) Method for upgrading service continuously, node to be upgraded and readable storage medium
CN109344000B (en) Block chain network service platform, recovery tool, fault processing method thereof and storage medium
US11237912B1 (en) Storage snapshot management
RU2429529C2 (en) Dynamic configuration, allocation and deployment of computer systems
US11663085B2 (en) Application backup and management
CN107111533B (en) Virtual machine cluster backup
CN110417613B (en) Distributed performance testing method, device, equipment and storage medium based on Jmeter
US20160259811A1 (en) Method and system for metadata synchronization
US20060095435A1 (en) Configuring and deploying portable application containers for improved utilization of server capacity
US20140032498A1 (en) Systems, methods, and media for synthesizing views of file system backups
CN111143133B (en) Virtual machine backup method and backup virtual machine recovery method
CN104317610A (en) Method and device for automatic installation and deployment of hadoop platform
Mundkur et al. Disco: a computing platform for large-scale data analytics
CN102571905A (en) Managing networks and machines for an online service
WO2022062304A1 (en) Method and device for deploying image recognition service on container cloud
US20170063986A1 (en) Target-driven tenant identity synchronization
US9959157B1 (en) Computing instance migration
WO2015057188A1 (en) Package dependency maps for distributed computing
CN111684437B (en) Staggered update key-value storage system ordered by time sequence
CN103365740B (en) A kind of data cold standby method and device
US9836365B2 (en) Recovery execution system using programmatic generation of actionable workflows
CN117389830A (en) Cluster log acquisition method and device, computer equipment and storage medium
Steinbauer et al. Dynamograph: a distributed system for large-scale, temporal graph processing, its implementation and first observations
US20200028739A1 (en) Method and apparatus for closed-loop and dynamic capacity management in a web-scale data center

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