📝 doc.
0
docs/.nojekyll
Normal file
120
docs/README.md
Normal file
@@ -0,0 +1,120 @@
|
||||
<h1 style="display: flex; align-items: center;">
|
||||
<img style="margin-right: 8px;" src="./assert/logo.svg" width="32px" height="32px"/> orion-ops-pro 是什么
|
||||
</h1>
|
||||
|
||||
`orion-ops-pro` 一款开箱即用的运维平台, 提供了资产管理、资产授权、Web终端、WebSftp、角色管理、系统管理等功能。为运维团队提供轻量化的运维治理平台。它是根据 `orion-ops`
|
||||
的产品思路完全重构的一套系统, 重新设计了架构并优化交互逻辑, 操作更快捷友好。
|
||||
|
||||
<p style="text-align: left">
|
||||
<a target="_blank" style="text-decoration: none" href="https://app.codacy.com/gh/lijiahangmax/orion-ops-pro/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade">
|
||||
<img src="https://app.codacy.com/project/badge/Grade/49eaab3a9a474af3b87e1d21ffec71c4" alt="quality"/>
|
||||
</a>
|
||||
<a target="_blank" style="text-decoration: none" href="https://www.oracle.com/java/technologies/javase/javase-jdk8-downloads.html">
|
||||
<img src="https://img.shields.io/badge/JDK-8+-green.svg" alt="jdk8"/>
|
||||
</a>
|
||||
<a target="_blank" style="text-decoration: none" href="https://www.apache.org/licenses/LICENSE-2.0">
|
||||
<img src="https://img.shields.io/github/license/lijiahangmax/orion-ops-pro" alt="License"/>
|
||||
</a>
|
||||
<a target="_blank" style="text-decoration: none" href="https://gitee.com/lijiahangmax/orion-ops-pro/stargazers">
|
||||
<img src="https://gitee.com/lijiahangmax/orion-ops-pro/badge/star.svg?theme=dark" alt="star"/>
|
||||
</a>
|
||||
<a target="_blank" style="text-decoration: none" href="https://gitee.com/lijiahangmax/orion-ops-pro/members">
|
||||
<img src="https://gitee.com/lijiahangmax/orion-ops-pro/badge/fork.svg?theme=dark" alt="fork"/>
|
||||
</a>
|
||||
<!-- <a target="_blank" style="text-decoration: none" href="https://github.com/lijiahangmax/orion-ops-pro">
|
||||
<img src="https://img.shields.io/github/stars/lijiahangmax/orion-ops-pro.svg?style=social" alt="star"/>
|
||||
</a> -->
|
||||
</p>
|
||||
|
||||
<br/>
|
||||
|
||||
当前版本: **1.0.0-beta.1**
|
||||
github: https://github.com/lijiahangmax/orion-ops-pro
|
||||
gitee: https://gitee.com/lijiahangmax/orion-ops-pro
|
||||
文档: https://lijiahangmax.gitee.io/orion-ops-pro/#/
|
||||
demo: http://101.43.254.243:1081/#/
|
||||
|
||||
演示账号: `orionuser`
|
||||
演示密码: `orionuser`
|
||||
留个小星星再走吧⭐
|
||||
|
||||
## 特性
|
||||
|
||||
* 易用便捷: 极简配置, 开箱即用, 并兼容 Docker 部署方式。
|
||||
* 资产管理: 支持灵活配置主机分组, 统一管理主机、秘钥和身份。
|
||||
* 资产授权: 可将资产数据授权给指定角色和用户。
|
||||
* 权限控制: 全面管理用户角色, 支持动态菜单配置和强制下线等功能。
|
||||
* 在线终端: 提供便捷的在线 Web 终端服务, 支持自定义快捷键和主题风格。
|
||||
* 文件管理: 实现远程主机文件的批量上传、下载和在线编辑等操作。
|
||||
* 可扩展性: 前后端代码规范统一, 代码质量高、健壮且易于阅读和扩展。
|
||||
[//]: # (FIXME * 批量操作: 支持远程主机批量执行命令 以及 批量执行上传文件)
|
||||
[//]: # (FIXME * 调度任务: 维护 cron 表达式, 定时执行主机命令)
|
||||
[//]: # (FIXME * 功能强大: 命令批量执行, 任务定时调度, 远程日志查看, 操作日志全记录等)
|
||||
|
||||
## 快速开始
|
||||
|
||||
docker安装: https://lijiahangmax.gitee.io/orion-ops-pro/#/quickstart/docker-install
|
||||
安装文档: https://lijiahangmax.gitee.io/orion-ops-pro/#/quickstart/install
|
||||
开发文档: https://lijiahangmax.gitee.io/orion-ops-pro/#/advance/dev
|
||||
操作手册: https://lijiahangmax.gitee.io/orion-ops-pro/#/operator/asset
|
||||
常见问题: https://lijiahangmax.gitee.io/orion-ops-pro/#/quickstart/faq
|
||||
roadmap: https://lijiahangmax.gitee.io/orion-ops-pro/#/about/roadmap
|
||||
|
||||
## 技术栈
|
||||
|
||||
* Docker
|
||||
* SpringBoot
|
||||
* Mysql
|
||||
* Redis
|
||||
* Vue3
|
||||
* Arco Design
|
||||
|
||||
[//]: # ( fixme 免责声明 (注意事项) (在使用平台之前, 请确保您已经了解并同意相关的使用协议和隐私政策。) (为了数据安全, 请定期备份数据和配置, 以防意外丢失或损坏。))
|
||||
|
||||
## 功能预览
|
||||
|
||||
> 工作台
|
||||
|
||||

|
||||
|
||||
> 资产管理
|
||||
|
||||

|
||||

|
||||
|
||||
> 主机终端
|
||||
|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||
|
||||
> 用户管理
|
||||
|
||||

|
||||

|
||||

|
||||
|
||||
> 系统管理
|
||||
|
||||

|
||||

|
||||
|
||||
## 联系我
|
||||
|
||||
<img src="./assert/img/qq_group1.jpg" alt="qq" width="268px"/>
|
||||
<img src="./assert/img/wx.jpg" alt="wx" width="268px"/>
|
||||
|
||||
📧 微信添加备注: ops
|
||||
|
||||
## 支持一下
|
||||
|
||||
<img src="./assert/img/support_pay.jpg" alt="收款码" width="540px"/>
|
||||
|
||||
🎁 为了项目能健康持续的发展, 我期望获得相应的资金支持, 你们的支持是我不断更新前进的动力!
|
||||
|
||||
## License
|
||||
|
||||
本项目遵循 [Apache-2.0](https://github.com/lijiahangmax/orion-ops-pro/blob/main/LICENSE) 开源许可证。
|
||||
11
docs/_coverpage.md
Normal file
@@ -0,0 +1,11 @@
|
||||
# orion-ops-pro <small>1.0.0-beta.1</small>
|
||||
|
||||
> 一款开箱即用的运维平台。
|
||||
|
||||
- 易用 便捷
|
||||
- 安全 稳定
|
||||
- 智能 高效
|
||||
|
||||
[GitHub](https://github.com/lijiahangmax/orion-ops-pro)
|
||||
[Gitee](https://gitee.com/lijiahangmax/orion-ops-pro)
|
||||
[Get Started](README.md)
|
||||
15
docs/_sidebar.md
Normal file
@@ -0,0 +1,15 @@
|
||||
* 关于
|
||||
* [Roadmap](about/roadmap.md)
|
||||
* [更新日志](about/change-log.md)
|
||||
* [如何升级](about/update.md)
|
||||
* 快速开始
|
||||
* [docker安装](quickstart/docker-install.md)
|
||||
* [普通安装](quickstart/install.md)
|
||||
* [本地调试](quickstart/dev.md)
|
||||
* [常见问题](quickstart/faq.md)
|
||||
* 操作手册
|
||||
* [资产管理](operator/asset.md)
|
||||
* [主机运维](operator/host_ops.md)
|
||||
* [运维审计](operator/host_audit.md)
|
||||
* [用户管理](operator/user.md)
|
||||
* [系统管理](operator/system.md)
|
||||
20
docs/about/change-log.md
Normal file
@@ -0,0 +1,20 @@
|
||||
> 版本号严格遵循 Semver 规范。
|
||||
|
||||
[//]: # (🌈添加 🔨优化 🐞修复 [如何升级](/about/update.md?id=_100))
|
||||
|
||||
## 1.0.0-beta.1
|
||||
|
||||
`2024-03-01` `preview`
|
||||
|
||||
🌈 主机管理
|
||||
🌈 主机秘钥
|
||||
🌈 主机身份
|
||||
🌈 资产授权
|
||||
🌈 主机终端
|
||||
🌈 连接日志
|
||||
🌈 角色管理
|
||||
🌈 用户管理
|
||||
🌈 操作日志
|
||||
🌈 系统菜单
|
||||
🌈 数据字典项
|
||||
🌈 数据字典值
|
||||
12
docs/about/roadmap.md
Normal file
@@ -0,0 +1,12 @@
|
||||
## 已完成 ✅
|
||||
|
||||
## 开发中 ⏱
|
||||
|
||||
## 未开始 ⏳
|
||||
|
||||
* 批量执行
|
||||
* 定时执行
|
||||
* 站内消息
|
||||
* 后端配置动态配置
|
||||
* 终端背景图片
|
||||
* 按资产数据 UI 改版
|
||||
9
docs/about/update.md
Normal file
@@ -0,0 +1,9 @@
|
||||
⚡ 注意: 应用不支持跨版本升级, 可以进行多次升级
|
||||
|
||||
## 1.0.0-beta.1
|
||||
|
||||
> sql 脚本
|
||||
|
||||
```sql
|
||||
|
||||
```
|
||||
9
docs/assert/docsify-copy-code.min.js
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
/*!
|
||||
* docsify-copy-code
|
||||
* v2.1.1
|
||||
* https://github.com/jperasmus/docsify-copy-code
|
||||
* (c) 2017-2020 JP Erasmus <jperasmus11@gmail.com>
|
||||
* MIT license
|
||||
*/
|
||||
!function(){"use strict";function s(o){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o})(o)}!function(o,e){void 0===e&&(e={});var t=e.insertAt;if(o&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],c=document.createElement("style");c.type="text/css","top"===t&&n.firstChild?n.insertBefore(c,n.firstChild):n.appendChild(c),c.styleSheet?c.styleSheet.cssText=o:c.appendChild(document.createTextNode(o))}}(".docsify-copy-code-button,.docsify-copy-code-button span{cursor:pointer;transition:all .25s ease}.docsify-copy-code-button{position:absolute;z-index:1;top:0;right:0;overflow:visible;padding:.65em .8em;border:0;border-radius:0;outline:0;font-size:1em;background:grey;background:var(--theme-color,grey);color:#fff;opacity:0}.docsify-copy-code-button span{border-radius:3px;background:inherit;pointer-events:none}.docsify-copy-code-button .error,.docsify-copy-code-button .success{position:absolute;z-index:-100;top:50%;right:0;padding:.5em .65em;font-size:.825em;opacity:0;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.docsify-copy-code-button.error .error,.docsify-copy-code-button.success .success{right:100%;opacity:1;-webkit-transform:translate(-115%,-50%);transform:translate(-115%,-50%)}.docsify-copy-code-button:focus,pre:hover .docsify-copy-code-button{opacity:1}"),document.querySelector('link[href*="docsify-copy-code"]')&&console.warn("[Deprecation] Link to external docsify-copy-code stylesheet is no longer necessary."),window.DocsifyCopyCodePlugin={init:function(){return function(o,e){o.ready(function(){console.warn("[Deprecation] Manually initializing docsify-copy-code using window.DocsifyCopyCodePlugin.init() is no longer necessary.")})}}},window.$docsify=window.$docsify||{},window.$docsify.plugins=[function(o,r){o.doneEach(function(){var o=Array.apply(null,document.querySelectorAll("pre[data-lang]")),c={buttonText:"Copy to clipboard",errorText:"Error",successText:"Copied"};r.config.copyCode&&Object.keys(c).forEach(function(t){var n=r.config.copyCode[t];"string"==typeof n?c[t]=n:"object"===s(n)&&Object.keys(n).some(function(o){var e=-1<location.href.indexOf(o);return c[t]=e?n[o]:c[t],e})});var e=['<button class="docsify-copy-code-button">','<span class="label">'.concat(c.buttonText,"</span>"),'<span class="error">'.concat(c.errorText,"</span>"),'<span class="success">'.concat(c.successText,"</span>"),"</button>"].join("");o.forEach(function(o){o.insertAdjacentHTML("beforeend",e)})}),o.mounted(function(){document.querySelector(".content").addEventListener("click",function(o){if(o.target.classList.contains("docsify-copy-code-button")){var e="BUTTON"===o.target.tagName?o.target:o.target.parentNode,t=document.createRange(),n=e.parentNode.querySelector("code"),c=window.getSelection();t.selectNode(n),c.removeAllRanges(),c.addRange(t);try{document.execCommand("copy")&&(e.classList.add("success"),setTimeout(function(){e.classList.remove("success")},1e3))}catch(o){console.error("docsify-copy-code: ".concat(o)),e.classList.add("error"),setTimeout(function(){e.classList.remove("error")},1e3)}"function"==typeof(c=window.getSelection()).removeRange?c.removeRange(t):"function"==typeof c.removeAllRanges&&c.removeAllRanges()}})})}].concat(window.$docsify.plugins||[])}();
|
||||
//# sourceMappingURL=docsify-copy-code.min.js.map
|
||||
1
docs/assert/docsify-pagination.min.js
vendored
Normal file
1
docs/assert/docsify@4.js
Normal file
242
docs/assert/font.css
Normal file
@@ -0,0 +1,242 @@
|
||||
/* cyrillic-ext */
|
||||
@font-face {
|
||||
font-family: 'Roboto Mono';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: url(https://fonts.gstatic.com/s/robotomono/v21/L0xuDF4xlVMF-BfR8bXMIhJHg45mwgGEFl0_3vq_SeW4Ep0.woff2) format('woff2');
|
||||
unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
|
||||
}
|
||||
|
||||
/* cyrillic */
|
||||
@font-face {
|
||||
font-family: 'Roboto Mono';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: url(https://fonts.gstatic.com/s/robotomono/v21/L0xuDF4xlVMF-BfR8bXMIhJHg45mwgGEFl0_3vq_QOW4Ep0.woff2) format('woff2');
|
||||
unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
|
||||
}
|
||||
|
||||
/* greek */
|
||||
@font-face {
|
||||
font-family: 'Roboto Mono';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: url(https://fonts.gstatic.com/s/robotomono/v21/L0xuDF4xlVMF-BfR8bXMIhJHg45mwgGEFl0_3vq_R-W4Ep0.woff2) format('woff2');
|
||||
unicode-range: U+0370-03FF;
|
||||
}
|
||||
|
||||
/* vietnamese */
|
||||
@font-face {
|
||||
font-family: 'Roboto Mono';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: url(https://fonts.gstatic.com/s/robotomono/v21/L0xuDF4xlVMF-BfR8bXMIhJHg45mwgGEFl0_3vq_S-W4Ep0.woff2) format('woff2');
|
||||
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+1EA0-1EF9, U+20AB;
|
||||
}
|
||||
|
||||
/* latin-ext */
|
||||
@font-face {
|
||||
font-family: 'Roboto Mono';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: url(https://fonts.gstatic.com/s/robotomono/v21/L0xuDF4xlVMF-BfR8bXMIhJHg45mwgGEFl0_3vq_SuW4Ep0.woff2) format('woff2');
|
||||
unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
||||
}
|
||||
|
||||
/* latin */
|
||||
@font-face {
|
||||
font-family: 'Roboto Mono';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: url(https://fonts.gstatic.com/s/robotomono/v21/L0xuDF4xlVMF-BfR8bXMIhJHg45mwgGEFl0_3vq_ROW4.woff2) format('woff2');
|
||||
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
||||
}
|
||||
|
||||
/* cyrillic-ext */
|
||||
@font-face {
|
||||
font-family: 'Source Sans Pro';
|
||||
font-style: normal;
|
||||
font-weight: 300;
|
||||
src: url(https://fonts.gstatic.com/s/sourcesanspro/v19/6xKydSBYKcSV-LCoeQqfX1RYOo3ik4zwmhduz8A.woff2) format('woff2');
|
||||
unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
|
||||
}
|
||||
|
||||
/* cyrillic */
|
||||
@font-face {
|
||||
font-family: 'Source Sans Pro';
|
||||
font-style: normal;
|
||||
font-weight: 300;
|
||||
src: url(https://fonts.gstatic.com/s/sourcesanspro/v19/6xKydSBYKcSV-LCoeQqfX1RYOo3ik4zwkxduz8A.woff2) format('woff2');
|
||||
unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
|
||||
}
|
||||
|
||||
/* greek-ext */
|
||||
@font-face {
|
||||
font-family: 'Source Sans Pro';
|
||||
font-style: normal;
|
||||
font-weight: 300;
|
||||
src: url(https://fonts.gstatic.com/s/sourcesanspro/v19/6xKydSBYKcSV-LCoeQqfX1RYOo3ik4zwmxduz8A.woff2) format('woff2');
|
||||
unicode-range: U+1F00-1FFF;
|
||||
}
|
||||
|
||||
/* greek */
|
||||
@font-face {
|
||||
font-family: 'Source Sans Pro';
|
||||
font-style: normal;
|
||||
font-weight: 300;
|
||||
src: url(https://fonts.gstatic.com/s/sourcesanspro/v19/6xKydSBYKcSV-LCoeQqfX1RYOo3ik4zwlBduz8A.woff2) format('woff2');
|
||||
unicode-range: U+0370-03FF;
|
||||
}
|
||||
|
||||
/* vietnamese */
|
||||
@font-face {
|
||||
font-family: 'Source Sans Pro';
|
||||
font-style: normal;
|
||||
font-weight: 300;
|
||||
src: url(https://fonts.gstatic.com/s/sourcesanspro/v19/6xKydSBYKcSV-LCoeQqfX1RYOo3ik4zwmBduz8A.woff2) format('woff2');
|
||||
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+1EA0-1EF9, U+20AB;
|
||||
}
|
||||
|
||||
/* latin-ext */
|
||||
@font-face {
|
||||
font-family: 'Source Sans Pro';
|
||||
font-style: normal;
|
||||
font-weight: 300;
|
||||
src: url(https://fonts.gstatic.com/s/sourcesanspro/v19/6xKydSBYKcSV-LCoeQqfX1RYOo3ik4zwmRduz8A.woff2) format('woff2');
|
||||
unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
||||
}
|
||||
|
||||
/* latin */
|
||||
@font-face {
|
||||
font-family: 'Source Sans Pro';
|
||||
font-style: normal;
|
||||
font-weight: 300;
|
||||
src: url(https://fonts.gstatic.com/s/sourcesanspro/v19/6xKydSBYKcSV-LCoeQqfX1RYOo3ik4zwlxdu.woff2) format('woff2');
|
||||
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
||||
}
|
||||
|
||||
/* cyrillic-ext */
|
||||
@font-face {
|
||||
font-family: 'Source Sans Pro';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: url(https://fonts.gstatic.com/s/sourcesanspro/v19/6xK3dSBYKcSV-LCoeQqfX1RYOo3qNa7lqDY.woff2) format('woff2');
|
||||
unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
|
||||
}
|
||||
|
||||
/* cyrillic */
|
||||
@font-face {
|
||||
font-family: 'Source Sans Pro';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: url(https://fonts.gstatic.com/s/sourcesanspro/v19/6xK3dSBYKcSV-LCoeQqfX1RYOo3qPK7lqDY.woff2) format('woff2');
|
||||
unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
|
||||
}
|
||||
|
||||
/* greek-ext */
|
||||
@font-face {
|
||||
font-family: 'Source Sans Pro';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: url(https://fonts.gstatic.com/s/sourcesanspro/v19/6xK3dSBYKcSV-LCoeQqfX1RYOo3qNK7lqDY.woff2) format('woff2');
|
||||
unicode-range: U+1F00-1FFF;
|
||||
}
|
||||
|
||||
/* greek */
|
||||
@font-face {
|
||||
font-family: 'Source Sans Pro';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: url(https://fonts.gstatic.com/s/sourcesanspro/v19/6xK3dSBYKcSV-LCoeQqfX1RYOo3qO67lqDY.woff2) format('woff2');
|
||||
unicode-range: U+0370-03FF;
|
||||
}
|
||||
|
||||
/* vietnamese */
|
||||
@font-face {
|
||||
font-family: 'Source Sans Pro';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: url(https://fonts.gstatic.com/s/sourcesanspro/v19/6xK3dSBYKcSV-LCoeQqfX1RYOo3qN67lqDY.woff2) format('woff2');
|
||||
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+1EA0-1EF9, U+20AB;
|
||||
}
|
||||
|
||||
/* latin-ext */
|
||||
@font-face {
|
||||
font-family: 'Source Sans Pro';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: url(https://fonts.gstatic.com/s/sourcesanspro/v19/6xK3dSBYKcSV-LCoeQqfX1RYOo3qNq7lqDY.woff2) format('woff2');
|
||||
unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
||||
}
|
||||
|
||||
/* latin */
|
||||
@font-face {
|
||||
font-family: 'Source Sans Pro';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: url(https://fonts.gstatic.com/s/sourcesanspro/v19/6xK3dSBYKcSV-LCoeQqfX1RYOo3qOK7l.woff2) format('woff2');
|
||||
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
||||
}
|
||||
|
||||
/* cyrillic-ext */
|
||||
@font-face {
|
||||
font-family: 'Source Sans Pro';
|
||||
font-style: normal;
|
||||
font-weight: 600;
|
||||
src: url(https://fonts.gstatic.com/s/sourcesanspro/v19/6xKydSBYKcSV-LCoeQqfX1RYOo3i54rwmhduz8A.woff2) format('woff2');
|
||||
unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
|
||||
}
|
||||
|
||||
/* cyrillic */
|
||||
@font-face {
|
||||
font-family: 'Source Sans Pro';
|
||||
font-style: normal;
|
||||
font-weight: 600;
|
||||
src: url(https://fonts.gstatic.com/s/sourcesanspro/v19/6xKydSBYKcSV-LCoeQqfX1RYOo3i54rwkxduz8A.woff2) format('woff2');
|
||||
unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
|
||||
}
|
||||
|
||||
/* greek-ext */
|
||||
@font-face {
|
||||
font-family: 'Source Sans Pro';
|
||||
font-style: normal;
|
||||
font-weight: 600;
|
||||
src: url(https://fonts.gstatic.com/s/sourcesanspro/v19/6xKydSBYKcSV-LCoeQqfX1RYOo3i54rwmxduz8A.woff2) format('woff2');
|
||||
unicode-range: U+1F00-1FFF;
|
||||
}
|
||||
|
||||
/* greek */
|
||||
@font-face {
|
||||
font-family: 'Source Sans Pro';
|
||||
font-style: normal;
|
||||
font-weight: 600;
|
||||
src: url(https://fonts.gstatic.com/s/sourcesanspro/v19/6xKydSBYKcSV-LCoeQqfX1RYOo3i54rwlBduz8A.woff2) format('woff2');
|
||||
unicode-range: U+0370-03FF;
|
||||
}
|
||||
|
||||
/* vietnamese */
|
||||
@font-face {
|
||||
font-family: 'Source Sans Pro';
|
||||
font-style: normal;
|
||||
font-weight: 600;
|
||||
src: url(https://fonts.gstatic.com/s/sourcesanspro/v19/6xKydSBYKcSV-LCoeQqfX1RYOo3i54rwmBduz8A.woff2) format('woff2');
|
||||
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+1EA0-1EF9, U+20AB;
|
||||
}
|
||||
|
||||
/* latin-ext */
|
||||
@font-face {
|
||||
font-family: 'Source Sans Pro';
|
||||
font-style: normal;
|
||||
font-weight: 600;
|
||||
src: url(https://fonts.gstatic.com/s/sourcesanspro/v19/6xKydSBYKcSV-LCoeQqfX1RYOo3i54rwmRduz8A.woff2) format('woff2');
|
||||
unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
||||
}
|
||||
|
||||
/* latin */
|
||||
@font-face {
|
||||
font-family: 'Source Sans Pro';
|
||||
font-style: normal;
|
||||
font-weight: 600;
|
||||
src: url(https://fonts.gstatic.com/s/sourcesanspro/v19/6xKydSBYKcSV-LCoeQqfX1RYOo3i54rwlxdu.woff2) format('woff2');
|
||||
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
||||
}
|
||||
BIN
docs/assert/img/asset_grant.png
Normal file
|
After Width: | Height: | Size: 561 KiB |
BIN
docs/assert/img/asset_host_list.png
Normal file
|
After Width: | Height: | Size: 584 KiB |
BIN
docs/assert/img/qq_group1.jpg
Normal file
|
After Width: | Height: | Size: 601 KiB |
BIN
docs/assert/img/support_pay.jpg
Normal file
|
After Width: | Height: | Size: 175 KiB |
0
docs/assert/img/support_wx.png
Normal file
0
docs/assert/img/support_zfb.jpg
Normal file
BIN
docs/assert/img/system_menu.png
Normal file
|
After Width: | Height: | Size: 605 KiB |
BIN
docs/assert/img/terminal_setting.png
Normal file
|
After Width: | Height: | Size: 530 KiB |
BIN
docs/assert/img/terminal_sftp.png
Normal file
|
After Width: | Height: | Size: 609 KiB |
BIN
docs/assert/img/terminal_snippet.png
Normal file
|
After Width: | Height: | Size: 509 KiB |
BIN
docs/assert/img/terminal_ssh.png
Normal file
|
After Width: | Height: | Size: 504 KiB |
BIN
docs/assert/img/terminal_theme.png
Normal file
|
After Width: | Height: | Size: 563 KiB |
BIN
docs/assert/img/terminal_transfer.png
Normal file
|
After Width: | Height: | Size: 524 KiB |
BIN
docs/assert/img/user_grant_menu.png
Normal file
|
After Width: | Height: | Size: 582 KiB |
BIN
docs/assert/img/user_info.png
Normal file
|
After Width: | Height: | Size: 552 KiB |
BIN
docs/assert/img/user_list.png
Normal file
|
After Width: | Height: | Size: 554 KiB |
BIN
docs/assert/img/user_operator_log.png
Normal file
|
After Width: | Height: | Size: 613 KiB |
BIN
docs/assert/img/workplace.png
Normal file
|
After Width: | Height: | Size: 606 KiB |
BIN
docs/assert/img/wx.jpg
Normal file
|
After Width: | Height: | Size: 141 KiB |
17
docs/assert/logo.svg
Normal file
@@ -0,0 +1,17 @@
|
||||
<svg id="图层_1" data-name="图层 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
|
||||
<defs>
|
||||
<style>.cls-1{fill:url(#未命名的渐变_4);}.cls-2{fill:url(#未命名的渐变_6);}</style>
|
||||
<linearGradient id="未命名的渐变_4" x1="0.32" y1="15.03" x2="20.16" y2="15.03" gradientUnits="userSpaceOnUse">
|
||||
<stop offset="0" stop-color="#23b6b6"/>
|
||||
<stop offset="1" stop-color="#189c98"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="未命名的渐变_6" x1="11.84" y1="16.97" x2="31.68" y2="16.97" gradientUnits="userSpaceOnUse">
|
||||
<stop offset="0" stop-color="#08589b"/>
|
||||
<stop offset="1" stop-color="#2167b2"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<path class="cls-1"
|
||||
d="M20,17.37a1.56,1.56,0,0,0-2.13-.65l-7.56,4.07A4.65,4.65,0,0,1,4,18.91H4a4.65,4.65,0,0,1,1.88-6.3L13.6,8.44a1.56,1.56,0,0,0,.64-2.1h0a1.56,1.56,0,0,0-2.13-.65l-8,4.3a7.24,7.24,0,0,0-2.94,9.82l.51.94a7.24,7.24,0,0,0,9.82,2.94l7.81-4.22a1.56,1.56,0,0,0,.65-2.1Z"/>
|
||||
<path class="cls-2"
|
||||
d="M12,14.63a1.56,1.56,0,0,0,2.13.65l7.56-4.07A4.65,4.65,0,0,1,28,13.09h0a4.65,4.65,0,0,1-1.88,6.3L18.4,23.56a1.56,1.56,0,0,0-.64,2.1h0a1.56,1.56,0,0,0,2.13.65l8-4.3a7.24,7.24,0,0,0,2.94-9.82l-.51-.94a7.24,7.24,0,0,0-9.82-2.94l-7.81,4.22a1.56,1.56,0,0,0-.65,2.1Z"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.3 KiB |
1
docs/assert/search.min.js
vendored
Normal file
1
docs/assert/vue.css
Normal file
2
docs/docs-serve.cmd
Normal file
@@ -0,0 +1,2 @@
|
||||
start "" "C:\Program Files\Google\Chrome\Application\chrome.exe" "http://localhost:3000/"
|
||||
docsify serve ./
|
||||
10
docs/how-use.md
Normal file
@@ -0,0 +1,10 @@
|
||||
### 如何使用
|
||||
|
||||
1. 安装 node
|
||||
2. 安装 docsify-cli
|
||||
```npm i docsify-cli -g```
|
||||
3. 在 doc 目录执行命令
|
||||
```docsify serve ./```
|
||||
4. 在浏览器访问 http://localhost:3000
|
||||
5. 官方文档 https://docsify.js.org/#/?id=docsify
|
||||
|
||||
58
docs/index.html
Normal file
@@ -0,0 +1,58 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>关于orion-ops-pro</title>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
|
||||
<meta name="description" content="Description">
|
||||
<link rel="icon" href="./assert/logo.svg">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">
|
||||
<!-- Theme: Defaults -->
|
||||
<link rel="stylesheet" href="./assert/font.css">
|
||||
<link rel="stylesheet" href="./assert/vue.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="app">
|
||||
loading...
|
||||
</div>
|
||||
<script>
|
||||
window.$docsify = {
|
||||
// 左侧文档名称
|
||||
name: 'orion-ops-pro',
|
||||
// 右上角仓库
|
||||
repo: 'https://github.com/lijiahangmax/orion-ops-pro',
|
||||
coverpage: true,
|
||||
// 加载侧边栏
|
||||
loadSidebar: true,
|
||||
// 侧边栏折叠
|
||||
subMaxLevel: 3,
|
||||
// 标题搜索
|
||||
search: {
|
||||
// 过期时间
|
||||
// 搜索路径 []
|
||||
maxAge: 1000 * 60 * 60,
|
||||
paths: 'auto',
|
||||
placeholder: '搜索',
|
||||
// 无数据
|
||||
noData: '找不到结果',
|
||||
// 搜索标题的最大层级
|
||||
depth: 3,
|
||||
// 是否隐藏其他侧边栏内容
|
||||
hideOtherSidebarContent: false
|
||||
},
|
||||
// 页码
|
||||
pagination: {
|
||||
previousText: '上一章',
|
||||
nextText: '下一章',
|
||||
crossChapter: true,
|
||||
crossChapterText: true,
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<!-- Docsify v4 -->
|
||||
<script src="./assert/docsify@4.js"></script>
|
||||
<script src="./assert/docsify-pagination.min.js"></script>
|
||||
<script src="./assert/docsify-copy-code.min.js"></script>
|
||||
<script src="./assert/search.min.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
40
docs/operator/asset.md
Normal file
@@ -0,0 +1,40 @@
|
||||
### 主机管理
|
||||
|
||||
管理和维护可操作的主机。
|
||||
|
||||
* 主机分组: 设置主机分组以及组内数据
|
||||
* 角色授权: 跳转页面到主机授权页面(角色)
|
||||
* 用户授权: 跳转页面到主机授权页面(用户)
|
||||
* 新增: 添加一台主机
|
||||
* 修改: 修改主机信息
|
||||
* 配置: 修改主机配置信息
|
||||
* 删除: 删除这台主机以及主机关联的数据
|
||||
|
||||
### 主机秘钥
|
||||
|
||||
统一管理和维护用于连接主机的秘钥。
|
||||
|
||||
* 角色授权: 跳转页面到主机秘钥授权页面(角色)
|
||||
* 用户授权: 跳转页面到主机秘钥授权页面(用户)
|
||||
* 新增: 添加一个主机秘钥
|
||||
* 修改: 修改主机秘钥信息
|
||||
* 详情: 查看主机秘钥信息
|
||||
* 删除: 删除当前主机秘钥
|
||||
|
||||
### 主机身份
|
||||
|
||||
统一管理和维护用于连接主机的身份。这里同时维护了用户名,密码/秘钥。
|
||||
|
||||
* 角色授权: 跳转页面到主机身份授权页面(角色)
|
||||
* 用户授权: 跳转页面到主机身份授权页面(用户)
|
||||
* 新增: 添加一个主机身份
|
||||
* 修改: 修改主机身份信息
|
||||
* 删除: 删除当前主机身份
|
||||
|
||||
### 资产授权
|
||||
|
||||
给用户/角色授权资产数据, 若无授权则无法访问资产。
|
||||
|
||||
给用户授权时: 若当前选择的用户有管理员角色(admin)则无需配置, 管理员拥有全部权限。
|
||||
给角色授权时: 无需给管理员(admin)配置, 管理员拥有全部权限。
|
||||
|
||||
3
docs/operator/host_audit.md
Normal file
@@ -0,0 +1,3 @@
|
||||
### 连接日志
|
||||
|
||||
在主机终端页面打开的 `SSH` `SFTP` 连接都会记录下来, 这里默认只展示 `SSH` 连接记录, 可以展开条件进行修改。
|
||||
35
docs/operator/host_ops.md
Normal file
@@ -0,0 +1,35 @@
|
||||
### 主机终端
|
||||
|
||||
主机终端页面 支持 SSH, SFTP。
|
||||
打开后默认会进入新建连接页面, 页面的主机数据是用户授权的资产数据。
|
||||
鼠标移入列表内的主机上时, 右侧会出现 `打开 SSH` `打开 SFTP` `连接设置` `收藏` 的按钮。
|
||||
点击 `连接设置` 后, 会弹出模态框, 可以自定义配置连接主机的 密码/秘钥/身份, 仅对自己生效, 不会修改全局配置, `秘钥` `身份` 数据是用户授权的资产数据。
|
||||
|
||||
> 顶部状态栏
|
||||
|
||||
* 全屏: 开启或关闭全屏
|
||||
|
||||
> 左侧状态栏
|
||||
|
||||
* 新建连接: 新建主机连接 `SSH` `SFTP`
|
||||
* 快捷键设置: 配置 `全局` `会话` `终端` 的快捷键
|
||||
* 显示设置: 配置终端 `显示偏好` `操作栏按钮` `右键菜单` 设置
|
||||
* 主题设置: 修改终端主题配色
|
||||
* 终端设置: 配置终端 `交互` `插件` `会话` 设置
|
||||
|
||||
> 右侧状态栏
|
||||
|
||||
* 命令片段: 自定义快速执行的命令片段, 双击直接执行
|
||||
* 传输列表: 打开文件传输列表, 当前会话下, 所有的文件上传下载传输都会显示在这里
|
||||
* 截图: 截屏终端并且自动下载
|
||||
|
||||
> 文件传输
|
||||
|
||||
点击上传或者下载后会自动添加到传输列表。
|
||||
|
||||
* 上传: 关闭页面自动清除
|
||||
* 下载: 下载完成后自动下载, 关闭页面自动清除
|
||||
|
||||
> SFTP
|
||||
|
||||
* 预览: 默认只能预览 2MB 以内的普通文件, 这个大小可以在前端 env 文件中修改 `VITE_SFTP_PREVIEW_MB`
|
||||
27
docs/operator/system.md
Normal file
@@ -0,0 +1,27 @@
|
||||
### 系统菜单
|
||||
|
||||
管理系统菜单。点击 `状态` 可以快速切换 启用/停用 和 显示/隐藏。
|
||||
|
||||
* 新增: 添加一个菜单
|
||||
* 刷新缓存: 强制刷新服务器缓存, 一般是手动修改了数据库后需要点击此按钮
|
||||
* 修改: 修改菜单信息
|
||||
* 删除: 删除菜单以及子菜单
|
||||
|
||||
### 数据字典项
|
||||
|
||||
维护数据字典项, 前端统一显示。
|
||||
|
||||
* 新增: 添加一个字典项
|
||||
* 刷新缓存: 强制刷新服务器缓存, 一般是手动修改了数据库后需要点击此按钮
|
||||
* 查看: 查看字典值的json
|
||||
* 修改: 修改字典项
|
||||
* 删除: 删除字典项以及字典值
|
||||
|
||||
### 数据字典值
|
||||
|
||||
维护数据字典项对应的值。
|
||||
|
||||
* 新增: 新增字典值
|
||||
* 修改: 修改字典值
|
||||
* 历史: 查询当前字典值的修改历史
|
||||
* 删除: 删除字典值
|
||||
27
docs/operator/user.md
Normal file
@@ -0,0 +1,27 @@
|
||||
### 角色管理
|
||||
|
||||
定义以及维护系统内的角色。 `admin` 是管理员角色, 无法删除/停用/分配菜单。
|
||||
|
||||
* 新增: 新增角色
|
||||
* 启用/停用: 启用/停用角色, 停用后授权的数据/菜单将无法使用
|
||||
* 分配菜单: 给角色分配菜单
|
||||
* 修改: 修改角色名称
|
||||
* 删除: 删除当前角色, 如果已被关联则移除用户关联
|
||||
|
||||
### 用户管理
|
||||
|
||||
维护系统内的用户。
|
||||
|
||||
* 新增: 新增用户
|
||||
* 启用/停用: 启用/停用角色, 停用后则无法登录系统
|
||||
* 修改: 修改用户的基本信息
|
||||
* 详情: 查看用户的基本信息, 登录日志, 当前登录设备, 操作日志
|
||||
* 重置密码: 重置用户密码
|
||||
* 分配角色: 设置用户绑定的角色
|
||||
* 删除: 删除当前用户以及用户数据
|
||||
|
||||
### 操作日志
|
||||
|
||||
记录用户在系统内的操作日志。
|
||||
|
||||
* 详情: 查看操作的参数以及留痕信息
|
||||
70
docs/quickstart/dev.md
Normal file
@@ -0,0 +1,70 @@
|
||||
### 所需环境
|
||||
|
||||
* JDK 1.8
|
||||
* Mysql 8.0(+)
|
||||
* Redis 5.0.5(+)
|
||||
* Node 16.16.0(+)
|
||||
* Maven 3.5.4(+)
|
||||
|
||||
⚡ maven 推荐使用阿里云 mirror
|
||||
⚡ npm 建议使用淘宝镜像 `npm config set registry https://registry.npmmirror.com/`
|
||||
|
||||
### 配置
|
||||
|
||||
1. 拉取代码
|
||||
|
||||
```
|
||||
# github
|
||||
git clone https://github.com/lijiahangmax/orion-ops-pro
|
||||
# gitee
|
||||
git clone https://gitee.com/lijiahangmax/orion-ops-pro
|
||||
```
|
||||
|
||||
2. 初始化数据库
|
||||
|
||||
```
|
||||
# 执行脚本
|
||||
orion-ops-pro/sql/init-1-schema-databases.sql
|
||||
orion-ops-pro/sql/init-2-schema-tables.sql
|
||||
orion-ops-pro/sql/init-3-data.sql
|
||||
```
|
||||
|
||||
3. 修改后端配置
|
||||
|
||||
```
|
||||
# 修改配置文件 (mysql, redis, secret-key)
|
||||
orion-ops-pro/orion-ops-launch/src/main/resources/application-prod.yaml
|
||||
|
||||
# 进入代码目录
|
||||
cd orion-ops-pro
|
||||
# 编译
|
||||
mvn -U clean install -DskipTests
|
||||
```
|
||||
|
||||
4. 修改前端配置
|
||||
|
||||
```
|
||||
# 进入代码目录
|
||||
cd orion-ops-pro/orion-ops-ui
|
||||
# 下载 pnpm
|
||||
npm i -g pnpm
|
||||
# 下载依赖
|
||||
pnpm i
|
||||
# 运行
|
||||
pnpm dev
|
||||
```
|
||||
|
||||
### 测试访问
|
||||
|
||||
启动前端后会自动打开浏览器 输入
|
||||
账号: `admin`
|
||||
密码: `admin`
|
||||
|
||||
### 文档
|
||||
|
||||
文档只有在 `dev` 环境才可以访问
|
||||
|
||||
- swagger 文档 http://127.0.0.1:9200/doc.html
|
||||
- druid console http://127.0.0.1:9200/druid/index.html
|
||||
- actuator endpoint http://127.0.0.1:9200/actuator
|
||||
- admin console http://127.0.0.1:9200/admin
|
||||
59
docs/quickstart/docker-install.md
Normal file
@@ -0,0 +1,59 @@
|
||||
### 所需环境
|
||||
|
||||
* Docker 20.10.14+
|
||||
* Docker Compose 2.3.3+
|
||||
|
||||
由于访问 DockerHub 镜像比较慢, 可以修改一下配置加速镜像 /etc/docker/daemon.json, 如果没有此文件可以创建此文件 (Linux系统, Window 和 Mac 直接可以通过 Docker 的
|
||||
Dashboard 修改)
|
||||
|
||||
```json
|
||||
{
|
||||
"registry-mirrors": [
|
||||
"https://registry.docker-cn.com",
|
||||
"https://registry.cn-hangzhou.aliyuncs.com",
|
||||
"https://mirror.ccs.tencentyun.com",
|
||||
"https://docker.mirrors.ustc.edu.cn"
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
### 构建镜像
|
||||
|
||||
```
|
||||
# 进入仓库目录
|
||||
cd orion-ops-pro
|
||||
# 修改 docker-compose.yml (建议修改)
|
||||
# SECRET_KEY 加密秘钥
|
||||
# MYSQL_USER mysql 用户名
|
||||
# MYSQL_PASSWORD mysql 用户密码
|
||||
# MYSQL_ROOT_PASSWORD mysql root 密码
|
||||
# REDIS_PASSWORD redis 密码
|
||||
# 构建
|
||||
docker compose build
|
||||
```
|
||||
|
||||
### 启动
|
||||
|
||||
```
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
### 连接 mysql (如果需要在 navicat 中连接)
|
||||
|
||||
```
|
||||
访问 adminer: http://localhost:8081
|
||||
服务器: orion-ops-pro-db
|
||||
用户名: root
|
||||
密码: Data@123456
|
||||
数据库: orion-ops-pro
|
||||
|
||||
点击左侧 SQL命令 输入:
|
||||
ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY 'Data@123456';
|
||||
执行 OK
|
||||
```
|
||||
|
||||
### 测试访问
|
||||
|
||||
在浏览器中输入 http://localhost:1081/ 访问
|
||||
账号: admin
|
||||
密码: admin
|
||||
50
docs/quickstart/faq.md
Normal file
@@ -0,0 +1,50 @@
|
||||
> ##### 1. 数据误删除怎么办?
|
||||
|
||||
数据库的数据都采用了逻辑删除, 可以将已删除的数据中的 `deleted` 字段改为 `0`
|
||||
如果不知道数据是哪一条, 可以查询用户操作日志, 点击 `参数` 寻找操作的id
|
||||
|
||||
> ##### 2. 是否支持维护 Windows 主机?
|
||||
|
||||
支持, 但是 Windows 的 ssh 命令兼容性不好, 一切需要执行ssh命令的地方都不友好
|
||||
如: 批量执行, 调度任务兼容性非常不友好
|
||||
|
||||
> ##### 3. 执行命令时为什么会找不到环境变量?
|
||||
|
||||
可以在执行命令的第一行设置 `source /etc/profile` 来加载环境变量
|
||||
|
||||
> ##### 4. 命令中途执行失败如何设置中断执行?
|
||||
|
||||
可以在执行命令的第一行设置 `set -e`
|
||||
作用是: 当执行出现意料之外的情况时, 立即退出
|
||||
|
||||
> ##### 5. 在调度任务、应用构建、应用发布 命令执行成功的依据是什么?
|
||||
|
||||
是获取命令的 `exitcode` 判断是否为 `0` 如果非0则代表命令执行失败
|
||||
同理, 在命令的最后一行设置 `exit 1` 结果将会是失败, 可以用此来中断后续流程
|
||||
|
||||
> ##### 6. 为什么使用秘钥认证还是无法连接机器?
|
||||
|
||||
```
|
||||
# 升级 openssh
|
||||
yum update openssh
|
||||
sshd -v (我的版本: OpenSSH_7.4p1, OpenSSL 1.0.2k-fips 26 Jan 2017)
|
||||
|
||||
# 生成秘钥时添加参数 -m PEM
|
||||
ssh-keygen -t rsa -m PEM
|
||||
chmod 700 ~/.ssh
|
||||
chmod 700 ~/.ssh/authorized_keys
|
||||
|
||||
# 修改 sshd 配置 /etc/ssh/sshd_config
|
||||
PubkeyAuthentication yes
|
||||
RSAAuthentication yes
|
||||
AuthorizedKeysFile .ssh/authorized_keys
|
||||
|
||||
# 重启 sshd 服务
|
||||
service sshd restart
|
||||
```
|
||||
|
||||
<br/>
|
||||
|
||||
⚡ 详细使用请参考操作手册~
|
||||
|
||||
<br/>
|
||||
133
docs/quickstart/install.md
Normal file
@@ -0,0 +1,133 @@
|
||||
### 所需环境
|
||||
|
||||
* JDK 1.8
|
||||
* Mysql 8.0(+)
|
||||
* Redis 5.0.5(+)
|
||||
* Node 16.16.0(+)
|
||||
* Maven 3.5.4(+)
|
||||
* Nginx
|
||||
|
||||
⚡ maven 推荐使用阿里云 mirror
|
||||
⚡ npm 建议使用淘宝镜像 `npm config set registry https://registry.npmmirror.com/`
|
||||
|
||||
### 构建
|
||||
|
||||
1. 拉取代码
|
||||
|
||||
```
|
||||
# github
|
||||
git clone https://github.com/lijiahangmax/orion-ops-pro
|
||||
# gitee
|
||||
git clone https://gitee.com/lijiahangmax/orion-ops-pro
|
||||
```
|
||||
|
||||
2. 初始化数据库
|
||||
|
||||
```
|
||||
# 执行脚本
|
||||
orion-ops-pro/sql/init-1-schema-databases.sql
|
||||
orion-ops-pro/sql/init-2-schema-tables.sql
|
||||
orion-ops-pro/sql/init-3-data.sql
|
||||
```
|
||||
|
||||
3. 构建后端代码
|
||||
|
||||
```
|
||||
# 修改配置文件 (mysql, redis, secret-key)
|
||||
orion-ops-pro/orion-ops-launch/src/main/resources/application-prod.yaml
|
||||
|
||||
# 进入代码目录
|
||||
cd orion-ops-pro
|
||||
# 编译
|
||||
mvn -U clean install -DskipTests
|
||||
```
|
||||
|
||||
4. 构建前端代码
|
||||
|
||||
```
|
||||
# 进入代码目录
|
||||
cd orion-ops-pro/orion-ops-ui
|
||||
# 下载 pnpm
|
||||
npm i -g pnpm
|
||||
# 下载依赖
|
||||
pnpm i
|
||||
# 编译
|
||||
pnpm build
|
||||
```
|
||||
|
||||
### 修改 nginx 配置
|
||||
|
||||
```
|
||||
server {
|
||||
listen 80;
|
||||
server_name localhost;
|
||||
client_max_body_size 1024m;
|
||||
|
||||
# 是否启动 gzip 压缩
|
||||
gzip on;
|
||||
# 需要压缩的常见静态资源
|
||||
gzip_types text/plain application/javascript application/x-javascript text/css application/xml text/javascript application/x-httpd-php image/jpeg image/gif image/png;
|
||||
# 如果文件大于 1k 就启动压缩
|
||||
gzip_min_length 1k;
|
||||
# 缓冲区
|
||||
gzip_buffers 4 16k;
|
||||
# 压缩的等级
|
||||
gzip_comp_level 2;
|
||||
# access_log /var/log/nginx/host.access.log main;
|
||||
|
||||
location / {
|
||||
root /usr/share/nginx/html;
|
||||
index index.html index.htm;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
# web history 模式 404
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
|
||||
location /orion/api {
|
||||
proxy_pass http://localhost:9200/orion/api;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
}
|
||||
|
||||
location /orion/keep-alive {
|
||||
proxy_pass http://localhost:9200/orion/keep-alive;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_read_timeout 3600s;
|
||||
proxy_send_timeout 3600s;
|
||||
}
|
||||
|
||||
error_page 500 502 503 504 /50x.html;
|
||||
location = /50x.html {
|
||||
root /usr/share/nginx/html;
|
||||
}
|
||||
|
||||
}
|
||||
```
|
||||
|
||||
### 部署
|
||||
|
||||
```
|
||||
复制 orion-ops-pro/orion-ops-ui 到 /usr/share/nginx/html
|
||||
复制 orion-ops-pro/orion-ops-launch/target/orion-ops-launch.jar 到 /data/orion
|
||||
# 启动后台服务
|
||||
nohup java -jar orion-ops-launch.jar --spring.profiles.active=prod 2>&1 &
|
||||
# 启动 nginx
|
||||
service nginx start
|
||||
```
|
||||
|
||||
### 测试访问
|
||||
|
||||
在浏览器中输入 http://localhost 访问
|
||||
账号: `admin`
|
||||
密码: `admin`
|
||||
@@ -102,7 +102,7 @@ public class SystemRoleServiceImpl implements SystemRoleService {
|
||||
Long id = Valid.notNull(request.getId(), ErrorMessage.ID_MISSING);
|
||||
SystemRoleDO record = systemRoleDAO.selectById(id);
|
||||
Valid.notNull(record, ErrorMessage.DATA_ABSENT);
|
||||
// 检查是否为管理员账号
|
||||
// 检查是否为管理员角色
|
||||
Valid.isTrue(!RoleDefine.isAdmin(record.getCode()), ErrorMessage.UNABLE_OPERATE_ADMIN_ROLE);
|
||||
// 转换
|
||||
SystemRoleDO updateRecord = SystemRoleConvert.MAPPER.to(request);
|
||||
@@ -167,7 +167,7 @@ public class SystemRoleServiceImpl implements SystemRoleService {
|
||||
// 添加日志参数
|
||||
OperatorLogs.add(OperatorLogs.CODE, code);
|
||||
OperatorLogs.add(OperatorLogs.NAME, record.getName());
|
||||
// 检查是否为管理员账号
|
||||
// 检查是否为管理员角色
|
||||
Valid.isTrue(!RoleDefine.isAdmin(code), ErrorMessage.UNABLE_OPERATE_ADMIN_ROLE);
|
||||
// 删除角色
|
||||
int effect = systemRoleDAO.deleteById(id);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
VITE_API_BASE_URL= 'http://127.0.0.1:9200/orion/api'
|
||||
VITE_WS_BASE_URL= 'ws://127.0.0.1:9200/orion/keep-alive'
|
||||
VITE_APP_VERSION= '1.0.0'
|
||||
VITE_APP_VERSION= '1.0.0-beta.1'
|
||||
VITE_SFTP_PREVIEW_MB= 2
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
VITE_API_BASE_URL= '/orion/api'
|
||||
VITE_WS_BASE_URL= '/orion/keep-alive'
|
||||
VITE_APP_VERSION= '1.0.0'
|
||||
VITE_APP_VERSION= '1.0.0-beta.1'
|
||||
VITE_SFTP_PREVIEW_MB= 2
|
||||
|
||||