Changes between Version 13 and Version 14 of cypress/FileTransfer


Ignore:
Timestamp:
Jun 29, 2020 9:47:56 PM (2 years ago)
Author:
cbaribault
Comment:

Added subtopic for generating rclone.conf file in the user's Cypress session.

Legend:

Unmodified
Added
Removed
Modified
  • cypress/FileTransfer

    v13 v14  
    2525In order to use rclone on Cypress, you must first create the config file ''~/.config/rclone/rclone.conf'' on your Cypress account, which you can do most easily by first creating a reusable copy of it on your local machine and then copying the resulting local file to your Cypress account via the following.
    2626
    27 ==== Configuring rclone on Cypress ====
     27==== 1st of 2 Options: Generating Your rclone.conf File In Your Cypress Session ====
     281. Login to Cypress from your local machine with X11 forwarding. (See [[cypress/SshUsage#TunnelingXWindowsSessionviaSSH|X11 Forwarding]].)
     292. In your Cypress session enter the following commands.
     30{{{
     31module load rclone
     32rclone config
     33}}}
     343. At the prompt '''...No remotes found - make a new one...''', enter {{{n}}} for '''New remote'''.
     354. At the prompt '''name>''', choose a meaningful name, e.g, {{{TU-Box}}}, to be used for future connection to your Tulane Box account from your Cypress command line session.
     365. At the prompt '''Type of storage to configure...''', enter {{{6}}} for '''Box'''.
     376. At the prompt '''...Box App Client Id...''', respond by pressing {{{Enter}}} for the default.
     387. At the prompt '''...Box App Client Secret...''', respond by pressing {{{Enter}}} for the default.
     398. At the prompt '''Edit advanced config? (y/n)nnn''', enter {{{n}}} for '''No'''.
     409. At the prompt '''Remote config - Use auto config?...''', enter {{{y}}} for '''Yes'''.
     4110. Observe the message ending in '''Waiting for code ...''', and wait for a separate browser window to open on your local machine with a Box web page. Depending on your network latency, you may experience a delay of 1 minute or more.
     42   In the Box web page, click on the link '''Use Single Sign On (SSO)'''.
     4311. In the next Box web page, enter your full Tulane email address and click on '''Authorize'''.
     4412. This will take you to the Tulane login web page, wherein you can complete your Tulane login information and click on '''Sign in'''.
     4513. This final web page should show the message '''Success! - All done. Please go back to rclone''', at which point you can close the browser window and return to your Cypress session command line window.
     4614. Back in the command line window, observe the new message '''Got code''' followed by your new token information ending with a prompt to which you can respond {{{y}}} for '''Yes this is OK'''.
     4715. The resulting response shows the list '''Current remotes:''', including your new Box remote, e.g., '''TU-Box''' followed by a prompt to which you can respond {{{q}}} for '''Quit config'''.
     4816. Observe the newly created config file '''~/.config/rclone/rclone.conf'''
     49{{{
     50[cbaribault@cypress1 ~]$ ls -l ~/.config/rclone/
     51total 8
     52-rw------- 1 cbaribault hpcstaff 233 Jun 29 20:00 rclone.conf
     53[cbaribault@cypress1 ~]$
     54}}}
     55   at which point you're ready to run rclone on Cypress. (See '''Running rclone on Cypress''' below.)
     56
     57
     58==== 2nd of 2 Options: Generating Your rclone.conf File Using Your Local Machine ====
    28591. Download, install, and configure rclone on your local machine by following the instructions for Windows, Mac, or Linux as appropriate starting from the [https://rclone.org/install/ rclone installation site.]
    29   a. During the above configuration, you will be prompted for a ''name'' for the Box remote system, e.g. ''!BoxRemote''.
     60  a. During the above configuration, you will be prompted for a name for the Box remote system, e.g. '''TU-Box'''.
    3061  b. Make note of your response for the name of the Box remote system for future reference to be used in your invocations of the rclone command.
    31 2. Once you've configured rclone on your local machine, locate the resulting file rclone.conf on your local machine.
    32   a. On Mac and Linux, e.g., look for the file ~/.config/rclone/rclone.conf
    33   b. On Windows 8 (or under) , e.g., look for the file %userprofile%\.config\rclone\rclone.conf
    34 3. Create as needed the directory ~/.config/rclone on your Cypress account.
    35 4. Copy the resulting local file rclone.conf to your Cypress directory ~/.config/rclone. See [[cypress/FileTransfer|File Transfer]].
    36 5. For security purposes, be sure to confirm that only you have ''exclusive'' read/write privileges to the resulting file ~/.config/rclone/rclone.conf on Cypress. See the ''ls'' and ''chmod'' commands under [[cypress/BasicLinuxComands|Linux Commands]]
     622. Once you've configured rclone on your local machine, locate the resulting file '''rclone.conf''' on your local machine.
     63  a. On Mac and Linux, e.g., look for the file '''~/.config/rclone/rclone.conf'''
     64  b. On Windows 8 (or under) , e.g., look for the file '''%userprofile%\.config\rclone\rclone.conf'''
     653. Create as needed the directory '''~/.config/rclone''' on your Cypress account.
     664. Copy the resulting file '''rclone.conf''' from your local machine to your Cypress directory '''~/.config/rclone'''. See [[cypress/FileTransfer|File Transfer]].
     675. For security purposes, be sure to confirm that only you have ''exclusive'' read/write privileges to the resulting file '''~/.config/rclone/rclone.conf''' on Cypress. See the ''ls'' and ''chmod'' commands under [[cypress/BasicLinuxComands|Linux Commands]]
    3768
    38 Once you have created the config file ''~/.config/rclone/rclone.conf'' on Cypress, you can run rclone via the following.
     69Once you have created the config file '''~/.config/rclone/rclone.conf''' on Cypress, you can run rclone via the following.
    3970
    4071==== Running rclone on Cypress ====
    41 1. The following command will list the contents of a top-level folder in your Box account with configured Box remote name !BoxRemote.
     721. To list the entire contents in your Box account with configured Box remote name '''TU-Box'''...
    4273{{{
    43 rclone ls BoxRemote:<top-level-folder>
     74rclone ls TU-Box:
    4475}}}
    45 2. The following command will copy the contents of a top-level folder in your Box account with configured Box remote name !BoxRemote to your current Cypress working directory.
     762. To list the contents of a top-level folder in your Box account with configured Box remote name '''TU-Box'''...
    4677{{{
    47 rclone copy BoxRemote:<top-level-folder> .
     78rclone ls TU-Box:<top-level-folder>
    4879}}}
    49 3. The following command will copy the file test.txt in your current Cypress working directory to a top-level folder in your Box account with configured Box remote name !BoxRemote.
     803. To copy the contents of a top-level folder in your Box account with configured Box remote name '''TU-Box''' to your current Cypress working directory...
    5081{{{
    51 rclone copy test.txt BoxRemote:<top-level-folder>
     82rclone copy TU-Box:<top-level-folder> .
    5283}}}
    53 4. The following command will simply list the available subcommands under rclone.
     844. To copy the file test.txt in your current Cypress working directory to a top-level folder in your Box account with configured Box remote name '''TU-Box'''.
     85{{{
     86rclone copy test.txt TU-Box:<top-level-folder>
     87}}}
     885. To simply list the available subcommands under rclone.
    5489{{{
    5590rclone --help