Puppet Class: query_service::gui

Defined in:
modules/query_service/manifests/gui.pp

Overview

Class: query_service::gui

Provisions Query Service GUI

Parameters:

  • $package_dir: Directory where the service is installed. GUI files are expected to be under its gui/ directory.

  • $data_dir: Where the data is installed.

  • $log_dir: Directory where the logs go

  • $username: Username owning the service

  • $deploy_mode: deployment mode. e.g scap3, manual etc

  • enable_ldf: boolean flag for enabling or disabling ldf

  • $max_query_time_millis: maximum query time in milliseconds

Parameters:

  • package_dir (String)
  • data_dir (String)
  • log_dir (String)
  • deploy_name (String)
  • username (String)
  • deploy_mode (Query_service::DeployMode)
  • enable_ldf (Boolean)
  • max_query_time_millis (Integer)


14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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
57
58
59
60
61
# File 'modules/query_service/manifests/gui.pp', line 14

class query_service::gui(
    String $package_dir,
    String $data_dir,
    String $log_dir,
    String $deploy_name,
    String $username,
    Query_service::DeployMode $deploy_mode,
    Boolean $enable_ldf,
    Integer $max_query_time_millis,
) {
    $port = 80
    $additional_port = 8888
    $alias_map = "${data_dir}/aliases.map"

    ::nginx::site { $deploy_name:
        content => template('query_service/nginx.erb'),
        require => File[$alias_map],
    }

    # List of namespace aliases in format:
    # ALIAS REAL_NAME;
    # This map is generated manually or by category update script
    file { $alias_map:
        ensure => present,
        owner  => $username,
        group  => 'wikidev',
        mode   => '0664',
        tag    => 'in-wdqs-data-dir',
    }

    # The directory for operator-controlled nginx flags
    file { '/var/lib/nginx/wdqs/':
        ensure  => directory,
        owner   => 'root',
        group   => 'wikidev',
        mode    => '0775',
        # Because nginx site creates /var/lib/nginx
        require => Nginx::Site['wdqs'],
    }

    file { '/etc/wdqs/gui_vars.sh':
        ensure  => present,
        content => template('query_service/gui_vars.erb'),
        owner   => 'root',
        group   => 'root',
        mode    => '0644',
    }
}