Forge Home

epics_ioclogserver

Manage EPICS IOC log servers

6,191 downloads

2,262 latest version

5.0 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 1.2.1 (latest)
  • 1.2.0
  • 1.1.0
  • 1.0.0
released Feb 29th 2020
This version is compatible with:
  • Puppet Enterprise 2019.8.x, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x, 2019.0.x, 2018.1.x, 2017.3.x, 2017.2.x, 2016.4.x
  • Puppet >= 4.10.0 < 7.0.0
  • ,

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'mark0n-epics_ioclogserver', '1.2.1'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add mark0n-epics_ioclogserver
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install mark0n-epics_ioclogserver --version 1.2.1

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

Documentation

mark0n/epics_ioclogserver — version 1.2.1 Feb 29th 2020

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).

Environment Variables

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

Example

Simple

epics_ioclogserver::logserver { 'vacuum':
  ensure  => running,
  enable  => true,
}

Specify Log File

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 Managed Externally

user { 'cryologger':
  ensure => present,
}

epics_ioclogserver::logserver { 'cryo':
  ensure      => running,
  enable      => true,
  port        => 7006,
  manage_user => false,
  username    => 'cryologger',
  require     => User['cryologger'],
}

Reference

Class epics_ioclogserver

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.

Defined Type epics_ioclogserver::logserver

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.

ensure

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.

enable

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.

file_limit

Maximum size of the log file. Valid values are between 0 (no limit) and 2,147,483,647 (2 GiB). Defaults to 0.

logfile

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.

logpath

Directory to save log file to. This goes together with the logfile argument. Defaults to /var/log/iocLogServer.

logrotate_compress

Whether to compress the log file when rotating it. Defaults to true.

logrotate_rotate

The time in days after which a the log file will be rotated. Default is 30.

logrotate_size

If the log file reaches this size the log will be rotated. Default is '100M'.

port

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).

systemd_after

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.

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.

Contact

Author: Martin Konrad