Puppet Class: graphoid

Defined in:
puppet/modules/graphoid/manifests/init.pp

Overview

Class: graphoid

graphoid is a node.js backend for the graph rendering.

Parameters

port

Port the service listens on for incoming connections.

log_level

The lowest level to log (trace, debug, info, warn, error, fatal)

allowed_domains

The protocol-to-list-of-domains map. Default: {} The protocols include http, https, as well as some custom graph-specific protocols. See www.mediawiki.org/wiki/Extension:Graph?venotify=restored#External_data

domain_map

The domain-to-domain alias map. Default: {}

timeout

The timeout (in ms) for requests. Default: 5000

headers

A map of headers that will be sent with each reply. Could be used for caching, etc. Default: false

error_headers

A map of headers that will be sent with each reply in case of an error. If not set, above headers will be used. Default: false

Parameters:

  • port (Any)
  • log_level (Any) (defaults to: undef)
  • allowed_domains (Any) (defaults to: {})
  • domain_map (Any) (defaults to: {})
  • timeout (Any) (defaults to: 5000)
  • headers (Any) (defaults to: false)
  • error_headers (Any) (defaults to: false)


30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# File 'puppet/modules/graphoid/manifests/init.pp', line 30

class graphoid(
    $port,
    $log_level = undef,
    $allowed_domains = {},
    $domain_map    = {},
    $timeout       = 5000,
    $headers       = false,
    $error_headers = false,
) {

    require_package('libcairo2-dev')
    require_package('libjpeg-dev')
    require_package('libgif-dev')

    service::node { 'graphoid':
        port      => $port,
        log_level => $log_level,
        config    => {
            allowedDomains => $allowed_domains,
            domainMap      => $domain_map,
            timeout        => $timeout,
            headers        => $headers,
            errorHeaders   => $error_headers,
        },
    }

}