- Node.js
- Docker
-
Clone this repository
-
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
- Run
docker-compose ps
to see containers runnning. - Install dependencies with
npm i
- Run migration with
npx sequelize-cli db:migrate
- Make a copy of
config/local.sample.js
under the name ofconfig/local.js
- 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
- DB Name: lake
- Hostname: localhost
- Port: 5432
- Username: postgres
- Password: postgres
- DB Name: test
- Hostname: localhost
- Port: 27017
- Username: (none required)
- Password: (none required)
- Vhost Name: rabbitmq
- Hostname: localhost
- Port: 5672
- Username: guest
- Password: guest
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
Jira auth setup
- Create an API key on Jira
- Create a basic auth header from your API key - Jira Docs
- Copy your basic auth header into the
jira.basicAuth
field in/config/local.js
file - Add your jira hostname to the
jira.host
field in the/config/local.js
file
- From the terminal, execute
npm run all
- From Postman (or similar), send a request like...
POST http://localhost:3001/
{
"jira": {
"projectId": "10003",
"accountUri": "merico.atlassian.net"
}
}
- 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/
- Visit:
http://localhost:3002
- Username:
admin
- Password:
admin