Note: The default ITS GitLab runner is a shared resource and is subject to slowdowns during heavy usage.
You can run your own GitLab runner that is dedicated just to your group if you need to avoid processing delays.

README.md 1.03 KB
Newer Older
Erik Schwartz's avatar
Erik Schwartz committed
1
2
# recfu-mover

Erik Schwartz's avatar
Erik Schwartz committed
3
4
5
6
Download files from IQ SFTP server to local filesystem.

* Used for BO report delivery to Rec Fusion customers.
* BO -> SFTP [project documentation](https://iqops.dsc.umich.edu/wiki/index.php/Transfer_files_from_BO_to_IQ_SFTP_server).
Erik Schwartz's avatar
Reorg    
Erik Schwartz committed
7
* Tested with [Node.js v14 LTS](https://nodejs.org/en/).
Erik Schwartz's avatar
Erik Schwartz committed
8

Erik Schwartz's avatar
Reorg    
Erik Schwartz committed
9
## Install
Erik Schwartz's avatar
Erik Schwartz committed
10

Erik Schwartz's avatar
Erik Schwartz committed
11
First, install the [Node.js runtime](https://nodejs.org/en/download/).
12
13
14

Next, clone this repository, enter its top-level directory, and install the required NPM modules:

Erik Schwartz's avatar
Erik Schwartz committed
15
16
```bash
cd recfu-mover
Erik Schwartz's avatar
Reorg    
Erik Schwartz committed
17
npm install --production && npm audit fix
Erik Schwartz's avatar
Erik Schwartz committed
18
19
```

20
Next, copy the example configuration:
Erik Schwartz's avatar
Erik Schwartz committed
21
22
23
24
25
26
27
28

```bash
cp ./site-config/client.json.EXAMPLE ./site-config/client.json
```

.. and set `client.json` values as needed.


Erik Schwartz's avatar
Erik Schwartz committed
29
30
## Run

31
32
From this application's top-level directory, run the app using:

Erik Schwartz's avatar
Erik Schwartz committed
33
```bash
Erik Schwartz's avatar
Erik Schwartz committed
34
npm run download
Erik Schwartz's avatar
Erik Schwartz committed
35
```
36
37
38
39

For scheduled runs of this application (through cron or Windows' Scheduled Tasks) it may be useful to redirect program output to a log file for later review, e.g.:

```bash
Erik Schwartz's avatar
Erik Schwartz committed
40
npm run download >> /path/to/recfu-mover.log 2>&1
41
```