From 30a3ef8e893fabb08fd48242ec81f77f4e1e27ab Mon Sep 17 00:00:00 2001 From: David BRAQUART Date: Wed, 18 Dec 2024 17:09:18 +0100 Subject: [PATCH 1/3] rename Signed-off-by: David BRAQUART --- .github/workflows/main.yml | 2 +- README.md | 4 +- docker-compose/docker-compose.base.yml | 12 ++--- .../study/docker-compose.override.yml | 54 +++++++++++++++++++ .../technical/create-postgres-databases.sh | 2 +- k8s/live/local/kustomization.yaml | 2 +- ....yaml => study-config-server-ingress.yaml} | 12 ++--- ...ml => study-config-server-application.yml} | 0 k8s/resources/common/kustomization.yaml | 8 +-- ...ml => study-config-server-deployment.yaml} | 16 +++--- ....yaml => study-config-server-service.yaml} | 6 +-- 11 files changed, 86 insertions(+), 32 deletions(-) rename k8s/live/local/{spreadsheet-config-server-ingress.yaml => study-config-server-ingress.yaml} (77%) rename k8s/resources/common/config/{spreadsheet-config-server-application.yml => study-config-server-application.yml} (100%) rename k8s/resources/common/{spreadsheet-config-server-deployment.yaml => study-config-server-deployment.yaml} (52%) rename k8s/resources/common/{spreadsheet-config-server-service.yaml => study-config-server-service.yaml} (53%) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 61b52b5b..95544b9f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -41,7 +41,7 @@ on: - voltage_init_server_updated - case_import_server_updated - gridadmin_app_updated - - spreadsheet_config_server_updated + - study_config_server_updated jobs: build: diff --git a/README.md b/README.md index 524e7571..6eb5592b 100644 --- a/README.md +++ b/README.md @@ -214,7 +214,7 @@ http://localhost:5033/swagger-ui.html // user-admin-server http://localhost:5034/swagger-ui.html // user-identity-server http://localhost:5030/swagger-ui.html // sensitivity-analysis-server http://localhost:5031/swagger-ui.html // shortcircuit-server -http://localhost:5035/swagger-ui.html // spreadsheet-config-server +http://localhost:5035/swagger-ui.html // study-config-server http://localhost:5037/swagger-ui.html // timeseries-server http://localhost:5038/swagger-ui.html // voltage-init-server http://localhost:5039/swagger-ui.html // case-import-server @@ -421,7 +421,7 @@ http:///shortcircuit-server/swagger-ui.html http:///timeseries-server/swagger-ui.html http:///voltage-init-server/swagger-ui.html http:///case-import-server/swagger-ui.html -http:///spreadsheet-config-server/swagger-ui.html +http:///study-config-server/swagger-ui.html ``` ## How to use a local docker image into Minikube? diff --git a/docker-compose/docker-compose.base.yml b/docker-compose/docker-compose.base.yml index 7dcc26fd..9780764d 100644 --- a/docker-compose/docker-compose.base.yml +++ b/docker-compose/docker-compose.base.yml @@ -9,7 +9,7 @@ services: - dynamic-mapping - dynamic-simulation - import - image: powsybl/case-server:latest + image: inca.rte-france.com/gridsuite/powsybl-case-server-rte:latest ports: - 5000:80 volumes: @@ -130,7 +130,7 @@ services: limits: memory: 384m - spreadsheet-config-server: + study-config-server: profiles: - all - suite @@ -139,11 +139,11 @@ services: - dynamic-mapping - dynamic-simulation - import - image: gridsuite/spreadsheet-config-server:latest + image: gridsuite/study-config-server:latest ports: - 5035:80 volumes: - - $PWD/../../k8s/resources/common/config/spreadsheet-config-server-application.yml:/config/specific/application.yml:Z + - $PWD/../../k8s/resources/common/config/study-config-server-application.yml:/config/specific/application.yml:Z - $PWD/../../k8s/resources/common/config/common-application.yml:/config/common/application.yml:Z restart: unless-stopped depends_on: @@ -232,7 +232,7 @@ services: - dynamic-mapping - dynamic-simulation - import - image: powsybl/network-store-server:latest + image: inca.rte-france.com/gridsuite/powsybl-network-store-server-rte:latest ports: - 8080:80 volumes: @@ -263,7 +263,7 @@ services: - dynamic-mapping - dynamic-simulation - import - image: powsybl/network-conversion-server:latest + image: inca.rte-france.com/gridsuite/powsybl-network-conversion-server-rte:latest ports: - 5003:80 volumes: diff --git a/docker-compose/study/docker-compose.override.yml b/docker-compose/study/docker-compose.override.yml index 66d3b504..fc335fe6 100644 --- a/docker-compose/study/docker-compose.override.yml +++ b/docker-compose/study/docker-compose.override.yml @@ -597,3 +597,57 @@ services: limits: memory: 128m restart: unless-stopped + + state-estimation-server: + profiles: + - all + - suite + - study + image: inca.rte-france.com/gridsuite/state-estimation-server-rte:latest + ports: + - 6040:80 + volumes: + - $PWD/../../k8s/resources/common/config/common-application.yml:/config/common/application.yml:Z + - $PWD/../../k8s/resources/state-estimation-server-config.yml:/home/powsybl/.itools/config.yml:Z + restart: unless-stopped + depends_on: + logspout: + condition: "service_started" + required: false + environment: + - JAVA_TOOL_OPTIONS=-Xmx768m + command: --server.port=80 --spring.config.additional-location=/config/ + sysctls: + - net.ipv4.ip_unprivileged_port_start=0 # for docker < 20.03.0 + memswap_limit: 1792m + deploy: + resources: + limits: + memory: 1792m + + state-estimation-orchestrator-server: + profiles: + - all + - suite + - study + image: inca.rte-france.com/gridsuite/state-estimation-orchestrator-server-rte:latest + ports: + - 6041:80 + volumes: + - $PWD/../../k8s/resources/common/config/common-application.yml:/config/common/application.yml:Z + - $PWD/../../k8s/resources/state-estimation-orchestrator-server-config.yml:/home/powsybl/.itools/config.yml:Z + restart: unless-stopped + depends_on: + logspout: + condition: "service_started" + required: false + environment: + - JAVA_TOOL_OPTIONS=-Xmx768m + command: --server.port=80 --spring.config.additional-location=/config/ + sysctls: + - net.ipv4.ip_unprivileged_port_start=0 # for docker < 20.03.0 + memswap_limit: 1792m + deploy: + resources: + limits: + memory: 1792m diff --git a/docker-compose/technical/create-postgres-databases.sh b/docker-compose/technical/create-postgres-databases.sh index 0571240e..2d2165f1 100755 --- a/docker-compose/technical/create-postgres-databases.sh +++ b/docker-compose/technical/create-postgres-databases.sh @@ -27,7 +27,7 @@ psql --username $POSTGRES_USER --dbname $POSTGRES_DEFAULT_DB <<-EOSQL create database "${DATABASE_PREFIX_NAME}voltageinit"; create database "${DATABASE_PREFIX_NAME}loadflow"; create database "${DATABASE_PREFIX_NAME}stateestimation"; - create database "${DATABASE_PREFIX_NAME}spreadsheetconfig"; + create database "${DATABASE_PREFIX_NAME}studyconfig"; create database "${DATABASE_PREFIX_NAME}useridentity_oidcreplication"; EOSQL } diff --git a/k8s/live/local/kustomization.yaml b/k8s/live/local/kustomization.yaml index 416d942a..031997f5 100644 --- a/k8s/live/local/kustomization.yaml +++ b/k8s/live/local/kustomization.yaml @@ -43,7 +43,7 @@ resources: - shortcircuit-server-ingress.yaml - timeseries-server-ingress.yaml - voltage-init-server-ingress.yaml - - spreadsheet-config-server-ingress.yaml + - study-config-server-ingress.yaml configMapGenerator: - name: gridapps-env-configmap diff --git a/k8s/live/local/spreadsheet-config-server-ingress.yaml b/k8s/live/local/study-config-server-ingress.yaml similarity index 77% rename from k8s/live/local/spreadsheet-config-server-ingress.yaml rename to k8s/live/local/study-config-server-ingress.yaml index 1d000058..003fd8cc 100644 --- a/k8s/live/local/spreadsheet-config-server-ingress.yaml +++ b/k8s/live/local/study-config-server-ingress.yaml @@ -1,14 +1,14 @@ apiVersion: networking.k8s.io/v1 kind: Ingress metadata: - name: spreadsheet-config-server-ingress + name: study-config-server-ingress annotations: nginx.ingress.kubernetes.io/configuration-snippet: | # our containers host at '/' so can't possibly make a difference between # '/XXX/' and '/XXX' (trailing slash) (which would respectively become # '/' and '' inside the container but an empty path doesn't exist in http) # so always redirect '/XXX' to '/XXX/' in the client outside the container - rewrite ^/spreadsheet-config-server$ /spreadsheet-config-server/ permanent; + rewrite ^/study-config-server$ /study-config-server/ permanent; # springfox swagger-ui uses X-Forwarded-Prefix to find the # base url when behind a reverse proxy. @@ -16,11 +16,11 @@ metadata: # (nginx.ingress.kubernetes.io/x-forwarded-prefix) # but it only works when using rewrite-target, which we can't use because # we have properly encoded slashs in urls - proxy_set_header X-Forwarded-Prefix /spreadsheet-config-server/; + proxy_set_header X-Forwarded-Prefix /study-config-server/; # using this instead of standard rewrite as a workaround to avoid decoding slashes in urls # we sometimes have ids in the urls that contain properly encoded slashes - if ($request_uri ~ "^/spreadsheet-config-server(/.*)") { + if ($request_uri ~ "^/study-config-server(/.*)") { proxy_pass http://upstream_balancer$1; break; } @@ -28,10 +28,10 @@ spec: rules: - http: paths: - - path: /spreadsheet-config-server(/|$) + - path: /study-config-server(/|$) pathType: Prefix backend: service: - name: spreadsheet-config-server + name: study-config-server port: number: 80 diff --git a/k8s/resources/common/config/spreadsheet-config-server-application.yml b/k8s/resources/common/config/study-config-server-application.yml similarity index 100% rename from k8s/resources/common/config/spreadsheet-config-server-application.yml rename to k8s/resources/common/config/study-config-server-application.yml diff --git a/k8s/resources/common/kustomization.yaml b/k8s/resources/common/kustomization.yaml index 01dfe1e2..93f9c581 100644 --- a/k8s/resources/common/kustomization.yaml +++ b/k8s/resources/common/kustomization.yaml @@ -36,8 +36,8 @@ resources: - config-notification-server-service.yaml - user-admin-server-deployment.yaml - user-admin-server-service.yaml - - spreadsheet-config-server-deployment.yaml - - spreadsheet-config-server-service.yaml + - study-config-server-deployment.yaml + - study-config-server-service.yaml - user-identity-oidc-replication-server-deployment.yaml - user-identity-server-service.yaml @@ -98,9 +98,9 @@ configMapGenerator: - name: user-admin-server-configmap-specific files: - application.yml=config/user-admin-server-application.yml - - name: spreadsheet-config-server-configmap-specific + - name: study-config-server-configmap-specific files: - - application.yml=config/spreadsheet-config-server-application.yml + - application.yml=config/study-config-server-application.yml - name: user-identity-oidc-replication-server-configmap-specific files: - application.yml=config/user-identity-oidc-replication-server-application.yml diff --git a/k8s/resources/common/spreadsheet-config-server-deployment.yaml b/k8s/resources/common/study-config-server-deployment.yaml similarity index 52% rename from k8s/resources/common/spreadsheet-config-server-deployment.yaml rename to k8s/resources/common/study-config-server-deployment.yaml index aa152402..fd327afa 100644 --- a/k8s/resources/common/spreadsheet-config-server-deployment.yaml +++ b/k8s/resources/common/study-config-server-deployment.yaml @@ -1,9 +1,9 @@ apiVersion: apps/v1 kind: Deployment metadata: - name: spreadsheet-config-server + name: study-config-server labels: - name: spreadsheet-config-server + name: study-config-server version: "1" app.kubernetes.io/component: gridsuite-springboot gridsuite.org/springboot-with-database: "true" @@ -12,19 +12,19 @@ metadata: spec: selector: matchLabels: - name: spreadsheet-config-server + name: study-config-server template: metadata: labels: - name: spreadsheet-config-server + name: study-config-server spec: containers: - name: main - image: docker.io/gridsuite/spreadsheet-config-server:latest + image: docker.io/gridsuite/study-config-server:latest volumeMounts: - mountPath: /config/specific - name: spreadsheet-config-server-configmap-specific-volume + name: study-config-server-configmap-specific-volume volumes: - - name: spreadsheet-config-server-configmap-specific-volume + - name: study-config-server-configmap-specific-volume configMap: - name: spreadsheet-config-server-configmap-specific + name: study-config-server-configmap-specific diff --git a/k8s/resources/common/spreadsheet-config-server-service.yaml b/k8s/resources/common/study-config-server-service.yaml similarity index 53% rename from k8s/resources/common/spreadsheet-config-server-service.yaml rename to k8s/resources/common/study-config-server-service.yaml index 4d6a966b..6236f4b8 100644 --- a/k8s/resources/common/spreadsheet-config-server-service.yaml +++ b/k8s/resources/common/study-config-server-service.yaml @@ -2,9 +2,9 @@ apiVersion: v1 kind: Service metadata: labels: - name: spreadsheet-config-server + name: study-config-server app.kubernetes.io/component: gridsuite-springboot - name: spreadsheet-config-server + name: study-config-server spec: selector: - name: spreadsheet-config-server + name: study-config-server From 269a2e0050313b75530b3f50bb0d151b579bdff2 Mon Sep 17 00:00:00 2001 From: David BRAQUART Date: Thu, 19 Dec 2024 10:24:47 +0100 Subject: [PATCH 2/3] rev remark: remove unrelevant inca patch Signed-off-by: David BRAQUART --- docker-compose/docker-compose.base.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docker-compose/docker-compose.base.yml b/docker-compose/docker-compose.base.yml index 9780764d..9b9d5f1c 100644 --- a/docker-compose/docker-compose.base.yml +++ b/docker-compose/docker-compose.base.yml @@ -9,7 +9,7 @@ services: - dynamic-mapping - dynamic-simulation - import - image: inca.rte-france.com/gridsuite/powsybl-case-server-rte:latest + image: powsybl/case-server:latest ports: - 5000:80 volumes: @@ -232,7 +232,7 @@ services: - dynamic-mapping - dynamic-simulation - import - image: inca.rte-france.com/gridsuite/powsybl-network-store-server-rte:latest + image: powsybl/network-store-server:latest ports: - 8080:80 volumes: @@ -263,7 +263,7 @@ services: - dynamic-mapping - dynamic-simulation - import - image: inca.rte-france.com/gridsuite/powsybl-network-conversion-server-rte:latest + image: powsybl/network-conversion-server:latest ports: - 5003:80 volumes: From 116ad5ca21aa8c8eed682ae8f73b14e2d0dc9d7c Mon Sep 17 00:00:00 2001 From: David BRAQUART Date: Thu, 19 Dec 2024 10:30:54 +0100 Subject: [PATCH 3/3] rev remark: remove unrelevant estim patch Signed-off-by: David BRAQUART --- .../study/docker-compose.override.yml | 54 ------------------- 1 file changed, 54 deletions(-) diff --git a/docker-compose/study/docker-compose.override.yml b/docker-compose/study/docker-compose.override.yml index fc335fe6..66d3b504 100644 --- a/docker-compose/study/docker-compose.override.yml +++ b/docker-compose/study/docker-compose.override.yml @@ -597,57 +597,3 @@ services: limits: memory: 128m restart: unless-stopped - - state-estimation-server: - profiles: - - all - - suite - - study - image: inca.rte-france.com/gridsuite/state-estimation-server-rte:latest - ports: - - 6040:80 - volumes: - - $PWD/../../k8s/resources/common/config/common-application.yml:/config/common/application.yml:Z - - $PWD/../../k8s/resources/state-estimation-server-config.yml:/home/powsybl/.itools/config.yml:Z - restart: unless-stopped - depends_on: - logspout: - condition: "service_started" - required: false - environment: - - JAVA_TOOL_OPTIONS=-Xmx768m - command: --server.port=80 --spring.config.additional-location=/config/ - sysctls: - - net.ipv4.ip_unprivileged_port_start=0 # for docker < 20.03.0 - memswap_limit: 1792m - deploy: - resources: - limits: - memory: 1792m - - state-estimation-orchestrator-server: - profiles: - - all - - suite - - study - image: inca.rte-france.com/gridsuite/state-estimation-orchestrator-server-rte:latest - ports: - - 6041:80 - volumes: - - $PWD/../../k8s/resources/common/config/common-application.yml:/config/common/application.yml:Z - - $PWD/../../k8s/resources/state-estimation-orchestrator-server-config.yml:/home/powsybl/.itools/config.yml:Z - restart: unless-stopped - depends_on: - logspout: - condition: "service_started" - required: false - environment: - - JAVA_TOOL_OPTIONS=-Xmx768m - command: --server.port=80 --spring.config.additional-location=/config/ - sysctls: - - net.ipv4.ip_unprivileged_port_start=0 # for docker < 20.03.0 - memswap_limit: 1792m - deploy: - resources: - limits: - memory: 1792m