Skip to content
Open
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
37 changes: 20 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ $ cd deployment

### Application profiles _(alias)_
> [!NOTE]
> If you want to use profiles other than the ones associated with the folders (`dynamic-mapping`, `monitor`, `study`, `suite`, `technical`), you have to use profiles as explained in the [next section](#docker-compose-profiles).
> If you want to use profiles other than the ones associated with the folders (`dynamic-mapping`, `monitor`, `study`, `suite`, `technical`, `study-light`), you have to use profiles as explained in the [next section](#docker-compose-profiles).
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Broken in-page anchor #docker-compose-profiles.

The link targets #docker-compose-profiles, but the section header at line 92 is ### Docker-compose with profiles, which GitHub renders as the anchor #docker-compose-with-profiles. As written, the link will scroll to the top of the README.

🔧 Fix the anchor
-> If you want to use profiles other than the ones associated with the folders (`dynamic-mapping`, `monitor`, `study`, `suite`, `technical`, `study-light`), you have to use profiles as explained in the [next section](`#docker-compose-profiles`).
+> If you want to use profiles other than the ones associated with the folders (`dynamic-mapping`, `monitor`, `study`, `suite`, `technical`, `study-light`), you have to use profiles as explained in the [next section](`#docker-compose-with-profiles`).
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
> If you want to use profiles other than the ones associated with the folders (`dynamic-mapping`, `monitor`, `study`, `suite`, `technical`, `study-light`), you have to use profiles as explained in the [next section](#docker-compose-profiles).
> If you want to use profiles other than the ones associated with the folders (`dynamic-mapping`, `monitor`, `study`, `suite`, `technical`, `study-light`), you have to use profiles as explained in the [next section](`#docker-compose-with-profiles`).
🧰 Tools
🪛 markdownlint-cli2 (0.22.1)

[warning] 60-60: Link fragments should be valid

(MD051, link-fragments)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@README.md` at line 60, The in-page anchor in the sentence containing
"profiles as explained in the [next section](`#docker-compose-profiles`)" doesn't
match the header text "### Docker-compose with profiles"; update the link target
to the correct anchor `#docker-compose-with-profiles` (or alternatively rename
the header to "Docker-compose with profiles" -> "Docker-compose profiles" to
match `#docker-compose-profiles`) so the link points to the actual
"Docker-compose with profiles" section; locate the link text in README.md and
adjust the anchor or the header text accordingly.


```bash
$ cd docker-compose/suite
Expand All @@ -68,6 +68,10 @@ $ cd docker-compose/study
$ docker compose up
```
```bash
$ cd docker-compose/study-light
$ docker compose up
```
```bash
$ cd docker-compose/dynamic-mapping
$ docker compose up
```
Expand All @@ -91,22 +95,22 @@ _Everything described in this section is inside the folder `explicit-profiles`._
Here's the summary of the profiles and what services they includes:
| **Component \ Service** | **_(none)_** | **study** | **study-light** | **dynamic-mapping** | **dynamic-simulation** | **suite** | **import** | **kibana** | **pgadmin** | **metrics** | **monitor** |
|--- |--- |--- |--- |--- |--- |--- |--- |--- |--- |--- |--- |
| rabbitmq<br>postgres<br>elasticsearch<br>minio* | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | | ✅ |
| kibana<br>logstash<br>socat<br>logspout | | | | | | | | ✅ | | | |
| case-import-server | | | | | | | ✅ | | | | |
| kibana<br>logspout<br>logstash<br>socat | | | | | | | | ✅ | | | |
| elasticsearch-exporter<br>grafana<br>postgres-exporter<br>prometheus | | | | | | | | | | ✅ | |
| gridmonitor-app<br>monitor-lf-worker-server<br>monitor-notification-server<br>monitor-sa-worker-server<br>monitor-server | | | | | | | | | | | ✅ |
| pgadmin | | | | | | | | | ✅ | | |
| apps‑metadata‑server<br>mock‑user‑service<br>gateway<br>config‑server<br>loadflow‑server<br>user‑admin‑server | | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | | | | ✅ |
| config‑notification‑server<br>network‑conversion‑server<br>network‑store‑server | | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | | | | |
| actions‑server<br>case‑server<br>filter‑server<br>report‑server | | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | | | | ✅ |
| griddyna‑app<br>dynamic‑mapping‑server | | | | ✅ | ✅ | ✅ | | | | | |
| gridstudy‑app<br>dynamic‑simulation‑server<br>dynamic‑security‑analysis‑server<br>dynamic‑margin‑calculation‑server<br>timeseries‑server | | | | | ✅ | ✅ | | | | | |
| cgmes‑gl‑server<br>odre‑server<br>sensitivity‑analysis‑server<br>shortcircuit‑server<br>voltage‑init‑server<br>gridadmin‑app | | ✅ | | | | ✅ | | | | | |
| security‑analysis‑server | | ✅ | | | | ✅ | | | | | ✅ |
| directory‑server | | ✅ | ✅ | | ✅ | ✅ | | | | | ✅ |
| directory‑notification‑server<br>explore‑server<br>geo‑data‑server<br>gridexplore‑app<br>network‑map‑server<br>single‑line‑diagram‑server<br>study‑notification‑server<br>study‑server | | ✅ | ✅ | | ✅ | ✅ | | | | | |
| network‑modification‑server | | ✅ | ✅ | | ✅ | ✅ | | | | | ✅ |
| gridmonitor-app<br>monitor-server<br>monitor-sa-worker-server<br>monitor-lf-worker-server<br>monitor-notification-server | | | | | | | | | | | ✅ |
| case‑import‑server | | | | | | | ✅ | | | | |
| grafana<br>prometheus | | | | | | | | | | ✅ | |
| dynamic-margin-calculation-server<br>dynamic-security-analysis-server<br>dynamic-simulation-server<br>timeseries-server | | | | | ✅ | ✅ | | | | | |
| cgmes-gl-server<br>gridadmin-app<br>odre-server<br>sensitivity-analysis-server<br>shortcircuit-server<br>voltage-init-server | | ✅ | | | | ✅ | | | | | |
| dynamic-mapping-server<br>griddyna-app | | | | ✅ | ✅ | ✅ | | | | | |
| geo-data-server | | ✅ | | | ✅ | ✅ | | | | | |
| security-analysis-server | | ✅ | | | | ✅ | | | | | ✅ |
| directory-notification-server<br>explore-server<br>gridexplore-app<br>gridstudy-app<br>network-map-server<br>single-line-diagram-server<br>study-notification-server<br>study-server | | ✅ | ✅ | | ✅ | ✅ | | | | | |
| directory-server<br>network-modification-server | | ✅ | ✅ | | ✅ | ✅ | | | | | ✅ |
| actions-server | | ✅ | | ✅ | ✅ | ✅ | ✅ | | | | ✅ |
| config-notification-server<br>network-conversion-server<br>network-store-server<br>study-config-server<br>user-identity-server | | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | | | | |
| apps-metadata-server<br>case-server<br>config-server<br>filter-server<br>gateway<br>loadflow-server<br>mock-user-service<br>report-server<br>user-admin-server | | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | | | | ✅ |
| elasticsearch<br>postgres<br>rabbitmq<br>s3-storage | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |

To use a profile, you use:
```shell
Expand Down Expand Up @@ -561,4 +565,3 @@ services:
...
```
Now, when using ```docker compose up```, your custom Docker image will be used.

87 changes: 65 additions & 22 deletions docker-compose/docker-compose.base.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: '4.0'

services:
case-server:
profiles:
Expand All @@ -18,12 +16,20 @@ services:
- ../k8s/resources/common/config/case-server-application.yml:/config/specific/application.yml:Z
- ../k8s/resources/common/config/common-application.yml:/config/common/application.yml:Z
depends_on:
postgres:
condition: service_healthy
elasticsearch:
condition: service_healthy
s3-storage:
condition: service_healthy
rabbitmq:
condition: service_healthy
logspout:
condition: "service_started"
required: false
Comment on lines 18 to 29
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | 💤 Low value

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
fd -t f 'case-server-application.ya?ml$' -X rg -n -C2 -i 'rabbit|amqp|spring\.cloud\.stream'

Repository: gridsuite/deployment

Length of output: 46


🏁 Script executed:

#!/bin/bash
# First, let's find the docker-compose file mentioned in the review
find . -name "docker-compose.base.yml" -type f

Repository: gridsuite/deployment

Length of output: 105


🏁 Script executed:

#!/bin/bash
# Look for case-server related files in the repository
fd -t f 'case' | grep -E '(config|application|properties|yaml|yml)' | head -20

Repository: gridsuite/deployment

Length of output: 626


🏁 Script executed:

#!/bin/bash
# Check the docker-compose.base.yml file to understand context
cat docker-compose/docker-compose.base.yml | head -40

Repository: gridsuite/deployment

Length of output: 1133


🏁 Script executed:

#!/bin/bash
# Search for case-server service definition and its depends_on configuration
rg -A 10 "case-server:" docker-compose/ --type yaml

Repository: gridsuite/deployment

Length of output: 1452


🏁 Script executed:

#!/bin/bash
# Read the case-server-application.yml file
cat k8s/resources/common/config/case-server-application.yml

Repository: gridsuite/deployment

Length of output: 46


🏁 Script executed:

#!/bin/bash
# Also check the common-application.yml to see if rabbitmq is configured there
cat k8s/resources/common/config/common-application.yml | head -100

Repository: gridsuite/deployment

Length of output: 921


🏁 Script executed:

#!/bin/bash
# Search for any rabbitmq or amqp configuration across the k8s config directory
rg -i 'rabbit|amqp|spring\.cloud\.stream' k8s/resources/common/config/

Repository: gridsuite/deployment

Length of output: 463


🏁 Script executed:

#!/bin/bash
# Check the size and content of case-server-application.yml
wc -l k8s/resources/common/config/case-server-application.yml
cat -n k8s/resources/common/config/case-server-application.yml

Repository: gridsuite/deployment

Length of output: 122


🏁 Script executed:

#!/bin/bash
# Search for spring.cloud.stream bindings in case-server config
rg -i 'spring\.cloud\.stream|binding' k8s/resources/common/config/case-server-application.yml

Repository: gridsuite/deployment

Length of output: 46


🏁 Script executed:

#!/bin/bash
# Check which services in docker-compose depend on rabbitmq
rg -B5 'condition: service_healthy' docker-compose/docker-compose.base.yml | grep -E '(^\s+[a-z-]+:|rabbitmq)'

Repository: gridsuite/deployment

Length of output: 1485


🏁 Script executed:

#!/antml/bash
# List all services and their rabbitmq dependencies
rg 'rabbitmq:' -B20 docker-compose/ --type yaml | rg -E '^\s+[a-z-]+:|rabbitmq:'

Repository: gridsuite/deployment

Length of output: 461


🏁 Script executed:

#!/bin/bash
# Get all services from docker-compose and their rabbitmq dependency status
rg -A 30 '^\s+[a-z-]+:\s*$' docker-compose/docker-compose.base.yml | rg -E '^\s+[a-z-]+:\s*$|rabbitmq:'

Repository: gridsuite/deployment

Length of output: 461


🏁 Script executed:

#!/bin/bash
# Check which other service configs mention spring.cloud.stream or rabbitmq bindings
find k8s/resources/common/config -name '*application.yml' -type f

Repository: gridsuite/deployment

Length of output: 993


🏁 Script executed:

#!/bin/bash
# Check if there are service-specific spring.cloud.stream configurations
for file in $(find k8s/resources/common/config -name '*application.yml' -type f); do
  echo "=== $file ==="
  rg -i 'spring\.cloud\.stream|binding' "$file" || echo "No spring.cloud.stream"
done

Repository: gridsuite/deployment

Length of output: 1477


🏁 Script executed:

#!/bin/bash
# Check the case-import-server config since it also depends on rabbitmq
cat k8s/resources/common/config/case-import-server-application.yml

Repository: gridsuite/deployment

Length of output: 46


🏁 Script executed:

#!/bin/bash
# Get full docker-compose to identify which services actually use rabbitmq
grep -n "rabbitmq:" docker-compose/docker-compose.base.yml | head -20

Repository: gridsuite/deployment

Length of output: 222


🏁 Script executed:

#!/bin/bash
# Check services that depend on rabbitmq - identify which ones actually need it
awk '/depends_on:/,/restart:/' docker-compose/docker-compose.base.yml | grep -B 20 'rabbitmq:' | grep -E '^\s+[a-z-]+:|rabbitmq:'

Repository: gridsuite/deployment

Length of output: 1607


Remove or reconsider the rabbitmq: service_healthy dependency for case-server.

case-server is primarily a case storage service proxying S3 + Postgres + Elasticsearch. The hard dependency on RabbitMQ at startup is questionable: no spring.cloud.stream bindings are configured in case-server-application.yml (which is empty), and RabbitMQ is not on the documented startup critical path. A transient RabbitMQ outage will unnecessarily block case-server startup. Either remove this dependency entirely, change it to service_started with required: false, or confirm that case-server actually publishes/consumes messages at boot rather than lazily.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docker-compose/docker-compose.base.yml` around lines 18 - 29, The depends_on
entry for rabbitmq under the case-server service is too strict; remove or relax
it so case-server startup isn't blocked by transient RabbitMQ issues: locate the
depends_on block for the case-server service (the rabbitmq sub-entry) and either
remove the rabbitmq dependency entirely, or change its condition from
service_healthy to "service_started" and add required: false; alternatively
verify in case-server application config (case-server-application.yml) and code
that it actually binds to Spring Cloud Stream at boot—if it does, keep the
dependency but document why it's needed.

restart: unless-stopped
environment:
- JAVA_TOOL_OPTIONS=-Xmx186m #deployment: 768m
- JAVA_TOOL_OPTIONS=-Xmx186m
command: >
--server.port=80
--spring.config.additional-location=/config/
Expand All @@ -41,7 +47,6 @@ services:
- all
- suite
- study
- study-light
- dynamic-mapping
- dynamic-simulation
- import
Expand All @@ -54,19 +59,23 @@ services:
- ../k8s/resources/common/config/common-application.yml:/config/common/application.yml:Z
restart: unless-stopped
depends_on:
postgres:
condition: service_healthy
rabbitmq:
condition: service_healthy
logspout:
condition: "service_started"
required: false
environment:
- JAVA_TOOL_OPTIONS=-Xmx576m
- JAVA_TOOL_OPTIONS=-Xmx384m
command: --server.port=80 --spring.config.additional-location=/config/
sysctls:
- net.ipv4.ip_unprivileged_port_start=0 # for docker < 20.03.0
memswap_limit: 1g
memswap_limit: 768m
deploy:
resources:
limits:
memory: 1g
memory: 768m

filter-server:
profiles:
Expand All @@ -86,19 +95,23 @@ services:
- ../k8s/resources/common/config/common-application.yml:/config/common/application.yml:Z
restart: unless-stopped
depends_on:
postgres:
condition: service_healthy
rabbitmq:
condition: service_healthy
logspout:
condition: "service_started"
required: false
command: --server.port=80 --spring.config.additional-location=/config/
sysctls:
- net.ipv4.ip_unprivileged_port_start=0 # for docker < 20.03.0
environment:
- JAVA_TOOL_OPTIONS=-Xmx576m
memswap_limit: 1g
- JAVA_TOOL_OPTIONS=-Xmx384m
memswap_limit: 768m
deploy:
resources:
limits:
memory: 1g
memory: 768m

user-admin-server:
profiles:
Expand All @@ -118,6 +131,10 @@ services:
- ../k8s/resources/common/config/common-application.yml:/config/common/application.yml:Z
restart: unless-stopped
depends_on:
postgres:
condition: service_healthy
rabbitmq:
condition: service_healthy
logspout:
condition: "service_started"
required: false
Expand Down Expand Up @@ -149,6 +166,8 @@ services:
- ../k8s/resources/common/config/common-application.yml:/config/common/application.yml:Z
restart: unless-stopped
depends_on:
postgres:
condition: service_healthy
logspout:
condition: "service_started"
required: false
Expand Down Expand Up @@ -180,6 +199,8 @@ services:
- ../k8s/resources/common/config/common-application.yml:/config/common/application.yml:Z
restart: unless-stopped
depends_on:
postgres:
condition: service_healthy
logspout:
condition: "service_started"
required: false
Expand Down Expand Up @@ -212,19 +233,21 @@ services:
- ../k8s/resources/common/config/common-application.yml:/config/common/application.yml:Z
restart: unless-stopped
depends_on:
postgres:
condition: service_healthy
logspout:
condition: "service_started"
required: false
command: --server.port=80 --spring.config.additional-location=/config/
sysctls:
- net.ipv4.ip_unprivileged_port_start=0 # for docker < 20.03.0
environment:
- JAVA_TOOL_OPTIONS=-Xmx384m
memswap_limit: 768m
- JAVA_TOOL_OPTIONS=-Xmx186m
memswap_limit: 512m
deploy:
resources:
limits:
memory: 768m
memory: 512m

network-store-server:
profiles:
Expand All @@ -243,19 +266,21 @@ services:
- ../k8s/resources/common/config/common-application.yml:/config/common/application.yml:Z
restart: unless-stopped
depends_on:
postgres:
condition: service_healthy
logspout:
condition: "service_started"
required: false
environment:
- JAVA_TOOL_OPTIONS=-Xmx1086m #deployment: 1408m
- 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: 1664m #deployment: 2048m
memswap_limit: 1280m
deploy:
resources:
limits:
memory: 1664m #deployment: 2048m
memory: 1280m

network-conversion-server:
profiles:
Expand All @@ -275,19 +300,25 @@ services:
- ../k8s/resources/common/config/network-conversion-server-config.yml:/home/powsybl/.itools/config.yml:Z
restart: unless-stopped
depends_on:
elasticsearch:
condition: service_healthy
s3-storage:
condition: service_healthy
rabbitmq:
condition: service_healthy
logspout:
condition: "service_started"
required: false
environment:
- JAVA_TOOL_OPTIONS=-Xmx768m #deployment: 1408m
- JAVA_TOOL_OPTIONS=-Xmx576m
command: --server.port=80 --spring.config.additional-location=/config/
sysctls:
- net.ipv4.ip_unprivileged_port_start=0 # for docker < 20.03.0
memswap_limit: 1280m #deployment: 2048m
memswap_limit: 1g
deploy:
resources:
limits:
memory: 1280m #deployment: 2048m
memory: 1g

loadflow-server:
profiles:
Expand All @@ -308,19 +339,23 @@ services:
- ../k8s/resources/common/config/loadflow-server-config.yml:/home/powsybl/.itools/config.yml:Z
restart: unless-stopped
depends_on:
postgres:
condition: service_healthy
rabbitmq:
condition: service_healthy
logspout:
condition: "service_started"
required: false
environment:
- JAVA_TOOL_OPTIONS=-Xmx768m #deployment: 1408m
- JAVA_TOOL_OPTIONS=-Xmx576m
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 #deployment: 3072m
memswap_limit: 1g
deploy:
resources:
limits:
memory: 1792m #deployment: 3072m
memory: 1g

config-server:
profiles:
Expand All @@ -339,6 +374,11 @@ services:
- ../k8s/resources/common/config/config-server-application.yml:/config/specific/application.yml:Z
- ../k8s/resources/common/config/common-application.yml:/config/common/application.yml:Z
restart: unless-stopped
depends_on:
postgres:
condition: service_healthy
rabbitmq:
condition: service_healthy
Comment on lines +377 to +381
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

logspout depends_on entry was dropped for config-server and config-notification-server.

Every other service in this file retains the optional logspout: service_started (with required: false) ordering hint, but it’s gone here. Given the PR description states the intent is to add missing depends_on entries (not remove them), this looks unintentional and will make these two containers skip the logspout start ordering when the kibana/all profile is active.

🔧 Restore logspout ordering
     depends_on:
       postgres:
         condition: service_healthy
       rabbitmq:
         condition: service_healthy
+      logspout:
+        condition: "service_started"
+        required: false

(apply analogously to config-notification-server)

Also applies to: 409-411

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docker-compose/docker-compose.base.yml` around lines 377 - 381, The
docker-compose.services for config-server and config-notification-server
unintentionally lost the optional logspout ordering dependency; restore a
depends_on entry mirroring other services by adding a logspout: { condition:
service_started, required: false } under the existing depends_on block for both
config-server and config-notification-server (look for the depends_on:
postgres/rabbitmq blocks in docker-compose.base.yml and add the logspout entry
similarly, and apply the same fix at the other occurrence referenced around
lines ~409-411).

environment:
- JAVA_TOOL_OPTIONS=-Xmx96m
command: --server.port=80 --spring.config.additional-location=/config/
Expand Down Expand Up @@ -366,6 +406,9 @@ services:
- ../k8s/resources/common/config/config-notification-server-application.yml:/config/specific/application.yml:Z
- ../k8s/resources/common/config/common-application.yml:/config/common/application.yml:Z
restart: unless-stopped
depends_on:
rabbitmq:
condition: service_healthy
environment:
- JAVA_TOOL_OPTIONS=-Xmx96m
command: --server.port=80 --spring.config.additional-location=/config/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: '4.0'

services:
griddyna-app:
profiles:
Expand Down Expand Up @@ -38,16 +36,18 @@ services:
- ../../k8s/resources/common/config/common-application.yml:/config/common/application.yml:Z
restart: unless-stopped
depends_on:
postgres:
condition: service_healthy
logspout:
condition: "service_started"
required: false
environment:
- JAVA_TOOL_OPTIONS=-Xmx576m
- JAVA_TOOL_OPTIONS=-Xmx384m
command: --server.port=80 --spring.config.additional-location=/config/
sysctls:
- net.ipv4.ip_unprivileged_port_start=0 # for docker < 20.03.0
memswap_limit: 1g
memswap_limit: 768m
deploy:
resources:
limits:
memory: 1g
memory: 768m
Loading