Code Monkey home page Code Monkey logo

xdc01-docker-nnodes's Introduction

XDC01-docker-Nnodes

Create and customize your XDC01 private chain within minutes. ( please go here to setup XinFin Public node: https://github.com/XinFinOrg/XinFin-Node )

XinFin Core Network

XinFin Core Quorum Network

Prerequisite

Operating System: Ubuntu 16.04 64-bit or higher

Tools: Docker, Docker Compose

Hardware:

Hardware Minimum Desired
CPU's: 2 4
Memory: 4 GB 8 GB
Storage: 100 GB 500 GB

Network Ports

Following network ports need to be open for the nodes to communicate

Port Type Definition
21001-2100* TCP/UDP GETH
22001-2200* TCP RPC
23001-2300* TCP RAFT
9001-900* TCP Constellation

*-auto-increment depending on number of nodes

Clone repository

git clone https://github.com/XinFinorg/XDC01-docker-Nnodes.git    

Step: 1 Install docker & docker-compose

sudo ./install_docker.sh

Step: 2 Pull image from Docker Hub

sudo docker pull xinfinorg/quorum:v2.1.0

Step: 3 Launch the setup script

cd static-nodes 
sudo ./setup.sh

Enter number of nodes, private IP of host machine & unique docker subnet

sudo docker-compose -p <PROJECT_NAME_STATIC_NODE> up -d

Accessing console

sudo docker exec -it PROJECT_NAME_STATIC_NODES_node_1_1 geth attach /qdata/dd/geth.ipc

Stopping the network

sudo docker-compose -p <PROJECT_NAME_STATIC_NODE> down

Adding a new node to the existing network

Install docker & pull image on the new host machine as done earlier in Step 1 & 2

cd dynamic-node
sudo ./setup.sh

Enter the public IP of the new host machine (private IP in case of local setup, assigned by router) Enter the node number (e.g. if you have 3 nodes up with the initial setup then node number here would be 4)

Copy enodeID from enode-url.json then attach to geth console of any running node & execute

raft.addPeer(enodeID)

Start the new node

cd dynamic-node
sudo docker-compose -p <PROJECT_NAME_DYNAMIC_NODE> up -d

Upgrade Network

Pull newer version of image from docker hub

sudo docker pull xinfinorg/quorum:v2.x.x

Stop containers running old version

sudo docker-compose -p <PROJECT_NAME_STATIC/DYNAMIC_NODE> down

Update docker-compose.yml to use new image (specify quorum:TAG_NAME as argument)

sudo ./update_quorum.sh quorum:v2.x.x

Run new version

sudo docker-compose -p <PROJECT_NAME_STATIC/DYNAMIC_NODE> up -d

Windows / macOS Support Using Vagrant

  1. Install Oracle VirtualBox
  2. Install Vagrant
  3. Install GIT
  4. Launch command prompt & follow the commands below
     git clone https://github.com/XinFinOrg/XDC01-docker-Nnodes.git
     cd XDC01-docker-Nnodes
     vagrant up
     vagrant ssh
  5. XDC01-docker-Nnodes is automatically copied to /home/vagrant/ follow Step 1, 2 & 3 as explained before in this document to complete the network setup.
  6. To shutdown the vagrant instance, run vagrant suspend. To delete it, run vagrant destroy.

( please go here to setup XinFin Public node: https://github.com/XinFinOrg/XinFin-Node )

Contacting Us

Join our Telegram Developer Group and put up your queries or raise issue in Github to get answer. We would love to answer your questions.

xdc01-docker-nnodes's People

Contributors

anilchinchawale avatar kartikb29 avatar punit-agarwal avatar riteshkakkad avatar shrikantgoswami avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.