|
|
# Installation
|
|
|
|
|
|
## Getting started
|
|
|
|
|
|
A step by step series of commands that tell you how to setup and use properly the Transfer Tool.
|
|
|
|
|
|
Start by downloading the last version of Transfer Tool on your local machine:
|
|
|
|
|
|
[Download](https://gitlab.sib.swiss/SPSP/transfer-tool/-/releases)
|
|
|
|
|
|
Extract the downloaded archive where you want and access it with your terminal:
|
|
|
|
|
|
```bash
|
|
|
cd ~/path/to/transfer-tool
|
|
|
ls -la
|
|
|
```
|
|
|
|
|
|
Your terminal should output 4 folders (logs,sent,viruses,bacteria), 2 files (README.md, spsp), 1 hidden folder (.outbox) and 1 hidden file (.pub). Here is a short description of each folder and file:
|
|
|
|
|
|
- **viruses** - main repository where you should copy your folder which contains your **viruses** fastq files and metadata file that you want to send
|
|
|
- **bacteria** - main repository where you should copy your folder which contains your **bacteria** fastq files and metadata file that you want to send
|
|
|
- **sent** - contains encrypted files with their SHA256 hash that have been properly sent
|
|
|
- **logs** - contains all the log files when you use the auto mode (log files record only errors)
|
|
|
- ***.outbox*** - contains files to be sent to the SPSP server through sftp
|
|
|
- README.md - user guide
|
|
|
- spsp - script containing all the commands to run, type `./spsp help` to display the commands
|
|
|
- *.pub* - public key of SPSP for encryption
|
|
|
|
|
|
Let's start by setting up the Transfer Tool. To do so, type:
|
|
|
|
|
|
```bash
|
|
|
./spsp init
|
|
|
```
|
|
|
|
|
|
This will make sure that the needed commands are available, that the script is executable, that your .env file is properly set and it will also import the public key to your own list of keys. Refer to the terminal output in case of any error.
|
|
|
|
|
|
## Configure the .env file
|
|
|
|
|
|
/!\ **THIS STEP IS EXTREMELY IMPORTANT, WITHOUT THE CORRECT SETUP, THE TRANSFER WILL FAIL** /!\
|
|
|
|
|
|
|
|
|
You need to have a properly configured .env file to connect to the SFTP server of SPSP. Normally, in the previous step, you should have been prompted to fill some informations while using the command `./spsp init`. But **if it is not the case**, you can manually create the needed file. Create an .env file by using the following commands:
|
|
|
|
|
|
```bash
|
|
|
echo 'ID=LAB_ID' > .env #REPLACE LAB_ID BY YOUR OWN ID PROVIDED BY THE SPSP BOARD
|
|
|
echo 'HOST=spsp-sftp.vital-it.ch' >> .env #DO NOT CHANGE THIS LINE
|
|
|
echo 'SFTP_URL=${ID}@${HOST}:/data' >> .env #DO NOT CHANGE THIS LINE
|
|
|
```
|
|
|
|
|
|
## Verify the public key
|
|
|
|
|
|
At one point, the terminal should output the fingerprint (in green) of the imported key. Please make sure that the fingerprint corresponds to:
|
|
|
|
|
|
**ABC9 FC14 AAC9 52E7 767F D14A 48B7 0E72 4BAF E0A3**
|
|
|
|
|
|
If it doesn't, please [contact us](mailto:spsp-support@sib.swiss?subject=[SPSP-SFTP]Wrong%20Public%20Key) and send us the public key (.pub file in the directory).
|
|
|
|
|
|
## Conclusion
|
|
|
|
|
|
If everything went well, congratulations, you are ready to use the Transfer Tool. If not, please check the terminal output or contact the [support](mailto:spsp-support@sib.swiss?subject=[SPSP-SFTP]Support).
|
|
|
|
|
|
[Use the Transfer Tool →](Use the Transfer Tool) |
|
|
\ No newline at end of file |