Skip to content

GettingStarted

Davide Miceli edited this page Jan 29, 2019 · 2 revisions

Getting Started

Docker

Chainode docker image is available on DockerHub: https://hub.docker.com/r/davidemiceli/chainode.

To run a Chainode peer on a docker container:

docker run --name peer001 \
-p 8000:8000 \
-v /path/to/configs.json:/configs.json \
-e CONFIGS=/configs.json \
-d chainode

Installation via npm package manager

To install chainode with npm package manager:

npm install chainode

Start a peer

To run the chainode peer, the Kafka peers and the Storage peers must be running and available.

Create the Kafka topic (if not exist):

  • blockchain.blocks.pending (for proposed transactions to be validated as blocks by every chainode peer).

To start a peer use a configuration file:

CONFIGS=/app/test/configs/generic.json npm start

The configurations can be overwritten like the following examples:

CONFIGS=/app/test/configs/generic.json BLOCKCHAIN=blockchain PEER_ID=000 DB_HOST=172.25.255.20 WEBUI_PORT=8080 npm start
CONFIGS=/app/test/configs/generic.json BLOCKCHAIN=blockchain PEER_ID=001 DB_HOST=172.25.255.21 WEBUI_PORT=8081 npm start