diff --git a/data/hostname/webapp0.softwareheritage.org.yaml b/data/hostname/webapp0.softwareheritage.org.yaml --- a/data/hostname/webapp0.softwareheritage.org.yaml +++ b/data/hostname/webapp0.softwareheritage.org.yaml @@ -8,3 +8,16 @@ apache::default_vhost: false swh::remote_service::search::config: "%{alias('swh::remote_service::search::config::storage0')}" + +swh::remote_service::storage::config: + cls: cassandra + args: + hosts: + - cassandra01.euwest.azure.internal.softwareheritage.org + - cassandra02.euwest.azure.internal.softwareheritage.org + - cassandra03.euwest.azure.internal.softwareheritage.org + - cassandra04.euwest.azure.internal.softwareheritage.org + - cassandra05.euwest.azure.internal.softwareheritage.org + - cassandra06.euwest.azure.internal.softwareheritage.org + keyspace: swh_test + objstorage: "%{alias('swh::remote_service::objstorage::config::azure_readonly_with_fallback')}" diff --git a/site-modules/profile/manifests/swh/deploy/webapp.pp b/site-modules/profile/manifests/swh/deploy/webapp.pp --- a/site-modules/profile/manifests/swh/deploy/webapp.pp +++ b/site-modules/profile/manifests/swh/deploy/webapp.pp @@ -102,6 +102,14 @@ notify => Service['gunicorn-swh-webapp'], } + $storage_cfg = $full_webapp_config['storage'] + if $storage_cfg['cls'] == 'cassandra' { + package {'python-cassandra': + ensure => present, + require => Apt::Source['softwareheritage'], + } + } + file {$production_db_dir: ensure => directory, owner => $user,