Skip to content

Commit

Permalink
updating README structure, adding link to api doc
Browse files Browse the repository at this point in the history
  • Loading branch information
hsmith-adl committed Jul 3, 2024
1 parent 2ba07d7 commit ce2a8a9
Show file tree
Hide file tree
Showing 2 changed files with 117 additions and 13 deletions.
54 changes: 41 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,48 @@
# elrrdatasync

ELRR services which aid in the streaming (Kafka streams) of data from the staging database to the ELRR database.

# Requirements
1. [Requirements](#requirements)
2. [Building ELRR Datasync](#build-the-application)
3. [Deploy on Docker](#deploy-on-docker)
4. [Running the app locally](#run-app-locally)
5. [ELRR Data Sync API](docs/api/api.md)


## Requirements

For building and running the elrrdatasync you need:
- JDK 1.8
- Maven 3
# Build the application
- mvn clean install -Dmaven.test.skip=false
# Deploying the application on Docker



## Building the application

To build the application run the following command

```shell
mvn clean install -Dmaven.test.skip=false
```


## Deploy on Docker

The easiest way to deploy the sample application to Docker is to follow below steps:
- mkdir -p target/dependency && (cd target/dependency; jar -xf ../*.jar)
- docker build --build-arg JAR_FILE="./target/elrrdatasync-0.0.1-SNAPSHOT.jar" --file Dockerfile -t <docker_hub>/test:elrrdatasync-dck-img .
- docker run -p Port:Port -t <docker_hub>/test:elrrdatasync-dck-img
# Running the application locally
There are several ways to run a Spring Boot application on your local machine. One way is to execute the main method in the com.deloitte.elrr.datasync.DatasyncApplication class from your IDE
# Alternatively you can use the Spring Boot Maven plugin:
- mvn spring-boot:run
# Optional step
- docker push <docker_hub>/test:elrrdatasync-dck-img
1. Extract the jar file: ```mkdir -p target/dependency && (cd target/dependency; jar -xf ../*.jar)```
2. Build the docker image: ```docker build --build-arg JAR_FILE="./target/elrrdatasync-0.0.1-SNAPSHOT.jar" --file Dockerfile -t <docker_hub>/test:elrrdatasync-dck-img .```
3. Run the docker image: ```docker run -p Port:Port -t <docker_hub>/test:elrrdatasync-dck-img```



## Run app locally

There are several ways to run a Spring Boot application on your local machine.

1. Execute the main method in the com.deloitte.elrr.datasync.DatasyncApplication class from your IDE
2. Using the Spring Boot Maven plugin: ```mvn spring-boot:run```
3. Optional step ```docker push <docker_hub>/test:elrrdatasync-dck-img```




76 changes: 76 additions & 0 deletions docs/api/api.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# ELRR Data Sync OpenAPI Doc

```yaml
openapi: 3.0.1
info:
title: ELRR Datasync OpenAPI definition
version: v0
servers:
- url: http://127.0.0.1:8080
description: Generated server url
paths:
/api/getImports:
get:
tags:
- imports-controller
operationId: getImports
parameters:
- name: name
in: query
required: true
schema:
type: string
responses:
'200':
description: default response
content:
'*/*':
schema:
$ref: '#/components/schemas/ImportDTO'
/api/getAllImports:
get:
tags:
- imports-controller
operationId: getAllImports
responses:
'200':
description: default response
content:
'*/*':
schema:
type: array
items:
$ref: '#/components/schemas/ImportDTO'
components:
schemas:
ImportDTO:
type: object
properties:
importsName:
type: string
detailsList:
type: array
items:
$ref: '#/components/schemas/ImportDetailDTO'
ImportDetailDTO:
type: object
properties:
importsName:
type: string
importsEndPoint:
type: string
importsDate:
type: string
format: date-time
totalRecords:
type: integer
format: int32
failedRecords:
type: integer
format: int32
successRecords:
type: integer
format: int32
status:
type: string
```

0 comments on commit ce2a8a9

Please sign in to comment.