Add srs.md

This commit is contained in:
2025-12-23 18:22:12 +00:00
commit e1df870f98

189
srs.md Normal file
View File

@@ -0,0 +1,189 @@
---
### 2.2 Deployment Model
- Backend berjalan sebagai **systemd service**
- Cockpit plugin berkomunikasi dengan backend via **local REST API**
- SCST digunakan sebagai **single iSCSI target framework**
- Bacula berjalan di **VM terpisah** sebagai iSCSI initiator
---
## 3. User Roles
### 3.1 Administrator
- Akses penuh sistem
- Konfigurasi storage, tape, iSCSI, Bacula
- Maintenance dan troubleshooting
### 3.2 Operator
- Monitoring sistem
- Operasi tape (inventory, load, unload)
- Monitoring job Bacula
### 3.3 Read-Only
- View-only dashboard
- Monitoring status dan logs
Autentikasi menggunakan **PAM/system users** melalui Cockpit.
---
## 4. Functional Requirements
### 4.1 Dashboard Module
- **FR-DASH-01**
Sistem menampilkan ringkasan kapasitas disk, status tape library, jumlah drive aktif, iSCSI session, dan status Bacula SD.
- **FR-DASH-02**
Sistem menampilkan alert untuk kondisi error, cleaning required, disk threshold, iSCSI failure, dan service down.
---
### 4.2 Storage Repository Management (Disk)
- **FR-DISK-01**
Administrator dapat membuat disk repository berbasis:
- LVM Logical Volume
- ZFS zvol (opsional)
- **FR-DISK-02**
Sistem menampilkan ukuran, filesystem, dan mount status repository.
- **FR-DISK-03**
Repository dapat dipresentasikan sebagai **iSCSI LUN** menggunakan SCST.
---
### 4.3 Tape Library Management
- **FR-TAPE-01**
Sistem mendeteksi media changer dan tape drives (maksimal 8).
- **FR-TAPE-02**
Sistem menampilkan slot inventory, barcode, tape yang ter-load, dan status drive.
- **FR-TAPE-03**
Operator dapat menjalankan inventory, load tape ke drive, dan unload tape ke slot.
- **FR-TAPE-04**
Sistem memastikan tape library hanya memiliki **single initiator**.
---
### 4.4 iSCSI Target Management (SCST)
- **FR-ISCSI-01**
Administrator dapat mengelola iSCSI target, IQN, portal, dan initiator ACL.
- **FR-ISCSI-02**
Sistem memisahkan iSCSI target disk dan tape library.
- **FR-ISCSI-03**
Mapping LUN:
- LUN 0 → Media changer
- LUN 18 → Tape drives
- **FR-ISCSI-04**
Konfigurasi SCST harus persisten, tervalidasi, dan dapat di-rollback.
---
### 4.5 Bacula Integration
- **FR-BAC-01**
Sistem mendeteksi status Bacula Storage Daemon.
- **FR-BAC-02**
Sistem dapat menghasilkan template `bacula-sd.conf` dan autochanger config.
- **FR-BAC-03**
Operator dapat menjalankan inventory dan restart Bacula SD.
---
### 4.6 Logs & Diagnostics
- **FR-LOG-01**
Sistem menyediakan live log viewer untuk SCST, iSCSI, dan Bacula.
- **FR-LOG-02**
Administrator dapat mengunduh support bundle (logs, configs, system info).
---
## 5. Non-Functional Requirements
### 5.1 Performance
- UI response < 300 ms
- Operasi tape asynchronous
- Apply konfigurasi iSCSI < 5 detik
### 5.2 Reliability
- UI action tidak boleh menyebabkan service crash
- Semua operasi destruktif memerlukan konfirmasi
- Service auto-restart via systemd
### 5.3 Security
- Tidak ada shell access dari UI
- Privileged action via polkit atau sudo whitelist
- HTTPS/TLS untuk UI
- Audit log untuk perubahan konfigurasi
### 5.4 Compatibility
- Ubuntu Server 24.04 LTS
- SCST (stable)
- Bacula Community / Enterprise
- LTO-8 SAS / FC
### 5.5 Maintainability
- Backend single binary (Go)
- Modular REST API
- Versioned UI plugin
- Human-readable config
---
## 6. Constraints & Assumptions
- Physical tape library hanya diakses oleh appliance
- Bacula VM adalah single initiator
- Disk repository hanya untuk backup workload
- Network iSCSI dedicated
---
## 7. Future Enhancements (Out of Scope v1)
- Multi-tenant support
- High Availability appliance
- Tape encryption management
- Cloud tiering
- Policy-based tape lifecycle
---
## 8. Acceptance Criteria
Sistem dinyatakan diterima apabila:
1. Disk repo dapat diakses Bacula via iSCSI
2. Tape library fisik terlihat di VM Bacula
3. Bacula dapat melakukan label, mount, write, dan unload tape
4. UI dapat melakukan inventory dan monitoring
5. Semua service survive reboot
---
## 9. Appendix
### Appendix A Supported Tape Technology
- LTO-8
- Barcode format: L8
### Appendix B Networking Recommendation
- Dedicated iSCSI VLAN
- Jumbo Frame (MTU 9000)
- Minimal 10GbE
---