Setting Up ybrelay Service

This section explains how to set up ybrelay, which is part of the standard Yellowbrick ybtools package. Before installing ybtools, you must remove prior versions of ybtools from your system. Then you can install the current version of ybtools on the system where you want to run ybrelay. For installation instructions, see Installing ybtools.

A dedicated ybrelay must have network connectivity to the Yellowbrick database and must be running at a host on your network that can be reached by the nodes in the cluster where client access to the relay server will run, such as the Spark application.

Setting Up ybrelay With JAVA_HOME Set

After installing ybtools, run ybrelay-init to start the ybrelay service if the JAVA_HOME environment variable is set.

  1. On CentOS/RHEL 7 and Ubuntu 16.04/18.04, initialize the ybrelay service by running the following:
    ybrelay-init
    INFO: Creating System Group: ybrelay with GID: 923
    INFO: Creating System User: ybrelay with UID: 923
    INFO: Creating Systemd service
    INFO: JAVA_HOME environment variable detected
    INFO: Adding JAVA_HOME configuration to ybrelay.config
    Created symlink from /etc/systemd/system/multi-user.target.wants/ybrelay.service to /etc/systemd/system/ybrelay.service.
    INFO: Starting Systemd service
    
  2. Verify that ybrelay.service was started properly by running the following:
    systemctl status ybrelay.service
    
● ybrelay.service - Yellowbrick Data Load Relay Service

       Loaded: loaded (/etc/systemd/system/ybrelay.service; enabled; vendor preset: disabled)

       Active: active (running) since Thu 2019-11-14 18:31:23 UTC; 57s ago

    Main PID: 3320 (java)

       CGroup: /system.slice/ybrelay.service

               └─3320 /opt/java/jre1.8.0_91/bin/java -Dvisualvm.display.name=YB:Relay -Xms512m -Xmx8g -ea -classpath 
    /opt/ybtools/etc:/opt/ybtools/lib/relay-service-3.2.0-SNAPSHOT.jar:/opt/ybtools/lib/client-com...
         
    Nov 14 18:31:23 rhel7.localdomain systemd[1]: Started Yellowbrick Data Load Relay Service.
 
    Nov 14 18:31:23 rhel7.localdomain ybrelay[3320]: Warning; java is not in your PATH. Using JAVA_HOME fallback: 
    /opt/java/jre1.8.0_91/bin

Setting Up ybrelay Without JAVA_HOME Set

If the environment variable JAVA_HOME is not set, running the ybrelay initializing script will return the following warnings:
ybrelay-init
INFO: Creating System Group: ybrelay with GID: 923
INFO: Creating System User: ybrelay with UID: 923
INFO: Creating Systemd service
WARN: JAVA_HOME environment variable not set                                 
WARN: Please edit the ybrelay.config
WARN: Service will be not enabled    
  1. To set the environmental variable JAVA_HOME, edit the /opt/ybtools/config/ybrelay.config file and set the JAVA_HOME path:
     JAVA_HOME=“/opt/java/jre1.8.0_91”
    Note: ybrelay cannot be started with ybrelay-init after editing the config file. ybrelay must be manually started, as outlined in the next steps.
  2. After editing the configuration, enable and start the service:
    systemctl enable ybrelay.service
    Created symlink from /etc/systemd/system/multi-user.target.wants/ybrelay.service to /etc/systemd/system/ybrelay.service
    systemctl start ybrelay.service
  3. Verify that ybrelay.service was started properly:
    systemctl status ybrelay.service

    ● ybrelay.service - Yellowbrick Data Load Relay Service

       Loaded: loaded (/etc/systemd/system/ybrelay.service; enabled; vendor preset: disabled)

       Active: active (running) since Thu 2019-11-14 18:40:33 UTC; 4s ago

    Main PID: 3196 (java)

       CGroup: /system.slice/ybrelay.service

               └─3196 /opt/java/jre1.8.0_91/bin/java -Dvisualvm.display.name=YB:Relay -Xms512m -Xmx8g -ea -classpath 
    /opt/ybtools/etc:/opt/ybtools/lib/relay-service-3.2.0-SNAPSHOT.jar:/opt/ybtools/lib/client-com...
     
    Nov 14 18:40:33 rhel7.localdomain systemd[1]: Started Yellowbrick Data Load Relay Service.

    Nov 14 18:40:33 rhel7.localdomain ybrelay[3196]: Warning; java is not in your PATH. Using JAVA_HOME fallback: 
    /opt/java/jre1.8.0_91/bin.

ybrelay Options

You can see the options for ybrelay by running ybrelay --help:
me@myvm:~$ ybrelay --help
Yellowbrick Data Relay version 3.2.0-20211
 
Coordinates multiple data streams over TCP sockets to load/unload to/from Yellowbrick appliance.
 
Example usage:
  ybrelay -w ./work
...
There is a default ybrelay.options file installed in /opt/ybtools/config/ybrelay.options. For more on ybrelay options, see ybrelay Options.