Commit c66bb76b authored by Herry's avatar Herry

added documentation

parent 791d0f99
......@@ -10,7 +10,7 @@ The five folders *data-hub*, *message-broker*, *rest-gateway*, *transaction-hub-
The *modules* folder contains various Python modules used by multiple microservices to improve code-reuse. When building the Docker images this folder is copied into the app path.
### Deployment scripts in *bin/*
The scripts *build.py* and *deploy.py* are used to create Docker images and deploy these images with Kubernetes respectively.
The scripts *build.py* and *deploy.py* are used to create Docker images and deploy these images with Kubernetes respectively on the cluster.
## Overall microservice architecture
![SMART architecture image](documentation/images/smart-architecture.png)
......
......@@ -21,6 +21,10 @@ def print_help():
def get_dockerfile_paths_and_names() -> Dict[str, str]:
"""
Gathers all available 'Dockerfile' (stored in DOOCKER_BUILD_NAME) in the project. Returns the path to these files and the
filename
"""
paths = []
for r, _, f in os.walk(SOURCEPATH):
for filename in f:
......@@ -36,6 +40,9 @@ def get_dockerfile_paths_and_names() -> Dict[str, str]:
def is_flutter_project(path: str) -> bool:
"""
Checks for the existence of a pubspec.yaml file which only exist in Flutter projects.
"""
test_file_path = f"{path}/pubspec.yaml"
return os.path.exists(test_file_path)
......
......@@ -68,4 +68,4 @@ Each microservice keeps track of valid tokens. If it encounters a token that has
There are scenarios where microservices must call each other. For this case, a helper class is implemented, which performs the necessary steps automatically. This class can be found at ```src/modules/security/token_manager.py```. The class is a singleton, so the ```getInstance()``` method gives access to the only available instance of ```TokenManager```, where the method ```getToken()``` can be used to retrieve a JWT token for internal requests. The roll of this user has regular User permissions.
```TokenManager``` uses the credentials stored in ```regular_user_credentials```.json to authenticate at the rest-gateway and caches the returned token, such that multiple requests to ```getToken()``` return the same one, which reduces traffic.
\ No newline at end of file
```TokenManager``` uses the credentials stored in ```regular_user_credentials.json``` to authenticate at the rest-gateway and caches the returned token, such that multiple requests to ```getToken()``` return the same one, which reduces traffic.
\ No newline at end of file
......@@ -8,4 +8,6 @@ Blockchain transactions posted to this gateway are checked for schema validity a
- Python 3.x
(Check Dockerfile for used Python modules)
- Docker
- Kubernetes
\ No newline at end of file
- Kubernetes
- Swagger
- OpenAPI
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment