Frequently Asked Questions and User Guide
RPM Configuration
Date
Aug 2024
Version
3.1

Congratulations! If you've come this far and installed a baltrad node from rpms you are ready to take on the setup and configuration of a node before starting to use the system.

The baltrad-config tool

If you have installed the software using the pre-built rpms there hasn't been any interactive steps for setting up the basic configuration of the system and you will probably not even be able to start the node right now.

All configuration files for a BALTRAD node will reside somewhere in /etc/baltrad depending on which modules has been installed. However, since there are several different configuration files a configuration tool has been developed that helps out in the setup process.

At first installation you should create a generic configuraton file that will be used for setting up the system. This configuration file can then be used whenever installing a new system or creating a mirror system.

First you should create a base configuration file setup with standard values.

%> sudo baltrad-config init --conf=localhost.properties

Then edit 'localhost.properties' with a text editor.

# General configuration settings
# Specifies if rave is installed or not (true, false).
# Used to know if rave_defines.py should be configured or not.
baltrad.with.rave = true

baltrad.user = baltrad
baltrad.group = baltrad

# postgres database specifics
baltrad.db.username = baltrad
baltrad.db.password = baltrad
baltrad.db.hostname = localhost
baltrad.db.dbname = baltrad

baltrad.node.name = localhost.localdomain
baltrad.node.address = http://127.0.0.1:8080
baltrad.keyczar.root = /etc/baltrad/bltnode-keys
baltrad.keystore.jks = /etc/baltrad/bltnode-keys/keystore.jks
baltrad.keystore.password = password
baltrad.dex.uri = http://localhost:8080/BaltradDex
baltrad.db.jdbc.prepare_threshold = -1

# dex & beast database script locations
beast.sql.file.dir=/usr/share/baltrad/baltrad-beast/sql
dex.sql.file.dir=/usr/share/baltrad/baltrad-dex/sql
bdb.binaries=/usr/bin


#BDB settings
#baltrad.bdb.server.type = werkzeug
baltrad.bdb.server.type = cherrypy
baltrad.bdb.server.cherrypy.threads = 10
baltrad.bdb.server.cherrypy.backlog = 5
baltrad.bdb.server.cherrypy.timeout = 10
baltrad.bdb.server.uri = http://localhost:8090
baltrad.bdb.server.backend.type = sqla
baltrad.bdb.server.backend.sqla.pool_size = 10
baltrad.bdb.server.log.level = INFO
baltrad.bdb.server.log.type = logfile
baltrad.bdb.server.log.file = /var/log/baltrad/baltrad-bdb-server.log
baltrad.bdb.server.log.id = baltrad-bdb-server
#baltrad.bdb.server.backend.sqla.storage.type = fs
baltrad.bdb.server.backend.sqla.storage.type = db
baltrad.bdb.server.backend.sqla.storage.fs.path = /var/lib/baltrad/bdb_storage
baltrad.bdb.server.auth.providers = noauth, keyczar
baltrad.framepublisher.min_poolsize = 1
baltrad.framepublisher.max_poolsize = 5
baltrad.framepublisher.queuesize = 100

#BEAST settings
beast.admin.mailer.encoding = UTF-8
beast.admin.mailer.host = localhost
beast.admin.mailer.port = 25
beast.admin.mailer.username = 
beast.admin.mailer.password = 
beast.admin.mailer.from = 
beast.admin.mailer.transport.protocol = smtp
beast.admin.mailer.smtp.auth = false
beast.admin.mailer.smtp.starttls.enable = false

#BEAST exchange pool settings
beast.pooled.publisher.pool.core.size = 1
beast.pooled.publisher.pool.max.size = 5
beast.pooled.publisher.queue.size = 100

#rave.ctpath=
rave.pgfs=4
rave.loglevel=info
rave.logid='PGF[rave.localhost.localdomain]'
rave.centerid=ORG:82
rave.qitotalmethod=minimum


# Additional post config scripts.
# These scripts are called as python scripts with the only additional argument pointing at this
# property file so you can specify more properties in addition to the ones above.
# The naming of the post config script properties should be baltrad.post.config.script.<N> 
# where N is a sequential number running from 1, and upward (1,2,3....).
#baltrad.post.config.script.1=..../xyz.py
#baltrad.post.config.script.2=..../xyz2.py

baltrad-config create_keys

Unless you already have a directory (/etc/baltrad/bltnode-keys) with both the public and private keys as well as the keystore you want to create the keys which is done by using the create_keys command. Most basic variant is :

baltrad ~]$ sudo baltrad-config create_keys --conf=localhost.properties

The create_keys command will use the configuration properties for most of the setup unless otherwise specified with the available options. Password however will either be queried for during the creation step or else it should be specified as an option. If the keystore is created, this password will be written to the specified configuration file.

Unless –keys-root is specified, then the value for property "baltrad.keyczar.root" will be used.

Unless –keystore is specified, then the value for property "baltrad.keystore.jks" will be used.

If –keys-root or –keystore is specified, then the properties file will be updated with new values.

You can also simplify the creation by adding –password which will disable the query for password during keystore creation. As well as –dname which will leave out the questions for the distinguished name. This means that a full example could be:

baltrad ~]$ baltrad-config create_keys --conf=localhost.properties --keystore=/tmp/keys/keystore.jks --keys-root=/tmp/keys --password=mysecretpassword --dname="CN=BALTRAD, OU=Unit, O=Org, L=City, ST=State, C=SE"

baltrad-config create_keys

After the configuration file has been updated properly it is time to setup the system.

The configuration is done by executing baltrad-config with the argument setup.

baltrad ~]$ sudo baltrad-config setup --conf=localhost.properties

If you want to initialize the database as well, you can add –install-database

baltrad ~]$ sudo baltrad-config setup --conf=localhost.properties --install-database

Final touches

After the node has been configured and setup you will have to do some steps to ensure that the node behaves like you can expect from a system service.

There are 3 different systemd services installed that has been added to /usr/lib/systemd/system. These are

  • /usr/lib/systemd/system/bdbserver.service
    For controling the baltrad database service
  • /usr/lib/systemd/system/raved.service
    For controlling the rave product generator
  • /usr/lib/systemd/system/baltrad-node.service
    For controlling the baltrad data exchange node

To start these service, it's just to type

baltrad ~]$ sudo systemctl start bdbserver
baltrad ~]$ sudo systemctl start raved
baltrad ~]$ sudo systemctl start baltrad-node

Since we also want the services to be automatically started at boot

baltrad ~]$ sudo systemctl enable raved
baltrad ~]$ sudo systemctl enable baltrad-node
baltrad ~]$ sudo systemctl enable bdbserver 

Now, when the node is running it's time to configure the operational parts of the system which are the same as when using the node installer for installation. Please refer to Change the admin's password.