Skip to content

Cellenics: Development Setup

ivababukova edited this page May 30, 2022 · 1 revision

This page lists all essential information to help you easily set up and get started with writing code. If, at any point you have questions, contact someone from the Biomage core team and we will help!

Installing dependencies

In order to get a working development environment run this script. It will set up and install some of the dependencies and clone all repositories in the biomage-ltd space.

Python and Node

You will be using Python and Node to develop applications. To do this, you will need to have them installed on your computer.

For macOS users, the easiest way to do this is to use Homebrew as your package manager. Get it from https://brew.sh/. For Linux users, you can use your package manager to install Python and Node. Make sure you have the versions specified in https://github.com/biomage-ltd/developer-docs/wiki/Contributors-Guide#development-environment.

Docker

A substantial portion of the development happens inside containers. To get started, you will need to download and install Docker. Instructions can be found at https://docs.docker.com/get-docker/.

After installation, if you are running on macOS or Windows, you will need to increase the memory limit of the virtual machine that Docker runs in. This can be found under Docker Desktop’s settings/preferences menu. Here is a screenshot of the resources setup that we use and works: https://github.com/biomage-ltd/developer-docs/blob/master/recommended_docker_setup.png

If your computer does not have enough memory to do this (min. 16 GB recommended), or you run Linux and your computer does not have enough system memory, ask at #engineering on Slack and we will set you up with a remote server for development if absolutely necessary.

Once installed, you should be able to open a new terminal and type docker. You should be able to see that you have Docker installed.

You will also need to install the latest version of Docker Compose. You can do this by typing:

$ pip3 uninstall docker-compose
$ pip3 install -U docker-compose

Visual Studio Code

Our projects are mainly developed using Visual Studio Code. To get started, you will have to get it installed from https://code.visualstudio.com/download. Once installed, the following extensions from the Visual Studio Marketplace need to be installed as well:

  • Debugger for Chrome (msjsdiag.debugger-for-chrome)
  • Docker (ms-azuretools.vscode-docker)
  • ESLint (dbaeumer.vscode-eslint)
  • Live Share (ms-vsliveshare.vsliveshare)
  • Python (ms-python.python)
  • Remote - Containers (ms-vscode-remote.remote-containers)
  • Remote - SSH (ms-vscode-remote.remote-ssh)
  • YAML (redhat.vscode-yaml)
  • Code Coverage - https://marketplace.visualstudio.com/items?itemName=markis.code-coverage

GitHub

You will need a GitHub account to start coding. Sign up for one if you don’t have one already.

You must also enable two-factor authentication. This can be done under https://github.com/settings/security. You will need this in order to be added to the biomage-ltd organization.

Once you have a Github account tell us your username, so that we can add you to biomage-ltd organisation.

Accessing AWS

You should have been given credentials to access the Biomage AWS account. If not, contact us and we will get this sorted.

You will be given two sets of credentials:

  • Console access: to access the AWS console, you have to visit https://signin.aws.amazon.com/console. Enter the username and password that you were given. You will be asked to change your password the first time you log in.
  • Programmatic access: the Access Key and Secret Access Key which you got is used to access AWS using APIs.

To make sure programmatic access works properly, you have to download and install the AWS CLI version 2. To read more about how to do this, visit https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2.html.

Once done, you can configure your access credentials by following the instructions at https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-quickstart.html. After you are done, you should have a file saved under ~/.aws/credentials with your keys.

Cellenics development setup

Tools

To ease development, you should install the following tools:

  • Lens: this is a tool for accessing the Kubernetes cluster. You can get it from https://k8slens.dev/.
  • Stoplight Studio: this is what we use for designing and editing our OpenAPI specs for the API. You can get it from https://stoplight.io/studio/.

Running InfraMock

To get the rest of the platform set up locally, follow the development and setup instructions in the README of each of these repositories following the order below:

When all of the above is running, you should be able to use the platform as if it was deployed in the cloud.

During development, you will be using VS Code and the workspace specified. Make sure you have the workspace, and not the folder open. The workspace contains important default settings that ensure consistency across development environments.