Skip to content

Commit

Permalink
Merge branch '1.6.0.release' ci_latest
Browse files Browse the repository at this point in the history
  • Loading branch information
freddidierRTE committed Sep 28, 2020
2 parents 1040383 + c51de2a commit 73ce93c
Show file tree
Hide file tree
Showing 171 changed files with 3,224 additions and 1,719 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,13 @@ src/test/**/karate/target/**/*
## Karate jar
src/test/**/karate.jar
## Tar.gz bundles
src/test/**/karate/**/*.tar.gz
src/test/**/*.tar.gz

# UI
ui/main/node_modules
ui/main/reports
ui/main/report.html
ui/main/package-lock.json

# Bundles for docker config
config/docker/businessconfig-storage/**
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.5.0.RELEASE
1.6.0.RELEASE
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/* Copyright (c) 2018-2020, RTE (http://www.rte-france.com)
* See AUTHORS.txt
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
* SPDX-License-Identifier: MPL-2.0
* This file is part of the OperatorFabric project.
*/



package org.lfenergy.operatorfabric.cards.model;

/**
* Define the kind of the card sender
* <dl>
* <dt>THIRD_PARTY</dt><dd>The sender is an external service</dd>
* <dt>ENTITY</dt><dd>The sender of the card is a user on behalf of the entity</dd>
* </dl>
* Note : This enum is created by hand because Swagger can't handle enums. It should match the corresponding enum definition in the Cards API.
*
*/
public enum PublisherTypeEnum {
EXTERNAL,
ENTITY
}
3 changes: 2 additions & 1 deletion client/cards/src/main/modeling/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"TitlePositionEnum": "org.lfenergy.operatorfabric.cards.model.TitlePositionEnum",
"RecipientEnum": "org.lfenergy.operatorfabric.cards.model.RecipientEnum",
"TimeSpanDisplayModeEnum": "org.lfenergy.operatorfabric.cards.model.TimeSpanDisplayModeEnum",
"EpochDate": "java.time.Instant"
"EpochDate": "java.time.Instant",
"PublisherTypeEnum": "org.lfenergy.operatorfabric.cards.model.PublisherTypeEnum"
}
}
2 changes: 1 addition & 1 deletion config/dev/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ services:
- "89:8080"
- "90:9990"
web-ui:
image: "lfeoperatorfabric/of-web-ui:1.5.0.RELEASE"
image: "lfeoperatorfabric/of-web-ui:1.6.0.RELEASE"
#user: ${USER_ID}:${USER_GID}
ports:
- "2002:80"
Expand Down
90 changes: 88 additions & 2 deletions config/dev/ngnix.conf
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,24 @@ server {
proxy_set_header Host $http_host;
proxy_pass http://172.17.0.1:2100;
}

location /users {
# enables `ng serve` mode
if ($request_method = 'OPTIONS') {
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Credentials' 'true';
add_header 'Access-Control-Allow-Methods' '*';
add_header 'Access-Control-Allow-Headers' '*';
add_header 'Content-Length' 0;
add_header 'Vary' 'Origin';
add_header 'Vary' 'Access-Control-Request-Method' ;
add_header 'Vary' 'Access-Control-Request-Headers';
return 204;
}
proxy_set_header Host $http_host;
proxy_pass http://172.17.0.1:2103/users;
}

