Skip to content

Running spine agent

Krzysztof Królikowski edited this page Apr 7, 2017 · 11 revisions

About spine-agent

One of the basic foundation of spine-agent is to cover client and server side with just one and the same binary file. Great benefit of this approach is decreased setup overhead. Before running spine-agent on server side it's good to have prepared database first.

Configuration file

Configuration file should be saved in /etc/spine-agent.conf. This path is hardcoded into binary, but if you pick some other path and filename you are able to provide it as the first argument to spine-agent.

# Plik konfiguracyjny agenta
# Nalezy go skopiowac do /etc
#
##### Global ########
# Tryb pracy: clinet/server
mode=client
# Port na ktorym dziala client i serwer
agent_port=2016
# Sciezka do pliku z logami
log=/var/log/spine-agent.log
#
##### Client ########
# Host na ktorym dziala serwer (client only)
agent_host=demo-server-ubuntu.lan
#
##### Server ########
# Namiary na baze danych (server only)
dbhost=localhost
dbname=spine
dbuser=spine
dbpass=superSecret

Configuration file is split into three sections: Global, Client and Server which will be covered in details here.

Section: Global

All options below are common to server and client.

Option Description Default
mode This option determines how spine agent should work. In client mode or server mode. client
agent_port Communication port 2016
log Path to agent logfile /var/log/spine-agent.log
⚠️ WARNING Despite the agent_port option i don't recommend to change default setting. Spine-agent code contains 2016 port hardcoded in one function. I'll fix it soon.

Option: agent_port is used either on client and server side.

Section: Client

This section have only one option: agent_host which holds server address.

Section: Server

This section contains database connection parameters. For security reasons it's good to change below values to more secure especially database password.

Option Description Default
dbhost Database host localhost
dbname Database name spine
dbuser Database login spine
dbpass Database password superSecret