Puppet Class: ores::base

Defined in:
modules/ores/manifests/base.pp

Overview

Parameters:

  • config_path (Stdlib::Unixpath) (defaults to: '/srv/deployment/ores/deploy')
  • venv_path (Stdlib::Unixpath) (defaults to: '/srv/deployment/ores/deploy/venv')


1
2
3
4
5
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
# File 'modules/ores/manifests/base.pp', line 1

class ores::base(
    Stdlib::Unixpath $config_path = '/srv/deployment/ores/deploy',
    Stdlib::Unixpath $venv_path = '/srv/deployment/ores/deploy/venv',
) {
    # Let's use a virtualenv for maximum flexibility - we can convert
    # this to deb packages in the future if needed. We also install build tools
    # because they are needed by pip to install scikit.
    # FIXME: Use debian packages for all the packages needing compilation
    require_package('virtualenv', 'python3-dev', 'build-essential',
                    'gfortran', 'libopenblas-dev', 'liblapack-dev')

    # Install scipy via debian package so we don't need to build it via pip
    # takes forever and is quite buggy
    require_package('python3-scipy')

    # It requires the enchant debian package
    require_package('enchant')

    # this package got renamed in buster
    $hunspell_nl = os_version('debian < buster') ? {
        true    => 'myspell-nl',
        default => 'hunspell-nl',
    }
    # Spellcheck packages for supported languages
    require_package([
        'aspell-ar',
        'aspell-el',
        'aspell-pl',
        'aspell-sv',
        'aspell-ro',
        'aspell-is',
        'aspell-uk',
        'myspell-cs',
        'myspell-de-at',
        'myspell-de-ch',
        'myspell-de-de',
        'myspell-en-au',
        'myspell-es',
        'myspell-et',
        'myspell-fa',
        'myspell-fr',
        'myspell-he',
        'myspell-hu',
        'myspell-lv',
        'myspell-nb',
        'myspell-pt-pt',
        'myspell-pt-br',
        'myspell-ru',
        'myspell-hr',
        $hunspell_nl,
        'hunspell-bs',
        'hunspell-ca',
        'hunspell-en-us',
        'hunspell-en-gb',
        'hunspell-eu',
        'hunspell-gl',
        'hunspell-it',
        'hunspell-sr',
        'hunspell-vi',
    ])

    # NOTE: aspell-id is imported in our apt up to Stretch:
    # https://apt.wikimedia.org/wikimedia/pool/thirdparty/a/aspell-id/
    if os_version('debian >= buster') {
        require_package('hunspell-id')
    } else {
        require_package('aspell-id')
    }
}