Skip to content

Commit

Permalink
Configuration cleaning
Browse files Browse the repository at this point in the history
Signed-off-by: freddidierRTE <frederic-f.didier@rte-france.com>
  • Loading branch information
freddidierRTE committed Jul 1, 2024
1 parent 511d98b commit c4cdb12
Show file tree
Hide file tree
Showing 10 changed files with 39 additions and 138 deletions.
31 changes: 3 additions & 28 deletions server/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
version: '2.1'
services:
mongodb:
container_name: mongodb
image: mongo:4.4.4-bionic
ports:
- "27017:27017"
Expand All @@ -10,10 +11,8 @@ services:
rabbitmq:
container_name: rabbitmq
image: lfeoperatorfabric/of-rabbitmq:4.3.0.RELEASE
ports:
- "5672:5672"
- "15672:15672"
keycloak:
container_name: keycloak
image: keycloak/keycloak:23.0.7
command:
- -v
Expand All @@ -39,13 +38,7 @@ services:
user: ${USER_ID}:${USER_GID}
ports:
- "2103:2103"
- "4103:5005"
environment:
- REGISTRY_HOST=registry
- REGISTRY_PORT=8080
- DEPENDS_ON=CONFIG
volumes:
- "../certificates:/certificates_to_add"
- "./docker-configurations/users.yml:/config/application.yml"
- "./docker-configurations/common.yml:/config/common.yml"
businessconfig:
Expand All @@ -56,13 +49,7 @@ services:
user: ${USER_ID}:${USER_GID}
ports:
- "2100:2100"
- "4100:5005"
environment:
- REGISTRY_HOST=registry
- REGISTRY_PORT=8080
- DEPENDS_ON=CONFIG
volumes:
- "../certificates:/certificates_to_add"
- "./businessconfig-storage:/businessconfig-storage"
- "./docker-configurations/common.yml:/config/common.yml"
- "./docker-configurations/businessconfig.yml:/config/application.yml"
Expand All @@ -75,13 +62,7 @@ services:
user: ${USER_ID}:${USER_GID}
ports:
- "2102:2102"
- "4102:5005"
environment:
- REGISTRY_HOST=registry
- REGISTRY_PORT=8080
- DEPENDS_ON=CONFIG
volumes:
- "../certificates:/certificates_to_add"
- "./docker-configurations/common.yml:/config/common.yml"
- "./docker-configurations/cards-publication.yml:/config/application.yml"
cards-consultation:
Expand All @@ -93,13 +74,7 @@ services:
user: ${USER_ID}:${USER_GID}
ports:
- "2104:2104"
- "4104:5005"
environment:
- REGISTRY_HOST=registry
- REGISTRY_PORT=8080
- DEPENDS_ON=CONFIG
volumes:
- "../certificates:/certificates_to_add"
- "./docker-configurations/common.yml:/config/common.yml"
- "./docker-configurations/cards-consultation.yml:/config/application.yml"
web-ui:
Expand All @@ -117,7 +92,7 @@ services:
- "./nginx.conf:/etc/nginx/conf.d/default.conf"
cards-reminder:
container_name: cards-reminder
image: "lfeoperatorfabric/of-cards-reminder:SNAPSHOT"
image: "lfeoperatorfabric/of-cards-reminder:4.3.0.RELEASE"
depends_on:
- cards-publication
- users
Expand Down
7 changes: 0 additions & 7 deletions server/docker-configurations/businessconfig.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@


operatorfabric.businessconfig:
storage:
path: "/businessconfig-storage"

#here we put urls for all feign clients
users:
ribbon:
listOfServers: users:2103
40 changes: 2 additions & 38 deletions server/docker-configurations/cards-publication.yml
Original file line number Diff line number Diff line change
@@ -1,42 +1,6 @@

spring:
deserializer:
value:
delegate:
class: io.confluent.kafka.serializers.KafkaAvroDeserializer
# class: org.lfenergy.operatorfabric.cards.publication.kafka.consumer.KafkaAvroWithoutRegistryDeserializer
serializer:
value:
delegate:
class: io.confluent.kafka.serializers.KafkaAvroSerializer
# class: org.lfenergy.operatorfabric.cards.publication.kafka.producer.KafkaAvroWithoutRegistrySerializer
# uncomment kafka.consumer.group-id to enable Kafka
# kafka:
# consumer:
# group-id: opfab-command


#here we put urls for all feign clients
users:
ribbon:
listOfServers: users:2103

externalRecipients-url: "{\
externalRecipient: \"http://ext-app:8090/test\" \
}"

# WARNING : If you set this parameter to false , all users have the rights to respond to all cards
checkPerimeterForResponseCard: true
# Demo configuration, should be removed in production
operatorfabric:
cards-publication:
checkAuthenticationForCardSending: false
checkPerimeterForCardSending: false
kafka:
topics:
card:
topicname: opfab
response-card:
topicname: opfab-response
schema:
registry:
url: http://localhost:8081
checkPerimeterForCardSending: false
Empty file.
4 changes: 3 additions & 1 deletion server/docker-configurations/common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ operatorfabric:
jwk-set-uri: http://keycloak:89/auth/realms/dev/protocol/openid-connect/certs
jwt:
login-claim: preferred_username

