Ansible playbook to automatize i3m artifacts deployment. This readme details the deployment of the BESU Network.
- Explorer: http://95.211.3.244:8547
- Playbook: https://gitlab.com/i3-market/code/i3m-deployment/-/tree/besu-nodes/playbooks/besu.yml
- AWX: http://95.211.3.249:19000/#/projects/30/details
- Nexus: http://95.211.3.251:8081/#browse/browse:i3m-raw:besu
Explorer: http://95.211.3.244:8547
P2P: (tcp+udp)
95.211.3.244:30303
95.211.3.249:30303
95.211.3.250:30303
95.211.3.251:30303
RPC-HTTP: tcp
95.211.3.244:8545
95.211.3.249:8545
95.211.3.250:8545
95.211.3.251:8545
RCP-WS: tcp
95.211.3.244:8546
95.211.3.249:8546
95.211.3.250:8546
95.211.3.251:8546
Generate a new credential to connect via SSH to each host.
Name: upc_rafael.genes
Description: SSH to nodes with user upc_rafael.genes
Credential Type: Machine
Username: upc_rafael.genes
Password: Encrypted
Privilege Escalation Method: sudo
Privilege Escalation Username: root
Privilege Escalation Password: Encrypted
Generate a new project to link the gitlab branch with the deployment.
Name: i3m-deployement-BESU-nodes
Description: Besu nodes deployment
Organization: I3M
Source Control Type: Git
Source Control URL: https://gitlab.com/i3-market/code/i3m-deployment.git
Source Control Branch: besu-nodes
Source Control Credential: Scm: i3M-SCM-credentials
Playbook Directory: _30__i3m_deployement_besu_nodes
Generate a new template to manage the job execution for this project.
Name: template-i3m-besu
Description: BESU node deployment
Job Type: run
Organization: I3M
Inventory: i3M-inventory
Project: i3m-deployement-BESU-nodes
Playbook: playbooks/besu.yml
Verbosity: 1 (Verbose)
Options: Enable Privilege Escalation
Credentials: SSH: upc_rafael.genes
Variables:
---
IMAGE_BESU: "hyperledger/besu:21.1.6"
RPC_API_METHODS: "ETH,NET,IBFT,WEB3"
VOLUME: "/var/besu"
PORT_P2P: 30303
PORT_HTTP: 8545
PORT_WS: 8546
NEXUS_USER: "i3m-nexus"
NEXUS_PASS: "XXXX"
URL_GENESIS: "http://95.211.3.251:8081/repository/i3m-raw/besu/genesis.json"
URL_KEY1: "http://95.211.3.251:8081/repository/i3m-raw/besu/accounts/0xXXXX"
URL_KEY2: "http://95.211.3.251:8081/repository/i3m-raw/besu/accounts/0xXXXX"
URL_KEY3: "http://95.211.3.251:8081/repository/i3m-raw/besu/accounts/0xXXXX"
URL_KEY4: "http://95.211.3.251:8081/repository/i3m-raw/besu/accounts/0xXXXX"
BOOTNODE: "enode://0xf2102d06488bb5b693fb85465c2bc316c5bf2a23a3c1f1dfb9e20733c67f7c41279a09f0f6c11a6964f0d0bf8ae85484e253e1196606b168faf77ffbfc081374@95.211.3.244:30303?discport=30303"
Steps:
- Download besu 21.1.6
- Create Network folder
- Create 20 accounts
- Create custom ibftConfigFile.json from template with:
- gasLimit: 12.5M
- accounts: Add previous accounts with enought ether.
- blockperiodsecond: 60s
- Generate genesis.json
- Execute command: /bin/besu operator generate-blockchain-config --config-file=ibftConfigFile.json --to=networkFiles
- Upload to Nexus genesis.json, accounts and node keys.
generate-accounts.sh
#!/bin/bash
BESU=../../bin/besu
for i in {1..20}
do
echo "Generating account $i"
$BESU --data-path=$i public-key export-address --to=$i/key.address
$BESU --data-path=$i public-key export --to=$i/key.pub
mv $i $(cat $i/key.address)
done
find . -name '*.address' -delete
Several accounts are created from the genesis with lots of ether. This enables each partner to own one unique account, which facilitates the audition of the smart contracts. The following list shows the asociated partner that owns each account. Please, if you want to use one of them, select an unassigned one and update this documentation with your email to ensure anyone uses your account and also you could receive notifications in case of some updates/troubles to the network. The asociated private keys are stored on the Nexus: http://95.211.3.251:8081/#browse/browse:i3m-raw:besu/accounts.