Puppet Class: ckan::ext::archiver

Defined in:
manifests/ext/archiver.pp

Summary

Installs the archiver extension.

Overview

Parameters:

  • ckan_conf (String) (defaults to: $ckan::params::ckan_conf)
  • paster (String) (defaults to: $ckan::params::paster)

See Also:



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
# File 'manifests/ext/archiver.pp', line 9

class ckan::ext::archiver (
  String $ckan_conf = $ckan::params::ckan_conf,
  String $paster    = $ckan::params::paster,
) {
  ckan::ext { 'archiver':
    plugin           => ['archiver'],
    revision         => 'master',
    pip_requirements => 'requirements.txt',
  }

  check_run::task { 'install-ckan-archiver-init':
    exec_command => "${ckan::paster} --plugin=ckanext-archiver archiver\
 init --config=${ckan_conf}",
    require      => Ckan::Ext['archiver'],
  }

  $main_section = 'app:celery'
  ckan::conf::setting { 'BROKER_BACKEND':
    value   => 'redis',
    section => $main_section,
    require => Class['ckan::conf::production'],
  }
  ckan::conf::setting { 'BROKER_HOST':
    value   => 'redis://localhost/1',
    section => $main_section,
    require => Class['ckan::conf::production'],
  }
  ckan::conf::setting { 'CELERY_RESULT_BACKEND':
    value   => '127.0.0.1',
    section => $main_section,
    require => Class['ckan::conf::production'],
  }
  ckan::conf::setting { 'REDIS_HOST':
    value   => '127.0.0.1',
    section => $main_section,
    require => Class['ckan::conf::production'],
  }
  ckan::conf::setting { 'REDIS_PORT':
    value   => '6379',
    section => $main_section,
    require => Class['ckan::conf::production'],
  }
  ckan::conf::setting { 'REDIS_DB':
    value   => '0',
    section => $main_section,
    require => Class['ckan::conf::production'],
  }
  ckan::conf::setting { 'REDIS_CONNECT_RETRY':
    value   => 'True',
    section => $main_section,
    require => Class['ckan::conf::production'],
  }

  # Requires redis pip, but the redis pip is not listed in
  # requirements of the extension.
  ckan::pip_package { 'redis':
    version => '2.10.1',
    require => Check_run::Task['install-ckan-archiver-init'],
  }
}