Puppet Class: profile::query_service::wcqs

Defined in:
modules/profile/manifests/query_service/wcqs.pp

Overview

Class: profile::query_service::wcqs

This class defines a meta-class that pulls in all the query_service profiles necessary for a query service installation servicing the commons.wikimedia.org dataset.

Parameters:

  • package_dir (Stdlib::Unixpath) (defaults to: lookup('profile::query_service::package_dir'))
  • data_dir (Stdlib::Unixpath) (defaults to: lookup('profile::query_service::data_dir'))
  • log_dir (Stdlib::Unixpath) (defaults to: lookup('profile::query_service::log_dir'))
  • deploy_name (String) (defaults to: lookup('profile::query_service::deploy_name'))
  • logstash_logback_port (Stdlib::Port) (defaults to: lookup('logstash_logback_port'))
  • heap_size (String) (defaults to: lookup('profile::query_service::blazegraph_heap_size'))
  • use_deployed_config (Boolean) (defaults to: lookup('profile::query_service::blazegraph_use_deployed_config'))
  • extra_jvm_opts (Array[String]) (defaults to: lookup('profile::query_service::blazegraph_extra_jvm_opts'))
  • contact_groups (String) (defaults to: lookup('contactgroups', {'default_value' => 'admins'}))
  • monitoring_enabled (Boolean) (defaults to: lookup('profile::query_service::blazegraph::monitoring_enabled'))
  • sparql_query_stream (Optional[String]) (defaults to: lookup('profile::query_service::sparql_query_stream', {'default_value' => undef}))
  • event_service_endpoint (Optional[String]) (defaults to: lookup('profile::query_service::event_service_endpoint', {'default_value' => undef}))
  • oauth_access_token_secret (String) (defaults to: lookup('profile::query_service::oauth_access_token_secret'))
  • oauth_consumer_secret (String) (defaults to: lookup('profile::query_service::oauth_consumer_secret'))
  • federation_user_agent (String) (defaults to: lookup('profile::query_service::federation_user_agent'))
  • blazegraph_main_ns (String) (defaults to: lookup('profile::query_service::blazegraph_main_ns'))
  • jvmquake_options (Optional[String]) (defaults to: lookup('profile::query_service::jvmquake_options', {'default_value' => undef}))
  • jvmquake_warn_threshold (Optional[Integer]) (defaults to: lookup('profile::query_service::jvmquake_warn_threshold', {'default_value' => undef}))
  • jvmquake_warn_file (String) (defaults to: lookup('profile::query_service::jvmquake_warn_file', {'default_value' => '/tmp/wcqs_blazegraph_jvmquake_warn_gc'}))


6
7
8
9
10
11
12
13
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# File 'modules/profile/manifests/query_service/wcqs.pp', line 6

class profile::query_service::wcqs(
    Stdlib::Unixpath $package_dir = lookup('profile::query_service::package_dir'),
    Stdlib::Unixpath $data_dir = lookup('profile::query_service::data_dir'),
    Stdlib::Unixpath $log_dir = lookup('profile::query_service::log_dir'),
    String $deploy_name = lookup('profile::query_service::deploy_name'),
    Stdlib::Port $logstash_logback_port = lookup('logstash_logback_port'),
    String $heap_size = lookup('profile::query_service::blazegraph_heap_size'),
    Boolean $use_deployed_config = lookup('profile::query_service::blazegraph_use_deployed_config'),
    Array[String] $extra_jvm_opts = lookup('profile::query_service::blazegraph_extra_jvm_opts'),
    String $contact_groups = lookup('contactgroups', {'default_value' => 'admins'}),
    Boolean $monitoring_enabled = lookup('profile::query_service::blazegraph::monitoring_enabled'),
    Optional[String] $sparql_query_stream = lookup('profile::query_service::sparql_query_stream', {'default_value' => undef}),
    Optional[String] $event_service_endpoint = lookup('profile::query_service::event_service_endpoint', {'default_value' => undef}),
    String $oauth_access_token_secret = lookup('profile::query_service::oauth_access_token_secret'),
    String $oauth_consumer_secret = lookup('profile::query_service::oauth_consumer_secret'),
    String $federation_user_agent = lookup('profile::query_service::federation_user_agent'),
    String $blazegraph_main_ns = lookup('profile::query_service::blazegraph_main_ns'),
    Optional[String] $jvmquake_options = lookup('profile::query_service::jvmquake_options', {'default_value' => undef}),
    Optional[Integer] $jvmquake_warn_threshold = lookup('profile::query_service::jvmquake_warn_threshold', {'default_value' => undef}),
    String $jvmquake_warn_file = lookup('profile::query_service::jvmquake_warn_file', {'default_value' => '/tmp/wcqs_blazegraph_jvmquake_warn_gc'}),
) {
    require ::profile::query_service::common
    require ::profile::query_service::gui
    require ::profile::query_service::streaming_updater

    $username = 'blazegraph'
    $instance_name = "${deploy_name}-blazegraph"
    $nginx_port = 80
    $blazegraph_port = 9999
    $prometheus_port = 9195
    $prometheus_agent_port = 9102

    $uri_scheme_options = ['-DwikibaseConceptUri=http://www.wikidata.org', '-DcommonsConceptUri=https://commons.wikimedia.org']
    $data_options = ['-DwikibaseSomeValueMode=skolem']

    $private_jvm_opts = [
        "-Dorg.wikidata.query.rdf.mwoauth.OAuthProxyConfig.accessTokenSecret=${oauth_access_token_secret}",
        "-Dorg.wikidata.query.rdf.mwoauth.OAuthProxyConfig.consumerSecret=${oauth_consumer_secret}",
        "-Dwdqs.jwt-identity-filter.jwt-identity-secret=${oauth_access_token_secret}",
    ]

    profile::query_service::blazegraph { $instance_name:
        username                => $username,
        package_dir             => $package_dir,
        data_dir                => $data_dir,
        log_dir                 => $log_dir,
        deploy_name             => $deploy_name,
        logstash_logback_port   => $logstash_logback_port,
        heap_size               => $heap_size,
        use_deployed_config     => $use_deployed_config,
        extra_jvm_opts          => $extra_jvm_opts + $private_jvm_opts + $uri_scheme_options + $data_options,
        contact_groups          => $contact_groups,
        monitoring_enabled      => $monitoring_enabled,
        sparql_query_stream     => $sparql_query_stream,
        event_service_endpoint  => $event_service_endpoint,
        nginx_port              => $nginx_port,
        blazegraph_port         => $blazegraph_port,
        prometheus_port         => $prometheus_port,
        prometheus_agent_port   => $prometheus_agent_port,
        config_file_name        => 'RWStore.wcqs.properties',
        prefixes_file           => 'prefixes-sdc.conf',
        use_geospatial          => true,
        journal                 => 'wcqs',
        blazegraph_main_ns      => $blazegraph_main_ns,
        use_oauth               => true,
        federation_user_agent   => $federation_user_agent,
        jvmquake_options        => $jvmquake_options,
        jvmquake_warn_threshold => $jvmquake_warn_threshold,
        jvmquake_warn_file      => $jvmquake_warn_file
    }
}