How to get credentials used for accessing EODATA on a cloud VM on ESA HPC

Default operating system images available on ESA HPC have automatic access to EODATA in two ways:

  • they contain folder /eodata with access to collections of EODATA or

  • by providing credentials with which you can use s3cmd and boto3 to access EODATA programmatically.

On ESA HPC, the credentials are created right after the VM is created and in this article you will find the exact location from which to access them.

Prerequisites

No. 1 Account

You need a ESA HPC hosting account with access to the Horizon interface: https://horizon.eohpc.net/auth/login/?next=/.

No. 2 Virtual machine

You need a virtual machine running on ESA HPC cloud on which you want to access the EODATA repository.

The following articles can help in creating a virtual machine:

To control your virtual machine, use

EODATA credentials on ESA HPC

On ESA HPC every project has its own pair of credentials. There are two methods for obtaining the key pair, depending on when you created your virtual machine:

  • Using curl (for machines created before December 12th 2024)

  • Checking the contents of the appropriate file (for machines created after December 12th 2024)

Virtual machines created before December 12th 2024 - executing curl

Important

IP address 169.254.169.254 is fixed and should not be changed in the examples below.

To get the required key pair, you can use curl in the following way:

curl http://169.254.169.254/openstack/latest/vendor_data2.json

The output should look like this:

{"nova": {"vmconfig": {"mountpoints": [{"s3_access_key": "1234", "s3_secret_key": "4321", "s3_url": "eodata.cloudferro.com", "s3_bucket": "eodata", "repomount": "/eodata"}], "nvidia_license_key": "", "brand": "eo-hpc"}}}

In your output, instead of 1234 and 4321, you will get the access and secret key associated with your project.

Virtual machines created after December 12th 2024 - checking the contents of the appropriate file

On unmodified Ubuntu and CentOS virtual machines created using images found by default in your project on ESA HPC cloud, the credentials should have been downloaded automatically, during the first boot. From that moment and onwards, they should always be available from the following file:

/etc/passwd-s3fs-eodata

Viewing its contents requires sudo privileges:

sudo cat /etc/passwd-s3fs-eodata

You should get a pair of access and secret keys separated by the colon. For instance, if 1234 is your access key and 4321 is your secret key, the output will look like this:

1234:4321

What To Do Next

You can use these credentials whenever there is a need to access EODATA, regardless of the method of accessing: