Changeset View
Changeset View
Standalone View
Standalone View
site-modules/profile/manifests/swh/deploy/storage.pp
# Deployment of the swh.storage.api server | # Deployment of the swh.storage.api server | ||||
class profile::swh::deploy::storage { | class profile::swh::deploy::storage { | ||||
include ::profile::swh::deploy::base_storage | include ::profile::swh::deploy::base_storage | ||||
package {'python3-swh.storage': | package {'python3-swh.storage': | ||||
ensure => 'present', | ensure => 'present', | ||||
} ~> ::profile::swh::deploy::rpc_server {'storage': | } ~> ::profile::swh::deploy::rpc_server {'storage': | ||||
executable => 'swh.storage.api.wsgi', | executable => 'swh.storage.api.server:make_app_from_configfile()', | ||||
worker => 'sync', | worker => 'sync', | ||||
http_check_string => '<title>Software Heritage storage server</title>', | http_check_string => '<title>Software Heritage storage server</title>', | ||||
} | } | ||||
$storage_config = lookup('swh::deploy::storage::config')['storage'] | $storage_config = lookup('swh::deploy::storage::config')['storage'] | ||||
if ($storage_config['cls'] == 'local' | if ($storage_config['cls'] == 'local' | ||||
and $storage_config['args']['journal_writer'] | and $storage_config['args']['journal_writer'] | ||||
and $storage_config['args']['journal_writer']['cls'] == 'kafka') { | and $storage_config['args']['journal_writer']['cls'] == 'kafka') { | ||||
include ::profile::swh::deploy::journal | include ::profile::swh::deploy::journal | ||||
} | } | ||||
} | } |