Skip to content

Commit 3861508

Browse files
author
Dennis Labordus
committed
Deployment description
Signed-off-by: Dennis Labordus <[email protected]>
1 parent e3f3800 commit 3861508

File tree

5 files changed

+85
-38
lines changed

5 files changed

+85
-38
lines changed

DEPLOYMENT.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<!--
2+
SPDX-FileCopyrightText: 2021 Alliander N.V.
3+
4+
SPDX-License-Identifier: Apache-2.0
5+
-->
6+
7+
# Deployment View
8+
9+
Below is a global overview of the expected deployment of the CoMPAS Environment.
10+
11+
![Deployment View](images/deployment-view.png)
12+
13+
The engineer uses an internet browser to connect to the web application. The internet browser also sends
14+
REST Calls to the different back-end services. All request are going to the same base URL, for instance
15+
http://localhost/ in the Docker Compose variant.
16+
17+
The internet browser will first go through a reverse proxy that will first validate if the engineer is logged in.
18+
If not an SSO Provider is used log the engineer in. This SSO Provider also delivers a JSON Web Token (JWT) to be
19+
used by the reverse proxy.
20+
21+
Depending on the context root the reverse proxy send the request further to the container. The JWT is added as
22+
authorization header to the requests to the containers. The JWT also contains the roles the engineer has.
23+
24+
The container validates the JWT using a verification key. This is often an URL to the SSO Provider that returns
25+
a JSON Web Key (Set) (JWK/JWKS). Also it uses the configured Path to retrieve the Roles/Groups.
26+
27+
## Local Deployment
28+
29+
- **Docker Compose**: Container Environment
30+
- **KeyCloak**: For the local deployment found in the GIT Repository we are using KeyCloak as an SSO Provider.
31+
All the users and roles are configured in KeyCloak.
32+
- **OpenResty**: As reverse proxy we are using a customized docker image of OpenResty. OpenResty verifies if the user
33+
is logged in and injects the JWT it retrieved from KeyCloak to the request going to the back-end services.
34+
35+
## Amazon Cloud (AWS)
36+
37+
- **Amazon EKS**: Container Environment?
38+
- **Amazon Cognito**: SSO Provider?
39+
- **AWS Elastic Load Balancing**: Reverse proxy?

