diff --git a/data/hostname/uffizi.softwareheritage.org.yaml b/data/hostname/uffizi.softwareheritage.org.yaml index f4220c81..8f896bd4 100644 --- a/data/hostname/uffizi.softwareheritage.org.yaml +++ b/data/hostname/uffizi.softwareheritage.org.yaml @@ -1,103 +1,109 @@ dar::backup::exclude: - srv/softwareheritage/annex # Deploy the storage server as a public resource swh::deploy::storage::backend::listen::host: 0.0.0.0 swh::deploy::storage::backend::workers: 64 swh::deploy::storage::backend::max_requests: 500 swh::deploy::storage::backend::max_requests_jitter: 50 swh::deploy::storage::config: storage: cls: local args: db: "host=%{hiera('swh::deploy::storage::db::host')} user=%{hiera('swh::deploy::storage::db::user')} dbname=%{hiera('swh::deploy::storage::db::dbname')} password=%{hiera('swh::deploy::storage::db::password')}" objstorage: cls: multiplexer args: objstorages: - cls: pathslicing args: 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 swh::deploy::indexer::storage::backend::workers: 32 swh::deploy::indexer::storage::config: indexer_storage: cls: local args: db: "host=%{hiera('swh::deploy::indexer::storage::db::host')} port=%{hiera('swh::deploy::indexer::storage::db::port')} user=%{hiera('swh::deploy::indexer::storage::db::user')} dbname=%{hiera('swh::deploy::indexer::storage::db::dbname')} password=%{hiera('swh::deploy::indexer::storage::db::password')}" # open objstorage api swh::deploy::objstorage::backend::listen::host: 0.0.0.0 swh::deploy::objstorage::backend::workers: 16 swh::deploy::objstorage::ceph::keyring: /etc/softwareheritage/objstorage/ceph-keyring swh::deploy::objstorage::ceph::rados_id: swh-contents-rw ceph::client_keyrings: '/etc/softwareheritage/objstorage/ceph-keyring': owner: root group: swhstorage mode: '0640' keys: - "%{alias('swh::deploy::objstorage::ceph::rados_id')}" icinga2::host::vars: load: high disks: disk /srv/storage/0: disk_wfree: '5%' disk_cfree: '3%' disk /srv/storage/1: disk_wfree: '5%' disk_cfree: '3%' disk /srv/storage/2: disk_wfree: '5%' disk_cfree: '3%' disk /srv/storage/3: disk_wfree: '5%' disk_cfree: '3%' disk /srv/storage/4: disk_wfree: '5%' disk_cfree: '3%' disk /srv/storage/5: disk_wfree: '5%' disk_cfree: '3%' disk /srv/storage/6: disk_wfree: '5%' disk_cfree: '3%' disk /srv/storage/7: disk_wfree: '5%' disk_cfree: '3%' disk /srv/storage/8: disk_wfree: '5%' disk_cfree: '3%' disk /srv/storage/9: disk_wfree: '5%' disk_cfree: '3%' disk /srv/storage/a: disk_wfree: '5%' disk_cfree: '3%' disk /srv/storage/b: disk_wfree: '5%' disk_cfree: '3%' disk /srv/storage/c: disk_wfree: '5%' disk_cfree: '3%' disk /srv/storage/d: disk_wfree: '5%' disk_cfree: '3%' disk /srv/storage/e: disk_wfree: '5%' disk_cfree: '3%' disk /srv/storage/f: disk_wfree: '5%' disk_cfree: '3%' disk /srv/storage/space/mirrors/gitorious.org/mnt: disk_wfree: '5%' disk_cfree: '3%' nginx::worker_processes: 16 diff --git a/site-modules/profile/manifests/swh/deploy/storage.pp b/site-modules/profile/manifests/swh/deploy/storage.pp index 10795e29..aff51f44 100644 --- a/site-modules/profile/manifests/swh/deploy/storage.pp +++ b/site-modules/profile/manifests/swh/deploy/storage.pp @@ -1,13 +1,21 @@ # Deployment of the swh.storage.api server class profile::swh::deploy::storage { include ::profile::swh::deploy::base_storage package {'python3-swh.storage': ensure => 'present', } ~> ::profile::swh::deploy::rpc_server {'storage': executable => 'swh.storage.api.wsgi', 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 + } }