This Puppet module installs and configures an EPICS IOC log server. The log server is run as a system service. Currently only systemd is supported as init system (e.g. Debian >=8).
Some attributes of the Epics_ioclogserver::logserver
class cause environment
variables to be set. Please refer to the following table for a list:
Attribute | Environment Variable |
---|---|
logfile |
EPICS_IOC_LOG_FILE_NAME |
port |
EPICS_IOC_LOG_PORT |
file_limit |
EPICS_IOC_LOG_FILE_LIMIT |
epics_ioclogserver::logserver { 'vacuum':
ensure => running,
enable => true,
}
epics_ioclogserver::logserver { 'klystron':
ensure => running,
enable => true,
port => 7005,
logfile => 'klystron.log',
logpath => '/var/log/rf',
username => 'rflogger',
logrotate_size => '200M',
logrotate_compress => false,
}
user { 'cryologger':
ensure => present,
}
epics_ioclogserver::logserver { 'cryo':
ensure => running,
enable => true,
port => 7006,
manage_user => false,
username => 'cryologger',
require => User['cryologger'],
}
This class takes care of all global task which are needed in order to run an IOC log server. It installs the needed packages. You generally don't need to use the main class directly.
This type manages an EPICS IOC log server instance. The instance gets configured
and registered as a system service. This type automatically includes
epics_ioclogserver
.
Ensures the IOC log server service is running/stopped. Valid values are
running
, stopped
, and . If not specified Puppet will not
start/stop the IOC service.
Whether the IOC log server service should be enabled to start at boot. Valid
values are true
, false
, and . If not specified (undefined) Puppet
will not start/stop the IOC service.
Maximum size of the log file. Valid values are between 0 (no limit) and
2,147,483,647 (2 GiB). Defaults to 0
.
File to save log data to. logpath
/logfile
is passed to the IOC log server
process in the EPICS_IOC_LOG_FILE_NAME
environment variable. Defaults to
<logServerName>.log
.
Directory to save log file to. This goes together with the logfile
argument.
Defaults to /var/log/iocLogServer
.
Whether to compress the log file when rotating it. Defaults to true
.
The time in days after which a the log file will be rotated. Default is 30
.
If the log file reaches this size the log will be rotated. Default is '100M'
.
Allows to configure the EPICS_IOC_LOG_PORT
environment variable for the IOC
log server. The default is 7004 (the default port used by iocLogServer).
Ensures the IOC log server service is started after the specified systemd
units have been activated. Please specify an array of strings. Default:
network.target
.
Note: This enforces only the correct order. It does not cause the specified
targets to be activated. Also see systemd_requires
.
Ensures the specified systemd
units are activated when this IOC log server is
started. Default: network.target
.
Note: This only ensures that the required services are started. That generally
means that systemd
starts them in parallel to the IOC log server service.
Please use systemd_after
to ensure they are started before the IOC is started.
Author: Martin Konrad