新增安装脚本

This commit is contained in:
萌森 2024-02-01 11:49:48 +08:00
parent 8f352ced0d
commit b953032767
9 changed files with 187 additions and 12 deletions

View File

@ -1,20 +1,23 @@
# 1Panel 应用商店
[1Panel](https://github.com/1Panel-dev/1Panel) 应用商店的官方存储库,包含了所有可以在 [1Panel](https://github.com/1Panel-dev/1Panel) 应用商店安装的应用程序。
当前仓库由 `新疆萌森软件开发工作室` 维护,我们致力于为 1Panel 用户提供更多的应用程序。
当前已上架的应用及其安装量信息请浏览https://apps.fit2cloud.com/1panel
## 上线应用
1Panel 应用商店应用上架的标准:
- [x] [Nacos](https://nacos.io/)
- [x] [Sentinel-Dashboard](https://sentinelguard.io/)
- [x] [Elastic](https://www.elastic.co/)
- [x] [Elasticsearch](https://www.elastic.co/elasticsearch/)
- [x] [Kibana](https://www.elastic.co/kibana/)
- [ ] [Logstash](https://www.elastic.co/logstash/)
- [ ] [Immich](https://immich.app/)
- 知名且活跃的开源项目
- 有相当规模的安装量
- 官方提供 Docker 镜像
## 脚本安装
## 问题反馈
```shell
git clone -b localApps https://github.com/QYG2297248353/appstore-1panel /opt/1panel/resource/apps/local/appstore-localApps
如果您在使用过程中遇到什么问题,或有进一步的需求需要反馈,请提交 GitHub Issue 到 [1Panel 项目的主仓库](https://github.com/1Panel-dev/1Panel/issues)
## 制作本地应用
[如何提交自己想要的应用](https://github.com/1Panel-dev/appstore/wiki/%E5%A6%82%E4%BD%95%E6%8F%90%E4%BA%A4%E8%87%AA%E5%B7%B1%E6%83%B3%E8%A6%81%E7%9A%84%E5%BA%94%E7%94%A8)
cp -rf /opt/1panel/resource/apps/local/appstore-localApps/apps/* /opt/1panel/resource/apps/local/
rm -rf /opt/1panel/resource/apps/local/appstore-localApps
```

View File

@ -0,0 +1,18 @@
additionalProperties:
formFields:
- default: 8858
edit: true
envKey: PANEL_APP_PORT_HTTP
labelEn: Web port
labelZh: Web 端口
required: true
rule: paramPort
type: number
- default: 8719
edit: true
envKey: COMMUNICATION_PORT
labelEn: Communication port
labelZh: 通讯端口
required: true
rule: paramPort
type: number

View File

@ -0,0 +1,12 @@
version: "3"
services:
"sentinel-dashboard":
image: bladex/sentinel-dashboard:1.8.6
container_name: ${CONTAINER_NAME}
restart: always
ports:
- "${PANEL_APP_PORT_HTTP}:8858"
- "${COMMUNICATION_PORT}:8719"
networks:
1panel-network:
external: true

View File

@ -0,0 +1,47 @@
# Sentinel-Dashboard
随着微服务的流行服务和服务之间的稳定性变得越来越重要。Sentinel是面向分布式、多语言异构化服务架构的流量治理组件主要以流量为切入点从流量路由、流量控制、流量整形、熔断降级、系统自适应过载保护、热点流量防护等多个维度来帮助开发者保障微服务的稳定性。
## 快速启动
访问地址
`http://IP:8858/sentinel`
> 用户名
> sentinel
>
> 密码
> sentinel
## Sentinel 的历史
+ 2012 年Sentinel 诞生,主要功能为入口流量控制。
+ 2013-2017 年Sentinel 在阿里巴巴集团内部迅速发展成为基础技术模块覆盖了所有的核心场景。Sentinel 也因此积累了大量的流量归整场景以及生产实践。
+ 2018 年Sentinel 开源,并持续演进。
+ 2019 年Sentinel 朝着多语言扩展的方向不断探索,推出 C++ 原生版本,同时针对 Service Mesh 场景也推出了 Envoy 集群流量控制支持,以解决
Service Mesh 架构下多语言限流的问题。
+ 2020 年,推出 Sentinel Go 版本,继续朝着云原生方向演进。
+ 2021 年Sentinel 正在朝着 2.0 云原生高可用决策中心组件进行演进;同时推出了 Sentinel Rust 原生版本。同时我们也在 Rust
社区进行了 Envoy WASM extension 及 eBPF extension 等场景探索。
+ 2022 年Sentinel 品牌升级为流量治理,领域涵盖流量路由/调度、流量染色、流控降级、过载保护/实例摘除等;同时社区将流量治理相关标准抽出到
OpenSergo 标准中Sentinel 作为流量治理标准实现。
## Sentinel 基本概念
### 资源
资源是 Sentinel 的关键概念。它可以是 Java 应用程序中的任何内容,例如,由应用程序提供的服务,或由应用程序调用的其它应用提供的服务,甚至可以是一段代码。在接下来的文档中,我们都会用资源来描述代码块。
只要通过 Sentinel API 定义的代码,就是资源,能够被 Sentinel 保护起来。大部分情况下可以使用方法签名URL甚至服务名称作为资源名来标示资源。
### 规则
围绕资源的实时状态设定的规则,可以包括流量控制规则、熔断降级规则以及系统保护规则。所有规则可以动态实时调整。
## Sentinel 是如何工作的
Sentinel 的主要工作机制如下:
+ 对主流框架提供适配或者显示的 API来定义需要保护的资源并提供设施对资源进行实时统计和调用链路分析。
+ 根据预设的规则结合对资源的实时统计信息对流量进行控制。同时Sentinel 提供开放的接口,方便您定义及改变规则。
+ Sentinel 提供实时的监控系统,方便您快速了解目前系统的状态。

View File

@ -0,0 +1,19 @@
name: sentinel-dashboard
tags:
- 中间件
title: Sentinel-Dashboard
type: 中间件
description: 阿里巴巴流量卫兵
additionalProperties:
key: sentinel-dashboard
name: Sentinel-Dashboard
tags:
- Middleware
shortDescZh: 阿里巴巴流量卫兵
shortDescEn: Alibaba Traffic Guard
type: runtime
crossVersionUpdate: false
limit: 0
website: https://sentinelguard.io/
github: https://github.com/alibaba/Sentinel
document: https://sentinelguard.io/zh-cn/docs/introduction.html

View File

@ -0,0 +1,18 @@
additionalProperties:
formFields:
- default: 8858
edit: true
envKey: PANEL_APP_PORT_HTTP
labelEn: Web port
labelZh: Web 端口
required: true
rule: paramPort
type: number
- default: 8719
edit: true
envKey: COMMUNICATION_PORT
labelEn: Communication port
labelZh: 通讯端口
required: true
rule: paramPort
type: number

View File

@ -0,0 +1,12 @@
version: "3"
services:
"sentinel-dashboard":
image: bladex/sentinel-dashboard:latest
container_name: ${CONTAINER_NAME}
restart: always
ports:
- "${PANEL_APP_PORT_HTTP}:8858"
- "${COMMUNICATION_PORT}:8719"
networks:
1panel-network:
external: true

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

46
install.sh Normal file
View File

@ -0,0 +1,46 @@
#!/bin/bash
check_command() {
command -v "$1" > /dev/null 2>&1 || {
echo >&2 "Error: $1 is not installed. Please install it and try again."
exit 1
}
}
check_command "git"
check_command "cp"
check_command "rm"
check_command "echo"
echo "$(date): Step 1 - Cloning repository..."
git clone -b localApps https://github.com/QYG2297248353/appstore-1panel /opt/1panel/resource/apps/local/appstore-localApps
apps_directory="/opt/1panel/resource/apps/local/appstore-localApps/apps"
local_directory="/opt/1panel/resource/apps/local/"
for app_directory in $apps_directory/*; do
app_name=$(basename "$app_directory")
if [ -d "$local_directory/$app_name" ]; then
rm -rf "$local_directory/$app_name"
cp -r "$app_directory" "$local_directory/"
echo "$(date): Step 2 - Copied and replaced directory $app_directory to $local_directory/"
else
cp -r "$app_directory" "$local_directory/"
echo "$(date): Step 2 - Copied directory $app_directory to $local_directory/"
fi
done
for app_directory in $apps_directory/*; do
app_name=$(basename "$app_directory")
if [ ! -d "$local_directory/$app_name" ]; then
cp -r "$app_directory" "$local_directory/"
echo "$(date): Step 3 - Copied directory $app_directory to $local_directory/"
fi
done
# 步骤 4: 删除appstore-localApps目录
echo "$(date): Step 4 - Deleting directory /opt/1panel/resource/apps/local/appstore-localApps..."
rm -rf "/opt/1panel/resource/apps/local/appstore-localApps"
echo "$(date): Step 4 - Deleted directory /opt/1panel/resource/apps/local/appstore-localApps"