DEV Community

André Coelho for LEDS

Posted on • Edited on

1

Manual de uso Immigrant - Jira

Visão geral

O Immigrant - Jira é uma abordagem baseada em ontologia que auxilia na identificação das necessidades de informação da organização, recuperando dados do Jira e fornecendo dados integrados que atendam às necessidades de informação.

Pré-requisitos

1- Python
2- Docker
3- Java 17

Infraestrutura

Fornece a infraestrutura base necessária para rodar o projeto.

Passo a Passo

1- Clone o repositório:

git clone https://gitlab.com/immigrant-data-driven-development/infrastructure/base-infrastructure.git
cd base-infrastructure
Enter fullscreen mode Exit fullscreen mode

2- Crie um arquivo .env com o seguinte conteúdo:

DEBEZIUM_VERSION=2.0
COMPOSE_PROJECT_NAME=immigrant-cdc-infrastructure
Enter fullscreen mode Exit fullscreen mode

3- Inicialize o Docker:

docker-compose up
Enter fullscreen mode Exit fullscreen mode

4- Verifique a aplicação na URL: http://localhost:19000


Jira Extractor

O Jira Extractor é uma ferramenta para extrair dados do Jira. Ele utiliza a biblioteca jiraX para a extração e Apache Kafka para colocar os dados em uma fila.

Passo a Passo

1- Clone o repositório:

git clone https://gitlab.com/immigrant-data-driven-development/etl/extract/jira-extract.git
cd jira-extract
Enter fullscreen mode Exit fullscreen mode

2- Crie um arquivo .env com o seguinte conteúdo:

TOPIC=application.jira.extract
SERVERS=kafka:29092
GROUP_ID=extract_jira_group

URL={url do projeto}
USERNAME={seu email}
SECRET={api token}
Enter fullscreen mode Exit fullscreen mode

3- Inicialize o Docker:

 docker-compose up
Enter fullscreen mode Exit fullscreen mode

4- Testando com o producer.py:

  • Crie e ative um ambiente virtual Python:
python -m venv env
source env/bin/activate
Enter fullscreen mode Exit fullscreen mode
  • Instale as dependências:
pip install -r src/requirements.txt
Enter fullscreen mode Exit fullscreen mode
  • Rode o producer:
python src/producer.py
Enter fullscreen mode Exit fullscreen mode

Exemplo dos dados enviados pelo producer:

data = {  
        "url":config('URL'),
        "username": config('USERNAME'),
        "secret": config('SECRET'),        
        }
Enter fullscreen mode Exit fullscreen mode

5- Verifique os tópicos gerados na URL: http://localhost:19000

Tópicos Kafka


SRO - Transform and Load

É o componente responsável por mapear o modelo do Jira para o banco de dados SRO.

Passo a Passo

1- Execute o serviço do Transform and Load:

  • Clone o repositório:
git clone https://gitlab.com/immigrant-data-driven-development/services/domain/sro.git
cd sro/webservice
Enter fullscreen mode Exit fullscreen mode
  • Execute o serviço:
docker-compose up
Enter fullscreen mode Exit fullscreen mode

ou

mvn clean install
mvn spring-boot:run
Enter fullscreen mode Exit fullscreen mode

2- Execute o Transform and Load:

  • Clone o repositório:
git clone https://gitlab.com/immigrant-data-driven-development/etl/transform-and-load/sro.git
cd sro
Enter fullscreen mode Exit fullscreen mode
  • Crie um arquivo .env com o seguinte conteúdo:
KAFKA_SERVER=kafka
KAFKA_PORT=29092
DB_URL=db-pg
DB_PORT=5432
DB_NAME=sro
DB_USERNAME=postgres
DB_PASSWORD=postgres
SERVER_ETL_PORT=8091
MONGO_HOST=mongo
MONGO_DB=sro
MONGO_PORT=27017
Enter fullscreen mode Exit fullscreen mode
  • Execute o Transform and Load:
docker-compose up
Enter fullscreen mode Exit fullscreen mode

ou

mvn clean install
mvn spring-boot:run
Enter fullscreen mode Exit fullscreen mode

3- Verifique se os dados esperados estão no banco postgres gerado.

Exemplo de projeto convertido para o banco de dados SRO

Projeto

Link do repositório do Immigrant
Neste repositório temos o Immigrant de forma completa.

Image of Datadog

How to Diagram Your Cloud Architecture

Cloud architecture diagrams provide critical visibility into the resources in your environment and how they’re connected. In our latest eBook, AWS Solution Architects Jason Mimick and James Wenzel walk through best practices on how to build effective and professional diagrams.

Download the Free eBook

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs