Files
railwaysystem/docs/visual/deployment.html
T

328 lines
17 KiB
HTML
Raw Permalink Normal View History

<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>部署拓扑与发布增量 Delta - RailwaySystem SYFJGYD学员管理系统</title>
<link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='%231d4ed8' d='M12 2c-4 0-8 .5-8 4v9.5C4 17.43 5.57 19 7.5 19L6 20.5v.5h2.23l2-2H14l2 2h2v-.5L16.5 19c1.93 0 3.5-1.57 3.5-3.5V6c0-3.5-3.58-4-8-4z'/></svg>">
<link rel="stylesheet" href="assets/docs.css">
<style>
/* 拓扑图与部署专属样式 */
.topology-card {
background: #ffffff;
border: 1px solid var(--border-light);
border-radius: var(--radius-lg);
padding: 2rem;
box-shadow: var(--shadow-card);
margin-bottom: 2.5rem;
}
.topology-svg-wrap {
width: 100%;
overflow-x: auto;
padding: 0.5rem 0;
}
.topology-svg {
min-width: 800px;
width: 100%;
height: auto;
display: block;
}
/* 007 醒目但不占屏的警示条 */
.warning-alert-bar {
background: #fef2f2;
border: 1px solid #fecaca;
border-left: 4px solid #dc2626;
border-radius: var(--radius-md);
padding: 1rem 1.25rem;
margin-bottom: 2rem;
display: flex;
align-items: center;
justify-content: space-between;
gap: 1rem;
flex-wrap: wrap;
}
.warning-tag-box {
display: inline-flex;
align-items: center;
gap: 0.4rem;
font-size: 0.8rem;
font-weight: 700;
color: #dc2626;
background: #fee2e2;
padding: 0.2rem 0.6rem;
border-radius: var(--radius-sm);
white-space: nowrap;
}
/* Delta 脚本卡片 */
.delta-summary-card {
background: #ffffff;
border: 1px solid var(--border-light);
border-radius: var(--radius-md);
padding: 1.5rem;
box-shadow: var(--shadow-card);
margin-bottom: 1.5rem;
}
</style>
</head>
<body>
<!-- 顶部主导航 -->
<nav class="navbar">
<div class="nav-brand-wrap">
<a href="index.html" class="nav-brand">
<svg viewBox="0 0 24 24"><path d="M12 2c-4 0-8 .5-8 4v9.5C4 17.43 5.57 19 7.5 19L6 20.5v.5h2.23l2-2H14l2 2h2v-.5L16.5 19c1.93 0 3.5-1.57 3.5-3.5V6c0-3.5-3.58-4-8-4zM7.5 17c-.83 0-1.5-.67-1.5-1.5S6.67 14 7.5 14s1.5.67 1.5 1.5S8.33 17 7.5 17zm9 0c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5zm1.5-6H6V6h12v5z"/></svg>
<div>
<div class="brand-title">RailwaySystem</div>
<div class="brand-sub">SYFJGYD学员管理系统</div>
</div>
</a>
<span class="brand-pill">Final Candidate · 待正式部署</span>
</div>
<ul class="nav-menu">
<li><a href="index.html" class="nav-link">首页</a></li>
<li><a href="business-flow.html" class="nav-link">业务</a></li>
<li><a href="architecture.html" class="nav-link">系统</a></li>
<li><a href="testing.html" class="nav-link">质量</a></li>
<li><a href="release-status.html" class="nav-link">发布</a></li>
<li><a href="modules.html" class="nav-link">14大业务模块清单</a></li>
<li><a href="data-model.html" class="nav-link">实体关系模型(ER)</a></li>
<li><a href="deployment.html" class="nav-link active">部署拓扑与脚本Delta</a></li>
<li><a href="http://192.168.139.218:9980/sict/railwaysystem/-/blob/feat/cicd-pipeline/docs/handbook/08-deployment-and-release.md" target="_blank" rel="noopener noreferrer" class="nav-handbook-link">&gt; 查阅部署发布手册</a></li>
<li><a href="http://192.168.139.218:9980/sict/railwaysystem/-/blob/feat/cicd-pipeline/docs/README.md" target="_blank" rel="noopener noreferrer" class="nav-back-link">&larr; 文档中心</a></li>
</ul>
</nav>
<!-- 页面主体容器 -->
<main class="page-container">
<header class="page-hero">
<div class="hero-pretitle">Shared Trial Deployment & Delta</div>
<h1 class="hero-title-main">局域网共享试用部署拓扑与脚本 Delta</h1>
<p class="hero-lead-text">
呈现共享试用环境标准拓扑链路:User &rarr; Frontend (8082) &rarr; Backend (8092) &rarr; Kingbase (training) / Redis。开发隧道端口与技术细节折叠收录。
</p>
</header>
<!-- 1. 007 脚本警示条 -->
<div class="warning-alert-bar">
<div style="display: flex; align-items: center; gap: 0.75rem;">
<span class="warning-tag-box">DO NOT EXECUTE 严禁执行</span>
<div style="font-size: 0.88rem; color: #991b1b;">
<strong>历史业务字典脚本 (RuoYi-Vue/sql/train/v2/007_dicts.sql) 本次发布严禁执行!</strong> 该脚本作为历史 V2 字典初始化资产存档,当前发布不包含且无需执行。
</div>
</div>
<span class="badge badge-danger">仅执行增量 001~003</span>
</div>
<!-- 2. 共享试用目标标准拓扑 (极简 4 层纵向链) -->
<section class="topology-card">
<div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; flex-wrap: wrap; gap: 0.75rem;">
<div>
<h2 style="font-size: 1.25rem; font-weight: 700; color: var(--navy-900);">共享试用部署标准拓扑 (Shared Trial Topology)</h2>
<p style="font-size: 0.82rem; color: var(--text-muted); margin-top: 0.2rem;">局域网试用网络走向,保障试用环境独立稳定</p>
</div>
<span class="badge badge-pass">标准四层链路</span>
</div>
<div class="topology-svg-wrap">
<svg class="topology-svg" viewBox="0 0 800 380" style="width: 100%; height: auto; max-width: 800px; display: block; margin: 0 auto;">
<defs>
<marker id="arrow" viewBox="0 0 10 10" refX="6" refY="5" markerWidth="6" markerHeight="6" orient="auto-start-reverse">
<path d="M 0 1 L 10 5 L 0 9 z" fill="#64748b"/>
</marker>
</defs>
<!-- 1. Client Browser -->
<g>
<rect x="250" y="20" width="300" height="52" rx="8" fill="#f8fafc" stroke="#94a3b8" stroke-width="1.5"/>
<text x="400" y="52" text-anchor="middle" font-size="14" font-weight="700" fill="#0f172a">终端客户端浏览器 (Client Browser)</text>
</g>
<!-- Link 1 -> 2 -->
<line x1="400" y1="72" x2="400" y2="108" stroke="#64748b" stroke-width="1.5" marker-end="url(#arrow)"/>
<text x="410" y="94" font-size="11" fill="#64748b">HTTPS / HTTP (80/443)</text>
<!-- 2. Frontend Nginx / Dist -->
<g>
<rect x="230" y="110" width="340" height="56" rx="8" fill="#eff6ff" stroke="#3b82f6" stroke-width="1.5"/>
<text x="400" y="135" text-anchor="middle" font-size="13" font-weight="700" fill="#1d4ed8">共享试用前端静态容器 (Nginx 反向代理)</text>
<text x="400" y="153" text-anchor="middle" font-size="11" fill="#2563eb">目标端口: 8082 · Vue 2.6 SPA 编译产物</text>
</g>
<!-- Link 2 -> 3 -->
<line x1="400" y1="166" x2="400" y2="202" stroke="#64748b" stroke-width="1.5" marker-end="url(#arrow)"/>
<text x="410" y="188" font-size="11" fill="#64748b">/prod-api/ 反向代理</text>
<!-- 3. Backend Spring Boot -->
<g>
<rect x="230" y="204" width="340" height="56" rx="8" fill="#f0fdf4" stroke="#10b981" stroke-width="1.5"/>
<text x="400" y="229" text-anchor="middle" font-size="13" font-weight="700" fill="#047857">共享试用后端单体服务 (Spring Boot 2.5.15)</text>
<text x="400" y="247" text-anchor="middle" font-size="11" fill="#059669">目标端口: 8092 · RuoYi-Vue 业务核心 JAR</text>
</g>
<!-- Link 3 -> 4 Databases -->
<line x1="350" y1="260" x2="280" y2="284" stroke="#64748b" stroke-width="1.5" marker-end="url(#arrow)"/>
<line x1="450" y1="260" x2="520" y2="284" stroke="#64748b" stroke-width="1.5" marker-end="url(#arrow)"/>
<!-- 4a. KingbaseES -->
<g>
<rect x="170" y="286" width="220" height="60" rx="8" fill="#fef2f2" stroke="#ef4444" stroke-width="1.5"/>
<text x="280" y="310" text-anchor="middle" font-size="13" font-weight="700" fill="#991b1b">KingbaseES (training 试用库)</text>
<text x="280" y="330" text-anchor="middle" font-size="11" fill="#b91c1c">V009R003C018 · 21张业务表</text>
</g>
<!-- 4b. Redis -->
<g>
<rect x="410" y="286" width="220" height="60" rx="8" fill="#f0f9ff" stroke="#0284c7" stroke-width="1.5"/>
<text x="520" y="310" text-anchor="middle" font-size="13" font-weight="700" fill="#0369a1">Redis (缓存与会话)</text>
<text x="520" y="330" text-anchor="middle" font-size="11" fill="#0284c7">Token 校验 · 验证码防重放</text>
</g>
</svg>
</div>
</section>
<!-- 3. Release Delta (3 required migrations) -->
<section class="content-section">
<div class="section-header">
<div>
<h2 class="section-title">发布数据库增量变更 (Release Delta)</h2>
<p class="section-subtitle">本次试用环境升级仅需依次执行 3 个幂等增量脚本,保障历史业务数据零丢失。</p>
</div>
<span class="badge badge-pass">3 Required Migrations</span>
</div>
<div class="delta-summary-card">
<div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.85rem; flex-wrap: wrap; gap: 0.5rem;">
<h3 style="font-size: 1.05rem; font-weight: 700; color: var(--navy-900);">3 Required Migrations (必须且仅执行)</h3>
<span class="badge badge-pass">DELTA = 3</span>
</div>
<p style="font-size: 0.88rem; color: var(--text-secondary); line-height: 1.7; margin-bottom: 1rem;">
共享试用环境已具备完整基础 Schema,本次升级严格限定于 3 个增量脚本,顺序执行即可完成日志耗时字段补齐、分析域权限闭环与报到考勤写权限补全:
</p>
<!-- 手风琴展开具体的 001/002/003 脚本细节 -->
<div class="accordion-item">
<div class="accordion-header">
<div class="accordion-title-group">
<span class="badge badge-pass">001</span>
<span style="font-size: 0.92rem; font-weight: 600; color: var(--navy-900);">001_sys_oper_log_cost_time.sql (操作日志耗时字段补丁)</span>
</div>
<svg class="accordion-arrow" viewBox="0 0 20 20"><path d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z"/></svg>
</div>
<div class="accordion-body">
<p><strong>作用</strong>:为系统操作日志表 <code>sys_oper_log</code> 补齐缺失的 <code>cost_time</code> 耗时字段 (<code>BIGINT DEFAULT 0</code>),对已有存量记录执行补偿归零初始化。</p>
<p><strong>执行方式</strong>:<code>\i RuoYi-Vue/sql/system/kingbase/001_sys_oper_log_cost_time.sql</code></p>
</div>
</div>
<div class="accordion-item">
<div class="accordion-header">
<div class="accordion-title-group">
<span class="badge badge-pass">002</span>
<span style="font-size: 0.92rem; font-weight: 600; color: var(--navy-900);">002_legacy_analytics_permissions.sql (分析域菜单与RBAC导出权限闭环)</span>
</div>
<svg class="accordion-arrow" viewBox="0 0 20 20"><path d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z"/></svg>
</div>
<div class="accordion-body">
<p><strong>作用</strong>:为培训分析域四大报表页面(Report、Checkin、Duration、Portrait)注入规范的 RBAC 导出权限与按钮(分配 menu_id 2177~2180),并校验父级菜单与防孤儿角色映射。</p>
<p><strong>执行方式</strong>:<code>\i RuoYi-Vue/sql/system/kingbase/002_legacy_analytics_permissions.sql</code></p>
</div>
</div>
<div class="accordion-item">
<div class="accordion-header">
<div class="accordion-title-group">
<span class="badge badge-pass">003</span>
<span style="font-size: 0.92rem; font-weight: 600; color: var(--navy-900);">003_report_attendance_action_permissions.sql (报到与考勤动作权限闭环)</span>
</div>
<svg class="accordion-arrow" viewBox="0 0 20 20"><path d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z"/></svg>
</div>
<div class="accordion-body">
<p><strong>作用</strong>:补齐现场报到确认 (<code>train:report:confirm</code> 2181)、考勤打卡录入 (<code>train:attendance:checkin</code> 2182) 与状态修改 (<code>train:attendance:edit</code> 2183) 动作权限,确保强写操作受到权限拦截保护。</p>
<p><strong>执行方式</strong>:<code>\i RuoYi-Vue/sql/system/kingbase/003_report_attendance_action_permissions.sql</code></p>
</div>
</div>
</div>
</section>
<!-- 4. 技术细节折叠手风琴 (Technical Details) -->
<section class="content-section" style="margin-bottom: 0;">
<div class="section-header">
<div>
<h2 class="section-title">技术底层细节与开发环境映射 (Technical Details)</h2>
<p class="section-subtitle">收录研发跳板机隧道、调试端口、心跳探测契约与运维排障细节。</p>
</div>
</div>
<div class="accordion-item">
<div class="accordion-header">
<div class="accordion-title-group">
<span class="badge badge-neutral">端口与隧道映射</span>
<span style="font-size: 0.95rem; font-weight: 600; color: var(--navy-900);">查看开发/测试/生产各环境端口配置与真实心跳探测契约</span>
</div>
<svg class="accordion-arrow" viewBox="0 0 20 20"><path d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z"/></svg>
</div>
<div class="accordion-body">
<div class="data-table-wrap">
<table class="data-table">
<thead>
<tr>
<th>组件名称</th>
<th>生产标准端口</th>
<th>本地/研发测试端口</th>
<th>健康心跳探测规范</th>
<th>备注说明</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>前端 Web 应用</strong></td>
<td><code>8082</code></td>
<td><code>8080</code> (开发 dev-server)</td>
<td><code>GET / (HTTP 200)</code></td>
<td>Vue 2.6 单页应用,Nginx 反向代理</td>
</tr>
<tr>
<td><strong>后端 API 服务</strong></td>
<td><code>8092</code></td>
<td><code>8090 / 8094</code> (独立实例)</td>
<td><code>GET /login (HTTP 200)</code></td>
<td>Spring Boot JAR,无 actuator 依赖,探测登录接口</td>
</tr>
<tr>
<td><strong>KingbaseES 主库</strong></td>
<td>物理直连端口</td>
<td><code>127.0.0.1:4321</code> (SSH隧道)</td>
<td><code>SELECT 1 FROM DUAL</code></td>
<td>通过安全跳板机建立隧道映射进行集成验证</td>
</tr>
<tr>
<td><strong>Redis 缓存</strong></td>
<td><code>6379</code></td>
<td><code>127.0.0.1:6379</code></td>
<td><code>PING -&gt; PONG</code></td>
<td>存储用户 JWT 令牌与防重放临时验证码</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>
</main>
<!-- 页脚 -->
<footer class="site-footer">
<p>RailwaySystem SYFJGYD学员管理系统 · 交付候选版 (Final Candidate)</p>
<p style="margin-top: 0.35rem; color: var(--text-muted);">
部署拓扑与 Delta 规范 · <a href="http://192.168.139.218:9980/sict/railwaysystem/-/blob/feat/cicd-pipeline/docs/handbook/08-deployment-and-release.md" target="_blank" rel="noopener noreferrer">查阅部署手册</a> · <a href="../reports/archive/20260915/deployment-report.md" target="_blank" rel="noopener noreferrer">查阅部署报告</a>
</p>
</footer>
<script src="assets/docs.js"></script>
</body>
</html>