Ingest Developer Getting Started
Ingest Architecture
How to update the diagram ?
This diagram is generated using diagrams.net. The .drawio
file is found in AIT Shared drive AIT > HCA Ingest > Documentation > Ingest Service_v2.drawio To embed, go to File > Embed > HTML...
create and copy the html and paste in this .md file.
Follow config when creating the html to embed:
Links
: SelectOpen in New Window
Lightbox
> SelectEdit: Custom
- link to actualdraw.io
file
Table of contents
Access
- create an ebi account
- github
- ebi-ait Github organisation (set up 2-factor auth; install secret on machine)
- Add developer to hca-dev team
- HumanCellAtlas Github organisation (set up 2-factor auth; install secret on machine)
- ebi-ait Github organisation (set up 2-factor auth; install secret on machine)
- Slack
- Slack: HCA
- #dcp-2
- Slack: AIT
- Slack: HCA
- EBI GitLab
- login to EBI AWS
- need to be in Google Group grp-aws-ait-team-power-users. If you are not a member, talk to your supervisor.
- You can click on ‘Management console’ to access console or use ‘Command line or programmatic access’ to access aws CLI. Add to your profile (
~/.aws/config
,~/.aws/credentials
):- aws_access_key_id=
- aws_secret_access_key=
- aws_session_token=
- note: The CLI Keys along with browser login session are short lived and has a timeout of 4hr.
- Please reach to Cloud-consultants for any connection problems.
- Quay.io - for built docker image storage
- Confluence
- Zenhub
- Google Apps (Google Drive Shared HCA folder & Calendar) - use EBI Single sign-on
- Register at Snyk. If Snyk authentication fails during your CI/CD pipeline, follow these steps to diagnose and resolve the issue:
- Authenticate: Run
snyk auth
in your terminal and follow prompts. - Retrieve Token: Check the token stored locally:
cat ~/.config/configstore/snyk.json
- Add Variable: Set
SNYK_TOKEN
variable to Settings > CI/CD in GitLab with your token value. - If you need to integrate Snyk into the Dockerfile, modify your Dockerfile to pass the Snyk token during build.
- Authenticate: Run
- mailing lists:
- Calendar
Licenses
JetBrains Licenses
- IntelliJ IDEA Ultimate - can be used for java/python, node
- Alternatively, the language packs can be used: PyCharm Professional, WebStorm
- follow this EBI procedure:
- Ask for to be included in the “JetBrains All Products Pack”
Other software uses free/community licensing.
Software
Caveat: All practical descriptions for Mac/Linux.
- Homebrew
- git and git-secrets
- Docker Desktop
- Kubernetes tools: follow see ingest-kube-deployment repo
- docker-machine-driver-hyperkit
brew install docker-machine-driver-hyperkit sudo chown root:wheel /usr/local/opt/docker-machine-driver-hyperkit/bin/docker-machine-driver-hyperkit sudo chmod u+s /usr/local/opt/docker-machine-driver-hyperkit/bin/docker-machine-driver-hyperkit
MongoDB
Follow the MongoDB installation guide for your platform.
RabbitMQ
Follow the RabbitMQ installation guide for your platform.
Repositories
Ingest-Core (InteliJ)
see readme
Run Dependencies in Docker
docker-compose up mongo rabbitmq
Run Locally
- Add Plugin for Project Lombok
- usually not necessary, come by default with idea
-
Edit Preferences: Preferences Build, Execution, Deployment Build Tools Gradle - Build and run using: Gradle
- Run tests using: IntelliJ IDEA
- run Spring Boot with profile
local
(see src/main/resources/application-local.properties)
Ingest-Broker (PyCharm)
Run in Docker
docker build -t humancellatlas/ingest-broker .
docker-compose up
Run Locally
Install Python 3.9 or higher
brew install pyenv
pyenv install --list
pyenv install 3.7.4
Will return something like:
Installed Python-3.7.4 to /Users/<username>/.pyenv/versions/3.7.4
Preferences | Project: ingest-broker | Project Interpreter [[/images/image1.png]]
Ingest-UI
- Install NVM
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash
- Add to ~/.bash_profile, Restart Terminal
source ~/.bashrc
- Install Node
nvm install node@12.16.3
- Install Yarn
brew install yarn@1.22.4
- Add to ~/.bashrc, Restart Terminal
export PATH="$PATH:/usr/local/Cellar/yarn/1.22.4/bin"
- Install global dependencies (ingest-ui/client):
npm install -g typescript@"<3.3.0" npm install -g node-sass@4.12.0
- Install Local Packages (ingest-ui/client):
yarn install
- Install Local Packages (ingest-ui):
yarn install
- Set up WebStorm for starting Angular
-
Edit Preferences: Run/Debug configurations Add new configuration (npm) - Create for dev and local environments that run dev and local npm scripts
- optional create for other environments too (listed in package.json scripts)
-
Ingest-Client
Preferences | Project: ingest-client | Project Interpreter [[/images/image2.png]]
DevOps
- Verify you can login to aws using your EBI credentials.
- Setup our Infrastructure-as-Code tools following the readme in ingest-kube-deployment
- If necessary, read up on Docker and containerisation, get familiar with Kubernetes basics, and Helm for application management in Kubernetes.
Some main docs
In Ingestion Service/Dev folder
- Ingest Dev Master Document
- HCA Ingest Service Specification and Overall Design
- DCP System Architecture
- HCA/ingest-client wiki
- DCP-wide Engineering Onboarding (should be one of the first docs a dev reads on joining!)