Check our terms and conditions, privacy policies, and cookies policy.
Copyright 2024 © All rights Reserved. Designed by LACNet
Here you will find instructions for the deployment of LACChain nodes using Ansible. By following this guide, your nodes will be executed from your local machine on your remote server. Your local machine and your remote server will communicate via ssh. The installation with ansible provided is compatible with Ubuntu, Centos7 and Centos8 stream.
During the process of node deploying, you will be asked about the network in which you would like to deploy your nodes. In order for your node to get permissioned, you need to complete the permissioning process first. In order to understand better what are the types of networks available and the permissioning processes for each network, please read permissioning process.
Recommended hardware features for LACChain nodes:
Recommended Hardware | On Mainnet Omega | On Open Protestnet | On Legacy ProTestnet (DEPRECATED) |
CPU | 4 vCPUs compute optimized | 4 vCPUs compute optimized | 2 vCPUs |
RAM Memory | 16 GB | 16 GB | 8 GB |
Hard Disk | 375 GB SSD | 50 GB SSD | 250 GB SSD |
IOPs | 70,000 IOPS READ 50,000 IOPS WRITE | 70,000 IOPS READ 50,000 IOPS WRITE | 15,000 IOPS READ 5,000 IOPS WRITE |
Operating System: Ubuntu 16.04, Ubuntu 18.04, Ubuntu 20.04, Ubuntu 22.04, Centos7, Centos8 stream always 64 bits.
It is necessary to enable the following network ports in the machine in which we are going to deploy the node:
Port 60606: TCP/UDP – To establish communication p2p between nodes.
Port 4545: TCP – To establish RPC communication. (this port is used for applications that communicate with LACChain and may be leaked to the Internet)
For this installation we will use Ansible. It is necessary to install Ansible on a local machine that will perform the installation of the node on a remote machine. Follow these instructions to install ansible in your local machine:
$ sudo apt-get update
$ sudo apt-get install software-properties-common
$ sudo apt-add-repository ppa:ansible/ansible
$ sudo apt-get update
$ sudo apt-get install ansible
To configure and install a LACChain node, you must clone this git repository in your local machine:
$ git clone https://github.com/LACNet-Networks/besu-networks
$ cd besu-networks/
Make sure you have SSH access to the remote machine where you are going to deploy the LACChain node. This step will vary depending on your context (physical machine, cloud provider, etc.). This document assumes that you are able to log into your remote machine using the following command:
$ ssh remote_user@remote_host
There are three types of LACChain nodes (validator, bootnode, and writer) that can be created in the LACChain networks orchestrated by LACNet at this moment. After cloning the repository in your local machine, create a copy of the “inventory.example"
file and save it as “inventory"
. Edit this file to add a line for the remote server where you are creating the new node. You can do it with a graphical tool or inside the shell.
$ cd besu-networks/
$ cp inventory.example inventory
$ vi inventory
[node]
192.168.10.72 node_ip=your.public.node.ip node_name=my_node_name node_email=your@email
Consider the following:
[node] line. Do not replace existing lines.
node_name
is the name you want for your node in the network monitoring tool.node_email
is the email address you want to register for your node in the network monitoring tool. It’s a good idea to provide the e-mail of the technical contact provided as part of the on-boarding process.Run the following script:
$ ansible-playbook -i inventory --private-key=~/.ssh/id_rsa -u remote_user site-lacchain-node.yml
You will be asked about which kind of node are you deploying and in which of the LACChain Networks. For instance, if you want to deploy a writer node on Mainnet Omega, first type 2 for writer and then 0 for Mainnet Omega. For a boot in ProTestnet type 1 and then also 1.
[0]:validator
[1]:boot
[2]:writer
Please, choose which type of node are you deploying:
[0]:mainnet-omega
[1]:open-protestnet
[2]:legacy-protestnet (DEPRECATED)
Please, choose in which network are you deploying:
Don’t forget to write down your node’s “enode”. Remember that you need to provide the enode to be permissioned as indicated in the permissioning process.
TASK [lacchain-validator-node : print enode key] ***********************************************
ok: [x.x.x.x] => {
"msg": "enode://cb24877f329e0e3fff6c7d7b88d601b698a9df6efbe1d91ce77130f065342b523418b38cb3c92ea3bcca15344e68c7d85a696eb9f8c0152c51b9b7b74729064e@a.b.c.d:60606"
}
Also as part of the permissioning process, we need you to provide us your node address. Please get it by executing the following:
$ cd /root/lacchain/data
$ cat nodeAddress
At the end of the installation, if everything worked a BESU service will be created managed by Systemctl with started status. After the installation has finished, you will have nginx installed on each instance chosen; it will be up and running and will allow secure and encrypted RPC connections (on the default 443 port). Certificates used to create the secure connections are self-signed; it is up to you decide another way to secure RPC connections or continue using the provided default service. Once you are permissioned, you can verify that you are connected to other nodes in the network by following the steps detailed in #issue33.
The default configuration should work for everyone. However, depending on your needs and technical knowledge you can modify your local node’s settings in /root/lacchain/config.toml
, e.g. for RPC access or authentication. Please refer to the reference documentation.
Once your node is ready, you can start it up with this command in remote machine:
$ service pantheon start
If you need to restart the services, you can execute the following commands:
$ service pantheon restart
To update your node, first change the inventory file. Replace the ip address with your node ip address. :
[node] #here put the role you are going to update
35.193.123.227
Optionally you can choose the sha_commit of the version you want to update. It is only needed to specify the version:
[node] #here put the role you are gong to update
35.193.123.227 besu_release_version='22.1.0'
Current Besu versions of LACChain nodes orchestrated by LACNet are obtained from here. Tested BESU versions are 21.1.6, 20.10.4, 1.5.3, 1.5.2, 1.4.4, 1.3.6.
Execute the following command to update the node:
$ ansible-playbook -i inventory --private-key=~/.ssh/id_rsa -u remote_user site-lacchain-update-node.yml
Once you have been permissioned, you can check if your node is connected to the network properly. Check that the node has stablished the connections with the peers:
$ sudo -i
$ curl -X POST --data '{"jsonrpc":"2.0","method":"net_peerCount","params":[],"id":1}' localhost:4545
You should get a result like this:
Now you can check if the node is syncing blocks by getting the log of the last 100 blocks:
$ tail -100 /root/lacchain/logs/pantheon_info.log
You should get something like this:
If any of these two checks doesn’t work, try to restart the besu service:
$ service pantheon restart
If you have forgotten to write down your enode, you may get it, executing the following command:
$ curl -X POST --data '{"jsonrpc":"2.0","method":"net_enode","params":[],"id":1}' http://localhost:4545
To get your node address you may execute the following command:
$ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_coinbase","params":[],"id":53}' http://127.0.0.1:4545
If you find any issue, you can open an issue on Github and contact us at [email protected]. If you already have a membership, you can also open a ticket.
Now that you have installed your writer node, you can follow our guides to deploy smart contracts, deploy private channels (using Ansible, using Dockers, or using Kubernetes), deploy an IPFS node (using Ansible, using Dockers, or using Kubernetes), and deploy the Hyperledger Firefly stack.
Check our terms and conditions, privacy policies, and cookies policy.
Copyright 2024 © All rights Reserved. Designed by LACNet