How dromara/jpom works
Project Type and Purpose
• Jpom is an “ops” platform that helps teams deploy, build, monitor, and manage projects.
• The README emphasizes it is a low-invasive online construction, automatic deployment, and operational maintenance tool.
• The file tree shows multiple Maven modules (server, agent, common, sub-plugins, storage-modules) and a separate web‑vue frontend, indicating a full‑stack system with modular plugins and extensibility.
File Structure for Architectural Patterns
• Top-level directories include “modules” (with subfolders for agent, server, common, storage-module, sub-plugin) and “web‑vue” (the Vue.js frontend).
• The server and agent modules are clearly separated; the “server” hosts the management console while the “agent” runs on nodes and handles operations like builds, file transfers, SSH, etc.
• The “sub-plugin” directory indicates a plugin mechanism (with modules for docker-cli, email, encrypt, git-clone, etc.) that extend core functionality without being tightly coupled.
• The “storage-module” directories (with variants for H2, MariaDB, MySQL, PostgreSQL) suggest pluggable database/storage support.
• The existence of multiple Dockerfiles, docker-compose files, and scripts points to containerization and flexible deployment options.
Main Components and Their Interactions
• Frontend Component:
– Represented by the “web‑vue” module.
– It communicates with the back end (via REST API endpoints or web sockets) to display real‑time information, logs, and manage configurations.
• Server Module:
– Core back‑end service (modules/server) that provides the management console, performs centralized configuration, logging, and orchestration.
– It interacts with the underlying storage (through the storage‑module) and receives data from plugin extensions.
• Agent Module:
– (modules/agent) Installed on managed nodes.
– Provides functionalities such as build, deployment, file management, and remote command execution via SSH/FTP.
– Communicates with the server over HTTP and possibly WebSocket channels for real‑time logs and command triggers.
• Sub-plugins:
– Extend functionalities like Docker management, email notifications, encryption tasks, Git operations, etc.
– They should be depicted as optional, modular components that plug into either the server or the agent.
• Storage/Database:
– Abstract the persistent data layer through interchangeable storage modules (H2, MySQL, etc.).
– They serve as the repository for metadata, logs, and configuration settings.
• Infrastructure & Deployment:
– Include Docker containers (as indicated by multiple Dockerfiles and docker-compose files).
– Represent CI/CD elements (Maven build, npm for front end) and external integrations (SSH, file storage, etc.).
Relationships and Interactions
• Connectivity from the server to agent nodes (via REST/WebSocket), indicating control commands, log streaming, or file transfers.
• Storage layer as a database that the server reads from and writes to.
• Optionally, include external notification services (email, messaging platforms) that are triggered by the server to notify users of alerts or task statuses.
Architectural Patterns and Technologies
• Use a modular, layered architecture with clear separation of concerns:
– Presentation (Vue web‑UI)
– Business Logic (Server module, common utilities)
– Operational Agents (Agent module)
– Extension Points (Sub-plugin modules)
– Persistence (Storage modules)
– Java/Spring Boot for back-end; Maven as build tool
– Node, npm, Vue.js for the frontend
– Docker for containerization; Shell scripts and CI/CD pipelines
– WebSocket and HTTP for communication
• Low‑invasiveness design and the pluggable extension mechanism.