This set of docker images contains a self-contained, Peerplays QA environment. It features 16 Peerplays nodes(running 27 witnesses), 16 Bitcoin SONs, 16 Hive SONs, 1 Redis and 1 faucet node.
Hardware Requirements
Here's a guideline for the hardware requirements for building the QA environment:
Memory
Storage
OS
32GB
~300GB
Ubuntu 18.04
Of course, the requirements will be highly dependent on what you're using the environment for. Intensive development of an enterprise-level application will need much more resources than simply exploring your own private environment.
Software Requirements
Following are the software requirements:
OS
Docker
git
Ubuntu 18.04
20.10.8 or higher
2.33.0 or higher
* If any of the software mentioned above is not installed, please use the following pages to install them:
Clone the peerplays-utils project in gitlab to get the latest setup scripts for Peerplays QA environment:
git clone https://gitlab.com/PBSA/tools-libs/peerplays-utils.git
cd peerplays-utils/peerplays-qa-environment/
Setting up the QA Environment
The environment setup needs to be run in the following order:
BITCOIN
HIVE
PEERPLAYS
REDIS
FAUCET
Note: After running the Peerplays initialization script, wait for the next maintenance block before start using the environment for testing.
Before starting initialization, make sure that all nodes are down.
sudo docker-compose down
BITCOIN
The first step is to build the bitcoin container. Open a new terminal and run the following command:
sudo docker-compose up bitcoin-for-peerplays
This will take some time to complete. Once you see the logs on the terminal have stopped, open a new terminal and login to the newly built Bitcoin container with the following command:
Once inside the container run init-network.sh script to setup the Bitcoin environment:
./init-network.sh
HIVE
Now we need to build the HIVE container. Open a new terminal and run the following command:
sudo docker-compose up hive-for-peerplays
This will take some time to complete. Wait till the HIVE blockchain starts generating blocks(Generated block #1 with timestamp ....) and then open a new terminal and login to the newly built HIVE container with the following command:
This will take some time to complete. Wait till the HIVE blockchain starts generating blocks(Generated block...) and then open a new terminal and login to the newly built HIVE container with the following command:
Note: In case you want to see the logs of peerplays01 node replace peerplays10 with peerplays01 in the command given above.
Node properties
The IP address and the configuration of the nodes in the environment are given below:
Bitcoin 10.11.12.201
Hive 10.11.12.202
Faucet 10.11.12.50
Redis 10.11.12.51
Peerplays01 10.11.12.101 Witness 1.6.1, 1.6.12, SON 1.33.0, Stale production ON
Peerplays02 10.11.12.102 Witness 1.6.2, 1.6.13, SON 1.33.1, Stale production OFF
Peerplays03 10.11.12.103 Witness 1.6.3, 1.6.14, SON 1.33.2, Stale production OFF
Peerplays04 10.11.12.104 Witness 1.6.4, 1.6.15, SON 1.33.3, Stale production OFF
Peerplays05 10.11.12.105 Witness 1.6.5, 1.6.16, SON 1.33.4, Stale production OFF
Peerplays06 10.11.12.106 Witness 1.6.6, 1.6.17, SON 1.33.5, Stale production OFF
Peerplays07 10.11.12.107 Witness 1.6.7, 1.6.18, SON 1.33.6, Stale production OFF
Peerplays08 10.11.12.108 Witness 1.6.8, 1.6.19. SON 1.33.7, Stale production OFF
Peerplays09 10.11.12.109 Witness 1.6.9, 1.6.20, SON 1.33.8, Stale production OFF
Peerplays10 10.11.12.110 Witness 1.6.10, 1.6.21, SON 1.33.9, Stale production OFF
Peerplays11 10.11.12.111 Witness 1.6.11, 1.6.22, SON 1.33.10, Stale production OFF
Peerplays13 10.11.12.112 Witness NONE , SON 1.33.11, Stale production OFF
Peerplays13 10.11.12.113 Witness NONE , SON 1.33.12, Stale production OFF
Peerplays14 10.11.12.114 Witness NONE , SON 1.33.13, Stale production OFF
Peerplays15 10.11.12.115 Witness NONE , SON 1.33.14, Stale production OFF
Peerplays16 10.11.12.116 Witness NONE , SON 1.33.15, Stale production OFF
Monitoring resource usage
To monitor computer resource usage by docker containers in real-time, use the following command: