Puppet Class: ckan

Inherits:
ckan::params
Defined in:
manifests/init.pp

Summary

Installs, configures, and manages ckan.

Overview

Install Details: docs.ckan.org/en/ckan-2.0/install-from-package.html

Additional features:

  • Database can be backed up to <backup_dir>/ckan_database.pg_dump determined by the frequency selected.

COPYRIGHT

GPL-3.0+

Examples:

Default Setup

class { 'ckan':
  site_url              => 'test.ckan.com',
  site_title            => 'CKAN Test',
  site_description      => 'A shared environment for managing Data.',
  site_intro            => 'A CKAN test installation',
  site_about            => 'Pilot data catalogue and repository.',
  plugins               =>
   text_preview recline_preview datastore resource_proxy pdf_preview',
  is_ckan_from_repo     => 'false',
  ckan_package_url      =>
   'http://packaging.ckan.org/python-ckan_2.1_amd64.deb',
  ckan_package_filename => 'python-ckan_2.1_amd64.deb',
}

Parameters:

  • site_url (String) (defaults to: 'localhost')

    The url for the ckan site.

  • site_title (String) (defaults to: 'localhost')

    The title of the web site.

  • server_name (String) (defaults to: undef)

    The name for the vhost.

  • site_description (Optional[String]) (defaults to: undef)

    The description (found in header) of the web site.

  • site_intro (Optional[String]) (defaults to: undef)

    The introduction on the landing page.

  • site_about (Optional[String]) (defaults to: undef)

    Information on the about page.

  • plugins (Optional[Array[String]]) (defaults to: undef)

    Contains the ckan plugins to be used by the installation. Do not include the following plugins as they are defaults and are already included. DO NOT INCLUDE: [‘stats’,‘text_view’,‘image_view’,‘recline_view’] @example

    plugins => ['text_preview','datastore','resource_proxy', 'datapusher']
    
  • app_instance_id (Optional[String]) (defaults to: undef)

    The secret password for the app instance . To generate a config file that contains a new password, run the following command: @example

    'paster make-config ckan /etc/ckan/default/dev.ini'
    
  • beaker_secret (Optional[String]) (defaults to: undef)

    The secret password for beaker. To generate a config file that contains a new password, run the following command. @example

    'paster make-config ckan /etc/ckan/default/dev.ini'
    
  • site_logo (Optional[String]) (defaults to: undef)

    The source of the logo. Should be specified as puppet:///<your module>/<image>.png Requires the png file extension.

  • license (String) (defaults to: 'puppet:///modules/ckan/license.json')

    The source to the json license file. Should be specified as puppet:///<your module>/<license file> and maintained by your module

  • ckan_version (Optional[String]) (defaults to: undef)

    Helps identify settings and configuration necessary between the different version of ckan. Valid formats:

    • ‘2.2’

    • ‘2.3’

    • eq: ‘x.y’

    Note, ckan_package_url & ckan_package_filename are not set, than the ckan version will use the package url from ckan.org and the appropriate name.

  • is_ckan_from_repo (Boolean) (defaults to: false)

    A boolean to indicate if the ckan package should be installed through an already configured repository setup outside of this module. If using Ubuntu/Deb should be able to do “apt-get install python-ckan” Its the same idea for yum and other package managers.

  • ckan_package_url (Optional[String]) (defaults to: undef)

    If not using a repo, then this url needs to be specified with the location to download the package. Note, this is using dpkg so deb/ubuntu only.

  • ckan_package_url_user (Optional[String]) (defaults to: undef)

    If the URL is password protected, the user name.

  • ckan_package_url_pass (Optional[String]) (defaults to: undef)

    If the URL is password protected, the password.

  • ckan_package_filename (Optional[String]) (defaults to: undef)

    The filename of the ckan package.

  • custom_css (String) (defaults to: 'main.css')

    The source to a css file used for the ckan site. This replaces the default main.css. Should be specified as puppet:///<your module>/<css filename> and maintained by your module. Images used in the custom css should be set in custom_imgs.

  • custom_imgs (Optional[Array[String]]) (defaults to: undef)

    An array of source for the images to be used by the css. Should be specified as

    ‘puppet:///<your module>/<img1>’,‘…’
  • recaptcha_version (String) (defaults to: '2')

    The version of recaptcha. Valid options:

    * 1 Older style with a red box.  The user enters text
    * 2 Newer style that the user clicks on a checkbox (cleaner).
    

    @see [recaptcha-version](docs.ckan.org/en/latest/maintaining/configuration.html#ckan-recaptcha-version)

  • recaptcha_publickey (Optional[String]) (defaults to: undef)

    The public key for recaptcha. @see [ckan-recaptcha-publickey](docs.ckan.org/en/latest/maintaining/configuration.html#ckan-recaptcha-publickey)

  • recaptcha_privatekey (Optional[String]) (defaults to: undef)

    The private key for recaptcha. @see [recaptcha-privatekey](docs.ckan.org/en/latest/maintaining/configuration.html#ckan-recaptcha-privatekey)

  • max_resource_size (String) (defaults to: '100')

    The maximum in megabytes a resource upload can be. @see [max-resource-size](docs.ckan.org/en/latest/maintaining/configuration.html#ckan-max-resource-size)

  • max_image_size (String) (defaults to: '10')

    The maximum in megabytes an image upload can be. @see [max-image-size](docs.ckan.org/en/latest/maintaining/configuration.html#ckan-max-image-size)

  • max_file_size (String) (defaults to: '1048576')

    This sets the upper file size limit for in-line previews. @see [resource-proxy-max-file-size](docs.ckan.org/en/latest/maintaining/configuration.html#ckan-resource-proxy-max-file-size)

  • large_file_support (Boolean) (defaults to: false)

    Enables large file to be transfered overriding settings like max_file_size. Also configures apache and nginx to support longer timeouts.

  • datapusher_formats (String) (defaults to: 'csv xls application/csv application/vnd.ms-excel')

    File formats that will be pushed to the DataStore by the DataPusher. When adding or editing a resource which links to a file in one of these formats, the DataPusher will automatically try to import its contents to the DataStore.

  • create_unowned_dataset (Boolean) (defaults to: false)

    Allow the creation of datasets not owned by any organization. @see ckan.readthedocs.io/en/2.9/maintaining/authorization.html#ckan-auth-create-unowned-dataset

  • default_views (Array[String]) (defaults to: ['image_view','recline_view'])

    Defines the resource views that should be created by default when creating or updating a dataset. From this list only the views that are relevant to a particular resource format will be created. This is determined by each individual view.

  • text_formats (String) (defaults to: 'text plain text/plain')
  • json_formats (String) (defaults to: 'json')

    JSON based resource formats that will be rendered by the Text view plugin @see docs.ckan.org/en/latest/maintaining/configuration.html#ckan-preview-json-formats

  • xml_formats (String) (defaults to: 'xml rdf rss')

    XML based resource formats that will be rendered by the Text view plugin @see docs.ckan.org/en/latest/maintaining/configuration.html#ckan-preview-xml-formats

  • image_formats (String) (defaults to: 'png jpeg jpg gif')

    Space-delimited list of image-based resource formats that will be rendered by the Image view plugin @see docs.ckan.org/en/latest/maintaining/configuration.html#ckan-preview-image-formats

  • postgres_pass (String) (defaults to: 'pass')

    The password for the postgres user of the database (admin user).

  • ckan_pass (String) (defaults to: 'pass')

    The password for the ckan user of the database.

  • pg_hba_conf_defaults (Boolean) (defaults to: true)

    True if use the default hbas and false to configure your own. This module uses postgresql so this setting informs the postgresql module that the hba’s should be handled outside of this module. Requires your own hba configuration.

  • pg_hba_rules (Optional[Hash]) (defaults to: undef)

    This is a hash which uses create_resources to create the hba rules. Optional. The hba rules can also be defined outside of this class.

  • postgresql_version (String) (defaults to: $ckan::params::postgresql_version)

    The version of postgresql to use.

  • postgis_version (String) (defaults to: $ckan::params::postgis_version)

    The version of postgis to use.

  • install_ckanapi (Boolean) (defaults to: false)

    Installs the ckan api if set to true. Also installs a helper script in /usr/bin/ckan/ckanapi.bash which launches ckanapi with the environment setup.

    @see github.com/ckan/ckanapi

  • ckan_api_version (String) (defaults to: '3.3')

    The version of the ckan api to install.

  • enable_backup (Boolean) (defaults to: true)

    Backs up the database to /backup/ckan_database.pg_dump.

  • backup_daily (Boolean) (defaults to: true)

    If backups enabled, sets backups to either daily (true) or weekly (false).

  • backup_dir (String) (defaults to: '/backup')

    The location where backups are stored.

  • solr_url (String) (defaults to: 'http://archive.apache.org/dist/lucene/solr')

    The base url for downloading solr.

  • solr_url_user (Optional[String]) (defaults to: undef)

    If the URL is password protected, the user name.

  • solr_url_pass (Optional[String]) (defaults to: undef)

    If the URL is password protected, the password.

  • solr_download_user (Optional[String]) (defaults to: undef)

    The user for downloading solr.

  • solr_download_pass (Optional[String]) (defaults to: undef)

    The user’s password for downloading solr.

  • solr_version (String) (defaults to: '5.5.3')

    The version of solr to install.

  • solr_schema_version (String) (defaults to: 'default')

    The version of the solr schema to use. Valid options:

    • ‘1.2’

    • ‘1.3’

    • ‘1.4’

    • ‘2.0’

    • ‘spatial’ - configures solar with the spatial extensions.

      Only supports bounding box.
      
    • ‘spatial-ext’ - configures solar with the extended spatial extension.

      This allows for bounding box, point, and Polygon.
      
    • ‘default’

    The options correspond to the following structure:

    “‘ /usr/lib/ckan/default/src/ckan/ckan/config/solr/schema-<solr_schema_version> “`

    The only exception is default which means schema.xml (required as of ckan 2.3).

  • solr_schema_extra_fields (Optional[Array]) (defaults to: undef)

    An array of strings to be included in the schema.

  • solr_jts_url (String) (defaults to: $ckan::params::jts_url)

    The url to be used to download the jts library for solr spatial ext. Only used if spatial-ext option is set.

  • solr_environment (Optional[Array]) (defaults to: undef)

    Bash style environment variables passed at the end of the solr server environment.

  • locale_default (String) (defaults to: 'en')

    Use this to specify the locale (language of the text) displayed in the CKAN Web UI.

  • locales_offered (Optional[String]) (defaults to: undef)

    By default, all locales found in the ckan/i18n directory will be offered to the user. To only offer a subset of these, list them under this option. The ordering of the locales is preserved when offered to the user. @see docs.ckan.org/en/2.8/maintaining/configuration.html#ckan-locales-offered

  • i18n_directory (Optional[String]) (defaults to: undef)

    By default, the locales are searched for in the ckan/i18n directory. Use this option if you want to use another folder.

  • ckan_storage_path (String) (defaults to: '/var/lib/ckan/default')

    The location where files will be stored for the file store. Note, this module handles creating the directory; however, ensure the path leading up to the directory has already been created.

  • display_timezone (String) (defaults to: 'UTC')

    By default, all datetimes are considered to be in the UTC timezone. Use this option to change the displayed dates on the frontend. Internally, the dates are always saved as UTC. This option only changes the way the dates are displayed. The valid values for this options [can be found at pytz](pytz.sourceforge.net/#helpers) Available from CKAN 2.5+ (has no effect on previous versions).

  • feeds_author_name (Optional[String]) (defaults to: undef)

    This controls the feed author’s name. If unspecified, it’ll use ckan.site_id. @see [feeds-author-name](docs.ckan.org/en/latest/maintaining/configuration.html#ckan-feeds-author-name)

  • feeds_author_link (Optional[String]) (defaults to: undef)

    This controls the feed author’s link. If unspecified, it’ll use ckan.site_url. @see [feeds-author-link](docs.ckan.org/en/latest/maintaining/configuration.html#ckan-feeds-author-link)

  • feeds_authority_name (Optional[String]) (defaults to: undef)

    The domain name or email address of the default publisher of the feeds and elements. If unspecified, it’ll use ckan.site_url. @see [feeds-authority-name](docs.ckan.org/en/latest/maintaining/configuration.html#ckan-feeds-authority-name)

  • feeds_date (Optional[String]) (defaults to: undef)

    A string representing the default date on which the authority_name is owned by the publisher of the feed. @see [feeds-date](docs.ckan.org/en/latest/maintaining/configuration.html#ckan-feeds-date)

  • smtp_server (Optional[String]) (defaults to: undef)

    The SMTP server to connect to when sending emails with optional port. The format is <DN>:<PORT> @example: smtp.example.com:587 @see [smtp-server](docs.ckan.org/en/latest/maintaining/configuration.html?highlight=email#smtp-server)

  • smtp_starttls (Optional[String]) (defaults to: undef)

    Whether or not to use STARTTLS when connecting to the SMTP server. @see [smtp-starttls](docs.ckan.org/en/latest/maintaining/configuration.html?highlight=email#smtp-starttls)

  • smtp_user (Optional[String]) (defaults to: undef)

    The username used to authenticate with the SMTP server. Example: username@example.com @see [smtp-user](docs.ckan.org/en/latest/maintaining/configuration.html?highlight=email#smtp-user)

  • smtp_password (Optional[String]) (defaults to: undef)

    The password used to authenticate with the SMTP server. @see [smtp-password](docs.ckan.org/en/latest/maintaining/configuration.html?highlight=email#smtp-password)

  • smtp_mail_from (Optional[String]) (defaults to: undef)

    The email address that emails sent by CKAN will come from. Note that, if left blank, the SMTP server may insert its own. Example: ckan@example.com @see [smtp-mail-from](docs.ckan.org/en/latest/maintaining/configuration.html?highlight=email#smtp-mail-from)

  • email_errors_to (Optional[String]) (defaults to: undef)

    An e-mail address to send any error reports to. Example: errors@example.com @see [email-errors-to](docs.ckan.org/en/latest/maintaining/configuration.html?highlight=email#email-to)

  • email_errors_from (Optional[String]) (defaults to: undef)

    The from e-mail address to use when sending any error reports. Example: ckan-errors@example.com @see [email-errors-from](docs.ckan.org/en/latest/maintaining/configuration.html?highlight=email#error-email-from)

  • roles_cascade (Optional[String]) (defaults to: undef)

    Makes role permissions apply to all the groups down the hierarchy from the groups that the role is applied to. @see [roles-cascade](docs.ckan.org/en/latest/maintaining/configuration.html#ckan-auth-roles-that-cascade-to-sub-groups)

  • featured_orgs (Optional[String]) (defaults to: undef)

    Defines a list of organization names or ids. Example: ‘org_one’ @see [featured-orgs](docs.ckan.org/en/latest/maintaining/configuration.html#ckan-featured-orgs)

  • featured_groups (Optional[String]) (defaults to: undef)

    Defines a list of group names or group ids. Example: ‘group_one’ @see [featured-groups](docs.ckan.org/en/latest/maintaining/configuration.html#ckan-featured-groups)

  • activity_streams_enabled (Boolean) (defaults to: true)

    Turns on and off the activity streams used to track changes on datasets, groups, users, etc @see [activity-streams-enabled](docs.ckan.org/en/latest/maintaining/configuration.html#ckan-activity-streams-enabled)

  • activity_streams_email_notifications (Boolean) (defaults to: false)

    Turns on and off the activity streams’ email notifications. @see [activity-streams-email-notifications](docs.ckan.org/en/latest/maintaining/configuration.html#ckan-activity-streams-email-notifications)

  • tracking_enabled (Boolean) (defaults to: false)

    This controls if CKAN will track the site usage. @see [tracking-enabled](docs.ckan.org/en/latest/maintaining/configuration.html#ckan-tracking-enabled)

  • search_facets_default (Integer) (defaults to: 10)

    Default number of facets shown in search results. @see [search-facets-default](docs.ckan.org/en/latest/maintaining/configuration.html#search-facets-default)

  • favicon (String) (defaults to: '/base/images/ckan.ico')
  • use_ssl (Boolean) (defaults to: false)

    Enable SSL for the site.

  • use_google_verification (Boolean) (defaults to: false)

    Enable google verification in the nginx configuration.

  • use_nagios (Boolean) (defaults to: false)

    Use a /nagios.txt in the nginx configuration file.

  • google_verification_string (Optional[String]) (defaults to: undef)

    The google verification string.

  • ssl_cert_path (Optional[String]) (defaults to: undef)

    The path to the ssl certificate for nginx.

  • ssl_key_path (Optional[String]) (defaults to: undef)

    The path to the ssl key for nginx.

  • disable_bot_pipl (Boolean) (defaults to: false)

    Disable the piplbot @see pipl.com/bot

  • install_from_source (Boolean) (defaults to: false)

    Install from source instead of package.

  • source_version (String) (defaults to: '2.7.7')

    The source version to install.

  • datapusher_version (String) (defaults to: '0.0.16')

    The version of datapusher to install if using the source version. Ignored if using packaged version. @see github.com/ckan/datapusher

  • install_datapusher (Boolean) (defaults to: true)

    Controlls if the datapusher should be intalled. Only applicable for the source install because the package install automatically installs the datapusher.



434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
# File 'manifests/init.pp', line 434

class ckan (
  String           $site_url                             = 'localhost',
  String           $site_title                           = 'localhost',
  String           $server_name                          = undef,
  Optional[String] $site_description                     = undef,
  Optional[String] $site_intro                           = undef,
  Optional[String] $site_about                           = undef,
  Optional[Array[String]] $plugins                       = undef,
  Optional[String] $app_instance_id                      = undef,
  Optional[String] $beaker_secret                        = undef,
  Optional[String] $site_logo                            = undef,
  String           $license                              = 'puppet:///modules/ckan/license.json',
  Boolean          $is_ckan_from_repo                    = false,
  Optional[String] $ckan_package_url                     = undef,
  Optional[String] $ckan_package_url_user                = undef,
  Optional[String] $ckan_package_url_pass                = undef,
  Optional[String] $ckan_package_filename                = undef,
  Optional[String] $ckan_version                         = undef,
  String           $custom_css                           = 'main.css',
  Optional[Array[String]] $custom_imgs                   = undef,
  String           $recaptcha_version                    = '2',
  Optional[String] $recaptcha_publickey                  = undef,
  Optional[String] $recaptcha_privatekey                 = undef,
  String           $max_resource_size                    = '100',
  String           $max_image_size                       = '10',
  String           $max_file_size                        = '1048576',
  Boolean          $large_file_support                   = false,
  String           $datapusher_formats                   = 'csv xls application/csv application/vnd.ms-excel',
  Boolean          $create_unowned_dataset               = false,
  Array[String]    $default_views                        = ['image_view','recline_view'],
  String           $text_formats                         = 'text plain text/plain',
  String           $json_formats                         = 'json',
  String           $xml_formats                          = 'xml rdf rss',
  String           $image_formats                        = 'png jpeg jpg gif',
  String           $postgres_pass                        = 'pass',
  String           $ckan_pass                            = 'pass',
  Boolean          $pg_hba_conf_defaults                 = true,
  Optional[Hash]   $pg_hba_rules                         = undef,
  String           $postgresql_version                   = $ckan::params::postgresql_version,
  String           $postgis_version                      = $ckan::params::postgis_version,
  Boolean          $install_ckanapi                      = false,
  String           $ckan_api_version                     = '3.3',
  Boolean          $enable_backup                        = true,
  Boolean          $backup_daily                         = true,
  String           $backup_dir                           = '/backup',
  String           $solr_url                             = 'http://archive.apache.org/dist/lucene/solr',
  Optional[String] $solr_url_user                        = undef,
  Optional[String] $solr_url_pass                        = undef,
  Optional[String] $solr_download_user                   = undef,
  Optional[String] $solr_download_pass                   = undef,
  String           $solr_version                         = '5.5.3',
  String           $solr_schema_version                  = 'default',
  Optional[Array]  $solr_schema_extra_fields             = undef,
  String           $solr_jts_url                         = $ckan::params::jts_url,
  Optional[Array]  $solr_environment                     = undef,
  String           $locale_default                       = 'en',
  Optional[String] $locales_offered                      = undef,
  String           $ckan_storage_path                    = '/var/lib/ckan/default',
  String           $display_timezone                     = 'UTC',
  Optional[String] $feeds_author_name                    = undef,
  Optional[String] $feeds_author_link                    = undef,
  Optional[String] $feeds_authority_name                 = undef,
  Optional[String] $feeds_date                           = undef,
  Boolean          $activity_streams_enabled             = true,
  Boolean          $activity_streams_email_notifications = false,
  Boolean          $tracking_enabled                     = false,
  Integer          $search_facets_default                = 10,
  String           $favicon                              = '/base/images/ckan.ico',
  Boolean          $use_ssl                              = false,
  Boolean          $use_google_verification              = false,
  Boolean          $use_nagios                           = false,
  Optional[String] $i18n_directory                       = undef,
  Optional[String] $smtp_server                          = undef,
  Optional[String] $smtp_starttls                        = undef,
  Optional[String] $smtp_user                            = undef,
  Optional[String] $smtp_password                        = undef,
  Optional[String] $smtp_mail_from                       = undef,
  Optional[String] $email_errors_to                      = undef,
  Optional[String] $email_errors_from                    = undef,
  Optional[String] $roles_cascade                        = undef,
  Optional[String] $featured_orgs                        = undef,
  Optional[String] $featured_groups                      = undef,
  Optional[String] $google_verification_string           = undef,
  Optional[String] $ssl_cert_path                        = undef,
  Optional[String] $ssl_key_path                         = undef,
  Boolean          $disable_bot_pipl                     = false,
  Boolean          $install_from_source                  = false,
  String           $source_version                       = '2.7.7',
  String           $datapusher_version                   = '0.0.16',
  Boolean          $install_datapusher                   = true,
) inherits ckan::params {
  # Check supported operating systems
  if $facts['os']['family'] != 'Debian' {
    fail("Unsupported OS ${facts['os']['family']}.  Please use a debian based system")
  }
  if $large_file_support {
    $nginx_max_resource_size     = '50000'
    $apache_timeout              = '1800'
    $nginx_proxy_connect_timeout = '1800s'
    $nginx_proxy_send_timeout    = '1800s'
    $nginx_proxy_read_timeout    = '1800s'
    $nginx_client_max_body_size  = '102400m'
    $nginx_send_timeout          = '1800s'
    $nginx_keepalive_timeout     = '1800s'
  } else {
    $nginx_max_resource_size     = $max_resource_size
    $apache_timeout              = undef
    $nginx_proxy_connect_timeout = undef
    $nginx_proxy_send_timeout    = undef
    $nginx_proxy_read_timeout    = undef
    $nginx_client_max_body_size  = undef
    $nginx_send_timeout          = undef
    $nginx_keepalive_timeout     = undef
  }

  File {
    owner => root,
    group => root,
  }

  $ckan_package_dir = '/usr/local/ckan'

  $default_views_string = join($default_views,' ')

  if versioncmp($solr_version, '6.6.0') >= 0 {
    $solr_version_7_plus = true
  } else {
    $solr_version_7_plus = false
  }

  if $ckan::version {
    if versioncmp($ckan::version, '2.9') <= 0 {
      $pip            = "${ckan::params::pip_path}/pip"
      $python         = "${ckan::params::python_path}/python"
      $python_version = 2
    } else {
      $pip            = "${ckan::params::pip_path}/pip3"
      $python         = "${ckan::params::python_path}/python3"
      $python_version = 3
    }
  } else {
    if versioncmp($ckan::source_version, '2.9') <= 0 {
      $pip            = "${ckan::params::pip_path}/pip"
      $python         = "${ckan::params::python_path}/python"
      $python_version = 2
    } else {
      $pip            = "${ckan::params::pip_path}/pip3"
      $python         = "${ckan::params::python_path}/python3"
      $python_version = 3
    }
  }

  contain ckan::install

  class { 'ckan::db_config':
    require => Class['ckan::install'],
  }

  class { 'ckan::config':
    backup_dir => $backup_dir,
    site_logo  => $site_logo,
    require    => Class['ckan::db_config'],
  }

  class { 'ckan::conf::production':
    require => Class['ckan::config'],
  }

  if $install_from_source {
    class { 'ckan::supervisor':
      require => Class['ckan::conf::production'],
      before  => Class['ckan::service'],
    }
  }

  class { 'ckan::service':
    subscribe => Class['ckan::config','ckan::db_config', 'ckan::conf::production'],
  }

  class { 'ckan::postinstall':
    require => Class['ckan::service'],
  }
  if $install_ckanapi {
    class { 'ckan::ckanapi':
      require => Class['ckan::postinstall'],
    }
    contain ckan::ckanapi
  }

  #contain ckan::nginx_config
  contain ckan::db_config
  contain ckan::config
  contain ckan::conf::production
  contain ckan::service
  contain ckan::postinstall
}