GithubHelp home page GithubHelp logo

mydataoperator's Introduction

DataOperator Backend

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.


Getting started

###Docker setup

Docker Image is the preferred way to test this POC.

Prerequisites

[Docker] (https://www.docker.com/)

1. Build docker image

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.

DataOperator Backend

Repository structure


├── 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

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.

Copying and License

This code is licensed under MIT

mydataoperator's People

Contributors

dhrpoc avatar allu2 avatar

Watchers

 avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.