location ~ "^/users/(.*)" {
# enables `ng serve` mode
if ($request_method = 'OPTIONS') {
Expand All @@ -94,6 +112,76 @@ server {
proxy_set_header Host $http_host;
proxy_pass http://172.17.0.1:2103/$1;
}

location /groups {
# enables `ng serve` mode
if ($request_method = 'OPTIONS') {
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Credentials' 'true';
add_header 'Access-Control-Allow-Methods' '*';
add_header 'Access-Control-Allow-Headers' '*';
add_header 'Content-Length' 0;
add_header 'Vary' 'Origin';
add_header 'Vary' 'Access-Control-Request-Method' ;
add_header 'Vary' 'Access-Control-Request-Headers';
return 204;
}
proxy_set_header Host $http_host;
proxy_pass http://172.17.0.1:2103/groups;
}

location ~ "^/groups/(.*)" {
# enables `ng serve` mode
if ($request_method = 'OPTIONS') {
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Credentials' 'true';
add_header 'Access-Control-Allow-Methods' '*';
add_header 'Access-Control-Allow-Headers' '*';
add_header 'Content-Length' 0;
add_header 'Vary' 'Origin';
add_header 'Vary' 'Access-Control-Request-Method' ;
add_header 'Vary' 'Access-Control-Request-Headers';
return 204;
}
proxy_set_header Host $http_host;
proxy_pass http://172.17.0.1:2103/$1;
}

location /entities {
# enables `ng serve` mode
if ($request_method = 'OPTIONS') {
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Credentials' 'true';
add_header 'Access-Control-Allow-Methods' '*';
add_header 'Access-Control-Allow-Headers' '*';
add_header 'Content-Length' 0;
add_header 'Vary' 'Origin';
add_header 'Vary' 'Access-Control-Request-Method' ;
add_header 'Vary' 'Access-Control-Request-Headers';
return 204;
}
proxy_set_header Host $http_host;
proxy_pass http://172.17.0.1:2103/entities;
}

location ~ "^/entities/(.*)" {
# enables `ng serve` mode
if ($request_method = 'OPTIONS') {
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Credentials' 'true';
add_header 'Access-Control-Allow-Methods' '*';
add_header 'Access-Control-Allow-Headers' '*';
add_header 'Content-Length' 0;
add_header 'Vary' 'Origin';
add_header 'Vary' 'Access-Control-Request-Method' ;
add_header 'Vary' 'Access-Control-Request-Headers';
return 204;
}
proxy_set_header Host $http_host;
proxy_pass http://172.17.0.1:2103/$1;
}


location /cards/ {
# enables `ng serve` mode
if ($request_method = 'OPTIONS') {
Expand All @@ -108,8 +196,6 @@ server {
return 204;
}
proxy_set_header Host $http_host;
# for SSE, keeps it alive, for one year as `1y` doesn't work
proxy_read_timeout 365d;
proxy_pass http://172.17.0.1:2104/;
}
location /cardspub/cards/userCard {
Expand Down
5 changes: 3 additions & 2 deletions config/dev/web-ui.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@
"time": {
"display": "BUSINESS"
},
"hideAckFilter": false
"hideAckFilter": false,
"secondsBeforeLttdForClockDisplay": 180
},
"notify": false,
"timeline": {
Expand Down Expand Up @@ -129,7 +130,7 @@
"styleWhenNightDayModeDesactivated" : "NIGHT"
},
"navbar": {
"hidden": ["logging","monitoring","freemessage"],
"hidden": [],
"businessmenus" : {"type":"BOTH"}
}
}
1 change: 1 addition & 0 deletions config/docker/cards-publication-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ users:
listOfServers: users:8080
# WARNING - You shoud replace localhost with the real IP , as locahost related to IP internal to docker
externalRecipients-url: "{\
processAction: \"http://localhost:8090/test\", \
api_test_externalRecipient1: \"http://localhost:8090/test\", \
api_test_externalRecipient2: \"http://localhost:8090/test\" \
}"
2 changes: 2 additions & 0 deletions config/docker/docker-compose.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@

echo USER_ID="$(id -u)" > .env
echo USER_GID="$(id -g)" >> .env
# create directory for bundle storage if not existing
mkdir -p businessconfig-storage
docker-compose up -d
34 changes: 20 additions & 14 deletions config/docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ services:
MONGO_INITDB_ROOT_PASSWORD: password
rabbitmq:
image: rabbitmq:3-management
ports:
- "5672:5672"
- "15672:15672"
# Port closed for security reasons , be careful if you open it
# ports:
# - "5672:5672"
# - "15672:15672"
keycloak:
image: jboss/keycloak:6.0.1
command: -Dkeycloak.migration.action=import -Dkeycloak.migration.provider=dir -Dkeycloak.migration.dir=/keycloak/export
Expand All @@ -23,58 +24,63 @@ services:
- ../keycloak:/keycloak
ports:
- "89:8080"
- "90:9990"
# Debug port closed for security reasons, be careful if you open it
# - "90:9990"
users:
container_name: users
image: "lfeoperatorfabric/of-users-business-service:1.5.0.RELEASE"
image: "lfeoperatorfabric/of-users-business-service:1.6.0.RELEASE"
user: ${USER_ID}:${USER_GID}
ports:
- "2103:8080"
- "4103:5005"
# Debug port closed for security reasons, be careful if you open it
# - "4103:5005"
volumes:
- "../certificates:/certificates_to_add"
- "./users-docker.yml:/config/application.yml"
- "./common-docker.yml:/config/common-docker.yml"
businessconfig:
container_name: businessconfig
image: "lfeoperatorfabric/of-businessconfig-business-service:1.5.0.RELEASE"
image: "lfeoperatorfabric/of-businessconfig-business-service:1.6.0.RELEASE"
depends_on:
- mongodb
user: ${USER_ID}:${USER_GID}
ports:
- "2100:8080"
- "4100:5005"
# Debug port closed for security reasons, be careful if you open it
# - "4100:5005"
volumes:
- "../certificates:/certificates_to_add"
- "../../services/core/businessconfig/src/main/docker/volume/businessconfig-storage:/businessconfig-storage"
- "./businessconfig-storage:/businessconfig-storage"
- "./common-docker.yml:/config/common-docker.yml"
- "./businessconfig-docker.yml:/config/application-docker.yml"
cards-publication:
container_name: cards-publication
image: "lfeoperatorfabric/of-cards-publication-business-service:1.5.0.RELEASE"
image: "lfeoperatorfabric/of-cards-publication-business-service:1.6.0.RELEASE"
depends_on:
- mongodb
user: ${USER_ID}:${USER_GID}
ports:
- "2102:8080"
- "4102:5005"
# Debug port closed for security reasons, be careful if you open it
# - "4102:5005"
volumes:
- "../certificates:/certificates_to_add"
- "./common-docker.yml:/config/common-docker.yml"
- "./cards-publication-docker.yml:/config/application-docker.yml"
cards-consultation:
container_name: cards-consultation
image: "lfeoperatorfabric/of-cards-consultation-business-service:1.5.0.RELEASE"
image: "lfeoperatorfabric/of-cards-consultation-business-service:1.6.0.RELEASE"
user: ${USER_ID}:${USER_GID}
ports:
- "2104:8080"
- "4104:5005"
# Debug port closed for security reasons, be careful if you open it
# - "4104:5005"
volumes:
- "../certificates:/certificates_to_add"
- "./common-docker.yml:/config/common-docker.yml"
- "./cards-consultation-docker.yml:/config/application-docker.yml"
web-ui:
image: "lfeoperatorfabric/of-web-ui:1.5.0.RELEASE"
image: "lfeoperatorfabric/of-web-ui:1.6.0.RELEASE"
ports:
- "2002:80"
depends_on:
Expand Down
71 changes: 69 additions & 2 deletions config/docker/nginx-cors-permissive.conf
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,75 @@ server {
proxy_set_header Host $http_host;
proxy_pass http://users:8080/$1;
}

location /groups {
# enables `ng serve` mode
if ($request_method = 'OPTIONS') {
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Credentials' 'true';
add_header 'Access-Control-Allow-Methods' '*';
add_header 'Access-Control-Allow-Headers' '*';
add_header 'Content-Length' 0;
add_header 'Vary' 'Origin';
add_header 'Vary' 'Access-Control-Request-Method' ;
add_header 'Vary' 'Access-Control-Request-Headers';
return 204;
}
proxy_set_header Host $http_host;
proxy_pass http://users:8080/groups;
}

location ~ "^/groups/(.*)" {
# enables `ng serve` mode
if ($request_method = 'OPTIONS') {
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Credentials' 'true';
add_header 'Access-Control-Allow-Methods' '*';
add_header 'Access-Control-Allow-Headers' '*';
add_header 'Content-Length' 0;
add_header 'Vary' 'Origin';
add_header 'Vary' 'Access-Control-Request-Method' ;
add_header 'Vary' 'Access-Control-Request-Headers';
return 204;
}
proxy_set_header Host $http_host;
proxy_pass http://users:8080/$1;
}

location /entities {
# enables `ng serve` mode
if ($request_method = 'OPTIONS') {
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Credentials' 'true';
add_header 'Access-Control-Allow-Methods' '*';
add_header 'Access-Control-Allow-Headers' '*';
add_header 'Content-Length' 0;
add_header 'Vary' 'Origin';
add_header 'Vary' 'Access-Control-Request-Method' ;
add_header 'Vary' 'Access-Control-Request-Headers';
return 204;
}
proxy_set_header Host $http_host;
proxy_pass http://users:8080/entities;
}

location ~ "^/entities/(.*)" {
# enables `ng serve` mode
if ($request_method = 'OPTIONS') {
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Credentials' 'true';
add_header 'Access-Control-Allow-Methods' '*';
add_header 'Access-Control-Allow-Headers' '*';
add_header 'Content-Length' 0;
add_header 'Vary' 'Origin';
add_header 'Vary' 'Access-Control-Request-Method' ;
add_header 'Vary' 'Access-Control-Request-Headers';
return 204;
}
proxy_set_header Host $http_host;
proxy_pass http://users:8080/$1;
}

location /cards/ {
# enables `ng serve` mode
if ($request_method = 'OPTIONS') {
Expand All @@ -108,8 +177,6 @@ server {
return 204;
}
proxy_set_header Host $http_host;
# for SSE, keeps it alive, for one year as `1y` doesn't work
proxy_read_timeout 365d;
proxy_pass http://cards-consultation:8080/;
}
location /cardspub/cards/userCard {
Expand Down
Loading

0 comments on commit 73ce93c

Please sign in to comment.