diff --git a/manifests/swh/deploy/storage_archiver.pp b/manifests/swh/deploy/storage_archiver.pp index be0a3a38..90527b97 100644 --- a/manifests/swh/deploy/storage_archiver.pp +++ b/manifests/swh/deploy/storage_archiver.pp @@ -1,55 +1,61 @@ # Deployment of swh.storage.archiver.director instance # Only asynchronous version possible. # Cron not installed since we need to run one synchronous batch first # to catch up class profile::swh::deploy::storage_archiver { $conf_directory = hiera('swh::deploy::storage_archiver::conf_directory') $conf_file = hiera('swh::deploy::storage_archiver::conf_file') $user = hiera('swh::deploy::storage_archiver::user') $group = hiera('swh::deploy::storage_archiver::group') $objstorage_path = hiera('swh::deploy::storage_archiver::objstorage_path') $batch_max_size = hiera('swh::deploy::storage_archiver::batch_max_size') $archival_max_age = hiera('swh::deploy::storage_archiver::archival_max_age') $retention_policy = hiera('swh::deploy::storage_archiver::retention_policy') + # archiver db info $db_host = hiera('swh::deploy::storage_archiver::db::host') $db_user = hiera('swh::deploy::storage_archiver::db::user') $db_dbname = hiera('swh::deploy::storage_archiver::db::dbname') $db_password = hiera('swh::deploy::storage_archiver::db::password') + # storage db info + $db_host_storage = hiera('swh::deploy::storage_archiver::db::host_storage') + $db_user_storage = hiera('swh::deploy::storage_archiver::db::user_storage') + $db_dbname_storage = hiera('swh::deploy::storage_archiver::db::dbname_storage') + $db_password_storage = hiera('swh::deploy::storage_archiver::db::password_storage') $log_file = hiera('swh::deploy::storage_archiver::log::file') file {$conf_directory: ensure => directory, owner => 'root', group => $group, mode => '0750', } file {$conf_file: ensure => present, owner => 'root', group => $group, mode => '0640', content => template('profile/swh/deploy/storage/archiver.ini.erb'), require => [ File[$conf_directory] ] } # cron {'swh-storage-archiver': # ensure => present, # user => $user, # command => "/usr/bin/python3 -m swh.storage.archiver.director --config-path ${conf_file} --async 2>&1 > ${log_file}", # hour => fqdn_rand(24, 'stats_export_hour'), # minute => fqdn_rand(60, 'stats_export_minute'), # month => '*', # monthday => '*', # weekday => '*', # require => [ # File[$conf_file] # ] # } } diff --git a/templates/swh/deploy/storage/archiver.ini.erb b/templates/swh/deploy/storage/archiver.ini.erb index 6f15cf7e..557e2485 100644 --- a/templates/swh/deploy/storage/archiver.ini.erb +++ b/templates/swh/deploy/storage/archiver.ini.erb @@ -1,9 +1,10 @@ # swh.storage.archiver.director configuration file # File managed by puppet - modifications will be overwritten [main] objstorage_path = <%= @objstorage_path %> batch_max_size = <%= @batch_max_size %> archival_max_age = <%= @archival_max_age %> retention_policy = <%= @retention_policy %> dbconn = host=<%= @db_host %> user=<%= @db_user %> dbname=<%= @db_dbname %> password=<%= @db_password %> +dbconn_storage = host=<%= @db_host_storage %> user=<%= @db_user_storage %> dbname=<%= @db_dbname_storage %> password=<%= @db_password_storage %>