cwpetrich / node-runner

1 stars 1 forks source link

Node Runner

Description

The purpose of this repository is to provide the means of running a node within docker.

This readme was written primarily for Ubuntu.

Instructions

The nr Tool

The nr tool provides a few easy to use commands to help with managing your nodes. You can use the tool with this format:

nr <COMMAND>

Possible commands to run in conjunction with nr:

Installing Prerequisites

Use the nr --install command to install Docker and Docker-Compose. Upon a successful install you will need to either logout, then back in, or reboot your machine in order to utilize Docker.

Configuration

Use the nr --config command to step through the prompts to create your node settings:

After supplying these values you will not need to do so again, so each subsequent startup will use the provided settings.

Running Your Nodes

You can use the nr --start command to begin running your nodes.

[!NOTE] You will need to use the nr --install command before you will be able to run your nodes.

Check that the nodes are running correctly. See Verify that the Nodes are Running Correctly.

Stopping Your Nodes

Use the nr --stop command to shutdown your nodes.

[!WARNING] This will prevent them from restarting automatically on machine reboot. If you stop your nodes and don't start them again, they will NOT start automatically upon reboot.

Auto start on reboot

After starting your nodes, if you do not intentionally stop them manually, they will automatically restart without requiring user intervention.

Verify that the Nodes are Running Correctly

Check that the docker images are running correctly by running: docker ps

If all of your nodes are restarting over and over again, run this command to see what's going on:

docker-compose logs --tail=0 --follow

Next log into your Nerd brand and check the active nodes count.

Nerd United

If only only a few are constantly restarting, they may fix themselves but if they don't within a minute, blow the broken ones away and run the nr --start command again and it will leave healthy running nodes alone while starting up enough to replace the ones you destroyed. You may have to continue this process a few times until you reach the number of healthy nodes you need.