diff --git a/data/defaults.yaml b/data/defaults.yaml --- a/data/defaults.yaml +++ b/data/defaults.yaml @@ -2102,6 +2102,29 @@ - swh.lister.pypi.tasks.PyPIListerTask - swh_lister_pypi_refresh +swh::deploy::worker::lister_npm::config_file: "%{hiera('swh::conf_directory')}/lister_npm.yml" +swh::deploy::worker::lister_npm::concurrency: 1 +swh::deploy::worker::lister_npm::loglevel: warning +# Contains a password: in private data +swh::deploy::worker::lister_npm::db::host: db +swh::deploy::worker::lister_npm::db::dbname: lister-npm +swh::deploy::worker::lister_npm::db::user: lister-npm +#swh::deploy::worker::lister_npm::db::password in private data +swh::deploy::worker::lister_npm::config: + storage: "%{alias('swh::remote_service::storage::config::writable')}" + scheduler: "%{alias('swh::remote_service::scheduler::config::writable')}" + lister: + cls: local + args: + db: "postgresql://%{hiera('swh::deploy::worker::lister_npm::db::user')}:%{hiera('swh::deploy::worker::lister_npm::db::password')}@%{hiera('swh::deploy::worker::lister_npm::db::host')}/%{hiera('swh::deploy::worker::lister_npm::db::dbname')}" + # credentials in private data + celery: + task_broker: "%{alias('swh::deploy::worker::task_broker')}" + task_modules: + - swh.lister.npm.tasks + task_queues: + - swh.lister.npm.tasks.NpmListerTask + swh::deploy::worker::archiver::config_file: "%{hiera('swh::conf_directory')}/archiver.yml" swh::deploy::worker::archiver::archival_max_age: 3600 swh::deploy::worker::archiver::max_queue_length: 100000 diff --git a/data/location/sesi_rocquencourt.yaml b/data/location/sesi_rocquencourt.yaml --- a/data/location/sesi_rocquencourt.yaml +++ b/data/location/sesi_rocquencourt.yaml @@ -24,6 +24,7 @@ - lister_debian - lister_github - lister_gitlab + - lister_npm - lister_pypi - loader_debian - loader_deposit diff --git a/site-modules/profile/manifests/swh/deploy/worker/lister_npm.pp b/site-modules/profile/manifests/swh/deploy/worker/lister_npm.pp new file mode 100644 --- /dev/null +++ b/site-modules/profile/manifests/swh/deploy/worker/lister_npm.pp @@ -0,0 +1,11 @@ +# Deployment for swh-lister-npm +class profile::swh::deploy::worker::lister_npm { + include ::profile::swh::deploy::base_lister + + ::profile::swh::deploy::worker::instance {'lister_npm': + ensure => present, + require => [ + Package['python3-swh.lister'], + ], + } +}