Skip to content

Commit 12d0852

Browse files
Merge pull request #87 from com-pas/deployment-view
Deployment Overview of the Docker Compose
2 parents 0b10390 + a3737b0 commit 12d0852

File tree

6 files changed

+93
-38
lines changed

6 files changed

+93
-38
lines changed

.reuse/dep5

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
2+
Upstream-Name: compas-deployment
3+
Upstream-Contact: Sander Jansen <[email protected]>
4+
Source: https://github.com/com-pas/compas-deployment
5+
6+
Files: images/*
7+
Copyright: 2022 Alliander N.V.
8+
License: Apache-2.0

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](https://aws.amazon.com/eks/)**: Container Environment?
38+
- **[Amazon Cognito](https://aws.amazon.com/cognito/)**: SSO Provider?
39+
- **[AWS Elastic Load Balancing](https://aws.amazon.com/elasticloadbalancing/)**: 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-08T05:34:50.511Z" agent="5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36" etag="kRcnI-EVh7d9fnGrXaFf" version="20.2.8" type="device"><diagram name="Page-1" id="c37626ed-c26b-45fb-9056-f9ebc6bb27b6">3Vtfc5s4EP80eUwGxD/7MXWcXtrmktRt2j7dyCBjtTLygOzE9+lPAmGDkLFjg4lvMhOjZSXE7v52VytxYQ1mrx9jOJ/e0wCRC2AErxfWzQUApgcc/iMoq4zS7xkZIYxxIJk2hBH+F0lizrbAAUpKjIxSwvC8TPRpFCGflWgwjulLmW1CSfmpcxiiCmHkQ1Kl/sABm0qqaRibG38hHE7lo3uOvDGG/p8wpotIPi+iEcruzGA+jGRNpjCgLwWSNbywBjGlLLuavQ4QEWLNJZb1u91ydz3lGEVsrw6+B11vPOlNAgtYxuSyB7Ih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