Introducción
Configuración y Tiempo de Ejecución
El SEPA DD PASO2 CSM es esencialmente una aplicación independiente que puede ejecutarse como un servicio, al igual que cualquier otro IPF application despliegue.
Sin embargo, usted decide ejecutar su IPF applications, usted puede hacer lo mismo para esto CSM.
Configuración
SEPA DD CSM Service
La configuración a continuación es la mínima requerida para el SEPA DD CSM Service
ipf {
mongodb.url = "mongodb://ipf-mongo:27017/sepadd" (1)
csm.sepa-dd {
bulk-file-processing.archive = true (2)
debulker.processing-entity = "BANK_ENTITY_1"
debulker.archive-path = "sepa-archive"
}
}
common-kafka-client-settings {
bootstrap.servers = "kafka:9092" (3)
auto.offset.reset = earliest
}
ipf.bulker { (4)
output.file-system = "s3"
archiver {
file-system = "s3"
}
configurations = [
{
name = "IDF"
file-name-prefix = "idf-"
file-path = "sepa-bulks"
archive-path = "sepa-archive"
component-hierarchy {
component-parser-name = "xml"
marker = "MPEDDIdfBlkDirDeb"
namespace-prefix = "S2SDDIdf"
children = [
{
marker = "FIToFICstmrDrctDbt"
},
{
marker = "FIToFIPmtCxlReq"
},
{
marker = "FIToFIPmtRvsl"
}
]
}
scheduled-auto-close = {
auto-close-by-age = 15s
}
},
{
name = "PACS_003"
file-name-prefix = "pacs003-"
component-hierarchy {
component-parser-name = "xml"
marker = "FIToFICstmrDrctDbt"
children = [
{
marker = "DrctDbtTxInf"
}
]
}
parent-bulk {
configuration-name = "IDF"
path = "FIToFICstmrDrctDbt"
},
},
{
name = "CAMT_056"
file-name-prefix = "camt056-"
component-hierarchy {
component-parser-name = "xml"
marker = "FIToFIPmtCxlReq"
children = [
{
marker = "TxInf"
}
]
}
parent-bulk {
configuration-name = "IDF"
path = "FIToFIPmtCxlReq"
}
},
{
name = "PACS_007"
file-name-prefix = "pacs007-"
component-hierarchy {
component-parser-name = "xml"
marker = "FIToFIPmtRvsl"
children = [
{
marker = "TxInf"
}
]
}
parent-bulk {
configuration-name = "IDF"
path = "FIToFIPmtRvsl"
}
}
]
}
ipf.debulker { (5)
archiving {
file-system = "s3"
}
}
akka { (6)
cluster.seed-nodes = [
"akka://"${actor-system-name}"@sepadd-csm-application-1:"${akka.remote.artery.canonical.port},
"akka://"${actor-system-name}"@sepadd-csm-application-2:"${akka.remote.artery.canonical.port}
]
remote.artery {
canonical.port = 55001
canonical.hostname = 0.0.0.0
bind.hostname = 0.0.0.0
bind.port = 55001
}
kafka {
producer {
kafka-clients = ${common-kafka-client-settings}
}
consumer {
kafka-clients = ${common-kafka-client-settings}
kafka-clients.group.id = sepadd-consumer-group
health-check-settings.enabled = true
}
}
}
ipf.file-manager.local.enabled = false (7)
ipf.file-manager.s3 = ${s3.config}
s3.config {
enabled = true
region = "us-east-1"
upload-parallelism = 1
credentials {
access-key-id = "test"
secret-access-key = "test"
}
resiliency-settings {
# Determines the maximum number of retries to be made. Note that this includes the first failed attempt.
max-attempts = 3
# Retry if HTTP error code is in the list
retryable-status-codes = [500, 503]
attempt-timeout = 3s
call-timeout = 1s
}
endpoint-url = "http://s3.localhost.localstack.cloud:4566" #https://docs.localstack.cloud/user-guide/aws/s3/#path-style-and-virtual-hosted-style-requests
}
ipf.working-days-service.connector.http.client { (8)
host = working-days-service-app
port = 8080
}
Tenga en cuenta los siguientes aspectos clave:
| 1 | Establezca la URL de mongo según corresponda a su entorno |
| 2 | Esto permite la archivación de bulk archivos producidos, la ubicación está configurada como parte de la bulker configuración en el punto 4 |
| 3 | Establezca esta propiedad de acuerdo a su entorno |
| 4 | En esta configuración, hemos establecido explícitamente output to s3(usted también podría establecer esto en local) ver Gestor de Archivos IPF para más detalles |
| 5 | Establezca explícitamente la archivación para debulked archivos a s3 |
| 6 | Akka configuración que establece un clúster de múltiples nodos (2) para esta aplicación. Si se despliega en Kubernetes esto generalmente estará vacío ya que los nodos semilla se descubren dinámicamente |
| 7 | La configuración de ejemplo incluye la configuración para s3, por lo que el administrador de archivos local ha sido deshabilitado. Alternativamente, usted puede establecer ipf.file-manager.local.enabled a verdadero y ipf.file-manager.s3.enabled para false para leer y escribir archivos en el sistema de archivos local. Al utilizar el administrador de archivos local, la configuración de S3 puede ser omitida. |
| 8 | Esto debe corresponder a la dirección y al puerto expuestos por el componente del Servicio de Días Laborales desplegado. Como se puede ver, los valores coinciden con los proporcionados en el despliegue.yml below |
Configuración del Contenedor S3
#!/bin/bash
echo 'Creating S3 bucket'
awslocal s3api create-bucket --bucket sepa-archive
awslocal s3api create-bucket --bucket sepa-bulks
Configuración Específica del Cliente
Por supuesto, puede proporcionar configuraciones específicas para el cliente en ciertos aspectos dentro del servicio.
Una cosa común que usted podría considerar hacer específica son las Kafka nombres de temas (por ejemplo Desmenuzador Kafka Configuración).
Otras configuraciones están disponibles y se describen en la sección correspondiente del documento de características (Características).
Ejecutando
El siguiente docker compose es un SEPA DD CSM Service despliegue que contiene toda la infraestructura/aplicaciones requeridas (Kafka, Zookeeper,MongoDB, S3 y Servicio de Días Laborales). Usted debe seleccionar la sección apropiada para "step2ddcsm-1" como punto de partida para su entorno de implementación.
services:
# Infrastructure
ipf-mongo:
image: mongo:4.4.15
container_name: ipf-mongo
ports:
- "27018:27017"
healthcheck:
test: echo 'db.runCommand("ping").ok' | mongo localhost:27017/test --quiet
zookeeper:
image: zookeeper:latest
container_name: zookeeper
ports:
- "2181:2181"
kafka:
image: wurstmeister/kafka:2.13-2.7.1
container_name: kafka
depends_on:
- zookeeper
ports:
- "9092:9092"
- "9099:9099"
environment:
- KAFKA_BROKER_ID=0
- KAFKA_AUTO_CREATE_TOPICS_ENABLE=true
- KAFKA_ZOOKEEPER_CONNECT=zookeeper:2181
- KAFKA_LOG_RETENTION_MINUTES=10
- KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR=1
- KAFKA_OFFSETS_TOPIC_NUM_PARTITIONS=1
- KAFKA_LISTENER_SECURITY_PROTOCOL_MAP=TEST:PLAINTEXT,PLAINTEXT:PLAINTEXT
- KAFKA_LISTENERS=PLAINTEXT://:9092,TEST://:9099
- KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://kafka:9092,TEST://localhost:9099
- KAFKA_CREATE_TOPICS=IPF_PROCESSING_DATA:1:1,FILE_NOTIFICATION_REQUEST:1:1,DIRECTDEBIT_CREDITOR_TO_CSM:1:1,DIRECTDEBIT_CSM_TO_CREDITOR:1:1,DIRECTDEBIT_TECHNICAL_RESPONSE:1:1,CSM_NOTIFICATIONS:1:1,SEPA_CSM_SERVICE_NOTIFICATION:1:1,CLIENT_PROCESSING_REQUEST:1:1,CLIENT_PROCESSING_RESPONSE:1:1
kafka-ui:
image: provectuslabs/kafka-ui:v0.7.0
container_name: kafka-ui
ports:
- "8098:8080"
environment:
- KAFKA_CLUSTERS_0_NAME=local
- KAFKA_CLUSTERS_0_BOOTSTRAPSERVERS=kafka:9092
- KAFKA_CLUSTERS_0_ZOOKEEPER=zookeeper:2181
depends_on:
- kafka
localstack:
image: localstack/localstack
container_name: localstack
ports:
- "4566:4566"
- "4572:4572"
- "8096:8080"
environment:
- SERVICES=s3
- AWS_ACCESS_KEY_ID=test
- AWS_SECRET_ACCESS_KEY=test
- DEBUG=1
- LOCALSTACK_HOST=s3.localhost.localstack.cloud:4566
networks:
default:
aliases:
- sepa-archive.s3.localhost.localstack.cloud
- sepa-bulks.s3.localhost.localstack.cloud
volumes:
- ./config/localstack/init-aws.sh:/etc/localstack/init/ready.d/init-aws.sh (1)
entrypoint: [ "bash", "-c", "chmod +x /etc/localstack/init/ready.d/init-aws.sh && docker-entrypoint.sh" ]
# Apps
working-days-service-app:
image: releases-registry.ipfdev.co.uk/working-days-service-app:1.0.11
container_name: working-days-service-app
ports:
- "8089:8080"
- "5003:5005"
volumes:
- ./logs:/ipf/logs
- ./config/working-days-service-app:/working-days-service-app/conf (2)
user: "1000:1000"
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:8080/actuator/health" ]
depends_on:
- ipf-mongo
step2ddcsm-1:
image: registry.ipf.iconsolutions.com/sepadd-csm-application-kafka:1.0.0
container_name: sepadd-csm-application-1
ports:
- "8083:8080"
- "5009:5005"
- "9003:9001"
- "8559:8558"
volumes:
- ./logs:/ipf/logs
- ./config/step2csm:/sepadd-csm-application-kafka/conf (3)
- ./bulk-output:/tmp/bulks
- ./bulk-input:/tmp/files
user: "1000:1000"
environment:
- IPF_JAVA_ARGS=-Dma.glasnost.orika.writeClassFiles=false -Dma.glasnost.orika.writeSourceFiles=false -Dconfig.override_with_env_vars=true -Dlogging.config=/sepadd-csm-application-kafka/conf/logback.xml
- CONFIG_FORCE_akka_remote_artery_canonical_hostname=sepadd-csm-application-1
depends_on:
- ipf-mongo
- kafka
healthcheck:
test: [ "CMD", "curl", "http://localhost:8080/actuator/health" ]
step2ddcsm-2:
image: releases-registry.ipfdev.co.uk/sepadd-csm-application-kafka:1.0.0
container_name: sepadd-csm-application-2
ports:
- "8084:8080"
- "5010:5005"
- "9004:9001"
volumes:
- ./logs:/ipf/logs
- ./config/step2csm:/sepadd-csm-application-kafka/conf (4)
- ./bulk-output:/tmp/bulks
- ./bulk-input:/tmp/files
user: "1000:1000"
environment:
- IPF_JAVA_ARGS=-Dma.glasnost.orika.writeClassFiles=false -Dma.glasnost.orika.writeSourceFiles=false -Dconfig.override_with_env_vars=true -Dlogging.config=/sepadd-csm-application-kafka/conf/logback.xml
- CONFIG_FORCE_akka_remote_artery_canonical_hostname=sepadd-csm-application-2
depends_on:
- ipf-mongo
- kafka
healthcheck:
test: [ "CMD", "curl", "http://localhost:8080/actuator/health" ]
Los archivos de configuración deben ser cargados de la siguiente manera:
| 1 | La configuración debe ser montada de acuerdo con Configuración del Contenedor S3 |
| 2 | La configuración debe ser montada de acuerdo con Configuración del Servicio de Días Laborales |
| 3 | La configuración debe ser montada de acuerdo con SEPA DD CSM Service Configuración (igual para 3 y 4) |
| 4 | La configuración debe ser montada de acuerdo con SEPA DD CSM Service Configuración (igual para 3 y 4) |