This is a part of proof-of-concept implementation of MyData Architecture. This repository holds DataOperator Backend, it is a part of 4 pieces consisting of DataSink, DataSource, DataOperator UI and this DataOperator Backend.
###Docker setup
Docker Image is the preferred way to test this POC.
[Docker] (https://www.docker.com/)
You need the following files that should be shipped in docker_setup.zip:
DockerFile
magic_fixes.sh
run_all.sh
services.sh
Go to the folder with the files and run the following command
docker build -f DockerFile -t dhrtest .
The command will take a while to run, you can now go get a new cup of coffee. When the command is done you will see line similar to:
Successfully built d061ec09e273
We will now call the ID above
Now run:
docker run docker run -p 127.0.0.1:80:80 -p 127.0.0.1:8080:8080 -i -t <ID> /etc/rc.local
This will start the container with bash.
When you see lines
[....] Starting web server: apache2apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
. ok
[ ok ] Starting MySQL database server: mysqld ..
[info] Checking for tables which need an upgrade, are corrupt or were
not closed cleanly..
The container is ready and you can press Enter to get clean prompt, then type
sh run_all.sh
The command will start up the testing environment and can take several seconds to complete. Once this has been done you can press Ctrl+P+Q to detach the container without closing it. At this point the Testing Environment is available on localhost.
Everything should running , you can visit http://127.0.0.1:80 to check it.
├── DO
│ ├── app.py # API
│ ├── base.py
│ ├── contributors.txt # Contributors to the Project
│ ├── custom_errors.py # Custom HTTPException for inserting relevant debug info to replies to clients.
│ ├── db_handler_Basic.py # Basic class for DB handling. Simple functions for interacting with DataOperator Backend specific DB model. Based on Core class
│ ├── db_handler_High.py # High class for DB handling. Complex functions for API. Based on Basic class
│ ├── db_handler.py # Core class for DB handling. Simple functions and initialization for DB.
│ ├── GenericConfigFile.json # Config file setting up the POC (DO_backend doesn't utilize everything it could from there yet)
│ ├── Initdb.py # Class holding Database initialization code for the POC
│ ├── README.md
│ └── resources
│ ├── __init__.py
│ └── Resources.py # Descriptions of Database objects for SQLAlchemy.
├── doc
│ └── swagger.yml # Swagger Documentation YML of the API for parts that are used.
├── operator_private_key.pem # Private key for signing and decrypting JWT tokens
├── operator_public_key.pem # Public key for encrypting and verifying JWT tokens
└── tools
├── Json2Swag.py # Tool to create swagger documentation definitions based on existing JSON.
├── ui_emulator.py # Testing tool, may not be updated to work with latest version
└── ui_makeContract.py # Testing tool, may not be updated to work with latest version
Documentation of API's used by DataOperator UI, Sink and Source can be found in file swagger.yml in /doc as well as instructions for stand alone setup without docker.
This code is licensed under MIT