Skip to content

BioData-PT/FEGA-user-docs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 

Repository files navigation

Instructions for LEGA users (SDA implementation)

Prerequisites

You must be able to use a shell terminal. The instructions are directioned towards Linux environments, but other environments can do the same using similar tools.

Install sda-cli

  • Download sda-cli, the tool used to upload data into FEGA. There are different releases available here. If you are using a terminal, you can run the following command to download the Linux version:
wget https://github.com/NBISweden/sda-cli/releases/download/v0.3.0/sda-cli_.0.3.0_Linux_x86_64.tar.gz
  • Extract the tool (substitute the filename, if needed):
tar -xzvf sda-cli_.0.3.0_Linux_x86_64.tar.gz
  • When doing submissions, you will need to call the sda-cli file from the terminal (e.g., using ./sda-cli).
  • (Optional) Add sda-cli to system-wide binaries (you need root access!):
sudo cp sda-cli /usr/bin

Getting the server's public key

  • Download the Portuguese LEGA's public key from https://inbox.ega.biodata.pt/c4gh.pub.pem . You can download it using a web browser or using wget https://inbox.ega.biodata.pt/c4gh.pub.pem . The downloaded file should look like this:
-----BEGIN CRYPT4GH PUBLIC KEY-----
B2gV8b0FoVLDz0x156JBpLXdB069w4UTtWYeQf9Yzz4=
-----END CRYPT4GH PUBLIC KEY-----

Configuration file

  • Create a file named s3cmd.conf using the following template and replace the values of access_key and secret_key with your EGA username:
[default]
encoding = UTF-8
guess_mime_type = True
use_https = True
host_base = https://inbox.ega.biodata.pt
host_bucket = https://inbox.ega.biodata.pt
human_readable_sizes = True
multipart_chunk_size_mb = 50
socket_timeout = 30
access_key = <EGA USERNAME>
secret_key = <EGA USERNAME>
access_token = <ACCESS TOKEN>
  • You can leave the access token as is for now, you will get it once you login. The access token is valid for 7 days, so you will need to replace it every now and then.

Uploading a file

Configuring credentials

  • Go to https://login.ega.biodata.pt and login using EGA. If you don't have EGA credentials, visit this URL.
  • Copy the access token (the long text starting with "eyJ") and put it in the s3cmd.conf file. Note: Try using triple-click on the text to select everything.
  • You may also click on "Download credentials to upload to the inbox" to get a ready-made configuration file when logging in, but please delete the lines setting check_ssl_hostname and check_ssl_certificate to False.

Uploading

  • After installing sda-cli, having the server's public key, and configuring a s3cmd.conf file, you are ready to upload a file. Use the following command and check the result:
./sda-cli -config s3cmd.conf upload -encrypt-with-key c4gh.pub.pem <FILE TO UPLOAD>
  • If an error is returned, check if the all the paths you are using are right and that the access token is still valid.
  • To check if the upload was successful, run the following command to see what files are in your inbox:
./sda-cli -config s3cmd.conf list
  • If the file you uploaded appears in the list, the file was successfully uploaded!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published