Unverified Commit 20184593 authored by Tamika Tannis's avatar Tamika Tannis Committed by GitHub

Add developer guide (#25)

* Add developer guide

* Update submodules
parent c1ea341e
Subproject commit b0ff41df2ebf11191cc75c6ab693ddbeb29115c5 Subproject commit 28a8cb0bce7af81f3c12acc399c24ac0f71c773f
Subproject commit ea46e71de6e9e345a4b0207f364d2e9afc110cc6 Subproject commit 17d008d890c24a16b54a991c68ad317a07a5f264
version: '3'
services:
neo4j:
image: neo4j:3.3.0
container_name: neo4j_amundsen
environment:
- NEO4J_AUTH=neo4j/test
ulimits:
nofile:
soft: 40000
hard: 40000
ports:
- 7474:7474
- 7687:7687
volumes:
- ./example/docker/neo4j/conf:/conf
networks:
- amundsennet
elasticsearch:
image: elasticsearch:6.7.0
container_name: es_amundsen
ports:
- 9200:9200
networks:
- amundsennet
amundsensearch:
build:
context: ./amundsensearchlibrary
dockerfile: public.Dockerfile
container_name: amundsensearch
ports:
- 5001:5000
depends_on:
- elasticsearch
networks:
- amundsennet
environment:
- PROXY_ENDPOINT=es_amundsen
amundsenmetadata:
build:
context: ./amundsenmetadatalibrary
dockerfile: public.Dockerfile
container_name: amundsenmetadata
depends_on:
- neo4j
ports:
- 5002:5000
networks:
- amundsennet
environment:
- PROXY_HOST=bolt://neo4j_amundsen
amundsenfrontend:
build:
context: ./amundsenfrontendlibrary
args:
SEARCHSERVICE_BASE: http://amundsensearch:5000
METADATASERVICE_BASE: http://amundsenmetadata:5000
dockerfile: local.Dockerfile
container_name: amundsenfrontend
depends_on:
- amundsenmetadata
- amundsensearch
ports:
- 5000:5000
networks:
- amundsennet
environment:
- SEARCHSERVICE_BASE=http://amundsensearch:5000
- METADATASERVICE_BASE=http://amundsenmetadata:5000
networks:
amundsennet:
# Developer Guide
This repository uses `git submodules` to link the code for all of Amundsen's libraries into a central location. This document offers guidance on how to develop locally with this setup.
This workflow leverages `docker` and `docker-compose` in a very similar manner to our [installation documentation](https://github.com/lyft/amundsen/blob/master/docs/installation.md#bootstrap-a-default-version-of-amundsen-using-docker), to spin up instances of all 3 of Amundsen's services connected with an instances of Neo4j and ElasticSearch which ingest dummy data.
## Cloning the Repository
If cloning the repository for the first time, run the following command to clone the repository and pull the submodules:
```bash
$ git clone --recursive git@github.com:lyft/amundsen.git
```
If you have already cloned the repository but your submodules are empty, from your cloned `amundsen` directory run:
```bash
$ git submodule init
$ git submodule update
```
After cloning the repository you can change directories into any of the upstream folders and work in those directories as you normally would. You will have full access to all of the git features, and working in the upstream directories will function the same as if you were working in a cloned version of that repository.
## Local Development
### Ensure you have the latest code
Beyond running `git pull origin master` in your local `amundsen` directory, the submodules for our libraries also have to be manually updated to point to the latest versions of each libraries' code. When creating a new branch on `amundsen` to begin local work, ensure your local submodules are pointing to the latest code for each library by running:
```bash
$ git submodule update --remote
```
### Building local changes
1. First, be sure that you have first followed the [installation documentation](https://github.com/lyft/amundsen/blob/master/docs/installation.md#bootstrap-a-default-version-of-amundsen-using-docker) and can spin up a default version of Amundsen without any issues. If you have already completed this step, be sure to have stopped and removed those containers by running:
```bash
$ docker-compose -f docker-amundsen.yml down
```
2. Launch the containers needed for local development by running:
```bash
$ docker-compose -f docker-amundsen-local.yml up
```
3. After making local changes rebuild the containers for any submodule that was modified. For example, to build a local change in `amundsen/amundsenmetadatalibrary` run:
```bash
$ docker-compose -f docker-amundsen-local.yml build amundsenmetadata
```
4. Relaunch the services by running:
```bash
$ docker-compose -f docker-amundsen-local.yml stop
$ docker-compose -f docker-amundsen-local.yml up
```
### Troubleshooting
1. If you have made a change in `amundsen/amundsenfrontendlibrary` and do not see your changes, this could be due to your browser's caching behaviors. Either execute a hard refresh (recommended) or clear your browser cache (last resort).
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment