CN111506657B - Block chain node equipment deployment method - Google Patents

Block chain node equipment deployment method Download PDF

Info

Publication number
CN111506657B
CN111506657B CN202010310573.XA CN202010310573A CN111506657B CN 111506657 B CN111506657 B CN 111506657B CN 202010310573 A CN202010310573 A CN 202010310573A CN 111506657 B CN111506657 B CN 111506657B
Authority
CN
China
Prior art keywords
file
node
target
equipment
electronic equipment
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
CN202010310573.XA
Other languages
Chinese (zh)
Other versions
CN111506657A (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202010310573.XA priority Critical patent/CN111506657B/en
Publication of CN111506657A publication Critical patent/CN111506657A/en
Application granted granted Critical
Publication of CN111506657B publication Critical patent/CN111506657B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor

Abstract

The embodiment of the application provides a method for deploying block chain node equipment. The method for deploying the blockchain node device can comprise the following steps: the method comprises the steps that electronic equipment obtains a node installation file, wherein the node installation file comprises a node installation package and a script of node equipment; importing the target file in the node installation package into a file directory corresponding to the target file based on the script of the node equipment; modifying the environmental parameters in the node installation package into first target parameters based on the script of the node equipment; and running the first target parameters and the target files of the imported file catalogue to realize the deployment of the electronic equipment as block chain link point equipment. By adopting the embodiment of the application, the electronic equipment is automatically deployed as the blockchain node equipment in the private chain network based on the script of the node equipment, so that the blockchain node equipment is effectively deployed.

Description

Block chain node equipment deployment method
Technical Field
The application relates to the technical field of communication, in particular to a method for deploying block chain node equipment.
Background
Blockchains are novel application modes of computer technologies such as distributed data storage, point-to-point transmission, consensus mechanisms, encryption algorithms, and the like. Blockchains can be categorized into public chains, alliance chains, and private chains.
Currently, block link point devices in a private chain network are deployed by installing a K8S tool in a central control machine and then operating the K8S tool to deploy electronic devices as block link point devices. However, the deployment of the blockchain node device is always dependent on the central controller. Therefore, how to effectively deploy the blockchain node devices and construct the private chain network is particularly important for the development of blockchain technology.
Disclosure of Invention
The embodiment of the application provides a method for deploying blockchain node equipment, which can realize the deployment of the blockchain node equipment in a private chain network without depending on a K8S tool installed in a central control machine and improve the deployment efficiency of the blockchain node equipment.
In a first aspect, an embodiment of the present application provides a method for deployment of a blockchain node device, the method including:
The method comprises the steps that electronic equipment obtains a node installation file, wherein the node installation file comprises a node installation package and a script of node equipment;
The electronic equipment imports the target file in the node installation package into a file directory corresponding to the target file based on the script of the node equipment;
The electronic equipment modifies the environmental parameters in the node installation package into first target parameters based on the script of the node equipment;
The electronic equipment operates the first target parameters and the target files of the imported file catalogue so as to realize the deployment of the electronic equipment as block chain link point equipment.
In a second aspect, an embodiment of the present application provides an electronic device including a memory and a processor. Wherein the memory is used for storing a computer program. A processor for invoking a computer program to perform the method of blockchain node device deployment as described in the first aspect.
In a third aspect, an embodiment of the present application provides a blockchain node deployment apparatus, where the apparatus has a function of implementing the blockchain node device deployment in the first aspect. The functions may be implemented by hardware, or may be implemented by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the functions described above.
In one implementation, a block link point deployment apparatus includes a receiving module, an importing module, a modifying module, and an operating module. The node installation module is used for acquiring a node installation file, wherein the node installation file comprises a node installation package and a script of node equipment. And the importing module is used for importing the target file in the node installation package into a file directory corresponding to the target file based on the script of the node equipment. And the modification module is used for modifying the environmental parameters in the node installation package into first target parameters based on the script of the node equipment. And the operation module is used for operating the first target parameters and the target files of the imported file catalogue so as to realize the deployment of the electronic equipment as block chain link point equipment.
In a fourth aspect, embodiments of the present application provide a computer readable storage medium storing a computer program comprising program instructions which, when executed by a processor, are operable to cause the processor to perform the functions of the blockchain node device deployment of the first aspect.
According to the embodiment of the application, the electronic equipment can acquire the node equipment installation file, and deploy the blockchain node equipment based on the node installation package in the node installation file and the script of the node equipment. Compared with the deployment of the block chain node equipment based on a third party (central control machine), the deployment efficiency of the block chain node equipment of the private chain network can be improved.
Drawings
In order to more clearly describe the embodiments of the present application or technical solutions in the background art, the drawings used in the embodiments of the present application will be described below.
FIG. 1 is a schematic diagram of a block chain network according to an embodiment of the present application;
FIG. 2 is a flow chart of a method for blockchain node device deployment provided by an embodiment of the present application;
FIG. 3 is a schematic diagram of a method for blockchain node deployment provided by an embodiment of the present application;
FIG. 4 is a schematic flow chart of a back-end instant service deployment according to an embodiment of the present application;
FIG. 5 is a schematic diagram of a method for back-end instant service deployment according to an embodiment of the present application;
FIG. 6 is a schematic diagram of a method for foreground deployment provided by an embodiment of the present application;
FIG. 7 is a schematic diagram of an interface provided by an embodiment of the present application;
FIG. 8 is a schematic diagram of a blockchain node deployment device according to an embodiment of the present application;
fig. 9 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
Embodiments of the present application will be described below with reference to the accompanying drawings in the embodiments of the present application.
With the advent of the information age, blockchain (Blockchain) technology has been pursued in various areas by virtue of its decentralization, distributed storage, and the like. The blockchain is essentially a decentralised database, which is a series of data blocks generated by cryptographic methods, each data block containing a batch of information of network transactions for verifying the validity (anti-counterfeiting) of the information and generating the next block. The blockchain may include a blockchain underlying platform, a platform product services layer, and an application services layer.
The blockchain underlying platform may include processing modules for user management, basic services, smart contracts, and operation detection. The user management module is responsible for identity information management of all blockchain participants, including maintenance of public and private key generation (account management), key management, maintenance of corresponding relation between the real identity of the user and the blockchain address (authority management) and the like, and under the condition of authorization, supervision and audit of transaction conditions of certain real identities, and provision of rule configuration (wind control audit) of risk control; the basic service module is deployed on all block chain node devices, is used for verifying the validity of a service request, recording the service request on a storage after the effective request is identified, for a new service request, the basic service firstly analyzes interface adaptation and authenticates the interface adaptation, encrypts service information (identification management) through an identification algorithm, and transmits the encrypted service information to a shared account book (network communication) in a complete and consistent manner, and records and stores the service information; the intelligent contract module is responsible for registering and issuing contracts, triggering contracts and executing contracts, a developer can define contract logic through a certain programming language, issue the contract logic to a blockchain (contract registering), invoke keys or other event triggering execution according to the logic of contract clauses to complete the contract logic, and simultaneously provide a function of registering contract upgrading; the operation detection module is mainly responsible for deployment in the product release process, modification of configuration, contract setting, cloud adaptation and visual output of real-time states in product operation, for example: alarms, detecting network conditions, detecting node device health status, etc.
A blockchain network is a distributed system formed by at least one blockchain node device connected in a network communication. Referring to fig. 1, fig. 1 is a schematic diagram of a block chain network according to an embodiment of the present application. The block chain network is composed of a plurality of block chain node devices, and the block chain node devices are electronic devices. As shown in fig. 1, the blockchain network is composed of an electronic device 101, an electronic device 102, an electronic device 103, and an electronic device 104. The electronic devices may include PCs (Personal Computer, personal computers), PDAs (tablet computers), cell phones, smart wearable devices, servers and the like. That is, building a blockchain network requires deploying at least one electronic device as a blockchain point device. The block link point devices can communicate with each other, and the block link point devices can also communicate with the outside, so that information interaction is realized.
With the continued development of blockchains, blockchains evolve into public chains, alliance chains, and private chains. The public chain refers to a blockchain that any person can enter the blockchain network at any time to read data, send data or contend for accounting. A federated chain refers to a blockchain that several organizations or organizations commonly participate in management. The private chain refers to a blockchain with a certain centralized control, the writing right of the account book of the private chain is controlled by a certain organization or organization, and the access and the use of data are strictly rights-managed.
Currently, the block chain node devices in the private chain network are deployed by installing a K8S tool in a central control machine (Central Control System ), and the electronic devices are deployed as block chain node devices by controlling the K8S tool. The central control computer can control other devices to realize resource sharing, video and audio mutual transmission, mutual detection and the like. The K8S tool is a conventional tool for deploying block link point equipment. Therefore, the deployment of the blockchain node equipment of the traditional private chain network depends on the central control machine, and if one machine room to be deployed does not have the central control machine, the blockchain node equipment of the private chain network cannot be deployed, and the deployment efficiency is low.
Wherein a private chain network can be understood as the following scenario. For example, 10 computers in a machine room are deployed as blockchain node devices, and a blockchain network formed by the 10 blockchain node devices is controlled by a certain organization or organization, then the 10 blockchain node devices form a private chain network. The private chain network defines read-write data rights, for example, write data rights of a device to the private chain network.
In order to deploy an electronic device as a blockchain node device in a private chain network, efficient deployment of blockchain node devices is achieved. The embodiment of the application provides a method for deploying block chain node equipment, which comprises the following steps: the method comprises the steps that electronic equipment obtains a node installation file, wherein the node installation file comprises a node installation package and a script of node equipment; the electronic equipment imports the target file in the node installation package into a file directory corresponding to the target file based on the script of the node equipment; the electronic equipment modifies the environmental parameters in the node installation package into first target parameters based on the script of the node equipment; the electronic equipment operates the first target parameters and the target files of the imported file catalogue so as to realize the deployment of the electronic equipment as block chain link point equipment.
According to the embodiment of the application, the electronic equipment processes the node installation package based on the acquired script of the node equipment, so that the electronic equipment can be automatically deployed as block chain link point equipment. Compared with the conventional deployment of the blockchain node equipment of the private chain network depending on the central control machine, the deployment of the blockchain node equipment can improve the deployment efficiency of the blockchain node equipment of the private chain network.
Referring to fig. 2, fig. 2 is a block chain node device deployment method according to an embodiment of the present application, including but not limited to the following steps:
step S201: and acquiring a node installation file.
The node installation file comprises a node installation package and a script of the node equipment. In detail, the node installation file includes: datappkg.tar.gz node installation package, deploy _node.sh node installation script, api_cfg.sql service interface rights table data.
In one implementation, an electronic device may receive a node installation file through a transmission interface. For example, the electronic device may receive the node installation file through, for example, a usb port.
In one implementation, the electronic device downloads the node installation file via a download address of the node installation file. The download address may be a download link of the download node installation file, or may be a web page address of the download node installation file, or may be a two-dimensional code image of the download node installation file, or the like. For example, a download link is input in a browser installed in the electronic device, and the node installation file is searched and downloaded, so that the node installation file can be obtained. For another example, a web page address capable of downloading the node installation file is input into a browser installed in the electronic device, and after a web page corresponding to the web page address is opened, the node installation file is downloaded in the web page. For another example, the electronic device scans the two-dimensional code stored or displayed by the electronic device, and directly downloads the node device installation file.
In one implementation, an electronic device locally stores node installation files. When the deployment of the blockchain node device is triggered, the electronic device deploys based on the stored node installation file. For example, the electronic device decompresses the locally stored node device installation file, and deploys the electronic device as a block link point device based on the decompressed file.
Step S202: and importing the target file in the node installation package into a file directory corresponding to the target file based on the script of the node equipment.
A script is a program stored in plain text for controlling an electronic device to perform a series of prescribed operations. For example, the script includes paths of the target files, where the paths act on addresses indicating file directories corresponding to the target files, so that the target files can be imported into the file directories corresponding to the target files according to the paths of the target files. Therefore, by adopting the script of the node equipment, each process in the node installation package can be controlled to automatically and orderly deploy without manual operation.
As described above, the process of importing the target file in the node installation package into the file directory corresponding to the target file may be understood as a process of initializing the target file in the node installation package. Initialization is the preparation of the system prior to operation, e.g., assigning variables to default values, setting controls to default states, etc. Specifically, the initialization process for the target file includes the following: ① The directory structure is initialized. ② System environment variables are initialized. ③ Initializing a preset database. Wherein:
In one implementation, the process that the electronic device constructs the file directory corresponding to the target file based on the target file may be understood by the electronic device initializing the directory structure based on the script of the node device. Specifically, the electronic device decompresses the node installation package to obtain a target file, wherein the target file can be multiple; the electronic equipment builds a file directory of the target file indicated by the path based on the path of the target file in the script of the node equipment. The file directory may be classified into a primary directory, a secondary directory, a multi-level directory, or the like. The target files with different types and different functions can be stored in a classified mode by adopting the multi-level directory.
In one implementation manner, the target file is a system environment variable file, and the manner of importing the target file in the node installation package into the file directory corresponding to the target file by the electronic device based on the script of the node device may be: the electronic device imports preset variables in the system environment variable file into a file directory indicated by the path of the system environment variable file based on the path of the system environment variable file in the script of the node device. For example, the system environment is a java environment, and the electronic device adds related variables of java to the/etc/profile directory based on a path of the java environment in the script of the node device.
In one implementation manner, the target file is a preset database file, and the manner of importing the target file in the node installation package into the file directory corresponding to the target file by the electronic device based on the script of the node device may be: the electronic equipment imports the preset database file into a file directory indicated by the path of the preset database file based on the path of the preset database file in the script of the node equipment. For example, the preset database file includes nnodeweb and various service database table structure data, and the electronic device imports nnodeweb and various service database table structure data into the file directory.
As described above, before the electronic device imports the preset database file into the file directory indicated by the path of the preset database file based on the path of the preset database file in the script of the node device, the electronic device further installs the preset database mysql (structured query language, relational database management system) based on the preset database file; and the electronic equipment establishes connection between the preset address of the preset database and the target address indicated by the path of the preset database file in the script of the node equipment. And further, the data can be acquired through the target address. For example, installing and starting a preset database based on a preset database file; establishing a connection between a preset address (h127.0.0.1-uroot-proot) and a target address (127.0.0.1), and displaying that the connection is successful; and importing nnodeweb and the database table structure data of each service and the like into a file directory based on the target address.
According to the embodiment of the application, the target file is initialized, the environment variables and the like are set, and the preparation work is prepared for the deployment of other subsequent processes.
Step S203: and modifying the environmental parameters in the node installation package into first target parameters based on the script of the node equipment.
It will be appreciated that modifying the environmental parameters may be modifying the configuration file. The configuration file (congfigurationfile) is a computer program for which parameters and initial settings can be configured.
In one implementation, the environment parameters include a first environment parameter and a second environment parameter, and based on the script of the node device, the manner of modifying the environment parameters in the node installation package to the first target parameters may be: the electronic equipment modifies the first environmental parameter into a mark of which the back end is a service; the electronic device modifies the second environment parameter to a network card address of the electronic device. Wherein, the configuration file can be/data/ispace/etc/NodeAgentSrv.lua. The first environment parameter may be a value of baas _base_addr field. The second environment parameter is the value of the interface_name field. In detail, the electronic device modifies the value of baas _base_addr field in the/data/ispace/etc/nodagamentsrv.lua file into a backend service background domain name (if the backend service does not have a background domain name, then it is modified into the IP address of the device where the backend service is located); and the electronic equipment takes the value knee of the interface_name field in the/data/ispace/etc/NodeAgentSrv.lua file as a network card name, wherein the network card name is acquired by the ifconfig.
Optionally, if the electronic device is not connected to an external network, the value of the new_outer_ip field in the/data/ispace/etc/nodagaentsrv.lua file needs to be changed to 0.
Step S204: and running the first target parameters and the target files of the imported file catalogue to realize the deployment of the electronic equipment as block chain link point equipment.
After the electronic device completes the deployment of each process, the electronic device operates the first target parameters and the target files of the imported file directory, and performs the restart proxy service. Wherein restarting the proxy service may be performed by: ①cd/data/ispace/agent.②killall-9NodeAgentSrv.③ /NodeAgentSrv.
In one implementation, after the electronic device runs the first target parameter and the target file of the import file directory, the electronic device logs in a preset database; and the electronic equipment imports the preset file in the node installation package into a preset database. For example, the electronic device imports a preset file api-cfg.sql in the node installation package into a preset database (mysql).
According to the embodiment of the application, based on the script of the node equipment, each service process in the node installation package is automatically deployed, so that the electronic equipment is deployed as the blockchain node equipment in the private chain network, and the deployment efficiency of the blockchain node equipment is improved.
As described above, the process of the electronic device deploying the electronic device as the blockchain node device based on the script of the node device may refer to fig. 3, and fig. 3 is a schematic diagram of a method for deploying the blockchain node according to the embodiment of the present application. Wherein, step 301: the electronic equipment runs the script of the node equipment; step 302: modifying the configuration file by the electronic equipment; step 303: the electronic device restarting the proxy service; step 304: the electronic device logs in to a preset database. Wherein, the configuration file is/data/ispace/etc/NodeAgentSrv.lua.
A specific description of the various steps of the electronic device deployment as a block link point device is provided below.
In one implementation, a method for initializing a target file in a node installation package by an electronic device based on a script of the node device includes: ① The electronic equipment constructs a file directory corresponding to the target file in the node installation package according to the script of the node equipment; ② The electronic equipment adds related parameters in a system environment variable (java environment) to a file directory (/ etc/profile) corresponding to the system environment variable file based on a path of a target file in a script of the node equipment; ③ The electronic device imports a preset database file (mysql) into a file directory indicated by the path of the preset database file based on the path of the target file in the script of the node device.
Optionally, the electronic device installs and starts the preset database (mysql) before importing the preset database file (mysql) into the file directory indicated by the path of the preset database file based on the path of the target file in the script of the node device; the electronic equipment establishes connection between a preset address (h127.0.0.1-uroot-proot) of a preset database and a target address (127.0.0.1) indicated by a path of a preset database file in a script of the node equipment; and the electronic equipment imports the first library table structure into a preset database through the target address.
In detail, the electronic device initializing the target file in the node installation package may mainly include three-part initialization. In one aspect, an electronic device initializes a directory structure. For example, the electronic device decompresses the installation package and builds a file directory corresponding to the target file; the electronic device initializes a preset database file configuration. On the other hand, the electronic device initializes a system environment variable file. For example, the electronic device adds java related variables to/etc/profile. In yet another aspect, the electronic device initializes a preset database file. For example, the electronic device starts a preset database; the electronic equipment is added with 127.0.0.1 connection, so that the effect that the electronic equipment mysql-h127.0.0.1-uroot-proot can be successfully connected is achieved; the electronic device imports nnodeweb the library table structure data for each service, etc.
In one implementation, a method for an electronic device to modify environmental parameters in a node installation package may include: the electronic equipment modifies the value of a first environmental parameter in the environmental parameters into a mark of which the back end is a service; the electronic device modifies the value of the second environmental parameter to a network card address of the electronic device. Alternatively, if the environment in which the electronic device is located has no external network, the value of the new_outer_ip field is changed to 0. The first environment parameter is baas _base_addr field. The backend services are identified by baas backend domain names. The second environment parameter is the interface_name field. The network card address of the electronic equipment is a network card name, and the network card name is acquired by the ifconfig.
Specifically, the electronic device may modify the value of the baas _base_addr field to be baas background domain name (if there is no domain name, it is changed to the IP address where baas is located); the electronic device may change the value of the interface_name field to the network card name.
It can be seen that the electronic device modifies the value of the first environment parameter to the identifier of the back-end instant service and modifies the value of the second environment parameter to the network card name of the electronic device. After the electronic equipment is deployed as the block link point equipment, the block link point equipment can transmit and process data through the identification of the rear end service and the network card name of the electronic equipment.
In one implementation, the electronic device may restart the proxy service through cd/data/ispace/agent, killall-9NodeAgentSrv and./NodeAgentSrv.
In one implementation, the electronic device logs into a preset database and imports an interface program api_cfg.sql.
As previously described, through the various steps described in connection with the embodiment of fig. 2, the electronic device may be automatically deployed as a block link point device. Further, if the deployment authority level is higher than that of the common blockchain node device, the blockchain node device can be deployed as the blockchain node device and then the back-end service deployment is performed. And then the blockchain node equipment with the management authority is deployed. The blockchain node device has management authority, which means that the blockchain node device can control the authority of the blockchain node device except the blockchain node device in the blockchain network to which the blockchain node device belongs. The process of deploying a back-end service as a service may refer to fig. 4, and fig. 4 is a schematic flow chart of back-end service deployment provided in an embodiment of the present application, where the method may include, but is not limited to, the following steps:
step S401: and acquiring the back-end service installation package and the back-end service script.
The method for the electronic device to obtain the back-end service installation package and the back-end service script and the process type for the electronic device to obtain the node installation file can refer to the implementation process described in step S201, and will not be described herein.
The back-end instant service installation package includes: mysql-5.7.20.Tar.gz and init_mysql.sh (optional), nbaas.sql (baas database structure), insert_ nbaas _data.sh (baas insert mysql library data script), etc. tar.gz (baas required configuration file), NBaasSrv (baas startup binary file), deploy _nbaas.sh (baas install script). The electronic equipment can automatically execute the operation of back-end service deployment according to the script of the back-end service.
Step S402: and importing the target file in the back-end service installation package into a file directory corresponding to the target file based on the script of the back-end service.
In one implementation, the electronic device imports a second library table structure in the backend service installation package into the database table management system; the electronic device modifies the first preset address in the second library table structure to a first target address of the electronic device, and modifies the second preset address in the second library table structure to a second target address of the electronic device. For example, the second library table structure is a t_node table, the first preset address is Fouter _ip, the second preset address is Finner _ip, the first target address is an external network IP address corresponding to the electronic device, and the second target address is an internal network IP address corresponding to the electronic device. The steps are: modifying the value of Fouter _ip into an external network IP address corresponding to the electronic equipment; the value of Finner IP is modified to the intranet IP address.
Step S403: and modifying the environmental parameters in the back-end service installation package based on the back-end service script to obtain a second target parameter.
In one implementation, based on the script of the back-end service, the method for modifying the environmental parameter in the back-end service installation package to obtain the second target parameter may be: the electronic device modifies the environmental parameters in the backend, i.e., service installation package, to a second target address of the electronic device. For example, the object file where the environmental parameter is located is/data/ispace/etc/nbaassrv.lua, the environmental parameter is the value of mem_cfg_ip, and the second target address is the intranet IP address of the device where the backend is served. The method comprises the following steps: and modifying the value of mem_cfg_ip in the/data/ispace/etc/NBaassrv.lua file into an intranet IP address of the equipment where the back end is served.
Step S404: and running the second target parameter to realize the deployment of the electronic equipment as block chain link point equipment.
The embodiment of the application can deploy the electronic equipment into the blockchain node equipment with the management authority based on the back-end service installation package and the back-end service script, thereby being convenient for managing other blockchain node equipment in the blockchain network to which the blockchain node equipment belongs.
As described above, the specific implementation process of the electronic device for deploying the electronic device as the block link point device with the management authority based on the script of the back-end service and the back-end service installation package can be seen in fig. 5, and fig. 5 is a schematic diagram of a method for deploying the back-end service according to the embodiment of the present application. Wherein, step 501: the electronic equipment runs a preset database file and initializes the preset database; step 502: the electronic equipment imports the database table structure and the data into a preset database which is served at the back end; step 503: the method comprises the steps that an electronic device runs a script inserted with a data function, and the number of the electronic devices to be deployed is obtained; step 504: the electronic equipment modifies a preset database of which the back end is served; step 505: the electronic equipment runs a script of which the back end is a service; step 506: the electronic equipment installs cache software; step 507: the electronic device modifies the environmental parameter. It will be appreciated that the order of execution of steps 501-507 may vary, and embodiments of the present application are not limited in this regard.
Specific details are set forth below regarding various steps of backend, i.e., service deployment.
In one implementation, the electronic device runs a script that is served by the back end, and the electronic device initializes a preset database file. The process of initializing the preset database by the electronic device may be: the electronic equipment decompresses a preset compressed file to obtain a first target folder; the electronic equipment imports the first target folder into a first target file; the electronic device writes the preset function into the preset configuration catalog. The method comprises the steps of presetting baas-web-tar.gz, wherein a first target file is a web folder, the first target file is/data/ispace/nbaas, a second preset function is nbaas-nginx.conf, a preset configuration catalog is conf.d, and the default is/etc/ginx/conf.d.
Specifically, the electronic equipment decompresses baas _web.tar.gz to obtain a web folder; the electronic device places the web under/data/ispace/nbaas; the electronic equipment installs the nginx according to the installation instruction yuminstall nginx; the electronic device places nbaas _nginx.conf under the nginx configuration directory conf.d.
In one implementation, the electronic device further obtains a number of at least one electronic device to be deployed after running the first preset function and initializing the first preset function. Specifically, the electronic device determines a number of at least one electronic device to be deployed; the electronic equipment generates an insertion data function according to the quantity; the electronic device runs the insert data function.
Optionally, the manner in which the electronic device obtains the number of electronic devices to be deployed may be: and when the electronic equipment runs the function of inserting data, displaying a display area on a display interface. Accordingly, the user may input the number of at least one electronic device to be deployed through the display area. Wherein the display area may be an input box, the user may directly input the number of at least one electronic device to be deployed through the input box. Or the display area may present an identification representing the number of the plurality of at least one electronic devices to be deployed, the user may select the identification such that the electronic devices determine the number of the at least one electronic devices to be deployed. For example, the a identifier indicates that the number of the at least one electronic device to be deployed is 2, and the b identifier indicates that the number of the at least one electronic device to be deployed is 21, then the user may select the a identifier, so that the electronic device determines that the number of the at least one electronic device to be deployed is 2.
In one implementation, a method for modifying a preset database of a back-end instant service by an electronic device may include: the electronic device modifies the first preset address in the second library table structure to a first target address of the electronic device, and modifies the second preset address in the second library table structure to a second target address of the electronic device. The second library table structure comprises a t_node table, wherein a first preset address is Fouter _ip, a second preset address is Finner _ip, a first target address is an external network IP address of the electronic equipment, and a second target address is an internal network IP address of the electronic equipment.
In detail, the electronic device may modify the value of Fouter _ip in the t_node table in the Baas preset database to the external network IP address of the electronic device, and modify the value of Finner _ip in the t_node table in the Baas preset database to the internal network IP address of the electronic device.
It can be seen that the electronic device modifies the address of the t_node table in the preset database served by the back end into the external network IP address or the internal network IP address of the electronic device. After the electronic device is deployed as the block link point device, the block link point device can directly obtain data in the preset database served by the back end based on the external network IP address or the internal network IP address, and further deploy the preset database served by the back end as the database of the block link node device.
In one implementation, a method for installing cache software by an electronic device based on a back-end-of-service may include: the electronic equipment installs cache software based on the installation command; the electronic device modifies the third preset address in the target code to a second target address based on the running command. The caching software may be memcached, the target code may be memcached-d-m 1024-u root-l 172.16.0.4-P11211-c 1024-P/tmp/memcached. Pid, the third preset address may be 172.16.0.4, and the second target address may be an intranet IP address of the machine where baas is located.
In detail, the electronic device runs an install command yuminstall memcached to install memcached; the electronic society runs an operation command, and replaces 172.16.0.4 address in memcached-d-m 1024-u root-l 172.16.0.4-P11211-c 1024-P/tmp/memcached. Pid with the IP address of the intranet of the machine where baas is located.
In one implementation, the electronic device may also modify the configuration file. In detail, the electronic device modifies/data/ispace/etc/nbaassrv.lua to modify the value of mem_cfg_ip to the intranet IP address of the machine where baas is located.
The electronic equipment provided by the embodiment of the application adopts the script of the back-end as-a-service, deploys the back-end as-a-service based on the back-end as-a-service installation package, and can be automatically deployed as the blockchain node equipment with the management authority in the private chain network.
The method for deploying the block chain node equipment provided by the application comprises the background deployment besides the background deployment. The foreground deployment can be divided into background service management platform foreground deployment and node equipment management platform premise deployment. Referring to fig. 6, fig. 6 is a block chain node device foreground deployment method according to an embodiment of the present application, including but not limited to the following steps:
Step S601: the electronic equipment deploys the back end, namely the service management platform foreground.
The installation files of the back-end service management platform foreground comprise a back-end service foreground installation package and a back-end service required nginx configuration file. Specifically, the electronic device decompresses baas _web.tar.gz to obtain a web folder, and places the web under/data/ispace/nbaas; the electronic device installs the nginx based on the installer yuminstall nginx; the electronic device places nbaas _nginx.conf under the nginx configuration directory conf.d.
Step S602: the electronic device deploys the blockchain node device management platform foreground.
The installation file of the blockchain node device management platform foreground comprises the nginx configuration file required by the blockchain node device. Specifically, the electronic device installs the ngix based on the installer yuminstall nginx; the electronic device places websrv _nginx.conf under the nginx configuration directory conf.d.
Therefore, the deployment of the blockchain node equipment is completed integrally through the deployment of the foreground and the background of the background service and the deployment of the foreground and the background of the blockchain node.
The electronic equipment can be deployed as the block chain link point equipment through the embodiment. After the deployment of the block link point device is completed, the verification, login and the like of the foreground can be performed, or whether some processes of the background in the deployment process are completed can be checked through a detection mechanism. For example, it can be checked whether a block link point device is deployed successfully, whether a backend, i.e., service, is deployed successfully, a chain flow is initiated, and whether a chain is created successfully.
Based on the blockchain node device deployment completion, several review operations for the foreground or background are described in detail below.
In one implementation, a verification use of the foreground may be performed. The foreground comprises Baas management foreground and node management foreground. Specifically, the verification of Baas management foreground is performed by accessing Baas of the external network IP, for example, baas of 16002. Specifically, the authentication of the node management foreground is used by accessing the node external network IP, for example, the node external network IP is 16004.
In one implementation, the block link point device may be logged in by a default user name and a default password. For example, the default user name is tencent@qq.com and the default password is admin@123.
It will be appreciated that the user name and password may be modified. Alternatively, the manner of modifying the user name may be: and replacing Femail values in t_ mch table in a preset database (BaaS background corresponds to nbaas library and node background corresponds to nnodeweb library) with new user names. Alternatively, the manner of modifying the password may be: and replacing Fpasswd fields and Fpasswd2 fields in t_ mch in a preset database (BaaS background corresponds to nbaas library and node background corresponds to nnodeweb library) with sha1 values corresponding to new passwords.
For example, to modify the password admin@123 to change@456 may be by replacing sha1 (change@456) with e2c90ed7d5dcc7fed953e00bbab39f183885a29e; the Fpasswd field and Fpasswd field values of the t_ mch table in the database are replaced with e2c90ed7d5dcc7fed953e00bbab f183885a29e.
In one implementation, it may be checked whether the blockchain node device deployment was successful. Specifically, whether ispace, software, trustsql folders exist under the/data/directory can be detected; whether mysql-h127.0.1-uroot-proot can be attached; after connection of mysql, show databases is nnodeweb; iss_db and digit_asset_db libraries; whether ps-ef| grep NodeAgentSrv has a process; whether ps-ef| GREP DIGITASSETSERVICE has a process; ps-ef| GREP ISSSERVICE has a process. If the detection is passed, the deployment of the blockchain node device can be considered successful.
In one implementation, it can be checked whether the backend, i.e., service deployment, was successful. Specifically, it is possible to detect whether ps-ef| grep NBaasSrv has a process; whether ps-ef| GREP MEMCACHE has a process; whether mysqlh127.0.1-uroot-proot can be attached; check if there is a value for select from t_ mch, if there is a value for select from t_chain, if select from t_node looks to see if Fmodify _time is the current time.
In one implementation, a blockchain flow may be initiated. Specifically, an interface call interface may be logged in and then the blockchain is started. The Login calling interface can be a Login interface, and the starting blockchain can be a call STARTCHAIN interface. Fig. 7 is a schematic diagram of an interface according to an embodiment of the present application, as shown in fig. 7.
Optionally, the method for calling the interface by the login interface may include: uname (corresponding to the Femail field in the database nbaas.t_ mch table, default value "tencent@qq.com"); timestamp (taking the timestamp of the current time. Available at https:// tool.lu/timestamp); pwd2; weakpasswd; pwd (value obtained by sha1 calculation on "uname |timestamp|password" character string, wherein uname and timestamp correspond to the values in uname and timestamp described above, respectively, password corresponds to Fpasswd field in database nbaas.t_ mch table, wherein Fpasswd field may have default value of "23d42f5f3f66498b2c8ff4c20b8c5ac826e 47146").
Alternatively, the way to launch the blockchain may be: the value of chain_id may be made "ch tencent _ prchain".
In one implementation, after a blockchain is started, it can be checked whether the blockchain was created successfully. Specifically, it is possible to check whether Fmodify _time is the current time and check whether the value of state in Fstatics field is 2 through program select.
In one implementation, if the blockchain creation is complete, data may be written to the blockchain. Specifically, different business operations are performed by calling an upper layer application service interface. For example, the calling mode may be http:// { node_ip }/{ interface }, where node_ip is an external network ip of a node (intranet if the service of the service is intranet), node_port is a port of the corresponding service, interface is an interface name to be called under the corresponding service, and parameters are sent in a post mode. Currently, in automated deployments, two services are involved, digital assets and information sharing, where digital assets mainly include distribution, transfer, redemption, etc. scenarios. The information sharing mainly comprises scenes such as adding, inquiring and the like.
It will be appreciated that many problems are encountered in performing block link point device deployment, and that several problems may occur are specifically identified below.
For example, when verifying whether the blockchain startup is successful, the value of the state in the Fstatics field is found to be 3, which indicates that the underlying consensus ports of the nodes are not connected, so as to ensure that the nodes can be connected by pinning and the ports 15000-17000 can be connected by telnet.
As another example, if the state value in Fstatics field is always 0, then the following operations can be performed: determining whether the start chain operation has been completed; checking whether the wrapper log has Unable to start JVM under the entry node/data/trustsql/ch_ tencent _ prchain directory; if there is the above problem, see if there is any of the following/etc/profile
JAVA_HOME=/data/software/jdk1.8.0;
CLASSPATH=$JAVA_HOME/lib/、PATH=$PATH:$JAVA_HOME/bin;
export PATH JAVA_HOME CLASSPATH;
PATH=$PATH:/data/software/mysql-5.7.20:/data/software/mysql-5.7.20/bin;
export PATH;
If not, the method needs to be added; checking each blockchain node device and executing: source/etc/profile, cd/data/trustsql/ch_ tencent _ prchain/bin,/trustsql start.
As another example, if after restarting the server, it is found that mysql is not connected, then/data/software/mysql-5.7.20/bin/mysqld may be executed.
As another example, a method of viewing a log. Configuration files under/data/ispace/etc, log_sys, log_app and log_sql in the configuration files of each service correspond to log configuration options, and the higher the level (1-5), the more information is printed. Log of log files under respective service binary run directory/data/ispace/xxx.
Therefore, after the background deployment and the foreground deployment of the blockchain node device described in connection with the embodiment of the application are successful, the operation of each process and the possible problems when the blockchain node device is used are checked. The detection of each link of the deployment of the block link point equipment can be realized, and the successful deployment of the electronic equipment into the block link point equipment is ensured.
Referring to fig. 8, fig. 8 is a schematic structural diagram of a block chain node deployment device 80 according to an embodiment of the present application, where the block chain node deployment device 80 is configured to execute steps executed by an electronic apparatus in an embodiment of a method corresponding to fig. 2 and fig. 4, and the block chain node deployment device 80 may include a receiving module 801, an importing module 802, a modifying module 803, and an operating module 804. Each module in the blockchain node deployment device 80 is specifically configured to:
a receiving module 801, configured to obtain a node installation file, where the node installation file includes a node installation package and a script of a node device;
An importing module 802, configured to import, based on a script of the node device, a target file in the node installation package into a file directory corresponding to the target file;
a modifying module 803, configured to modify an environmental parameter in the node installation package into a first target parameter based on a script of the node device;
And the operation module 803 is configured to operate the first target parameter and the target file of the import file directory, so as to implement the deployment of the electronic device as a block link point device.
In one implementation, before the importing module 802 imports the target file in the node installation package into the file directory corresponding to the target file based on the script of the node device, the importing module is further configured to: the electronic equipment decompresses the node installation package to obtain a target file;
The electronic equipment builds a file directory of the target file indicated by the path based on the path of the target file in the script of the node equipment.
In one implementation, the target file is a system environment variable file;
The importing module 802 is specifically configured to, when importing, based on the script of the node device, the target file in the node installation package into the file directory corresponding to the target file:
The electronic device imports preset variables in the system environment variable file into a file directory indicated by the path of the system environment variable file based on the path of the system environment variable file in the script of the node device.
In one implementation, the target file is a preset database file;
The importing module 802 is specifically configured to, when importing, based on the script of the node device, the target file in the node installation package into the file directory corresponding to the target file:
the electronic equipment guides the preset database file into a file directory indicated by the path of the preset database file based on the path of the preset database file in the script of the node equipment.
In one implementation, the importing module 802 is further configured to, before presetting a path of a database file in the script based on the node device, import the preset database file into a file directory indicated by the path of the preset database file:
Installing a preset database based on the preset database file;
establishing connection between a preset address of a preset database and a target address indicated by a path of a preset database file in a script of node equipment;
And importing the first library table structure into a preset database through the target address.
In one implementation, the environmental parameters include a first environmental parameter and a second environmental parameter;
The modification module 803 is further configured to, when modifying an environmental parameter included in the node installation package to be a first target parameter based on the script of the node device:
modifying the first environmental parameter into a mark of which the back end is a service;
and modifying the second environment parameter into a network card address of the electronic equipment.
In one implementation, the running module 804, after running the first target parameter and the target file of the import file directory, is further configured to:
Logging in a preset database;
and importing the preset file in the node installation package into a preset database.
In one implementation, the execution module 804 is further configured to, after executing the first target parameter and the target file of the import file directory, the receiving module 801:
Acquiring a back-end service installation package and a back-end service script;
An importing module 802, configured to import, based on the script of the back-end service, the target file in the back-end service installation package into a file directory corresponding to the target file;
a modifying module 803, configured to modify an environmental parameter in the back-end service installation package based on the back-end service script, to obtain a second target parameter;
And an operation module 804, configured to operate the second target parameter to implement deployment of the electronic device as a blockchain node device, where the electronic device deployed as a blockchain node device has management authority, and the management authority indicates that the blockchain node device has authority to manage node devices other than the blockchain node device in the blockchain network to which the blockchain node device belongs.
In one implementation, when the import module 802 imports the file directory corresponding to the target file in the back-end service installation package based on the script of the back-end service, the import module is further configured to:
Importing a second library table structure in the back-end service installation package into a preset database;
Modifying the first preset address of the second library table structure to be a first target address of the electronic device, and modifying the second preset address in the second library table structure to be a second target address of the electronic device.
In one implementation, the modification module 803 is specifically configured to, when modifying an environmental parameter in the back-end service installation package based on a back-end service script:
And modifying the environment parameters in the back-end service installation package into a second target address of the electronic equipment.
It should be noted that, in the embodiment corresponding to fig. 8, details of implementation of the steps performed by each module may be referred to the embodiments shown in fig. 2 and fig. 4 and the foregoing, which are not described herein again.
Referring to fig. 9, fig. 9 is a schematic structural diagram of an electronic device according to an embodiment of the application. The electronic device 90 comprises a processor 901, a memory 902 and a communication interface 903, said processor 901, said memory 902 being connected by one or more communication buses.
The processor 901 is configured to support the electronic device to perform the corresponding functions of the electronic device in the methods described in fig. 2 and 4. The processor 901 may be a central processor (Central Processing Unit, CPU), a network processor (Network Processor, NP), a hardware chip, or any combination thereof.
The memory 902 is used for storing program codes and the like. The memory 902 may include volatile memory (RAM), such as random access memory (Random Access Memory); the Memory 902 may also include a non-volatile Memory (non-volatile Memory), such as Read Only Memory (ROM), flash Memory (flash Memory), hard disk (HARD DISK DRIVE, HDD) or Solid state disk (Solid STATE DRIVE, SSD); the memory 902 may also include a combination of the above types of memory.
In an embodiment of the present application, the electronic device 90 includes a plurality of interfaces, where the interface for sending data and the interface for receiving data may not be the same interface.
The processor 901 may call program code stored in the memory 902 to perform the following operations:
A communication interface 903, configured to obtain a node installation file, where the node installation file includes a node installation package and a script of a node device;
A processor 901, configured to import, based on a script of the node device, a target file in the node installation package into a file directory corresponding to the target file;
Modifying the environmental parameters in the node installation package into first target parameters based on the script of the node equipment;
And running the first target parameters and the target files of the imported file catalogue to realize the deployment of the electronic equipment as block chain link point equipment.
In one implementation, before importing the target file in the node installation package into the file directory corresponding to the target file based on the script of the node device, the processor 901 is further configured to: the electronic equipment decompresses the node installation package to obtain a target file;
The electronic equipment builds a file directory of the target file indicated by the path based on the path of the target file in the script of the node equipment.
In one implementation, the target file is a system environment variable file;
The processor 901 is specifically configured to, when importing, based on a script of the node device, a target file in the node installation package into a file directory corresponding to the target file:
The electronic device imports preset variables in the system environment variable file into a file directory indicated by the path of the system environment variable file based on the path of the system environment variable file in the script of the node device.
In one implementation, the target file is a preset database file;
The processor 901 is specifically configured to, when importing, based on a script of the node device, a target file in the node installation package into a file directory corresponding to the target file:
the electronic equipment guides the preset database file into a file directory indicated by the path of the preset database file based on the path of the preset database file in the script of the node equipment.
In one implementation, the processor 901 is further configured to, before presetting a path of a database file in the script based on the node device, import the preset database file into a file directory indicated by the path of the preset database file:
Installing a preset database based on the preset database file;
establishing connection between a preset address of a preset database and a target address indicated by a path of a preset database file in a script of node equipment;
And importing the first library table structure into a preset database through the target address.
In one implementation, the environmental parameters include a first environmental parameter and a second environmental parameter;
the processor 901 is further configured to, when modifying an environmental parameter included in the node installation package to a first target parameter based on the script of the node device:
modifying the first environmental parameter into a mark of which the back end is a service;
and modifying the second environment parameter into a network card address of the electronic equipment.
In one implementation, after executing the first target parameter and the target file of the import file directory, the processor 901 is further configured to:
Logging in a preset database;
and importing the preset file in the node installation package into a preset database.
In one implementation, after executing the first target parameter and the target file of the import file directory, the communication interface 903 is further configured to:
Acquiring a back-end service installation package and a back-end service script;
A processor 901, configured to import, based on a script of a back-end service, a target file in a back-end service installation package into a file directory corresponding to the target file;
Modifying the environmental parameters in the back-end service installation package based on the back-end service script to obtain second target parameters;
And running a second target parameter to realize the deployment of the electronic equipment as the block chain link point equipment, wherein the electronic equipment deployed as the block chain node equipment has management authority, and the management authority indicates that the block chain node equipment has the authority for managing the node equipment except the block chain node equipment in the block chain network to which the block chain node equipment belongs.
In one implementation, when the processor 901 imports the file directory corresponding to the target file into the target file in the back-end service installation package based on the script of the back-end service, the processor is further configured to:
Importing a second library table structure in the back-end service installation package into a preset database;
Modifying the first preset address of the second library table structure to be a first target address of the electronic device, and modifying the second preset address in the second library table structure to be a second target address of the electronic device.
In one implementation, when modifying an environmental parameter in a back-end-of-service installation package based on a back-end-of-service script, the processor 901 is specifically configured to:
And modifying the environment parameters in the back-end service installation package into a second target address of the electronic equipment.
Further, the processor 901 may also cooperate with the memory 902 to perform operations corresponding to the electronic device in the method embodiment shown in fig. 2 and fig. 4, and the description in the method embodiment may be referred to specifically, which is not repeated herein.
The embodiment of the application also provides a computer readable storage medium, which can be used for storing a computer program for the electronic device in the embodiment shown in fig. 2 and fig. 4, and the computer readable storage medium contains a program for executing the program designed for the electronic device in the embodiment.
The computer readable storage medium includes but is not limited to flash memory, hard disk, solid state disk.
Embodiments of the present application also provide a computer program product that, when executed by a computer device, may perform the method of blockchain node device deployment designed for an electronic device in the embodiments of fig. 2 and 4.
In an embodiment of the present application, there is also provided a chip including a processor and a memory, where the memory is configured to store a computer program, and the processor is configured to call and run the computer program from the memory, where the computer program is configured to implement the method in the above-described method embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, produces a flow or function in accordance with embodiments of the present application, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable device. The computer instructions may be stored in or transmitted across a computer-readable storage medium. The computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by a wired (e.g., coaxial cable, fiber optic, digital Subscriber Line (DSL)), or wireless (e.g., infrared, wireless, microwave, etc.). The computer readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more available media. The usable medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid state disk (Solid STATE DISK, SSD)), etc.
The foregoing is merely illustrative of the present invention, and the present invention is not limited thereto, and any person skilled in the art will readily recognize that variations or substitutions are within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (11)

1. A method of blockchain node device deployment, the method comprising:
The method comprises the steps that electronic equipment obtains a node installation file, wherein the node installation file comprises a node installation package and a script of node equipment;
the electronic equipment decompresses the node installation package to obtain a target file; the target file comprises a system environment variable file and a preset database file;
The electronic equipment builds a file directory of the target file indicated by the path based on the path of the target file in the script of the node equipment;
The electronic equipment imports a preset variable in the system environment variable file into a file directory indicated by the path of the system environment variable file based on the path of the system environment variable file in the script of the node equipment; the electronic equipment imports the preset database file into a file directory indicated by the path of the preset database file based on the path of the preset database file in the script of the node equipment;
The electronic equipment modifies the environmental parameters in the node installation package into first target parameters based on the script of the node equipment;
The electronic equipment runs the first target parameters and the target files imported into the file catalogue so as to realize the deployment of the electronic equipment as block chain link point equipment;
And checking a deployment process of deploying the electronic equipment as the blockchain node equipment based on a detection mechanism to check whether the blockchain node equipment is successfully deployed.
2. The method according to claim 1, wherein before the electronic device imports the preset database file into the file directory indicated by the path of the preset database file based on the path of the preset database file in the script of the node device, the method further comprises:
the electronic equipment installs a preset database based on the preset database file;
The electronic equipment establishes connection between a preset address of the preset database and a target address indicated by a path of the preset database file in the script of the node equipment;
And the electronic equipment imports a first library table structure into the preset database through the target address.
3. The method of claim 1, wherein the environmental parameters include a first environmental parameter and a second environmental parameter;
The electronic device modifies an environmental parameter in the node installation package to a first target parameter based on a script of the node device, including:
The electronic equipment modifies the first environmental parameter into a back-end service identifier;
And the electronic equipment modifies the second environment parameter into the network card address of the electronic equipment.
4. The method of claim 1, wherein after the electronic device runs the first target parameter and imports the target file of the file directory, further comprising:
the electronic equipment logs in a preset database;
and the electronic equipment imports the preset file in the node installation package into the preset database.
5. The method of claim 1, wherein after the electronic device runs the first target parameter and imports the target file of the file directory, further comprising:
the electronic equipment acquires a back-end service installation package and a back-end service script;
the electronic equipment imports a target file in the back-end service installation package into a file directory corresponding to the target file based on the back-end service script;
The electronic equipment modifies the environmental parameters in the back-end service installation package based on the back-end service script to obtain second target parameters;
The electronic equipment operates the second target parameter to realize the deployment of the electronic equipment into block chain link point equipment, wherein the electronic equipment deployed into block chain node equipment has management authority, and the management authority indicates that the block chain node equipment has authority to manage node equipment except the block chain node equipment in a block chain network to which the block chain node equipment belongs.
6. The method of claim 5, wherein the electronic device importing the target file in the back-end as-a-service installation package into the file directory corresponding to the target file based on the back-end as-a-service script, comprising:
the electronic equipment imports a second library table structure in the back-end service installation package into a preset database;
the electronic device modifies a first preset address in the second library table structure into a first target address of the electronic device, and modifies a second preset address in the second library table structure into a second target address of the electronic device.
7. The method of claim 5, wherein the electronic device modifying the environmental parameters in the back-end-as-a-service installation package based on the back-end-as-a-service script comprises:
and the electronic equipment modifies the environment parameters in the back-end service installation package into a second target address of the electronic equipment.
8. A block link point deployment apparatus, comprising:
the receiving module is used for acquiring a node installation file, wherein the node installation file comprises a node installation package and a script of node equipment;
The importing module is used for decompressing the node installation package by the electronic equipment to obtain a target file; the target file comprises a system environment variable file and a preset database file; the electronic equipment builds a file directory of the target file indicated by the path based on the path of the target file in the script of the node equipment; the electronic equipment imports a preset variable in the system environment variable file into a file directory indicated by the path of the system environment variable file based on the path of the system environment variable file in the script of the node equipment; the electronic equipment imports the preset database file into a file directory indicated by the path of the preset database file based on the path of the preset database file in the script of the node equipment;
the modification module is used for modifying the environmental parameters in the node installation package into first target parameters based on the script of the node equipment;
the operation module is used for operating the first target parameters and the target files of the imported file catalogue so as to realize the deployment of the electronic equipment as block chain link point equipment; and checking a deployment process of deploying the electronic equipment as the blockchain node equipment based on a detection mechanism to check whether the blockchain node equipment is successfully deployed.
9. An electronic device, comprising:
a memory; the memory is used for storing a computer program; and
A processor; the processor is configured to invoke the computer program to perform the method of any of claims 1-7.
10. A computer readable storage medium, characterized in that the computer readable storage medium stores a computer program comprising program instructions for causing a processor to perform the method according to any of claims 1-7 when executed by the processor.
11. A computer program product comprising computer instructions which, when executed by a processor, implement the method of any of claims 1-7.
CN202010310573.XA 2020-04-17 2020-04-17 Block chain node equipment deployment method Active CN111506657B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010310573.XA CN111506657B (en) 2020-04-17 2020-04-17 Block chain node equipment deployment method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010310573.XA CN111506657B (en) 2020-04-17 2020-04-17 Block chain node equipment deployment method

Publications (2)

Publication Number Publication Date
CN111506657A CN111506657A (en) 2020-08-07
CN111506657B true CN111506657B (en) 2024-04-26

Family

ID=71876239

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010310573.XA Active CN111506657B (en) 2020-04-17 2020-04-17 Block chain node equipment deployment method

Country Status (1)

Country Link
CN (1) CN111506657B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112463123B (en) * 2020-11-25 2023-07-14 北京字跳网络技术有限公司 Task compiling method, device, network node, system and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110389900A (en) * 2019-07-10 2019-10-29 深圳市腾讯计算机系统有限公司 A kind of distributed experiment & measurement system test method, device and storage medium
WO2019232828A1 (en) * 2018-06-06 2019-12-12 平安科技(深圳)有限公司 Script deployment method and apparatus, and computer device and storage medium
CN110855791A (en) * 2019-11-18 2020-02-28 腾讯科技(深圳)有限公司 Block link point deployment method and related equipment
CN110995473A (en) * 2019-11-18 2020-04-10 腾讯科技(深圳)有限公司 Service node control method and related equipment

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11729186B2 (en) * 2018-10-04 2023-08-15 Research Foundation Of The City University Of New York Blockchain architecture for computer security applications

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019232828A1 (en) * 2018-06-06 2019-12-12 平安科技(深圳)有限公司 Script deployment method and apparatus, and computer device and storage medium
CN110389900A (en) * 2019-07-10 2019-10-29 深圳市腾讯计算机系统有限公司 A kind of distributed experiment & measurement system test method, device and storage medium
CN110855791A (en) * 2019-11-18 2020-02-28 腾讯科技(深圳)有限公司 Block link point deployment method and related equipment
CN110995473A (en) * 2019-11-18 2020-04-10 腾讯科技(深圳)有限公司 Service node control method and related equipment

Also Published As

Publication number Publication date
CN111506657A (en) 2020-08-07

Similar Documents

Publication Publication Date Title
EP4047487B1 (en) File storage method, terminal, and storage medium
CN109478149B (en) Access services in a hybrid cloud computing system
US10880287B2 (en) Out of box experience application API integration
EP3235213B1 (en) No password user account access
CN109479062B (en) Usage tracking in hybrid cloud computing systems
CN108289098B (en) Authority management method and device of distributed file system, server and medium
JP6161827B2 (en) Preliminary authentication of client application accessing user account on content management system
CN111274268B (en) Internet of things data transmission method and device, medium and electronic equipment
US9443067B1 (en) System for the distribution and deployment of applications, with provisions for security and policy conformance
US11063922B2 (en) Virtual content repository
EP4033349A1 (en) Method and apparatus for generating mirror image file, and computer-readable storage medium
CN111897623B (en) Cluster management method, device, equipment and storage medium
CN110022315A (en) Weight management method, device and equipment in a kind of piece of chain type account book
WO2022095518A1 (en) Automatic interface test method and apparatus, and computer device and storage medium
CN111259364B (en) Method, device, equipment and storage medium for using national secret encryption card
CN111506657B (en) Block chain node equipment deployment method
US10469473B2 (en) Network authentication system extensions
US11757976B2 (en) Unified application management for heterogeneous application delivery
CN109558192A (en) A kind of implementation method, device, storage medium and the computer equipment of video face label
CN115843359A (en) Management of computing secrets
Venkata Sai Santosh et al. Decentralized application for two-factor authentication with smart contracts
TW200933381A (en) System and method for running a web-based application while offline
US20190056960A1 (en) Online desktop operating system
CN117436050A (en) Big data component management method, device, equipment and storage medium
CN117609151A (en) File management system and method based on different storage media

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