diff --git a/data/hostname/uffizi.softwareheritage.org.yaml b/data/hostname/uffizi.softwareheritage.org.yaml --- a/data/hostname/uffizi.softwareheritage.org.yaml +++ b/data/hostname/uffizi.softwareheritage.org.yaml @@ -20,6 +20,12 @@ root: "%{hiera('swh::deploy::storage::directory')}" slicing: "0:2/2:4/4:6" - "%{alias('swh::remote_service::objstorage::config::azure')}" + journal_writer: + cls: kafka + args: + brokers: "%{alias('swh::deploy::journal::brokers')}" + prefix: "%{alias('swh::deploy::journal::prefix')}" + client_id: "swh.storage.journal_writer.%{::swh_hostname.short}" # Deploy the indexer storage server as a public resource swh::deploy::indexer::storage::backend::listen::host: 0.0.0.0 diff --git a/site-modules/profile/manifests/swh/deploy/storage.pp b/site-modules/profile/manifests/swh/deploy/storage.pp --- a/site-modules/profile/manifests/swh/deploy/storage.pp +++ b/site-modules/profile/manifests/swh/deploy/storage.pp @@ -10,4 +10,12 @@ worker => 'sync', http_check_string => 'Software Heritage storage server' } + + $storage_config = lookup('swh::deploy::storage::config')['storage'] + + if ($storage_config['cls'] == 'local' + and $storage_config['args']['journal_writer'] + and $storage_config['args']['journal_writer']['cls'] == 'kafka') { + include ::profile::swh::deploy::journal + } }