internalAccount:
login: opfab
password: test
mongodb:
uri: mongodb://root:password@mongodb:27017/operator-fabric?authSource=admin

Expand Down
2 changes: 2 additions & 0 deletions server/docker-configurations/users.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ operatorfabric.users.default:
entities: ["ENTITY2_NL"]
- login: publisher_test
groups: ["Dispatcher", "ReadOnly", "Manager", "Demo"]
- login: opfab
groups: ["ADMIN"]
groups:
- id: ADMIN
name: ADMINISTRATORS
Expand Down
9 changes: 3 additions & 6 deletions server/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,10 @@ server {
proxy_set_header Host $http_host;
proxy_pass http://businessconfig:2100;
}
location /users {
location /users/ {
proxy_set_header Host $http_host;
proxy_pass http://users:2103/users;
}
location ~ "^/users/(.*)" {
proxy_set_header Host $http_host;
proxy_pass http://users:2103/$1$is_args$args;
proxy_pass http://users:2103/;
proxy_set_header X-Forwarded-For $remote_addr;
}
location /cards/ {
proxy_set_header Host $http_host;
Expand Down
23 changes: 23 additions & 0 deletions server/realms/export/dev-users-0.json
Original file line number Diff line number Diff line change
Expand Up @@ -176,5 +176,28 @@
"realmRoles" : [ "default-roles-dev" ],
"notBefore" : 0,
"groups" : [ ]
},
{
"id" : "2951ebcb-f804-48b1-9659-opfab",
"createdTimestamp" : 1697538125718,
"username" : "opfab",
"enabled" : true,
"totp" : false,
"emailVerified" : false,
"firstName" : "",
"lastName" : "",
"credentials" : [ {
"id" : "56211d65-789b-4f75-aa78-44d250opfab",
"type" : "password",
"userLabel" : "My password",
"createdDate" : 1697538135699,
"secretData" : "{\"value\":\"n9CDOwKI1B/zyrRAJbDShHdh6Iqk0AFg2pML7nwzdHk=\",\"salt\":\"s0mmPxfQh8PICyE6g17q+A==\",\"additionalParameters\":{}}",
"credentialData" : "{\"hashIterations\":27500,\"algorithm\":\"pbkdf2-sha256\",\"additionalParameters\":{}}"
} ],
"disableableCredentialTypes" : [ ],
"requiredActions" : [ ],
"realmRoles" : [ "default-roles-dev" ],
"notBefore" : 0,
"groups" : [ ]
}]
}
1 change: 1 addition & 0 deletions server/waitForOpfabToStart.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,5 @@ waitService businessconfig localhost:2100
waitService cards-publication localhost:2102/cards/userCard
waitService users localhost:2103
waitService cards-consultation localhost:2104
waitService cards-reminder localhost:2107
waitService keycloak localhost:89
60 changes: 2 additions & 58 deletions server/web-ui.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,14 @@
{
"checkPerimeterForResponseCard": true,
"showUserEntitiesOnTopRightOfTheScreen": true,
"archive": {
"filters": {
"page": {
"size": [
"10"
]
}
}
},
"feed": {
"card": {
"hideTimeFilter": false,
"time": {
"display": "BUSINESS"
},
"hideAckFilter": false,
"secondsBeforeLttdForClockDisplay": 3700,
"hideReadSort": false,
"hideSeveritySort": false
"secondsBeforeLttdForClockDisplay": 3700
},
"notify": false,
"timeline": {
"hide": false,
"domains": [
Expand All @@ -34,30 +21,6 @@
]
}
},
"i10n": {
"supported": {
"time-zones": [
{
"label": "Headquarters timezone",
"value": "Europe/Paris"
},
{
"label": "Down Under",
"value": "Australia/Melbourne"
},
"Europe/London",
"Europe/Dublin",
"Europe/Brussel",
"Europe/Berlin",
"Europe/Rome",
"Europe/Madrid",
"Europe/Lisbon",
"Europe/Amsterdam",
"Europe/Athens",
"Pacific/Samoa"
]
}
},
"i18n": {
"supported": {
"locales": [
Expand Down Expand Up @@ -95,29 +58,10 @@
"hiddenSettings": ["description"]
},
"about": {
"firstapplication": {
"name": "First application",
"rank": 1,
"version": "v12.34.56"
},
"keycloack": {
"name": "Keycloak",
"rank": 2,
"version": "12.0.2"
},
"lastapplication": {
"name": "Wonderful Solution",
"version": "0.1.2-RELEASE"
"version": "23.0.7"
}
},
"navbar": {
"hidden": ["logging","monitoring","usercard","calendar"],
"businessmenus" : {"type":"BOTH"}
},
"admin": {
"hidden": false
},
"feedConfiguration": {
"hidden": false
}
}

0 comments on commit c4cdb12

Please sign in to comment.