diff --git a/manifests/reva.pp b/manifests/reva.pp index b3b711b..cf24646 100644 --- a/manifests/reva.pp +++ b/manifests/reva.pp @@ -8,6 +8,7 @@ class sunetdrive::reva ( $environment = sunetdrive::get_environment() $shared_secret = safe_hiera('shared_secret') + $statistics_secret = safe_hiera('statistics_secret') $iopsecret = safe_hiera('iopsecret') $smtp_credentials = safe_hiera('smtp_credentials') @@ -22,18 +23,17 @@ class sunetdrive::reva ( content => template('sunetdrive/reva/revad.toml.erb'), mode => '0644', } + file { '/opt/reva/rclone.conf': + ensure => present, + owner => 'www-data', + group => 'root', + content => template('sunetdrive/reva/rclone.conf.erb'), + mode => '0644', + } file { '/opt/reva/data': ensure => directory, owner => 'www-data', } - file { '/opt/reva/metrics.json': - ensure => present, - owner => 'www-data', - group => 'root', - content => template('sunetdrive/reva/metrics.json.erb'), - mode => '0644', - } - sunet::docker_compose { 'drive_reva_docker_compose': content => template('sunetdrive/reva/docker-compose.yml.erb'), service_name => 'reva', diff --git a/templates/reva/docker-compose.yml.erb b/templates/reva/docker-compose.yml.erb index 303a5dc..f90dc9a 100644 --- a/templates/reva/docker-compose.yml.erb +++ b/templates/reva/docker-compose.yml.erb @@ -16,7 +16,7 @@ services: volumes: - /opt/reva/revad.toml:/etc/revad/revad.toml - /opt/reva/data:/var/tmp/reva - - /opt/reva/metrics.json:/etc/revad/metrics.json + - /opt/reva/rclone.conf:/root/.rclone.conf - /opt/reva/<%= @environment %>/<%= @domain %>.crt:/etc/revad/tls/<%= @domain %>.crt - /opt/reva/<%= @environment %>/<%= @domain %>.key:/etc/revad/tls/<%= @domain %>.key restart: always diff --git a/templates/reva/metrics.json.erb b/templates/reva/metrics.json.erb deleted file mode 100644 index e812fcd..0000000 --- a/templates/reva/metrics.json.erb +++ /dev/null @@ -1,5 +0,0 @@ -{ - "cs3_org_sciencemesh_site_total_num_users": 2200, - "cs3_org_sciencemesh_site_total_num_groups": 0, - "cs3_org_sciencemesh_site_total_amount_storage": 270000000000000 -} diff --git a/templates/reva/rclone.conf.erb b/templates/reva/rclone.conf.erb new file mode 100644 index 0000000..3d144dc --- /dev/null +++ b/templates/reva/rclone.conf.erb @@ -0,0 +1,6 @@ +[statistics] +type = webdav +url = https://89.46.20.42/remote.php/dav/files/_script/ +vendor = nextcloud +user = _script +pass = <%= @statistics_secret %>