How do I…?¶
This page will host tutorials and guides from the lab users and managers on specific lab activities.
If you have how-do-i questions:
For general topics, use the “helpline” topic in the
#generalstream of the Chat
For contextual discussions, reach out to
@LabManagersin your Chat conversations
Over time, this page should be populated with the frequently asked questions.
I have received my lab login credentials. What should I do now?
The lab uses a set of inter-linked Services to provide shared working spaces. A good first step is to complete the first login to Chat, to Project Portal and the Science Desktop. This will ensure that your accounts are created, security setup works and your account will be available for other lab users to interact with. If the instructions available at the linked pages does not work, then please open a support ticket providing details of the problem.
How do I invite a new user to the lab?
How do I create new labspace?
How do I get help at the DataLab?
How do I transfer files to and from a labspace?¶
First, clarify with your labspace head if this would be allowed for your project.
We recommend the use of the rsync tool to synchronize the contents of a folder on your machine to the labspace folder. rsync is a well-estbalished and open-source tool to perform differential file transfer, i.e. it can be used to only update contents that are newer or different.
The general syntax for rsync transfers over an ssh connection is
rsync [OPTIONS] SRC USER@HOST:DEST
A good command for synchronizing the contents from your local folder at
path/to/source_folder to the
labspaces/my-labspace-name/data/inbox folder on the datalab is
rsync -vhurt --chmod=ug=rwX path/to/source_folder firstname.lastname@example.org:labspaces/my-labspace-name/data/inbox/
--chmod=ug=rwX is required to ensure that read-write permissions are shared for both the
u ser (you) and the
g roup (labspace). The
-r option specifies that the folder contents are recursively copied, that is the sub-folders are traversed and copied over at the corresponding location. The
-u option performs an update, meaning only files that are different in the source and destination are transferred. The
-t option keeps the timestamps of file modification,
-v shows a verbose listing of the transfers,
-h option shows the file size numbers in human-readable format. It is also possible to add
--progress to show real-time progress information.
Note that rsync allows you to control whether the source folder or only its contents are created on the destination. In the command above, the sourch path
source_folder did not have a trailing slash (/) while the destination
data/inbox/ had a trailing slash. This means that
source_folder will be created under
inbox. Including a trailing slash as
source_folder/ would result in the contents of
source_folder being copied under
source_folder itself would not be created. If you have spaces in the path, then check the
--protect-args option to provide the paths with spaces.
Running the above command (with paths set correctly) should result in prompts for your password and OTP. Entering these should commence the transfer if the paths are correct. Note that a graphical interface for rsync is available as grsync, but please check that options are correctly specified. The
--chmod=ug=rwX option should be entered under Advanced Options > Additional Options.
How to connect the chat with gitlab?¶
The Chat is where most of the labspace conversations occur. It is therefore the most convenient place to surface the activities on the git repos of your labspace. The lab has a zulip bot that can listen to activity on a gitlab repo and relay it to a topic in your labspace stream.
To enable the gitlab-to-chat integration for your labspace:
go to the repository in Projects you want to enable the bot
go to Settings > Webhooks
click Add new webhook
enter the chat url (described below) in the URL field
in the Trigger section select the activities you want to be notified on the chat for - recommended events are Push, Issues events, Comments and Merge request
click Add webhook
now enjoy a live stream view of your project activities from the Chat.
The chat url for your project will be of the form:
You will need to replace the STREAMNAME with the url-encoded name of your labspace stream. This can be found by going to the Chat_ in browser and navigating to the labspace stream.
So, for example,if the name of your labspace is “My Labspace”, you would need to set stream=My%20Labspace and not stream=89-My-Labspace as shown in the url. The values of stream= and topic= need to be URL encoded (spaces become %20, etc). To convert a text string to URL encoding, the site https://www.urlencoder.org/ can be used.