Skip to main content

Running in Production

This guide is designed to assist you in setting up the RollApp for production use. The focus will be on loading and starting the RollApp services individually using systemd.

NOTE

systemd is only available on Linux systems. You can verify that you have systemd installed by running:

systemctl --version

This approach enables running the process in the background, independent logging and monitoring and giving you enhanced control and visibility over each component.

NOTE

The guide assumes you've already registered your rollapp using roller by following the steps in the quick start. If you haven't, please do so now.

In addition, we'll be setting up a monitoring system using the well-known tools, Prometheus and Grafana. This will allow us to capture key metrics from our RollApp, set up alerts and understand the performance of our application over time.

By the end of this guide, you will have a production-grade local RollApp setup. Let's dive in!

NOTE

For ease of use CORS is enabled by default for all origins. Please edit ~/.roller/rollapp/config/config.toml and set cors_allowed_origins to the desired origins if you wish to restrict CORS.

Starting the Rollapp

To load the rollapp services, use the following command:

roller services load

This command should return:

💈 Services 'sequencer', 'da-light-client' and 'relayer' been loaded successfully. To start them, use 'sudo systemctl start <service>'.

Now lets continue with starting the enabled the services.

Due to the present discrepancy where only the Celestia rollapp operates a light client, compared to Avail, we will divide the guidelines into two sections:

sudo systemctl enable da-light-client
sudo systemctl enable sequencer
sudo systemctl enable relayer

Next, start the services:

sudo systemctl start da-light-client
sudo systemctl start sequencer
sudo systemctl start relayer

Let's check the status of the services and ensure they are running:

NOTE

It may take the relayer a few seconds to stabilize so please wait a few seconds before checking the status.

sudo systemctl status da-light-client
sudo systemctl status sequencer
sudo systemctl status relayer

The status should be active (running) for all services.

NOTE

In case of any failed services, please try to run the relevant services separately in order to get more information about the error.

Let's continue with setting up the monitoring services.