Merge pull request #255 from merico-dev/ts-task-service feat: task service with plugin execution
npm ipostgres and redis and startupcp .env.sample .env. change DB_URL and REDIS_URL to your local dbnpm run allNOTE: To run the tests:
cp .env.sample .env.testnpm run test:e2enpm run composedocker-compose ps to see containers runnning.npm icp .env.sample .env. change DB_URL and REDIS_URL to your docker container dbnpm run all.env.sample to .envREDIS_URL AND DB_URL. Queue service require redis for the task queue. Plugins write datas into configed DB.Connect to the Grafana database: Inside ./devops/docker-compose.yml edit the environment variables as needed to connect to your local postgres instance, specifically:
GF_DATABASE_NAMEGF_DATABASE_USERGF_DATABASE_PASSWORDConnect 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:
databaseusersecureJsonData/passwordPOST localhost:3000/source
{
"type": "Jira",
"name": "Jira Collector",
"options": {
"host": "https://www.atlassian.com/",
"email": "xx@example.com",
"auth": "base64EncodedAuthToken"
}
}
response:
{ source: 'source id' }
POST localhost:3000/sources/${source id}
{
collector: ['Issue'],
enricher: ['LeadTime'],
options: {
projects: ['ProjectName'],
boards: ['Scrum Board Id']
}
}
response:
{ task: 'task id' }
GET localhost:3000/tasks/${task id}
response:
{
task: {
id: 'task id',
status: 'finished',
progress: {
collector: [
{name: 'Issue', status: 'finished'}
],
enricher: [
{name: 'LeadTime', status: 'finished'}
]
}
}
}
Login Credentials
http://localhost:3002adminadminProvisioning a Grafana Dashboard
To save a dashboard in the lake repo and load it:
/dashboard/new, or use sidebar).json file in /grafana/dashboards