Installing Orakuru node

Guide on how to install Orakuru node and prepare it for providing data

Requirements

Make sure that you have Docker installed. If you don't, you can follow these instructions. If you want to run Orakuru node natively, please follow building Orakuru node from sources.

Step 1: Download latest Orakuru image

You can download Orakuru image using the following command:

$ docker pull ghcr.io/orakurudata/crystal-ball:v0.2.6

Latest version is v0.2.6 at the time or writing this guide, you can check the latest version here.

Step 2: Prepare your configuration

You'll need to create a directory that will contain Orakuru node configuration somewhere on your server. For the purposes of this guide, we'll create it in the home directory:

$ mkdir -p ~/.orakuru

Afterwards, you'll need to create web3.yml and requests.yml in this directory. You can download example files using:

$ wget https://raw.githubusercontent.com/orakurudata/crystal-ball/main/etc/web3.yml -O ~/.orakuru/web3.yml
$ wget https://raw.githubusercontent.com/orakurudata/crystal-ball/main/etc/requests.yml -O ~/.orakuru/requests.yml

After you download example files, you'll need to edit them accordingly. web3.yml needs to contain an websocket web3 endpoint URL and a testnet private key that was whitelisted for the event. Make sure to restrict access to this file to only your user using:

$ chmod 600 ~/.orakuru/web3.yml

As for requests.yml, the default configuration is just fine, but if you want to restrict access to specific domains, you can update it accordingly.

Step 3: Starting the node

After you've prepared your configuration, you're ready to start your node. This can be done using:

$ docker run -v $HOME/.orakuru/:/orakuru/etc -d \
             -e CB_LOG_LEVEL=trace \
             --name "crystal-ball" \
             --restart on-failure:5 \
             -p 9000:9000 \
             --network host \
             ghcr.io/orakurudata/crystal-ball:v0.2.6

-v $HOME/.orakuru/:/orakuru/etc - mount our configuration directory inside the container. Replace $HOME/.orakuru with the path to your directory, if it wasn't created by the guide.

-e CB_LOG_LEVEL - enable the most amount of logs. Useful for debugging

--name "crystal-ball" - tag the container with crystal-ball name

--restart on-failure:5 - automatically restart container 5 times in case of a crash

-p 9000:9000 - port forward metrics from the container to the host. This will make Prometheus monitoring available from the internet. If you have Prometheus running locally, change this to -p 127.0.0.1:9000:9000

--network host - allow container to communicate with services running outside of containers

You can add additional options as environment variables. Also, you can only allow access to monitoring from localhost by changing -p 9000:9000 to -p 127.0.0.1:9000:9000, though beware, that running Prometheus on the same machine is not perfect.

Last updated