diff --git a/.github/workflows/04h_deploy_with_github_runner.yml b/.github/workflows/04h_deploy_with_github_runner.yml index 2a5c6ea..6f7f0d1 100644 --- a/.github/workflows/04h_deploy_with_github_runner.yml +++ b/.github/workflows/04h_deploy_with_github_runner.yml @@ -41,6 +41,7 @@ jobs: container_app_environment_name: ${{ vars.CONTAINER_APP_ENVIRONMENT_NAME }} resource_group_name: ${{ vars.CONTAINER_APP_ENVIRONMENT_RESOURCE_GROUP_NAME }} # RG of the runner pat_token: ${{ secrets.BOT_TOKEN_GITHUB }} + self_hosted_runner_image_tag: "latest" deploy: needs: [ create_runner ] diff --git a/helm/Chart.lock b/helm/Chart.lock new file mode 100644 index 0000000..e740093 --- /dev/null +++ b/helm/Chart.lock @@ -0,0 +1,6 @@ +dependencies: +- name: microservice-chart + repository: https://pagopa.github.io/aks-microservice-chart-blueprint + version: 2.8.0 +digest: sha256:379d9a7c312874dd1771386d92d8f597cb3fed497bb80dfde102513b582123d4 +generated: "2024-06-04T10:40:48.246079+02:00" diff --git a/helm/Chart.yaml b/helm/Chart.yaml index e107a8a..4e48247 100644 --- a/helm/Chart.yaml +++ b/helm/Chart.yaml @@ -2,8 +2,8 @@ apiVersion: v2 name: pagopa-nodo-cfg-data-migration description: A microservice that permits the migration from Nexi's Oracle database to PagoPA's PostgreSQL database type: application -version: 0.74.0 -appVersion: 1.0.2 +version: 0.85.0 +appVersion: 1.0.4-nexi-conf dependencies: - name: microservice-chart version: 2.8.0 diff --git a/helm/values-dev.yaml b/helm/values-dev.yaml index 74f69de..3ad96b2 100644 --- a/helm/values-dev.yaml +++ b/helm/values-dev.yaml @@ -4,7 +4,7 @@ microservice-chart: fullnameOverride: "" image: repository: ghcr.io/pagopa/pagopa-nodo-cfg-data-migration - tag: "1.0.2" + tag: "1.0.4-nexi-conf" pullPolicy: Always livenessProbe: httpGet: @@ -64,14 +64,15 @@ microservice-chart: envConfig: WEBSITE_SITE_NAME: 'pagopanodocfgdatamigration' ENV: 'Azure Kubernetes' + # SRC ORACLEDB_CONNECTION_STRING: "jdbc:oracle:thin:@(DESCRIPTION=(ENABLE=BROKEN)(ADDRESS=(PROTOCOL=tcp)(PORT=1522)(HOST=db-nodo-pagamenti.d.db-nodo-pagamenti.com))(CONNECT_DATA=(SERVICE_NAME=NDPSPCT_PP_NODO4_CFG))(SO_KEEPALIVE=true)(TCP_KEEPIDLE=60)(TCP_KEEPINTVL=30)(TCP_KEEPCNT=15))" ORACLEDB_USERNAME: "NODO4_CFG" ORACLEDB_DEFAULT_SCHEMA: "NODO4_CFG" - # NEXI POSTGRESQL_CONNECTION_STRING: "jdbc:postgresql://db-postgres-ndp.d.db-nodo-pagamenti.com:5444/ndpspct?prepareThreshold=0¤tSchema=NODO4_CFG" - POSTGRESQL_CONNECTION_STRING: "jdbc:postgresql://pagopa-d-weu-nodo-flexible-postgresql.postgres.database.azure.com:6432/nodo?sslmode=require&prepareThreshold=0¤tSchema=cfg" - # NEXI POSTGRESQL_USERNAME: "pp_nodo4_cfg" + # PAGOPA + + # POSTGRESQL_CONNECTION_STRING: "jdbc:postgresql://nodo-db.d.internal.postgresql.pagopa.it:6432/nodo-replica?sslmode=require&prepareThreshold=0¤tSchema=cfg" + POSTGRESQL_CONNECTION_STRING: "jdbc:postgresql://nodo-db.d.internal.postgresql.pagopa.it:6432/nodo?sslmode=require&prepareThreshold=0¤tSchema=cfg" POSTGRESQL_USERNAME: "cfg" - # NEXI POSTGRESQL_DEFAULT_SCHEMA: "NODO4_CFG" POSTGRESQL_DEFAULT_SCHEMA: "cfg" POSTGRESQL_JDBC_BATCH_SIZE: '30' DEFAULT_LOGGING_LEVEL: "INFO" @@ -124,7 +125,7 @@ microservice-chart: STEP_ICABINARYFILE_BATCH_SIZE: '1000' envSecret: ORACLEDB_PASSWORD: 'oracle-db-cfg-password' - # NEXI POSTGRESQL_PASSWORD: 'db-nexi-cfg-password' + # POSTGRESQL_PASSWORD: 'db-nexi-cfg-password' # NEXI POSTGRESQL_PASSWORD: 'db-cfg-password' OTEL_AUTH_BEARER: "otel-auth-bearer" keyvault: diff --git a/helm/values-prod.yaml b/helm/values-prod.yaml index 83f4709..e5e0121 100644 --- a/helm/values-prod.yaml +++ b/helm/values-prod.yaml @@ -4,7 +4,7 @@ microservice-chart: fullnameOverride: "" image: repository: ghcr.io/pagopa/pagopa-nodo-cfg-data-migration - tag: "1.0.2" + tag: "1.0.4-nexi-conf" pullPolicy: Always livenessProbe: httpGet: @@ -47,7 +47,7 @@ microservice-chart: memory: "1Gi" cpu: "0.40" limits: - memory: "1Gi" + memory: "2.5Gi" cpu: "0.5" autoscaling: enable: true @@ -67,6 +67,7 @@ microservice-chart: ORACLEDB_CONNECTION_STRING: "jdbc:oracle:thin:@(DESCRIPTION=(ENABLE=BROKEN)(ADDRESS=(PROTOCOL=tcp)(PORT=1521)(HOST=db-nodo-pagamenti.p.db-nodo-pagamenti.com))(CONNECT_DATA=(SERVICE_NAME=NDPSPCP_NODO4_CFG))(SO_KEEPALIVE=true)(TCP_KEEPIDLE=60)(TCP_KEEPINTVL=30)(TCP_KEEPCNT=15))" ORACLEDB_USERNAME: "NODO4_CFG" ORACLEDB_DEFAULT_SCHEMA: "NODO4_CFG" + # PAGOPA POSTGRESQL_CONNECTION_STRING: "jdbc:postgresql://nodo-db.p.internal.postgresql.pagopa.it:6432/nodo?sslmode=require&prepareThreshold=0¤tSchema=cfg" POSTGRESQL_USERNAME: "cfg" POSTGRESQL_DEFAULT_SCHEMA: "cfg" @@ -80,6 +81,7 @@ microservice-chart: SQL_BINDER_LOGGING_LEVEL: "INFO" CORS_CONFIGURATION: '{"origins": ["*"], "methods": ["*"]}' OTEL_EXPORTER_OTLP_ENDPOINT: "http://otel-collector.elastic-system.svc:4317" + JAVA_OPTS: "-XX:MaxHeapSize=2g" # Variables for define batch size for all steps STEP_BINARYFILE_BATCH_SIZE: '100' STEP_CANALETIPOVERSAMENTO_BATCH_SIZE: '1000' diff --git a/helm/values-uat.yaml b/helm/values-uat.yaml index c4fd4fb..df482b7 100644 --- a/helm/values-uat.yaml +++ b/helm/values-uat.yaml @@ -4,7 +4,7 @@ microservice-chart: fullnameOverride: "" image: repository: ghcr.io/pagopa/pagopa-nodo-cfg-data-migration - tag: "1.0.2" + tag: "1.0.4-nexi-conf" pullPolicy: Always livenessProbe: httpGet: @@ -65,14 +65,20 @@ microservice-chart: WEBSITE_SITE_NAME: 'pagopanodocfgdatamigration' ENV: 'Azure Kubernetes' ORACLEDB_CONNECTION_STRING: "jdbc:oracle:thin:@(DESCRIPTION=(ENABLE=BROKEN)(ADDRESS=(PROTOCOL=tcp)(PORT=1524)(HOST=db-nodo-pagamenti.u.db-nodo-pagamenti.com))(CONNECT_DATA=(SERVICE_NAME=NDPSPCA_NODO4_CFG))(SO_KEEPALIVE=true)(TCP_KEEPIDLE=60)(TCP_KEEPINTVL=30)(TCP_KEEPCNT=15))" + # jdbc:oracle:thin:@db-nodo-pagamenti-prf.u.db-nodo-pagamenti.com:1524/NDPSPCST + + #ORACLEDB_CONNECTION_STRING: "jdbc:oracle:thin:@(DESCRIPTION=(ENABLE=BROKEN)(ADDRESS=(PROTOCOL=tcp)(PORT=1524)(HOST=db-nodo-pagamenti-prf.u.db-nodo-pagamenti.com))(CONNECT_DATA=(SERVICE_NAME=NDPSPCST))(SO_KEEPALIVE=true)(TCP_KEEPIDLE=60)(TCP_KEEPINTVL=30)(TCP_KEEPCNT=15))" ORACLEDB_USERNAME: "NODO4_CFG" ORACLEDB_DEFAULT_SCHEMA: "NODO4_CFG" + # DST + # NEXI # POSTGRESQL_CONNECTION_STRING: "jdbc:postgresql://db-postgres-ndp.u.db-nodo-pagamenti.com:5445/ndpspca?prepareThreshold=0¤tSchema=NODO4_CFG" # NEXI UAT - # POSTGRESQL_CONNECTION_STRING: "jdbc:postgresql://db-postgres-ndp-prf.u.db-nodo-pagamenti.com:5444/ndpspcq?prepareThreshold=0¤tSchema=NODO4_CFG" # NEXI PRF + #POSTGRESQL_CONNECTION_STRING: "jdbc:postgresql://db-postgres-ndp-prf.u.db-nodo-pagamenti.com:5444/ndpspcq?prepareThreshold=0¤tSchema=NODO4_CFG" # NEXI PRF + #POSTGRESQL_USERNAME: "pp_nodo4_cfg" # NEXI + #POSTGRESQL_DEFAULT_SCHEMA: "NODO4_CFG" # NEXI + # PAGOPA POSTGRESQL_CONNECTION_STRING: "jdbc:postgresql://pagopa-u-weu-nodo-flexible-postgresql.postgres.database.azure.com:6432/nodo?sslmode=require&prepareThreshold=0¤tSchema=cfg" - # POSTGRESQL_USERNAME: "pp_nodo4_cfg" # NEXI POSTGRESQL_USERNAME: "cfg" - # POSTGRESQL_DEFAULT_SCHEMA: "NODO4_CFG" # NEXI POSTGRESQL_DEFAULT_SCHEMA: "cfg" POSTGRESQL_JDBC_BATCH_SIZE: '30' DEFAULT_LOGGING_LEVEL: "INFO" @@ -120,8 +126,8 @@ microservice-chart: STEP_WFESPPLUGINCONF_BATCH_SIZE: '1000' envSecret: ORACLEDB_PASSWORD: 'oracle-db-cfg-password' - # POSTGRESQL_PASSWORD: 'db-nexi-cfg-password' # NEXI UAT - # POSTGRESQL_PASSWORD: 'db-nexi-cfg-password-prf' # NEXI PRF + #POSTGRESQL_PASSWORD: 'db-nexi-cfg-password' # NEXI UAT + #POSTGRESQL_PASSWORD: 'db-nexi-cfg-password-prf' # NEXI PRF POSTGRESQL_PASSWORD: 'db-cfg-password' OTEL_AUTH_BEARER: "otel-auth-bearer" keyvault: diff --git a/openapi/openapi.json b/openapi/openapi.json index bb77569..925963b 100644 --- a/openapi/openapi.json +++ b/openapi/openapi.json @@ -4,7 +4,7 @@ "description": "A microservice that permits the migration from Nexi's Oracle database to PagoPA's PostgreSQL database", "termsOfService": "https://www.pagopa.gov.it/", "title": "data-migration", - "version": "1.0.2" + "version": "1.0.4-nexi-conf" }, "servers": [ { diff --git a/pom.xml b/pom.xml index d984f54..19c5ad1 100644 --- a/pom.xml +++ b/pom.xml @@ -11,7 +11,7 @@ it.gov.pagopa.nodo data-migration - 1.0.2 + 1.0.4-nexi-conf A microservice that permits the migration from Nexi's Oracle database to PagoPA's PostgreSQL database 17 diff --git a/src/main/java/it/gov/pagopa/nodo/datamigration/fsm/step/StartStep.java b/src/main/java/it/gov/pagopa/nodo/datamigration/fsm/step/StartStep.java index 232a8df..0a058e6 100644 --- a/src/main/java/it/gov/pagopa/nodo/datamigration/fsm/step/StartStep.java +++ b/src/main/java/it/gov/pagopa/nodo/datamigration/fsm/step/StartStep.java @@ -131,6 +131,7 @@ private void activateMigration() throws MigrationStatusSavingException { private void truncateAllTables() throws MigrationTruncateAllTablesException { try { + /* EntityManager em = emFactory.createEntityManager(); log.info(" - Starting deleting all data from GDE_CONFIG..."); deleteAndFlush(em, "GDE_CONFIG"); @@ -217,6 +218,8 @@ private void truncateAllTables() throws MigrationTruncateAllTablesException { deleteAndFlush(em, "QUADRATURE_SCHED"); log.info(" - Deleted all data from QUADRATURE_SCHED. Ended deleting all previous data!."); log.info(" - Ended deleting all previous data!."); + */ + log.info(" - Skipped deletion of all previous data!."); } catch (DataAccessException e) { throw new MigrationTruncateAllTablesException(e); }