Skip to content

Commit

Permalink
Merge pull request #9 from pagopa/NOD-744-deploy-uat
Browse files Browse the repository at this point in the history
[NOD-744] Deploy UAT
  • Loading branch information
aomegax authored Apr 10, 2024
2 parents 137f26b + 5dd5d89 commit bf701c1
Show file tree
Hide file tree
Showing 10 changed files with 51 additions and 40 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/05h_deploy_with_github_runner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ jobs:
shell: bash
run: |
cd ./infra
export ARM_CLIENT_ID="${{ secrets.CLIENT_ID }}"
export ARM_CLIENT_ID="${{ secrets.CD_CLIENT_ID }}"
export ARM_SUBSCRIPTION_ID=$(az account show --query id --output tsv)
export ARM_TENANT_ID=$(az account show --query tenantId --output tsv)
export ARM_USE_OIDC=true
Expand Down
32 changes: 17 additions & 15 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,26 @@ WORKDIR /build
COPY . .
RUN mvn clean package -DskipTests


FROM amazoncorretto:17.0.10-alpine3.19@sha256:180e9c91bdbaad3599fedd2f492bf0d0335a9382835aa64669b2c2a8de7c9a22 as builder
WORKDIR /app
COPY --from=buildtime /build/target/*.jar /app/application.jar
RUN java -Djarmode=layertools -jar application.jar extract

#WORKDIR /app
#COPY --from=buildtime /build/target/*.jar /app/application.jar
#RUN java -Djarmode=layertools -jar application.jar extract
COPY --from=buildtime /build/target/*.jar application.jar

FROM ghcr.io/pagopa/docker-base-springboot-openjdk17:v1.1.3@sha256:a4e970ef05ecf2081424a64707e7c20856bbc40ddb3e99b32a24cd74591817c4
WORKDIR /app
#ADD --chown=spring:spring https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/download/v1.25.1/opentelemetry-javaagent.jar .

COPY --chown=spring:spring --from=builder /app/dependencies/ ./
COPY --chown=spring:spring --from=builder /app/snapshot-dependencies/ ./
#FROM ghcr.io/pagopa/docker-base-springboot-openjdk17:v1.1.3@sha256:a4e970ef05ecf2081424a64707e7c20856bbc40ddb3e99b32a24cd74591817c4
#COPY --chown=spring:spring --from=builder /app/dependencies/ ./
#COPY --chown=spring:spring --from=builder /app/snapshot-dependencies/ ./
# https://github.com/moby/moby/issues/37965#issuecomment-426853382
COPY --chown=spring:spring --from=builder /app/spring-boot-loader/ ./
COPY --chown=spring:spring --from=builder /app/application/ ./
#RUN true
#COPY --chown=spring:spring --from=builder /app/spring-boot-loader/ ./
#COPY --chown=spring:spring --from=builder /app/application/ ./

## https://github.com/microsoft/ApplicationInsights-Java/releases
ADD --chown=spring:spring https://github.com/microsoft/ApplicationInsights-Java/releases/download/3.4.19/applicationinsights-agent-3.4.19.jar applicationinsights-agent.jar
COPY --chown=spring:spring docker/applicationinsights.json applicationinsights.json
COPY --chown=spring:spring docker/run.sh run.sh
RUN chmod +x ./run.sh

EXPOSE 8080

#ENTRYPOINT ["java","-javaagent:opentelemetry-javaagent.jar","--enable-preview","org.springframework.boot.loader.JarLauncher"]
ENTRYPOINT ["java", "--enable-preview","org.springframework.boot.loader.JarLauncher"]
ENTRYPOINT ["./run.sh"]
6 changes: 6 additions & 0 deletions docker/applicationinsights.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"selfDiagnostics": {
"destination": "console",
"level": "INFO"
}
}
3 changes: 3 additions & 0 deletions docker/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh
#exec java -javaagent:/applicationinsights-agent.jar ${JAVA_OPTS} org.springframework.boot.loader.JarLauncher "$@"
exec java -javaagent:/applicationinsights-agent.jar ${JAVA_OPTS} -jar application.jar
4 changes: 2 additions & 2 deletions helm/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ apiVersion: v2
name: pagopa-node-cfg-sync
description: Microservice that sync api-config-cache and standin configuration
type: application
version: 0.52.0
appVersion: 0.0.3
version: 0.75.0
appVersion: 0.0.3-23-NOD-744-deploy-uat
dependencies:
- name: microservice-chart
version: 2.8.0
Expand Down
12 changes: 6 additions & 6 deletions helm/values-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@ microservice-chart:
fullnameOverride: ""
image:
repository: ghcr.io/pagopa/pagopa-node-cfg-sync
tag: "0.0.3"
tag: "0.0.3-23-NOD-744-deploy-uat"
pullPolicy: Always
livenessProbe:
httpGet:
path: /actuator/health/liveness
port: 8080
initialDelaySeconds: 30
initialDelaySeconds: 180
failureThreshold: 6
periodSeconds: 10
readinessProbe:
httpGet:
path: /actuator/health/readiness
port: 8080
initialDelaySeconds: 30
initialDelaySeconds: 180
failureThreshold: 6
periodSeconds: 10
deployment:
Expand Down Expand Up @@ -97,14 +97,14 @@ microservice-chart:
OTEL_TRACES_SAMPLER: "always_on"
envSecret:
# required
APPLICATIONINSIGHTS_CONNECTION_STRING: 'ai-d-connection-string'
APPLICATIONINSIGHTS_CONNECTION_STRING: 'azure-insight-connection-string'
DB_PAGOPA_POSTGRES_PASSWORD: "db-cfg-password"
DB_NEXI_POSTGRES_PASSWORD: "db-nexi-cfg-password"
DB_NEXI_ORACLE_PASSWORD: "oracle-db-cfg-password"
API_CONFIG_CACHE_RX_CONNECTION_STRING: "nodo-dei-pagamenti-cache-sync-rx-connection-string-key"
API_CONFIG_CACHE_SA_CONNECTION_STRING: "nodo-dei-pagamenti-cache-sync-sa-connection-string-key"
API_CONFIG_CACHE_SA_CONNECTION_STRING: "node-cfg-sync-re-sa-connection-string-key"
STAND_IN_MANAGER_RX_CONNECTION_STRING: "nodo-dei-pagamenti-stand-in-sync-rx-connection-string-key"
STAND_IN_MANAGER_SA_CONNECTION_STRING: "nodo-dei-pagamenti-stand-in-sync-sa-connection-string-key"
STAND_IN_MANAGER_SA_CONNECTION_STRING: "node-cfg-sync-re-sa-connection-string-key"
API_CONFIG_CACHE_SUBSCRIPTION_KEY: "cfg-for-node-subscription-key"
STAND_IN_MANAGER_SUBSCRIPTION_KEY: "cfg-for-node-subscription-key"
OTEL_EXPORTER_OTLP_HEADERS: "elastic-apm-secret-token"
Expand Down
16 changes: 8 additions & 8 deletions helm/values-prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ microservice-chart:
fullnameOverride: ""
image:
repository: ghcr.io/pagopa/pagopa-node-cfg-sync
tag: "0.0.3"
tag: "0.0.3-23-NOD-744-deploy-uat"
pullPolicy: Always
livenessProbe:
httpGet:
Expand Down Expand Up @@ -74,20 +74,20 @@ microservice-chart:
DB_NEXI_POSTGRES_SERVICE_IDENTIFIER: "NDP004DEV"
DB_NEXI_POSTGRES_CONNECTION_TIMEOUT: "15000"
DB_NEXI_POSTGRES_MAX_LIFETIME: "30000"
DB_CONFIG_URL: "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))"
DB_NEXI_ORACLE_URL: "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))"
DB_NEXI_ORACLE_USER: "NODO4_CFG"
DB_NEXI_ORACLE_ENABLED: "true"
DB_NEXI_ORACLE_SERVICE_IDENTIFIER: "NDP003DEV"
DB_NEXI_ORACLE_CONNECTION_TIMEOUT: "15000"
DB_NEXI_ORACLE_MAX_LIFETIME: "30000"
DB_PAGOPA_POSTGRES_URL: "jdbc:postgresql://ndp.p.db-nodo-pagamenti.com:6432/nodo?sslmode=require&prepareThreshold=0&currentSchema=cfg"
DB_PAGOPA_POSTGRES_URL: "jdbc:postgresql://nodo-db.p.internal.postgresql.pagopa.it:6432/nodo?sslmode=require&prepareThreshold=0&currentSchema=cfg"
DB_PAGOPA_POSTGRES_USER: "cfg"
DB_PAGOPA_POSTGRES_ENABLED: "true"
DB_PAGOPA_POSTGRES_SERVICE_IDENTIFIER: "NDP001DEV"
DB_PAGOPA_POSTGRES_CONNECTION_TIMEOUT: "15000"
DB_PAGOPA_POSTGRES_MAX_LIFETIME: "30000"
API_CONFIG_CACHE_URL: "https://api.uat.platform.pagopa.it/api-config-cache/o/v1/stakeholders/node/cache/schemas/v1"
STAND_IN_MANAGER_URL: "https://api.uat.platform.pagopa.it/stand-in-manager/api/v1"
API_CONFIG_CACHE_URL: "https://api.platform.pagopa.it/api-config-cache/o/v1/stakeholders/node/cache/schemas/v1"
STAND_IN_MANAGER_URL: "https://api.platform.pagopa.it/stand-in-manager/api/v1"
OTEL_SERVICE_NAME: "pagopanodecfgsync"
OTEL_RESOURCE_ATTRIBUTES: "deployment.environment=prod"
OTEL_EXPORTER_OTLP_ENDPOINT: "http://otel-collector.elastic-system.svc:4317"
Expand All @@ -97,14 +97,14 @@ microservice-chart:
OTEL_TRACES_SAMPLER: "always_on"
envSecret:
# required
APPLICATIONINSIGHTS_CONNECTION_STRING: 'ai-p-connection-string'
APPLICATIONINSIGHTS_CONNECTION_STRING: 'azure-insight-connection-string'
DB_PAGOPA_POSTGRES_PASSWORD: "db-cfg-password"
DB_NEXI_POSTGRES_PASSWORD: "db-nexi-cfg-password"
DB_NEXI_ORACLE_PASSWORD: "oracle-db-cfg-password"
API_CONFIG_CACHE_RX_CONNECTION_STRING: "nodo-dei-pagamenti-cache-sync-rx-connection-string-key"
API_CONFIG_CACHE_SA_CONNECTION_STRING: "nodo-dei-pagamenti-cache-sync-sa-connection-string-key"
API_CONFIG_CACHE_SA_CONNECTION_STRING: "node-cfg-sync-re-sa-connection-string-key"
STAND_IN_MANAGER_RX_CONNECTION_STRING: "nodo-dei-pagamenti-stand-in-sync-rx-connection-string-key"
STAND_IN_MANAGER_SA_CONNECTION_STRING: "nodo-dei-pagamenti-stand-in-sync-sa-connection-string-key"
STAND_IN_MANAGER_SA_CONNECTION_STRING: "node-cfg-sync-re-sa-connection-string-key"
API_CONFIG_CACHE_SUBSCRIPTION_KEY: "cfg-for-node-subscription-key"
STAND_IN_MANAGER_SUBSCRIPTION_KEY: "cfg-for-node-subscription-key"
OTEL_EXPORTER_OTLP_HEADERS: "elastic-apm-secret-token"
Expand Down
12 changes: 6 additions & 6 deletions helm/values-uat.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ microservice-chart:
fullnameOverride: ""
image:
repository: ghcr.io/pagopa/pagopa-node-cfg-sync
tag: "0.0.3"
tag: "0.0.3-23-NOD-744-deploy-uat"
pullPolicy: Always
livenessProbe:
httpGet:
Expand Down Expand Up @@ -74,13 +74,13 @@ microservice-chart:
DB_NEXI_POSTGRES_SERVICE_IDENTIFIER: "NDP004DEV"
DB_NEXI_POSTGRES_CONNECTION_TIMEOUT: "15000"
DB_NEXI_POSTGRES_MAX_LIFETIME: "30000"
DB_CONFIG_URL: "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))"
DB_NEXI_ORACLE_URL: "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))"
DB_NEXI_ORACLE_USER: "NODO4_CFG"
DB_NEXI_ORACLE_ENABLED: "true"
DB_NEXI_ORACLE_SERVICE_IDENTIFIER: "NDP003DEV"
DB_NEXI_ORACLE_CONNECTION_TIMEOUT: "15000"
DB_NEXI_ORACLE_MAX_LIFETIME: "30000"
DB_PAGOPA_POSTGRES_URL: "jdbc:postgresql://ndp.u.db-nodo-pagamenti.com:6432/nodo?sslmode=require&prepareThreshold=0&currentSchema=cfg"
DB_PAGOPA_POSTGRES_URL: "jdbc:postgresql://nodo-db.u.internal.postgresql.pagopa.it:6432/nodo?sslmode=require&prepareThreshold=0&currentSchema=cfg"
DB_PAGOPA_POSTGRES_USER: "cfg"
DB_PAGOPA_POSTGRES_ENABLED: "true"
DB_PAGOPA_POSTGRES_SERVICE_IDENTIFIER: "NDP001DEV"
Expand All @@ -97,14 +97,14 @@ microservice-chart:
OTEL_TRACES_SAMPLER: "always_on"
envSecret:
# required
APPLICATIONINSIGHTS_CONNECTION_STRING: 'ai-u-connection-string'
APPLICATIONINSIGHTS_CONNECTION_STRING: 'azure-insight-connection-string'
DB_PAGOPA_POSTGRES_PASSWORD: "db-cfg-password"
DB_NEXI_POSTGRES_PASSWORD: "db-nexi-cfg-password"
DB_NEXI_ORACLE_PASSWORD: "oracle-db-cfg-password"
API_CONFIG_CACHE_RX_CONNECTION_STRING: "nodo-dei-pagamenti-cache-sync-rx-connection-string-key"
API_CONFIG_CACHE_SA_CONNECTION_STRING: "nodo-dei-pagamenti-cache-sync-sa-connection-string-key"
API_CONFIG_CACHE_SA_CONNECTION_STRING: "node-cfg-sync-re-sa-connection-string-key"
STAND_IN_MANAGER_RX_CONNECTION_STRING: "nodo-dei-pagamenti-stand-in-sync-rx-connection-string-key"
STAND_IN_MANAGER_SA_CONNECTION_STRING: "nodo-dei-pagamenti-stand-in-sync-sa-connection-string-key"
STAND_IN_MANAGER_SA_CONNECTION_STRING: "node-cfg-sync-re-sa-connection-string-key"
API_CONFIG_CACHE_SUBSCRIPTION_KEY: "cfg-for-node-subscription-key"
STAND_IN_MANAGER_SUBSCRIPTION_KEY: "cfg-for-node-subscription-key"
OTEL_EXPORTER_OTLP_HEADERS: "elastic-apm-secret-token"
Expand Down
2 changes: 1 addition & 1 deletion openapi/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"title": "cfg-sync",
"description": "Microservice to update configuration schema of Nodo dei Pagamenti",
"termsOfService": "https://www.pagopa.gov.it/",
"version": "0.0.3"
"version": "0.0.3-23-NOD-744-deploy-uat"
},
"servers": [
{
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<groupId>it.gov.pagopa.node</groupId>
<artifactId>cfg-sync</artifactId>
<version>0.0.3</version>
<version>0.0.3-23-NOD-744-deploy-uat</version>
<description>Microservice to update configuration schema of Nodo dei Pagamenti</description>

<properties>
Expand Down

0 comments on commit bf701c1

Please sign in to comment.