INTEGRATION_TESTING.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
<!--
2+
SPDX-FileCopyrightText: 2021 Alliander N.V.
3+
4+
SPDX-License-Identifier: Apache-2.0
5+
-->
6+
7+
# Integration Testing
8+
9+
To improve the quality of the application more beside the testing in the separate repositories we also created some integration
10+
tests to test all components together. The integration tests are executed against the Docker Compose version in this project.
11+
12+
We are using the [Robot Framework](https://robotframework.org/) to execute the integration tests. For the Robot Framework we are
13+
using the [Browser Library](https://github.com/MarketSquare/robotframework-browser) to do the Web testing. this Library is based
14+
on [Playwright](https://playwright.dev/). All Integration Tests and data can be found in the directory 'integration-testing'.
15+
Output can be found in the directory 'target' is below commands and Github Actions are used.
16+
17+
Some useful links:
18+
- [Robot Framework](https://robotframework.org/)
19+
- [Robot Framework User Guid](https://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html)
20+
- [Robot Framework BuildIn Keywords](https://robotframework.org/robotframework/latest/libraries/BuiltIn.html)
21+
- [Browser Library](https://github.com/MarketSquare/robotframework-browser)
22+
- [Browser Library Keywords](https://marketsquare.github.io/robotframework-browser/Browser.html)
23+
- [Playwright](https://playwright.dev/)
24+
- [Playwright Documentation](https://playwright.dev/docs/intro/)
25+
26+
Some useful commands to execute the Robot Framework locally.
27+
Please follow the instructions of [Robot Framework](https://robotframework.org/) to install the Framework.
28+
And also follow the instruction of [Browser Library](https://github.com/MarketSquare/robotframework-browser) to install this needed library.
29+
30+
```
31+
# Prefer to remove the target directory before starting.
32+
rm -r target
33+
34+
# Normal run of all the test suites (with firefox, headless).
35+
robot -d target/firefox integration-testing/
36+
37+
# Run of all the test suites (with firefox in presenter mode to better follow what happens).
38+
robot -d target/firefox -v browser:firefox -v enable_presenter_mode:true -v headless:false integration-testing/
39+
40+
# Run of all the test suites (with chromium, headless), looks like chromium now only works headless. It crashs otherwise.
41+
robot -d target/chromium -v browser:chromium integration-testing/
42+
```

README.md

Lines changed: 3 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ SPDX-License-Identifier: Apache-2.0
99
[![Slack](https://raw.githubusercontent.com/com-pas/compas-architecture/master/public/LFEnergy-slack.svg)](http://lfenergy.slack.com/)
1010

1111
# CoMPAS Deployment Repository
12-
Containing tools / configurations for deploying CoMPAS services.
12+
Containing tools / configurations for deploying CoMPAS services. For a deployment overview see [here](DEPLOYMENT.md)
13+
14+
More about the integration tests being run against these Docker Compose environment can be found [here](INTEGRATION_TESTING.md)
1315

1416
## Docker Compose (BaseX)
1517
There is a pre configured [Docker Compose](compas/docker-compose-basex.yml) file, which starts all the given CoMPAS services.
@@ -104,40 +106,3 @@ These roles are assigned to certain users (see below).
104106
- **A SCD Reader**: A user with the role 'Read' only on the SCD Type.
105107
- Username: scd-reader
106108
- Password: reader
107-
108-
## Integration Testing
109-
110-
To improve the quality of the application more beside the testing in the separate repositories we also created some integration
111-
tests to test all components together. The integration tests are executed against the Docker Compose version in this project.
112-
113-
We are using the [Robot Framework](https://robotframework.org/) to execute the integration tests. For the Robot Framework we are
114-
using the [Browser Library](https://github.com/MarketSquare/robotframework-browser) to do the Web testing. this Library is based
115-
on [Playwright](https://playwright.dev/). All Integration Tests and data can be found in the directory 'integration-testing'.
116-
Output can be found in the directory 'target' is below commands and Github Actions are used.
117-
118-
Some useful links:
119-
- [Robot Framework](https://robotframework.org/)
120-
- [Robot Framework User Guid](https://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html)
121-
- [Robot Framework BuildIn Keywords](https://robotframework.org/robotframework/latest/libraries/BuiltIn.html)
122-
- [Browser Library](https://github.com/MarketSquare/robotframework-browser)
123-
- [Browser Library Keywords](https://marketsquare.github.io/robotframework-browser/Browser.html)
124-
- [Playwright](https://playwright.dev/)
125-
- [Playwright Documentation](https://playwright.dev/docs/intro/)
126-
127-
Some useful commands to execute the Robot Framework locally.
128-
Please follow the instructions of [Robot Framework](https://robotframework.org/) to install the Framework.
129-
And also follow the instruction of [Browser Library](https://github.com/MarketSquare/robotframework-browser) to install this needed library.
130-
131-
```
132-
# Prefer to remove the target directory before starting.
133-
rm -r target
134-
135-
# Normal run of all the test suites (with firefox, headless).
136-
robot -d target/firefox integration-testing/
137-
138-
# Run of all the test suites (with firefox in presenter mode to better follow what happens).
139-
robot -d target/firefox -v browser:firefox -v enable_presenter_mode:true -v headless:false integration-testing/
140-
141-
# Run of all the test suites (with chromium, headless), looks like chromium now only works headless. It crashs otherwise.
142-
robot -d target/chromium -v browser:chromium integration-testing/
143-
```

images/deployment-view.drawio

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<mxfile host="app.diagrams.net" modified="2022-09-07T09:10:37.842Z" agent="5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36" etag="lYk3ZGuue9Wm70Cj9oxD" version="20.2.8" type="device"><diagram name="Page-1" id="c37626ed-c26b-45fb-9056-f9ebc6bb27b6">3ZtZc6M4EIB/TR6TQtx+zDjObGYmm8NzPm3JoGDNyMglZCfeX78SCMwh4yTGkGxN1RgJIaC7v+5Wo5xY48XTRwaX82saInJiGuHTiXVxYprAtyzxI3s2Wc/IB1lHxHCoBm07pvhfpDoN1bvCIUoqAzmlhONltTOgcYwCXumDjNHH6rAHSqp3XcIINTqmASTN3h845HPVCwxje+IvhKO5urXvqBMzGPyJGF3F6n4xjVF2ZgHzadTQZA5D+ljqsiYn1phRyrOjxdMYESnWXGLZdZc7zhaPzFDMn3VB4EHXmz34D6FlWsbDqW9mU6whWSk5XKAloZuFnDF7Zr7JRfQ4xxxNlzCQ7UdhBifWhzlfENEC4jCVAZK3MkSreFfZCOgCB/kJzuifQsbywgca80u4wESaznfEQhhD1a3sBNiyjQkZU0JZ+jTWgyP/FRPmZ1Lxq4vVo8t7rBHjWGj7nOAoFn2cyqdvClDJVA5HT6UuJdCPiC4QZxsxRJ01/ewKZfam42Ttx5IRGaaS87xkQI6lrAIqy42KubcqFAdKi3qN3l0uw3lkXM4/hpeRs/70bR3dnTaVOhbSgDhGTHRP4jVmNM40bMg7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