How to access the EO-Data repository in Windows on EO-Lab?

The CODE-DE, EO-Lab and EO-Data repositories, among others, are automatically mounted on Windows VMs. If, for some reason, this doesn’t happen or stops working, there is the possibility of manually mounting them.

This process, however, is not as easy as it is on Linux and requires freeware called “rclone”. In this tutorial we will set up rclone and mount the repositories manually.

Installing rclone

  1. We will need an access key and secret key for setting this up. These can be obtained on your profile page.

  1. On your windows-VM run PowerShell as administrator

  2. Enter the following commands to install and configure rclone:

mkdir c:\rclone; cd c:\rclone [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 Invoke-WebRequest -Uri "https://downloads.rclone.org/v1.53.0/rclone-v1.53.0-windows-amd64.zip" -OutFile "c:\rclone\rclone.zip" Expand-Archive -path 'c:\rclone\rclone.zip' -destinationpath '.\' cp c:\rclone\rclone-v1.53.0-windows-amd64\* c:\rclone\ rm -r c:\rclone\rclone-v1.53.0-windows-amd64; rm -r c:\rclone\rclone.zip .\rclone.exe config
  1. Below is listed what should be used for each step of the configuration. For ‘blank lines’ the default selection is used and confirmed with ‘Enter’:

n/s/q> n (New remote)
name> EOLAB (freely choosable)
Storage> 4 (Amazon S3 Compliant Storage Provider)
provider> 3 (Ceph Object Storage)
env_auth> 1 (false)
access_key_id> [YOUR-ACCESS-KEY]
secret_access_key> [YOUR-SECRET-KEY]
region>
endpoint> http://data.fra1-1.cloudferro.com
location_constraint>
acl>
server_side_encryption>
sse_kms_key_id>
y/n> n (Do not edit advanced configuration)
y/e/d> y (Yes, if configuration is okay)
e/n/d/r/c/s/q> q (Quit configuration)

Your config should look like this:

--------------------
[EOLAB]
type = s3
provider = Ceph
access_key_id = xxxxxxxxxxxxxxxxxxxxxxxx
secret_access_key = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
region = other-v2-signature
endpoint = http://data.fra1-1.cloudferro.com
--------------------
  1. Next, we will install two more required tools, chocolatey (package manager) and nssm (service manager):

Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) choco install winfsp -y Invoke-WebRequest -Uri "https://nssm.cc/release/nssm-2.24.zip" -OutFile "c:\rclone\nssm.zip" Expand-Archive -path 'c:\rclone\nssm.zip' -destinationpath '.\' cp .\nssm-2.24\win64\nssm.exe .\ rm nssm.zip rm -r .\nssm-2.24\
  1. Using the following command, we will test the connection:

.\rclone.exe lsd EOLAB:/EOLAB

You should see a result like this:

0 2020-09-12 17:33:00 -1 CLMS
0 2020-09-12 17:33:00 -1 Sentinel-1
0 2020-09-12 17:33:00 -1 Sentinel-2
0 2020-09-12 17:33:00 -1 Sentinel-3
0 2020-09-12 17:33:00 -1 Sentinel-5P
0 2020-09-12 17:33:00 -1 auxdata

Now, we will map EO-Lab as a network drive for more convenience:

.\rclone.exe mount EOLAB:EOLAB/ Z:

Please note, that you can use any drive letter you want. To do so, just replace Z: in the above example with another letter.

Should you want or need to mount the CODE-DE repository as well, please repeat steps 1 through 5 and use the following for step 6:

.\rclone.exe lsd CODEDE:/CODEDE
.\rclone.exe mount CODEDE:/CODEDE/ Z:

Installation of rclone as a service

Lastly, we will set up automatic mounting of the repositories after a reboot or similar.

  1. If rclone is still running, press Ctrl + C to close it

  2. Use the below commands to install and run rclone as a service

  3. For this step, please use an account with local administrative privileges (Administrator in this example)

cd C:\rclone .\nssm.exe install EOLAB C:\rclone\rclone.exe mount EOLAB:CODEDE/ Z: .\nssm.exe set EOLAB ObjectName .\Administrator 'password' .\nssm.exe start EOLAB
  1. From now on, the EO-Lab network drive will be mapped automatically, even after restarting the system.