Skip to content

MaximDub/lake

 
 

Repository files navigation

Dev Lake

badge

Requirements

  • Node.js
  • Docker

Installation

  1. Clone this repository

  2. From the newly cloned repo directory, run docker-compose up --build

    NOTE: If you get an error like this:

    "Error response from daemon: invalid mount config for type "bind": bind source path does not exist: /tmp/rabbitmq/etc/"

    You can fix it by adding the directory in the terminal:

    mkdir /tmp/rabbitmq/etc
  1. Run docker-compose ps to see containers runnning.
  2. Install dependencies with npm i
  3. Run migration with npx sequelize-cli db:migrate

Configuration

  1. Make a copy of config/local.sample.js under the name of config/local.js
  2. We can use default values for most fields except the Jira section. For how to set up basic authorization with Jira, please see this section below

Connection Information

Postgres Connection

  • DB Name: lake
  • Hostname: localhost
  • Port: 5432
  • Username: postgres
  • Password: postgres

MongoDB Connection

  • DB Name: test
  • Hostname: localhost
  • Port: 27017
  • Username: (none required)
  • Password: (none required)

RabbitMQ Connection

  • Vhost Name: rabbitmq
  • Hostname: localhost
  • Port: 5672
  • Username: guest
  • Password: guest

Grafana Connection

Connect to the Grafana database: Inside docker-compose.yml edit the environment variables as needed to connect to your local postgres instance, specifically:

  • GF_DATABASE_NAME
  • GF_DATABASE_USER
  • GF_DATABASE_PASSWORD

Connect the Grafana data source: Additionally to use the postgres database as data source inside grafana, ensure postgres config options are correct in ./grafana/datasources/datasource.yml, specifically:

  • database
  • user
  • secureJsonData/password

Services

Jira

Jira auth setup

  1. Create an API key on Jira
  2. Create a basic auth header from your API key - Jira Docs
  3. Copy your basic auth header into the jira.basicAuth field in /config/local.js file
  4. Add your jira hostname to the jira.host field in the /config/local.js file

Usage

Create a Collection Job

  1. From the terminal, execute npm run all
  2. From Postman (or similar), send a request like...
POST http://localhost:3001/

{
    "jira": {
        "projectId": "10003",
        "accountUri": "merico.atlassian.net"
    }
}
  1. See that the collection job was published, jira collection ran, the enrichment job was published, and jira enrichment ran

To run only the enrichment job on existing collections: POST http://localhost:3000/

Using the Grafana Dashboard

  • Visit: http://localhost:3002
  • Username: admin
  • Password: admin

About

Data lake for dev.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 99.9%
  • Shell 0.1%