How to get credentials used for accessing EODATA on a cloud VM on WEkEO Elasticity

Many operating system images available on WEkEO Elasticity come with access to the EODATA repository configured by default, but there are situations in which you will want to configure such access for yourself. You may have, for instance, uploaded a custom operating system image which does not have a configured access to the EODATA repository. Or, you may want to use a method which is not available by default on the operating system image of your choice.

To configure manual access for EODATA repository, you will need to provide the access and secret keys. This article provides methods of obtaining them for

  • default Linux virtual machines

  • virtual machines created using user-provided Linux images

  • default Windows images.

Section What To Do Next at the end of this article lists different methods for accessing the EODATA repository, using those credentials.

What Are We Going To Cover

  • EODATA credentials on CF2 and WAW3-1 clouds

  • EODATA credentials on WAW3-2 and FRA1-2 clouds

Prerequisites

No. 1 Account

You need a WEkEO Elasticity hosting account with access to the Horizon interface: https://horizon.cloudferro.com.

No. 2 Virtual machine

You need a virtual machine running on WEkEO Elasticity cloud on which you want to access the EODATA repository. Make sure that you add the eodata network to it during its creation.

The following articles can help in creating a virtual machine:

If you want to upload a custom Linux image, see one of these articles:

  • /general/How-to-upload-custom-image-to-WEkEO-Elasticity-cloud-using-OpenStack-Horizon-dashboard

On custom Linux VMs, you will need software which can get data from the network. In this article, we will use curl (installing it, however, is out of scope of this text). Other software like wget might also work, but is also out of scope of this text.

Of course, you need to be able to control your virtual machine. You can use SSH as some of the articles above instructed, and you can also use the web console: How to access the VM from OpenStack console on WEkEO Elasticity

EODATA credentials on CF2 and WAW3-1 clouds

You should use CLOUDFERRO as your access key and PUBLIC as your secret key.

EODATA credentials on WAW3-2 and FRA1-2 clouds

On WAW3-2 and FRA1-2 clouds every project has its own pair of credentials. The method of obtaining them will depend on the type of the underlying image. The following methods are covered in this section:

  • Checking the contents of the appropriate file on default Ubuntu and CentOS images

  • Using curl to obtain the key pair (this method should work both on images mentioned above and custom Linux images)

Important

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

WAW3-2 and FRA1-2 clouds using Linux VMs created using default images - checking the contents of the appropriate file

On unmodified Ubuntu and CentOS virtual machines created using images found by default in your project on WEkEO Elasticity 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

If you can’t see your credentials in that file, use method for custom Linux VMs below to obtain them - it should also work on default Linux virtual machines.

WAW3-2 and FRA1-2 clouds using custom and default Linux VMs - executing curl

To obtain the key pair on custom-image base Linux VM and access the eodata repository, the image should have access to the eodata_ network available in your project and the default project network. You will also need appropriate software:

  • For software used to obtain credentials, see Prerequisite No. 2.

  • There are different methods of accessing EODATA. The software used in your chosen method can also be installed later, after obtaining the credentials.

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": "creodias"}}}

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

WAW3-2 and FRA1-2 clouds using Windows VMs

Method 1: Find the key pair in rclone.conf file

If the Windows VM you are working with was

  • created from one of the default Windows images available at Horizon,

  • has access to your default project network and the eodata_ network found in your project and

  • was not modified in any way apart from setting the password for the account Administrator,

it should have obtained the credentials used EODATA repository automatically.

If that is the case, you can find your pair of keys in the following file:

C:\Users\Administrator\.config\rclone\rclone.conf

The contents of this file should be similar to this:

[DIAS]
type = s3
provider = Other
access_key_id = 1234
secret_access_key = 4321
endpoint = eodata.cloudferro.com

Instead of 1234, you will have your access key and instead of 4321, you will have your secret key.

Method 2: Get the key pair using a PowerShell command

If your virtual machine has access to the eodata_ network and your default project network, you can use the following PowerShell command to obtain your credentials:

Invoke-WebRequest -URI http://169.254.169.254/openstack/latest/vendor_data2.json -UseBasicParsing

The section of the output called Content should look similar to this:

{"nova": {"vmconfig": {"mountpoints": [{"s3_access_key": "1234", "s3_secret_key":
"4321", "s3_url": “eodata.cloudferro.com", "s3_bucket": “eodata”, ...

In that section of the output you will get your access key instead of 1234 and your secret key instead of 4321.

What To Do Next

Now that you know how to get your credentials, you can use them to access the EODATA repository using different methods on different platforms. The following articles can help: