Difference between revisions of "Servers"

From DeBlasio Lab Wiki
Line 2: Line 2:
  
 
As a reminder: passwords are inherently insecure. Whenever possible SSH keys should be used to interact with both our machines and any remote machines you access through our servers (this includes GitHub, NCBI, etc.).  
 
As a reminder: passwords are inherently insecure. Whenever possible SSH keys should be used to interact with both our machines and any remote machines you access through our servers (this includes GitHub, NCBI, etc.).  
 +
 +
== Current DeBlasio Lab Cluster Hardware ==
  
 
== Access ==
 
== Access ==

Revision as of 09:14, 31 May 2022

The DeBlasio Lab server(s) is/are set up to be used for research conducted in the group. The following policies should be used to interact with our machine(s).

As a reminder: passwords are inherently insecure. Whenever possible SSH keys should be used to interact with both our machines and any remote machines you access through our servers (this includes GitHub, NCBI, etc.).

Current DeBlasio Lab Cluster Hardware

Access

Each member of the group will have an account created for them on the machines. You should change your password upon first login. Access to the machines is only available via SSH.

To change your password type passwd <username>.

xscreenie

xscreenie is a tool that maintains persistent terminal sessions between connections. Upon first log in you will see the menu with no current sessions, use option a to create your first session, you will also need to choose a session name. Using CTRL + D will close the session and remove it from the session list, CTRL + A followed by D will keep the session running and exit to the menu. note that if the server is restarted all sessions will be lost.

SSH keys

SSH keys are the recommended method for logging into the machines. To add your SSH public key to the server on your local machine run ssh-keygen and follow the prompts, then run cat ~/.ssh/id_rsa.pub | ssh <username>@<server> "cat >> ~/.ssh/authorized_keys". From then on when you type ssh <user>@<server>, you will no longer be prompted for your password.

SSH Aliases

SSH aliases allow you to use shorthand to ssh to servers. For example, lets say I want to SSH to local.dandeblasio.com as notmynormalusername on port 50. Normally I would have to use the command ssh notmynormalusername@local.dandeblasio.com -p 50. Insead you can edit the file ~/.ssh/config (assuming you're on mac or linux, not sure of the location on windows) and add the following:

host ldd50  
  HostName local.dandeblasio.com
  User notmynormalusername
  Port 50

Then when you run ssh ldd50 is the same as typing the command above. Indenting and capitalization are important here.

Storage

Your home directory is for small storage (login scripts, configuration files, etc.) and not for research code or data. All users share 256G of home directory space. All other data should go on the set of hard disk drives (in /mnt/, see below for setting up these directories).

Code

All code should be committed to the group GitHub account as often as possible. While in development, this repository may be kept private, but the code will be made public when relevant papers are submitted for publication.

There is a github group for the lab (https://github.com/deblasiolab), you should add yourself to the group so you can create and manage repos within this group using your github account. I would also recommend adding your server SSH key (use the instructions above to make a new SSH key on the server) to your github account for login-free pushing of commits to github. If you need help with this step ask Dan to help you.

Data

Data should *never* be put into git repos, they can be in the same directory but should not be under version control.

Mounded Disks/mkdatadir

Within the mounted drives, you must create a directory with your username to keep your code and data. The drives themselves are not writeable other than your own directories, to create a new storage directory you will use mkdatadir. For example, if you want to create a directory to use in /mnt/disk005 you would run mkdatadir 5. This will create a new directory /mnt/disk005/<username>/.

For convenience you can create a directory of symlinks in your home directory using the command similar to ln -s /mnt/disk001/dfdeblasio /home/dfdeblasio/mymnt/disk001 replacing disk001 and dfdeblasio as appropriate. There is a small script that can be copied and modified in ~dfdeblasio/mymnt/makeln.pl to automatically create these links.