petr-balogh / rlocker

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Resource Locker project

This project is a Back-end service with API endpoints and web UI, for monitoring the resources created in different cloud providers, define their usage availability by locking/unlocking a resource.

Project Dependencies:

  • rlockerservices - Services repository that the rlocker uses
  • rlockertools - A Python based client interface to interact with the platform

Quick Start Video will be added soon

Project Architecture:

Django website with applications, account, api, dashboard, health, lockable_resource, rqueue

  • account: Designed to add more functionalities to the built-in user app

    • __ init __: Packaging this account directory (Django App)
    • apps: Application configurations
    • signals: A signal to create a Token object so each Account will have an associated Token
    • urls: Urls that are related to the Account, like user login
    • views: Views that are related to auth actions like login and logout (We do not enable registration from the WEB UI)
  • api: Application Programming Interface in order to automate resource locking releasing via endpoints.

    • __ init __: Packaging this account directory (Django App)
    • apps: Application configurations
    • custom_permissions: For enabling only access for non anonymous users, a permission mechanism should be written in api application
    • serializers: Serializers Object for the api, to prepare JSON responses.
    • urls: Endpoints that are enabled after the api prefix
    • utils: Useful functions for the api application
    • views: Views where we will take actions in each endpoint, depending on the request method.
  • dashboard: Designed to display a read-only dashboard for more centralized view of the lockable resources with more details

    • __ init __: Packaging this account directory (Django App)
    • apps: Application configurations
    • urls: Endpoints that are enabled for this application
    • views: Views where we will manipulate the data we'd like to display in the dashboard
  • health: Designed to have a health check URL that returns a raw string, so it will be easier to check health of the entire platform

    • __ init __: Packaging this account directory (Django App)
    • apps: Application configurations
    • urls: URL endpoints of this specific application
    • views: Views of this specific application
  • lockable_resource: Application Programming Interface in order to automate resource locking releasing via endpoints.

    • __ init __: Packaging this account directory (Django App)
    • admin: Model Registrations to the admin panel of the Django Application
    • apps: Application configurations
    • constants: Constants of the lockable resource app, we define there rules for available status types that a lockable resource object can have
    • exceptions: We define in the exceptions the actions that are not making sense, for i.e locking a resource that is already locked
    • label_manager: Takes responsibility to perform smart retrieving of an available resource by only specifying it's label
    • models: Modelize a schema of the table for different Lockable resources we will manage.
    • signals: Signals to be triggered once a specific field of lockable resource object changes
    • urls: Available URL's from the Web UI to manage the lockable resources
    • views: Design of the views and actions to take in GET/POST requests.
  • rqueue: Application for managing the requests that could not be locked immediately, this is a queue management system application

    • __ init __: Packaging this account directory (Django App)
    • admin: Model Registrations to the admin panel of the Django Application
    • apps: Application configurations
    • constants: Constants of the rqueue app, we define there priority enumerations, time intervals for resource availability check
    • context_processors: Since we want some data to be accessible from each HTML template, we have to define it as a global context that is available (from settings.py)
    • models: Modelize a schema of the table for different requests in queue
    • signals: Signals to be triggered once a rqueue object is being created.
    • urls: Available URL's from the Web UI to manage the requests in queue
    • utils: Helper functions for the rqueue applications. for i.e - displaying nicer string for the pended time of a queue
    • views: Design of the views and actions to take in GET/POST requests.

About


Languages

Language:JavaScript 54.1%Language:HTML 19.8%Language:CSS 14.7%Language:Python 5.6%Language:CoffeeScript 5.4%Language:Less 0.3%Language:Dockerfile 0.0%Language:PHP 0.0%Language:Makefile 0.0%