Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
119 changes: 0 additions & 119 deletions .github/workflows/manual-develoment.yml

This file was deleted.

16 changes: 14 additions & 2 deletions helm/am-document-processor/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,20 @@ spec:
vault.hashicorp.com/agent-inject-secret-kafka: "kv/preprod/kafka"
vault.hashicorp.com/agent-inject-template-kafka: |
{{`{{- with secret "kv/preprod/kafka" -}}
export KAFKA_BOOTSTRAP_SERVERS="{{ .Data.data.bootstrapServers }}"
export KAFKA_CONSUMER_GROUP_ID="{{ .Data.data.consumerGroupId }}"
KAFKA_BOOTSTRAP_SERVERS="{{ .Data.data.kafkabootstrapserver }}"
KAFKA_SECURITY_PROTOCOL="{{ .Data.data.securityprotocol }}"
KAFKA_SASL_MECHANISM="{{ .Data.data.sslmechanism }}"
KAFKA_SASL_JAAS_CONFIG="{{ .Data.data.sasljaasconfig }}"
KAFKA_ZOOKEEPER_CONNECT="{{ .Data.data.zookeeperconnect }}"
KAFKA_CONSUMER_GROUP_ID="{{ .Data.data.consumerGroupId }}"
KAFKA_CONSUMER_AUTO_OFFSET_RESET="{{ .Data.data.autooffsetreset }}"
{{- end -}}`}}

vault.hashicorp.com/agent-inject-secret-mongodb: "kv/preprod/database/mongo"
vault.hashicorp.com/agent-inject-template-mongodb: |
{{`{{- with secret "kv/preprod/database/mongo" -}}
MONGODB_DATABASE="{{ .Data.data.portfoliodatabase }}"
MONGODB_URI= {{ .Data.data.uri }}/{{ .Data.data.portfoliodatabase }}?authSource={{ .Data.data.authsource }}
{{- end -}}`}}
{{- with .Values.podAnnotations }}
{{- toYaml . | nindent 8 }}
Expand Down
10 changes: 5 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@
<spring.boot.version>3.4.1</spring.boot.version>

<!-- AM Common -->
<am.common.data.mongo.version>1.2.8-SNAPSHOT</am.common.data.mongo.version>
<am.common.data.model.version>1.2.8-SNAPSHOT</am.common.data.model.version>
<am.common.data.service.version>1.2.8-SNAPSHOT</am.common.data.service.version>
<am.common.data.mongo.version>1.2.9-SNAPSHOT</am.common.data.mongo.version>
<am.common.data.model.version>1.2.9-SNAPSHOT</am.common.data.model.version>
<am.common.data.service.version>1.2.9-SNAPSHOT</am.common.data.service.version>

<!-- Database -->
<mssql.jdbc.version>12.8.1.jre11</mssql.jdbc.version>
Expand Down Expand Up @@ -120,11 +120,11 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-mongodb</artifactId>
</dependency>
<dependency>
<!-- <dependency>
<groupId>com.microsoft.sqlserver</groupId>
<artifactId>mssql-jdbc</artifactId>
<version>${mssql.jdbc.version}</version>
</dependency>
</dependency> -->
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.ComponentScans;
import org.springframework.data.mongodb.repository.config.EnableMongoRepositories;

import lombok.extern.slf4j.Slf4j;

Expand All @@ -16,6 +17,7 @@
@ComponentScan("org.am.mypotrfolio.service.mapper"),
@ComponentScan("com.am.common.amcommondata.mapper")
})
@EnableMongoRepositories(basePackages = "com.am.common.amcommondata.repository")
public class DocumentProcessingApplication {

public static void main(String[] args) {
Expand Down
40 changes: 0 additions & 40 deletions src/main/java/org/am/mypotrfolio/config/MongoConfig.java

This file was deleted.

This file was deleted.

53 changes: 44 additions & 9 deletions src/main/resources/application.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# Kafka Configuration
KAFKA_BOOTSTRAP_SERVERS: kafka.dev.svc.cluster.local:9092
KAFKA_SECURITY_PROTOCOL: SASL_PLAINTEXT
KAFKA_SASL_MECHANISM: PLAIN
KAFKA_SASL_JAAS_CONFIG: org.apache.kafka.common.security.plain.PlainLoginModule required username="kafkaUser" password="kafkaPassword123!";

server:
port: 8080
spring:
Expand All @@ -24,26 +30,24 @@ spring:
hibernate:
format_sql: true
kafka:
bootstrap-servers: kafka.dev.svc.cluster.local:9092
bootstrap-servers: ${KAFKA_BOOTSTRAP_SERVERS}
properties:
security.protocol: SASL_PLAINTEXT
sasl.mechanism: PLAIN
sasl.jaas.config: org.apache.kafka.common.security.plain.PlainLoginModule required username="kafkaUser" password="kafkaPassword123!";
security.protocol: ${KAFKA_SECURITY_PROTOCOL}
sasl.mechanism: ${KAFKA_SASL_MECHANISM}
sasl.jaas.config: ${KAFKA_SASL_JAAS_CONFIG}
consumer:
group-id: document-processor
auto-offset-reset: earliest
data:
mongodb:
uri: mongodb://ssd2658:ssd2658@mongodb.dev.svc.cluster.local:27017/portfolio?authSource=admin
database: portfolio
auto-index-creation: true

app:
kafka:
portfolio-topic: am-portfolio
trade-topic: am-trade
persistence:
mongodb:
uri: mongodb://admin:password@mongodb.dev.svc.cluster.local:27017/nse_security?authSource=admin
database: nse_security

logging:
level:
Expand All @@ -53,4 +57,35 @@ logging:
org.hibernate: INFO
org.hibernate.SQL: INFO
'[org.hibernate.type.descriptor.sql.BasicBinder]': TRACE
'[org.springframework.data.mongodb.core.MongoTemplate]': DEBUG
'[org.springframework.data.mongodb.core.MongoTemplate]': DEBUG



# Management/Actuator Configuration
management:
endpoints:
web:
exposure:
include: health,info,metrics,prometheus
endpoint:
health:
probes:
enabled: true
show-details: always
validate-group-membership: false
group:
readiness:
include: diskSpace,mongodb,redis,kafka
liveness:
include: diskSpace,mongodb,redis,kafka
health:
livenessstate:
enabled: true
readinessstate:
enabled: true
mongo:
enabled: true
redis:
enabled: true
kafka:
enabled: true