> For the complete documentation index, see [llms.txt](https://kopens.gitbook.io/plantpulse-platform/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kopens.gitbook.io/plantpulse-platform/admin/modules.md).

# 모듈별 상세 매뉴얼

PlantPulse 플랫폼은 `/opt/kopens/plantpulse-platform/` (바이너리 설치) 또는 컨테이너 내부 `/home/kopens/` 아래에 25개 이상의 독립 모듈로 구성됩니다. 각 모듈은 단일 책임을 가지고 독립적으로 시작 / 정지 / 재시작이 가능합니다.

## 모듈 분류

```mermaid
graph TB
  subgraph APP["애플리케이션 (콘솔 / API)"]
    SVR[server]
    BAT[batch]
    DG[data-gateway]
    SQL[sql]
    MON[monitor]
    WH[warehouse]
  end

  subgraph PROC["처리 (이벤트 / 시계열)"]
    CEP[cep]
    PLUG[plugin]
    TS[timeseries]
  end

  subgraph MSG["메시징"]
    MSGB[messaging<br/>Kafka · MQTT · STOMP]
  end

  subgraph STG["스토리지"]
    STO[storage<br/>Cassandra · PostgreSQL · Valkey · MinIO]
  end

  subgraph ANL["분석"]
    AN[analytics<br/>Spark · Hive · Kyuubi · Gravitino]
  end

  subgraph WF["워크플로우"]
    WFM[workflow<br/>Temporal · Kestra]
  end

  subgraph UTIL["유틸리티"]
    STARTUP[startup]
    SETUP[setup]
    BACKUP[backup]
    RECOVERY[recovery]
    EXPORTER[exporter]
    MIGRATOR[migrator]
    MIRROR[mirror-maker]
    SIM[simulator]
    DBPERF[db-performance]
    API[api]
    LAB[lab]
  end

  APP --> MSGB
  APP --> STO
  PROC --> MSGB
  PROC --> STO
  ANL --> STO
  WF --> STO
```

## 모듈 카테고리

| 카테고리       | 모듈                                                                                                                    | 설명                                                                                             |
| ---------- | --------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
| **애플리케이션** | [server](/plantpulse-platform/admin/modules/server.md)                                                                | 웹 콘솔, IIoT 엔진, REST API                                                                        |
|            | [batch](https://dev.kopens.io/plantpulse-platform/plantpulse-docs/-/blob/master/admin/modules/batch.md)               | 스케줄 배치 처리                                                                                      |
|            | [data-gateway](https://dev.kopens.io/plantpulse-platform/plantpulse-docs/-/blob/master/admin/modules/data-gateway.md) | REST 기반 데이터 게이트웨이                                                                              |
|            | [sql](https://dev.kopens.io/plantpulse-platform/plantpulse-docs/-/blob/master/admin/modules/sql.md)                   | SQL 쿼리 서비스                                                                                     |
|            | [monitor](https://dev.kopens.io/plantpulse-platform/plantpulse-docs/-/blob/master/admin/modules/monitor.md)           | 시스템 모니터링 에이전트                                                                                  |
|            | [warehouse](https://dev.kopens.io/plantpulse-platform/plantpulse-docs/-/blob/master/admin/modules/warehouse.md)       | Iceberg 기반 데이터 웨어하우스                                                                           |
| **처리**     | [cep](https://dev.kopens.io/plantpulse-platform/plantpulse-docs/-/blob/master/admin/modules/cep.md)                   | 복합 이벤트 처리 (Esper)                                                                              |
|            | [plugin](https://dev.kopens.io/plantpulse-platform/plantpulse-docs/-/blob/master/admin/modules/plugin.md)             | OPC-UA / AAS 산업 표준 플러그인                                                                        |
|            | [timeseries](https://dev.kopens.io/plantpulse-platform/plantpulse-docs/-/blob/master/admin/modules/timeseries.md)     | 시계열 엔진 + 시각화 UI                                                                                |
| **메시징**    | [messaging](/plantpulse-platform/admin/modules/messaging.md)                                                          | Kafka + MQTT(HiveMQ) + STOMP(ActiveMQ)                                                         |
| **스토리지**   | [storage](/plantpulse-platform/admin/modules/storage.md)                                                              | Cassandra + PostgreSQL + Valkey + MinIO                                                        |
| **분석**     | [analytics](/plantpulse-platform/admin/modules/analytics.md)                                                          | Spark + Hive + Kyuubi + Gravitino + Hadoop                                                     |
| **워크플로우**  | [workflow](https://dev.kopens.io/plantpulse-platform/plantpulse-docs/-/blob/master/admin/modules/workflow.md)         | Temporal + Kestra                                                                              |
| **유틸리티**   | [startup](https://dev.kopens.io/plantpulse-platform/plantpulse-docs/-/blob/master/admin/modules/startup.md)           | 시작/정지/재시작/노드 관리 스크립트                                                                           |
|            | [utilities](https://dev.kopens.io/plantpulse-platform/plantpulse-docs/-/blob/master/admin/modules/utilities.md)       | setup, backup, recovery, exporter, migrator, mirror-maker, simulator, db-performance, api, lab |

## 모듈 공통 구조

각 서비스 모듈은 공통 디렉토리 구조와 운영 인터페이스를 따릅니다.

```
plantpulse-<모듈>/
├── app/                    # 애플리케이션 WAR / JAR
├── bin/
│   ├── start.sh            # 포그라운드 시작
│   ├── stop.sh             # 정지
│   └── log-viewer.sh       # 실시간 로그 (tail -F)
├── server/ 또는 lib/        # 내장 Tomcat 서버 또는 JAR
├── logs/                   # system.log (메인 로그)
└── conf/ 또는 config/       # 설정 파일
```

## 공통 운영 명령

| 작업     | 호스트 명령                                   | 비고                          |
| ------ | ---------------------------------------- | --------------------------- |
| 전체 시작  | `plantpulse-startup/start-daemon.sh`     | 백그라운드                       |
| 전체 정지  | `plantpulse-startup/stop.sh`             | 안전 종료                       |
| 전체 재시작 | `plantpulse-startup/restart.sh`          | stop → clean → start-daemon |
| 모듈 재시작 | `plantpulse-startup/restart-<module>.sh` | 개별 모듈만                      |
| 상태 점검  | `plantpulse-startup/status.sh`           | 포트 기반                       |
| 통합 로그  | `plantpulse-startup/log-viewer.sh`       | 전체 모듈 로그                    |

## 모듈 의존성

PlantPulse 는 의존성 순서에 따라 단계별로 기동됩니다. 모듈 단위 재시작 시 의존 관계를 알고 있어야 합니다.

```mermaid
flowchart LR
  S[storage] --> A[analytics]
  S --> M[messaging]
  S --> WF[workflow]
  S --> TS[timeseries]
  A --> WH[warehouse]
  S --> P[plugin]
  M --> CEP[cep]
  M --> DG[data-gateway]
  M --> APP[server / batch / sql / monitor]
  S --> DG
  A --> SQL[sql]
  CEP --> APP
  DG --> APP
  TS --> APP
```

> **재시작 시 주의**: 인프라 모듈(storage / messaging / analytics)을 재시작하면 의존하는 모든 애플리케이션도 함께 재시작해야 합니다. `plantpulse-startup/restart.sh` 로 전체 재시작이 가장 안전합니다.

## 포트 매핑 요약

| 영역     | 포트                 | 모듈                            |
| ------ | ------------------ | ----------------------------- |
| 외부 노출  | 80 / 443           | server (HTTP / HTTPS)         |
| 외부 노출  | 7443               | server (관리 콘솔 HTTPS)          |
| 외부 노출  | 4949               | monitor (헬스 체크)               |
| 메시징    | 9092 / 9093 / 9094 | messaging (Kafka)             |
| 메시징    | 1883 / 1884        | messaging (MQTT)              |
| 메시징    | 61000 / 61004      | messaging (STOMP)             |
| 스토리지   | 9042               | storage (Cassandra)           |
| 스토리지   | 5432               | storage (PostgreSQL)          |
| 스토리지   | 6379               | storage (Valkey)              |
| 스토리지   | 9000 / 9001        | storage (MinIO)               |
| 분석     | 7077 / 4440        | analytics (Spark Master / UI) |
| 분석     | 10000              | analytics (Kyuubi)            |
| 분석     | 19001              | analytics (Gravitino)         |
| 분석     | 9083               | analytics (Hive Metastore)    |
| 시계열    | 7800 / 7801        | timeseries (Engine)           |
| 시계열    | 3000               | timeseries (UI)               |
| 워크플로우  | 7233 / 8233        | workflow (Temporal)           |
| 워크플로우  | 8380               | workflow (Kestra)             |
| 처리     | 7400 / 7401        | cep                           |
| 처리     | 5500               | data-gateway                  |
| 처리     | 11004 / 11005      | plugin (OPC-UA)               |
| 처리     | 8007 / 8090        | plugin (AAS V2 / V3)          |
| 애플리케이션 | 9500               | batch                         |
| 애플리케이션 | 9600               | warehouse                     |
| 애플리케이션 | 4000               | sql                           |

전체 포트는 [포트 구성 정보](/plantpulse-platform/installation/ports.md) 페이지를 참고해 주세요.

## 기술 지원

모듈별 운영 문의는 **<webmaster@kopens.com>** 으로 연락해 주세요.
