Giter Site home page Giter Site logo

teleops's Introduction

teleops

Telegram bot application

Structure

1. NGINX

  • Receiving updates (messages) from Telegram API services on port 8443
  • Passing this messages to TeleEngine
  • Listening on port 443 to proxying to TeleManager Django web APP

2. TeleManager

  • Receiving Telegram updates from NGINX
  • Passing Telegram messages to TeleBot
  • Django Web App that allows:
  • Manage TeleOps user's accounts

3. TeleBot

  • Receiving Telegram messages from TeleManager
  • Perform authentication of users
  • Sending task to TeleEngine according to arrived message
  • Receiving task results from TeleEngine
  • Sending messages back to Telegram Users
  • Leveraging Python for logging, authentication and other control

4. TeleEngine

  • Receiving tasks from TeleBot
  • Sending results to TeleEngine

4. TeleDatabase

PostgreSQL with two databases:

  • telemanager DB: contains information about users, they privileges, commands, etc.
  • teleapp DB (optional): application data.

5. TeleManager

Django Web Framework Application that allows you to manage users and they privileges. TeleManager interacts with TeleDatabase

Plan

  • Creation of interacting scheme for 5 main elements: alt text

  • Choose platform for web server:

    • CherryPy
    • NGINX + gunicorn + Django

    NGINX + gunicorn + Django was choosen as the web server platform due to:

    • recommended production environment
  • Choose way of interaction of TeleManager application and TeleDatabase:

    • Django ORM
    • Python Class based

    Django ORM has been choosen due to convenience.

  • Figure out distribution model:

    • Docker Container:
      • Single container with TeleManager, TeleBot, TeleEngine, TeleDatabase
      • 2 Dedicated container:
        • TeleManager, TeleBot, TeleEngine
        • TeleDatabase
    • Single application, which requires the user to install the database and application on the machine barely

    2 Dedicated container was chosen as distribution model due to:

    • Learning of Docker objectives
    • Fast deployment
    • Microsegmentation
  • Create template for NGINX config

  • Code TeleManager

  • Code TeleBot

  • Code TeleEngine

  • Code distribution (images, docker-compose)

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.