diff --git a/manifests/swh/deploy/indexer.pp b/manifests/swh/deploy/indexer.pp index 411d511..80c1581 100644 --- a/manifests/swh/deploy/indexer.pp +++ b/manifests/swh/deploy/indexer.pp @@ -1,31 +1,33 @@ # Base class for the indexer manifests class profile::swh::deploy::indexer { + include ::profile::swh::deploy::objstorage_cloud + $config_directory = '/etc/softwareheritage/indexer' $config_file = "${config_directory}/base.yml" $config = hiera('swh::deploy::worker::swh_indexer::base::config') $objstorage_config = hiera('swh::azure_objstorage::config') $merged_config = merge($config, {'objstorage' => $objstorage_config}) $packages = ['python3-swh.indexer'] file {$config_directory: ensure => 'directory', owner => 'swhworker', group => 'swhworker', mode => '0755', } file {$config_file: ensure => 'present', owner => 'swhworker', group => 'swhworker', mode => '0640', content => inline_template('<%= @merged_config.to_yaml %>'), } package {$packages: ensure => 'installed', } } diff --git a/manifests/swh/deploy/objstorage_cloud.pp b/manifests/swh/deploy/objstorage_cloud.pp new file mode 100644 index 0000000..9741fd4 --- /dev/null +++ b/manifests/swh/deploy/objstorage_cloud.pp @@ -0,0 +1,22 @@ +# Deployment of the cloud objstorage + +class profile::swh::deploy::objstorage_cloud { + $pinned_packages = [ + 'python3-cffi', + 'python3-cryptography', + 'python3-pkg-resources', + 'python3-pyasn1', + 'python3-setuptools', + ] + + $objstorage_packages = ['python3-swh.objstorage.cloud'] + + ::apt::pin {'objstorage_cloud': + explanation => 'Pin python3-azure-storage dependencies to backports', + codename => 'jessie-backports', + packages => $pinned_packages, + priority => 990, + } -> package {$objstorage_packages: + ensure => installed, + } +}