← history for doc/yats-server.md
πŸ“„ README.md

Yats Server

Installing YATS Server

Building the sources

For the Community Edition the sources are available from:

$ git clone https://code.kevwe.com/git/yats.git

In order to build the server

cd server
go build

The server executable is named yats-server

Service Configuration

You can start different named instances of the program. An instance named β€˜default’ is expected to read
a configuration file from:

 ~/.yats/default.json 

where the content is something like :

{
  "databaseUsername": "cassandra",
  "databasePassword": "cassandra-password",
  "databasePort": "9042",
  "databaseHost": "127.0.0.1",
  "databaseSchema": "yats",
  "restAddress": "127.0.0.1:18081",
  "grpcAddress": ":50051",
  "tcpAddress": ":1025",
  "archiveFrequency": "weekly",
  "archiveDirectory": "/home/goodstuff",
  "archiveNode": "true"
}

Starting the server

cd yats
./script/service.sh start

Stop the Server

cd /opt/ows/service
./script/service.sh stop

YATS as a system Service

In order to keep the service active after a reboot, Systemd can be used in Linux with
a configuration like the following:

# cat /etc/systemd/system/yats-service.service 
[Unit]
Description=YATS Server process
After=network-online.target
[Service]
Type=exec
ExecStart=/path/to/yats/script/service.sh default start
ExecStop=/path/to/yats/script/service.sh default stop
Restart=on-failure
[Install]
WantedBy=multi-user.target