Skip to content
Snippets Groups Projects
dev-getting-started.md 3.8 KiB
Newer Older
# Development Getting Started Environment

[TOC]

## Standard Applications for Installation and Setup

* Choose your own Integrated Development Environment (IDE)  
  _**NOTE**:All projects within the center are IDE agnostic._
* Install package manager for system (ex. macos: Homebrew  windows: Chocolatey)
* Install Git  
  _**NOTE**: On windows git installation, check the checkbox for also installing OpenSSH.  This will be required
  later for setting up SSH keys to push work into GitLab._

## Create Source Control Account with UAB Remote Compute's Gitlab

1. Visit <https://gitlab.rc.uab.edu>
2. Login via the LDAP dialog using your BlazerID crendetials  
  Your GitLab account will be created upon logging in for the first time
3. Let someone know in the team that your GitLab account has been created, they will invite you to be a member
of the "Center for computational genomics and data-science" group to have access to the center's projects.

## Setup SSH Keys to interact with GitLab on work machine

An SSH key is an access credential in the SSH protocol. Its function is similar to that of user names and passwords,
but the keys are primarily used for automated processes.  UAB uses SSH keys to interact with GitLab from your work
machine.  This is **required** to be able to commit and push code to GitLab.  

Follow the instructions GitLab provides to setup SSH keys on your local machine to communicate with your GitLab
account <https://docs.gitlab.com/ee/ssh/README.html#gitlab-and-ssh-keys>

Use the command below once the SSH keys are setup to verify that the public SSH Key added to your UAB Research
Compute GitLab account works.  
> `ssh -T git@gitlab.rc.uab.edu`

### Important tips when creating SSH Keys

Try to read all of the tips beore getting started with the recommended instructions above

* When generating a SSH key there is an option that allows the user to set a comment, `-C comment`.  Use your
email address that is associated with your GitLab account to know that this key has been generated for that
purpose. An example of the command can look like this `ssh-keygen -t ed25519 -C "blazerid@uab.edu-GitLab"`
* Windows machines to do not have OpenSSH installed by default, however Git provides an additional option to
install OpenSSH when installing Git itself. It is recommended to install then.
* If you have an SSH Key already generated using the default filename and filepath, do not overwite it and use
a new filename to indentify it as a key being used for GitLab. Example filename can be `gitlab_uab_rsa`.
If using a different filename then the default, use the information in the tip below
* Two files will be generated on your local machine when a SSH key is created; One public key and one private
key.  *If* you do not use the default filename in the default file path, you will have to manually add the SSH
Key to your local system.  Use the following instructions to do so.
<https://docs.gitlab.com/ee/ssh/README.html#working-with-non-default-ssh-key-pair-paths>  

## Cloning your first project

1. Visit the following project within GitLab
<https://gitlab.rc.uab.edu/center-for-computational-genomics-and-data-science/manual-of-operations>
2. In the top right of the project page, there is a 'clone' button.  Click it and copy the `Clone with SSH` text
3. Open your terminal and change to a director that you want to copy the project into.
    3.a If this is the first project, use `git init` in the director to set it up for use with git

## Developing Python Applications

* Install the latest version of Python with your systems preferred package manager
  * On macos:  `brew install Python3`  
* Install the latest version of pip with your systems preferred package manager  
  * On macos:  `brew install pip3`  
* Install the latest version of pipenv with your systems preferred package manager
  * On macos:  `brew install pipenv`