Sysadmin-Info-Config
marcux redigerade denna sida 1 år sedan

Home -> Sysadmin -> Info & config

Info & config

L3Q Client (l3q)

L3Q client is communicating with the L3Q daemon (l3qd) with the
https protocol and sends POST requests with json serialized data.
The client sends the validation string with each request.
The L3Q daemon replies with json data if clients validation
string is correct.
There are two things that need to be configured before this
client will be able to communicate with the daemon:

  • In config file: /etc/l3q/l3q.conf
    The parameter l3qd_host must be configured and point to the
    L3Q daemon (resolvable host name or IP address)
  • Validate client
    This client must be validated with the L3Q daemon before the
    daemon will respond to requests from this client.
    Start the validate daemon on the server that run the daemon,
    l3qd --validate-client
    make sure that the firewall has this port open and follow intructions
    from the validate daemon.

L3Q daemon (l3qd)

L3Q daemon is by default using port 39911, make sure that this
port is open in the firewall.
The L3Q daemon runs with two major processes, one is listening
for requests from L3Q clients and L3Q node daemons with protocol
https, the other process is the worker process that takes care
of backups and housekeeping.
If a https request has incomplete data or the validation of client
fails then an empty json is returned.
The daemon uses self-signed certificates for https that is why
it is recommended to run L3Q in a locally controled network.
The daemon sends all jobs to the nodes where L3Q node daemons
takes care of the running of jobs.
Running processes on the nodes will continue to execute even if
the daemon (l3qd) is restarted or stopped.
The daemon thread (https) and the worker thread are executed at
the same time, if the daemon is stopped both threads are stopped.
Queue and status will not be updated if the daemon is stopped.
Sqlite3 is been used as the database.

Required configuration:
If default values is fine in config file:

/etc/l3q/l3qd.conf

then no configuration changes are required.

L3Q node daemon (node-l3qd)

L3Q node daemon is by default using port 39911, make sure that this
port is open in the firewall.
The L3Q node daemon runs with two major processes, one is listening
for requests from L3Q daemon for new tasks to process and the other
process is periodically checking status on running processes,
cleans up when tasks has terminated and reports status to L3Q daemon.
Both processes uses https to communicate.
If a https request has incomplete data or the validation of daemon
fails then an empty json is returned.
The daemon and node daemon uses self-signed certificates for https
that is why it is recommended to run L3Q in a locally controlled network.
The node daemon receives all jobs from the daemon where L3Q node
daemons takes care of starting and monitoring of jobs.
L3Q node daemon is using systemd to run all tasks in a shared slice
where resorces can be limited per task.
The current running processes on each node will continue to execute
even if the node daemon (node-l3qd) is restarted or stopped.
The communication thread (https) and the status thread are executed at
the same time, if the node daemon is stopped both threads are stopped,
all local tasks continue to run but central daemon will not get new
status updates.
Sqlite3 is been used as the database, validation keys are stored and
latest status of tasks if central daemon is unreachable.

There are one thing that need to be configured before this
node daemon will be able to communicate with the central daemon:

  • Validate node daemon
    This node daemon must be validated with the L3Q daemon before the
    daemon will respond to requests from this node-daemon.
    Start the validate daemon on the server that run the daemon,
    l3qd --validate-node
    make sure that the firewall has this port open and follow intructions
    from the validate daemon.

Required configuration:
If default values is fine in config file:

/etc/l3q/node-l3qd.conf

then no configuration changes are required.