Download the Docker image
Copy to the home folder and load the docker by running the following command
sudo docker load --input multichaindocker
Run the following command to check installed image.
sudo docker images
pip
wget
multichain [link](http://www.multichain.com/download-install/)
Savoir [link](https://github.com/DXMarkets/Savoir)
Pubnub==3.8.3 [link](https://www.pubnub.com/docs/python/pubnub-python-sdk)
logging
git
Open three terminals and run the docker image in three terminals.
example :
container 1 - farmland
container 2 - warehouse
container 3 - retailstore
Run cd in each container.
Clone the blockchain_agri_usecase repository in three containers.
Choose the farmland contianer as the admin by starting the chain in the farmland container
Run the command "multichain-util create chain1" in the farmland container.
multichain-util create chain1
Run the command "multichaind chain1 -daemon"
multichaind chain1 -daemon
Connect to the chain from the other(warehouse,retailstore) containers.
Copy the command that given when you started the chain in farmland.
Run that command in other contatiners.
Now we have to give permissions for the other containers.
Copy the line that you got in the above operation.
Paste it in the admin(farmland) container and add two more permissions
1) issue
2) mine
and run the command
Please follow the same procedure to give permissions for the retailstore container.
Now permissions are granted for the warehouse and retailstore containers.
Now we have to start the chain from the warehouse and retailstore containers.
multichaind chain1 -daemon
Next have to give permission for the burnaddress of the chain.
Run the following command to get the info about the chain.
multichain-cli chain1 getinfo
Copy the burnaddress
Grant receive permission to the burn address by running following command.
multichain-cli chain1 grant <copied burnaddress> receive.
Now goto the repository root folder and run the following get.sh to get the values for rpcuser,rpcport,rpcpassword
Run the following command
sh get.sh
1.rpcuser
2.rpcport
3.rpcpassword
Now goto the respective folders in the container.
container 1 - Farmland folder
container 2 - Warehouse folder
container 3 - Retailstore folder
Open the config.ini program in each container and paste those copied values from the step 10, and save.
Now the run the programs in three containers.
container1 - python farmland.py
container2 - python warehouse.py
container3 - python retailstore.py