Home

Awesome

:information_source: Fork notes

This repo is a fork from golem-node, inspired by scaleable-golem-provider

Why forked?

Caveats?

Golem Provider Node :whale: Docker Image

I recommend checking out the parent repos mentioned above for more general information.

:information_source: Prerequisites (important)

You need to have Docker as well as docker-compose installed. Tested on Docker version 20.10.5 and docker-compose version 1.28.5. Currently only works on Linux machines.

:arrow_forward: Usage

You can clone this repository or use the provided docker-compose.yml as a base template for your own setup.

A Makefile is included for convenience and I highly recommend using it, as it also takes care if environment variable imports.

I recommend to use make or make help to list the available shortcuts.

1. Environment Set Up

Copy the .env.presets file to .env and edit to your preferences:

VariableDescription
YA_PAYMENT_NETWORKmainnet or rinkeby
NODE_SUBNETWhich subnet to use
NODE_NAMEName you want to give your node
YA_ACCOUNTYour Ethereum wallet address you want to be paid to
NODE_CPU_THREADSNumber of cores you want to dedicate per node
NODE_MEM_GIBGigabytes of memory you want to allocate per node
NODE_STORAGE_GIBGigabytes of storage you want to allocate per node
NODE_COSTS_STARTSet job starting cost, default: 0.0
NODE_COSTS_HOURSet job running cost per hour, default: 0.02
NODE_COSTS_CPU_HOURSet job running cost per CPU hour, default: 0.1
NODE_NUMNumber of nodes/providers to run
NICENESSSet the providers nice-ness, see notes below, default: 0
AUTOHEAL_CONTAINER_LABELWhich containers to autoheal, default: all
AUTOHEAL_START_PERIODDelay for autoheal. Should be same as the healthcheck interval. default: 300
AUTOHEAL_INTERVALInterval for autoheal. Default: 5
COMPOSE_PROJECT_NAMEChanges the default docker-compose prefix for nicer container names, default: golem

What is niceness? Niceness really is the niceness of a task. The nicer a task, the less important is makes itself, giving higher priority to other threads. This comes in handy if you run your provider on a computer you actually still want to be usable. In that case I recommend setting this to maximum niceness of 20.

:information_source: Note: Make sure your machine has enough resources to start your scaled server! That means your server should have at least:

2. Run the Node

Run make presets on first start and whenever you have changed any of the settings in the .env file. If you don't you will be either running old settings, or the build will fail.

There is three ways you can start your node:

Display the last logs at any time by running make logs.

Use

By default, these commands will give results for the first node. If you are running more than one node you can add index=NUM to your command to address a different index. Example: make status index=2

Get shell access to your first running container with make shell. Here also this gives you only the shell of your first node. If you want the shell of a different node, use: docker-compose exec --index=INDEX_NUM node bash with the INDEX_NUM number of your choice.

To stop your node, run make stop.