SH
shinbatsu/devops-bmstu
Mirror from GItlab. LMS System project from BMSTU DevOps course.
LMS System
Project Description
The project is an LMS (Learning Management System) designed to manage student learning outcomes.
LMS is a web application developed using the following technologies based on a "three-tier" architecture.
General Architecture Overview
Structurally, the application looks as follows:
!include <C4/C4_Container>
left to right direction
Person(user,user,"User")
System_Boundary(c1, "LMS") {
System_Boundary(c2, "k8s Namespace") {
Container(frontend, "Web Application", "ReactJS, Docker", "Web interface and static content")
Container(backend, "API", "Python 3.8, Django, Docker Container", "Handles data modification", tags="backendContainer")
Container(ingress, "Ingress Controller", "nginx, k8s, ingress", "Reverse proxy")
System_Boundary(c4, "Monitoring Subsystem") {
Container(prometheus, "Prometheus", "nginx, k8s, ingress", "Collects metrics and alerts")
Container(graphana, "Grafana", "nginx, k8s, ingress", "System state visualization")
Container(loki, "Loki", "nginx, k8s, ingress", "Log collection server")
}
}
System_Boundary(c3, "Virtual Machine") {
ContainerDb(database, "Database", "PostgreSQL 16", "Stores user data and application data model")
}
}
Rel(backend,database,"SSL","JDBC, SQL")
Rel(user,ingress,"HTTPS","Download JS application")
Rel(user,ingress,"HTTPS,WSS","Access backend")
Rel(ingress,frontend,"HTTP","Download JS application")
Rel(ingress,backend,"HTTP,WSS","API requests")
Rel(backend,loki,"k8s-log driver","Log")
Rel(database,loki,"syslog","Log")
Rel(user,ingress,"HTTPS","Monitoring interface")
Rel(ingress,graphana,"HTTPS","Monitoring interface")Object Groups / Managed Objects - Structure
Application
Frontend:
- Web Application (React): Visual part of the application that the user interacts with.
- Static Content: Application content – images, logos, icons.
- UX/UI, E2E Tests (Jest): Tests for user interaction with the application.
Backend:
- Django: Business logic processing, API.
- WSGI: Middleware interface for handling requests via the Python application (Django in this case).
- Unit Tests: Verifies API responses.
- Nginx: Server for handling incoming requests.
Database:
- PostgreSQL-16: Service for storing static system data.
Infrastructure
Monitoring and Logging:
- Prometheus: Collects system information (metrics/logs).
- Grafana: Visualizes logs.
- Loki: Stores logs.
CI/CD:
- GitLab CI/CD: Manages deployment and delivery within the application infrastructure.
- K8s: Resource distribution and potential system scaling within the cluster.
- Docker: Decomposes the application into independent container services.
Compute Resources:
- BASIS: Cloud with dedicated resources where the system will run.
Object Groups / Managed Objects - PlantUML Diagram
Diagram
!include <C4/C4_Container>
left to right direction
Person(dev, "Developer")
Person(ci, "CI/CD Server")
System_Boundary(lifecycle, "Lifecycle") {
Container(development, "Code Development", "IDE, Git", "Implement business requirements")
System_Boundary(monitoring_system, "Monitoring") {
Container(lint, "Code Check", "Linters (e.g., Flake8, ESLint), Code Review", "Static analysis, style check, code review")
Container(build, "Build and Test", "Docker, Unit Tests (UnitTest + Jest)", "Build Docker image, run unit tests")
Container(integration_test, "Integration Testing", "E2E Tests, UI Tests", "Integration and UX/UI tests")
Container(cicd_deploy, "CI/CD Deploy", "Kubernetes")
}
}
Rel(dev, development, "", "Source code")
Rel(development, lint, "", "Source code")
Rel(lint, build, "", "Verified source code")
Rel(ci, lint, "Runs linters and static analyzers")
Rel(ci, build, "Performs build procedures")
Rel(build, integration_test, "", "Docker image")
Rel(ci, integration_test, "Runs integration tests", "")
Rel(integration_test, cicd_deploy, "", "Ready application")
Rel(ci, cicd_deploy, "Runs deployment pipeline")Lifecycle
| Stage | Work Type | Artifacts |
|---|---|---|
| Code Writing | Functionality development | Source code, application modules |
| Code Check | Static analysis (linters), style check, code review | Linter reports, review comments, fixes |
| Build | Docker image build | Docker image |
| Application Testing | Integration tests (E2E), UX/UI tests | Test results, bug reports |
| CI/CD Deployment | Run pipeline to deploy in Kubernetes | Docker image, deployed container, deployment logs |
| Results Collection | Collect metrics (Prometheus), logs (Loki), dashboards (Grafana) | Metrics, graphs, logs |
Testing Procedure
Testing is performed in 2 stages:
- SAST code analysis using GitLab built-in tools
- Unit testing using automated tests developed alongside the code
Backend Component Unit Testing
Running Django Tests
Tests are run for the built application before container creation.
python manage.py testDjango Test Results
- Test report files are created in the test_reports folder in the project root directory.
- Logs are recorded in project.log in the project root directory.
Frontend Component Unit Testing
Testing is performed in 2 stages:
- SAST code analysis using GitLab built-in tools
- Unit testing using automated tests developed alongside the code
Running React Tests
Tests are run for the built application in interactive mode by default. To disable interactive mode, set the variable CI=true.
cd /app/build
CI=true npm testReact Test Results
After tests, a junit.xml file is created in /app/build.
Deployment Procedure
- See README.md for individual components
- Note deployment specifics for Kubernetes cluster
On this page
Languages
Python44.8%JavaScript30.8%CSS16.9%Dockerfile5.6%HTML1.9%
Contributors
The Unlicense
Created September 22, 2025
Updated January 17, 2026