-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature: copy docs from scaleph-website
- Loading branch information
Showing
123 changed files
with
6,878 additions
and
235 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
[ | ||
{ | ||
"text": "快速上手", | ||
"link": "/guide/", | ||
"activeMatch": "/guide/" | ||
}, | ||
{ | ||
"text": "功能设计", | ||
"link": "/design/", | ||
"activeMatch": "/design/" | ||
}, | ||
{ | ||
"text": "路线图", | ||
"link": "/roadmap/", | ||
"activeMatch": "/roadmap/" | ||
}, | ||
{ | ||
"text": "参与贡献", | ||
"link": "/contribute/", | ||
"activeMatch": "/contribute/" | ||
}, | ||
{ | ||
"text": "博客", | ||
"link": "/blog/", | ||
"activeMatch": "/blog/" | ||
}, | ||
{ | ||
"text": "FAQ", | ||
"link": "/fqg/", | ||
"activeMatch": "/fqg/" | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,153 @@ | ||
--- | ||
id: deploy | ||
title: 部署 | ||
slug: deploy | ||
order: 1 | ||
--- | ||
|
||
`scaleph` 产出为镜像,部署方式以 docker 为主。同时,Scaleph 也提供了安装包的方式用来在内网环境中进行部署。 | ||
用户可以根据自己的需求选择适合自己的部署方式。 | ||
|
||
## docker | ||
|
||
`scaleph` 运行依赖如下,其中 minio 作为文件存储中间件,可以使用 HDFS、OSS 以及 S3 代替: | ||
|
||
- redis | ||
- mysql | ||
- minio | ||
|
||
`scaleph` 应用本身由 2 个组件组成: | ||
|
||
- [scaleph-api](https://github.com/flowerfine/scaleph/pkgs/container/scaleph%2Fscaleph-api)。服务端功能实现。 | ||
- [scaleph-ui-react](https://github.com/flowerfine/scaleph/pkgs/container/scaleph%2Fscaleph-ui-react)。前端功能实现。 | ||
|
||
镜像本身发布在 github packages 中,如遇到网络不好的情况,需通过科学上网手段,本地下载镜像上传到部署服务器等操作实现部署。 | ||
|
||
部署过程: | ||
|
||
```shell | ||
# clone scaleph 源码 | ||
git clone https://github.com/flowerfine/scaleph.git --depth 1 | ||
|
||
# 一键启动 scaleph 及其依赖 | ||
cd scaleph/tools/docker/deploy/scaleph | ||
docker compose up -d | ||
|
||
# 如网络不好,可以先 pull 镜像,稍后启动 | ||
docker compose pull | ||
docker compose up -d | ||
|
||
# 关闭 scaleph | ||
docker compose down | ||
``` | ||
|
||
在所有容器正常启动后,用户即可访问 [http://localhost](http://localhost/),用户名密码为 `sys_admin/123456`。 | ||
|
||
## 安装包 | ||
|
||
### 获取二进制包 | ||
|
||
从[github](https://github.com/flowerfine/scaleph/releases)获取二进制包。 | ||
或者您也可以[自行编译](./compile)。 | ||
|
||
### 解压安装包 | ||
|
||
```shell | ||
tar -zxf scaleph-1.0.6-bin.tar.gz | ||
``` | ||
|
||
文件目录树如下所示: | ||
|
||
```text | ||
scaleph-1.0.6 | ||
├── bin | ||
├── conf | ||
├── libs | ||
├── plugins | ||
└──datasource | ||
├── sql | ||
├── ui | ||
├── LICENSE | ||
└── README.md | ||
``` | ||
|
||
### 准备环境 | ||
|
||
您可以使用 docker 的方式来部署`mysql`,`redis`,`minio`,也可以自行部署相关组件。 | ||
|
||
> 如果您使用自行安装的 mysql 数据库,您需要将`sql`目录下的脚本在 mysql 中执行。 | ||
> | ||
> 或者使用 scaleph 提供的初始化数据库的脚本: | ||
```shell | ||
./bin/tools.sh init-database \ | ||
--driver com.mysql.cj.jdbc.Driver \ | ||
--url jdbc:mysql://127.0.0.1:3306 \ | ||
--username root \ | ||
--password 123456 \ | ||
--sql-files sql | ||
``` | ||
|
||
### 修改配置 | ||
|
||
```shell | ||
vim bin/config.sh | ||
``` | ||
|
||
设置`JAVA_HOME`. | ||
|
||
```shell | ||
export JAVA_HOME=path/to/your/java_home | ||
``` | ||
|
||
编辑 `conf/application.yml` 和 `conf/application-dev.yml` 以适配您的环境。 | ||
|
||
### 启停 | ||
|
||
#### 后台启动 | ||
|
||
```shell | ||
./bin/scaleph.sh start | ||
``` | ||
|
||
输出如下: | ||
|
||
```text | ||
Staring in backend | ||
Running with pid 45193 | ||
``` | ||
|
||
#### 前台启动 | ||
|
||
```shell | ||
./bin/scaleph.sh start-frontend | ||
``` | ||
|
||
启动后在浏览器打开[http://localhost:8080/scaleph/ui/#/login](http://localhost:8080/scaleph/ui/#/login) | ||
|
||
#### 检查进程状态 | ||
|
||
```shell | ||
./bin/scaleph.sh status | ||
``` | ||
|
||
#### 停止 | ||
|
||
> 只能在后台启动时使用此脚本停止进程。 | ||
```shell | ||
./bin/scaleph.sh stop | ||
``` | ||
|
||
### 日志 | ||
|
||
日志保存在 `logs/scaleph` | ||
|
||
```text | ||
logs | ||
└── scaleph | ||
├── scaleph-error.log | ||
├── scaleph-info.log | ||
├── scaleph-server.log | ||
└── scaleph-warn.log | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
--- | ||
id: docker | ||
title: Docker | ||
slug: docker | ||
order: 1 | ||
--- | ||
|
||
docker 文章总结 | ||
|
||
* [Docker的/var/lib/docker文件夹占满了磁盘空间](https://mp.weixin.qq.com/s/OCnD9joQvUDXdB7eEIlXfQ) | ||
* [Docker镜像解析获取Dockerfile文件](https://mp.weixin.qq.com/s/f1IkEdHYJdPWwfV4DwHrwg) | ||
* [Spring Boot 和 Docker:@DockerImage 注解简介](https://mp.weixin.qq.com/s/HCyWOGSt1qF3jpEJdgDyJA) | ||
* [腾讯面试题:无网络环境,如何部署Docker镜像?](https://mp.weixin.qq.com/s/hpjKUVtOy0RhY0g0oh9jQg) | ||
* [docker瘦身,可以试下这个开源的17.1kstar的项目](https://mp.weixin.qq.com/s/wa6Kn6sd7r29iWx_yfzy5w) | ||
* [Dockerfile 支持内置Shell脚本, 从此告别 && 链接符号](https://mp.weixin.qq.com/s/usiLxPhJyogwPy36BhINBg) | ||
|
||
kubernetes 文章总结 | ||
|
||
* [Kubernetes中的Pause容器到底是干嘛的](https://mp.weixin.qq.com/s/9ZVaKEPgSYZnIup0wzhL7w) | ||
* [Kubernetes Informer 认知](https://mp.weixin.qq.com/s/uFKwPCswy7gVYvBqvPOMBA) | ||
* [还在苦恼快速搭建K8S环境,试试Kind吧](https://mp.weixin.qq.com/s/tiUGTcumfZppocPJuFaXQw) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
--- | ||
id: k3s-doc | ||
title: 文档汇总 | ||
slug: k3s-doc | ||
order: 3 | ||
--- | ||
|
||
## 开源项目 | ||
|
||
- [K3s](https://github.com/k3s-io/k3s) | ||
- [K3d](https://github.com/k3d-io/k3d) | ||
- [AutoK3s](https://github.com/cnrancher/autok3s) | ||
|
||
## 文档资料 | ||
|
||
### 官方文档 | ||
|
||
文档链接: | ||
|
||
- https://docs.k3s.io/zh/ | ||
- https://docs.rancher.cn/docs/k3s/_index | ||
|
||
### 边缘计算 k3s 社区(微信公众号) | ||
|
||
安装部署: | ||
|
||
- [在本地运行 Kubernetes 的 3 种主流方式](https://mp.weixin.qq.com/s/pDE7DHwoled56wSjBoBgxA) | ||
- [保姆级教程!使用 k3d 实现 K3s 高可用!](https://mp.weixin.qq.com/s/Omdo2uiYwaNs8pDSVKDk1Q) | ||
- [k3d 入门指南:在 Docker 中运行 K3s](https://mp.weixin.qq.com/s/1iLxMlTszfP9gFMZn2jPbA) | ||
- [轻量级 Kubernetes 集群发行版 K3s 完全进阶指南](https://mp.weixin.qq.com/s/XZPgnB0TxWcq_LKpO3ap9A) | ||
- [一文搞定全场景 K3s 离线安装](https://mp.weixin.qq.com/s/pfUM6tr2HDeFyJExFVAc4Q) | ||
- [轻松上手 | 使用国内资源安装 K3s 全攻略](https://mp.weixin.qq.com/s/PBX_VIZgigQ7EEDLBWmPCA) | ||
- [探索 K3s 简单高效的多云和混合云部署](https://mp.weixin.qq.com/s/EOYSSDyrRbg0G9P-PbYtZQ) | ||
|
||
实操案例: | ||
|
||
- [K3s vs K8s:轻量级和全功能的对决](https://mp.weixin.qq.com/s/575ZBryg4bv9k01To1QY7w) | ||
- [选择 K3s 还是 RKE2?一文读懂!](https://mp.weixin.qq.com/s/f4KikyrSNgVDJavTDYdWfg) | ||
- [实操案例:使用 Prometheus Operator 进行集群监控](https://mp.weixin.qq.com/s/_Kk0xz97w_AblIWVlv7XFw) | ||
- [从安装到部署!在 k3s 中部署应用程序完全体验!](https://mp.weixin.qq.com/s/ydD6V6dO89ZSfWc_MyECWg) | ||
- [手把手实操教程!使用 k3s 运行轻量级 VM](https://mp.weixin.qq.com/s/632N3Hg5kCEJeDPnfWP2Tg) | ||
- [详细教程丨如何在 k3s 环境中安装 GPU 相关程序](https://mp.weixin.qq.com/s/fmjsUoBL7v2GyZD6uvu-Xg) | ||
- [极简教程!教你快速将 K3s 与 Cloud Controller 集成](https://mp.weixin.qq.com/s/7GXJOngIvMUqDD3Z7uyvqA) | ||
- [基础指南:如何在 K3s 中配置 Traefik?](https://mp.weixin.qq.com/s/EOvdzbrWeUlOOhRDuOwO2w) | ||
- [如何在 K3s 中启用 Traefik Dashborad](https://mp.weixin.qq.com/s/maJoSGGaygo-Oux1_bbSEg) |
Oops, something went wrong.