Giter Site home page Giter Site logo

cardano's Introduction

cardano

My Cardano node setup, happily shared for the greater good ๐Ÿป

My goal was to try and make the process as simple as possible, and after a significant amount of time spent reading and experimenting, I mangaged to put everything in a single setup script, that will install everything you need and start a healthy and good-looking cardano node ๐Ÿฅณ

There's also a script for a complete Staking pool setup.

*** If you like it, please Stake some of your $ADA with me by delegating to the TRAIL pool! ๐Ÿ™๐Ÿป ***

Simple node deployment

First, give your user the required permissions to run all required commands. Depends on your opearating system, it should be something like:

usermod -aG admin [your-user]

You might need to login again for it to affect.

Then, all you have to do is copy setup.sh into your home directory (using scp or alike), and run it (you can also clone this repo to your home dir, and run the script from there).

That's it ๐Ÿ˜Ž

The script will install all required packages, and start a docker-compose application running a relay node alongside a prometheus instance, and setup several other required tasks such as a topolgy updater, etc.

Deploy on Windows

Using docker, deploying on Windows is a piece of cake too ๐Ÿฐ

Install Docker Desktop on your windows machine, and follow the instruction to install and enable WSL 2 (see this for additional info). Then, open the Linux shell (I used Ubuntu 20.04 LTS, from the Microsoft App Store), and follow the exact same instructions as above.

That's it ๐Ÿ˜Ž

Deploying a core (block-producing node)

If you want to run a block producer (core) node, simply run the same script with the -m core flag.

Note that in order to run a block producing node you must make sure you have the required keys and certificate under cardano/node-keys before running the script (see here for details).

You should also edit the topology at cardano/block-producer-topology/block-producer-topology.json to contain the public IP address of your relay node.

Script parameters

Choose image

By using the -i flag, you can specify the docker image that will be used for the cardano node.

While the default is using IOHK's official docker image, you can specify any other image as long as it respects the parameters defined in the docker-compose.yaml, specifying some required configurations (i.e, topology file, port, etc.).

You can of course use my image (eladws/cardano-node), and check out the Dockerfile I used to build it for more details.

Relay or Core

By using the -m flag, you can specify which mode you want to deploy - core or relay.

What is a topology updater?

In short, it is a process you have to run in order for your node to be known to other peers, and have a list of updated valid peers. This is highly recommended until Cardano will implement its peer-to-peer mechanism.

You can find a comprehensive discussion here.

Addresses and ports

This setup is using port 6666 as an incoming port for a regular (relay) node, and port 5555 for the block producing (core) node. The host addresses are remained untouched, and need to be set manually if neccessary.

Prometheus is made available on port 9090.

Just run the containers

If you prefer running each contaier separately rather than deploying the full setup, you can build and run the containers yourself:

Build a cardano-node container, running the latest pre-compiled executable

docker build -t [owner/repo] .

Run the container

It uses the default configuration, but requires a topology file (you can get one here) and a local path for ipc (just an empty local foder).

docker volume create node-db

docker run -d -p 12798:12798 -v [path-to-topology-file]:/node-topology/mainnet-topology.json -v [path-to-put-ipc]:/node-ipc --mount source=node-db,target=/node-db [owner/repo]

Run Prometheus container for monitoring

(Requires a prometheus.yml file containing the node's container address as a target)

docker run -d -p 9090:9090 -v [path-to-prometheus.yml]:/etc/prometheus/prometheus.yml prom/prometheus

Run a block producing (core) node

To run a block producer you will need two signing keys (kes.skey, vrf.skey) and a certificate (node.cert).

After generating all required keys, put them in some folder, and mount it onto the node at /node-keys.

docker run -d -p 12798:12798 -v [path-to-topology-file]:/node-topology/block-producer-topology.json -v [path-to-put-ipc]:/node-ipc --mount source=node-db,target=/node-db -v [path-to-keys-folder]:/node-keys [owner/repo]

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.