From 467761e6c13cd2837cc2a76c35cbfd336300af71 Mon Sep 17 00:00:00 2001 From: wanghe Date: Thu, 7 Dec 2023 15:16:35 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=96=B0=E5=A2=9E=20Consul=20(#670)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/consul/1.17.0/data.yml | 18 ++++++++++++++++++ apps/consul/1.17.0/data/config/.gitkeep | 0 apps/consul/1.17.0/data/data/.gitkeep | 0 apps/consul/1.17.0/data/logs/.gitkeep | 0 apps/consul/1.17.0/docker-compose.yml | 22 ++++++++++++++++++++++ apps/consul/1.17.0/scripts/init.sh | 3 +++ apps/consul/README.md | 12 ++++++++++++ apps/consul/data.yml | 20 ++++++++++++++++++++ apps/consul/logo.png | Bin 0 -> 1584 bytes 9 files changed, 75 insertions(+) create mode 100644 apps/consul/1.17.0/data.yml create mode 100644 apps/consul/1.17.0/data/config/.gitkeep create mode 100644 apps/consul/1.17.0/data/data/.gitkeep create mode 100644 apps/consul/1.17.0/data/logs/.gitkeep create mode 100644 apps/consul/1.17.0/docker-compose.yml create mode 100644 apps/consul/1.17.0/scripts/init.sh create mode 100644 apps/consul/README.md create mode 100644 apps/consul/data.yml create mode 100644 apps/consul/logo.png diff --git a/apps/consul/1.17.0/data.yml b/apps/consul/1.17.0/data.yml new file mode 100644 index 000000000000..1207f14cd32e --- /dev/null +++ b/apps/consul/1.17.0/data.yml @@ -0,0 +1,18 @@ +additionalProperties: + formFields: + - default: 8500 + edit: true + envKey: PANEL_APP_PORT_HTTP + labelEn: HTTP Port + labelZh: HTTP端口 + required: true + rule: paramPort + type: number + - default: 8600 + edit: true + envKey: PANEL_APP_PORT_DNS + labelEn: DNS Port + labelZh: DNS端口 + required: true + rule: paramPort + type: number \ No newline at end of file diff --git a/apps/consul/1.17.0/data/config/.gitkeep b/apps/consul/1.17.0/data/config/.gitkeep new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/apps/consul/1.17.0/data/data/.gitkeep b/apps/consul/1.17.0/data/data/.gitkeep new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/apps/consul/1.17.0/data/logs/.gitkeep b/apps/consul/1.17.0/data/logs/.gitkeep new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/apps/consul/1.17.0/docker-compose.yml b/apps/consul/1.17.0/docker-compose.yml new file mode 100644 index 000000000000..2c6c445d5dbc --- /dev/null +++ b/apps/consul/1.17.0/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3' +services: + consul: + image: hashicorp/consul:1.17.0 + container_name: ${CONTAINER_NAME} + restart: always + ports: + - "${PANEL_APP_PORT_HTTP}:8500" + - "${PANEL_APP_PORT_DNS}:8600/udp" + command: consul agent -server -bootstrap-expect=1 -client=0.0.0.0 -ui -data-dir=/consul/data -node=consul-node -datacenter=dc1 -log-level=warn -enable-script-checks=true -config-dir=/consul/config + volumes: + - ./data/config:/consul/config + - ./data/data:/consul/data + - ./data/logs:/consul/logs + networks: + - 1panel-network + labels: + createdBy: "Apps" + +networks: + 1panel-network: + external: true \ No newline at end of file diff --git a/apps/consul/1.17.0/scripts/init.sh b/apps/consul/1.17.0/scripts/init.sh new file mode 100644 index 000000000000..4e811c86aa28 --- /dev/null +++ b/apps/consul/1.17.0/scripts/init.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +chown -R 1000:1000 data \ No newline at end of file diff --git a/apps/consul/README.md b/apps/consul/README.md new file mode 100644 index 000000000000..60e92b4517e0 --- /dev/null +++ b/apps/consul/README.md @@ -0,0 +1,12 @@ +# Consul + +**Consul** 是一种分布式、高度可用且数据中心感知的解决方案,用于跨动态、分布式基础设施连接和配置应用程序。 + +## 主要功能: + +- **多数据中心**:Consul 旨在感知数据中心,并且可以支持任意数量的区域,而无需复杂的配置。 +- **服务网格**:Consul 服务网格通过自动 TLS 加密和基于身份的授权实现安全的服务间通信。应用程序可以在服务网格配置中使用 sidecar 代理,通过透明代理为入站和出站连接建立 TLS 连接。 +- **API 网关**:Consul API 网关管理对 Consul 服务网格内服务的访问,允许用户定义网格内部署的服务的流量和授权策略。 +- **服务发现**:Consul 使服务可以轻松注册自身并通过 DNS 或 HTTP 接口发现其他服务。也可以注册 SaaS 提供商等外部服务。 +- **健康检查**:健康检查使 Consul 能够快速提醒操作员集群中的任何问题。与服务发现的集成可防止将流量路由到不健康的主机并启用服务级别断路器。 +- **动态应用程序配置**:一个 HTTP API,允许用户在 Consul 中存储索引对象,用于存储配置参数和应用程序元数据。 \ No newline at end of file diff --git a/apps/consul/data.yml b/apps/consul/data.yml new file mode 100644 index 000000000000..204d1fc15d0d --- /dev/null +++ b/apps/consul/data.yml @@ -0,0 +1,20 @@ +name: Consul +tags: + - 中间件 +title: Consul +type: 中间件 +description: 分布式、高可用且具有数据中心感知能力的解决方案 +additionalProperties: + key: consul + name: Consul + tags: + - Middleware + shortDescZh: 分布式、高可用且具有数据中心感知能力的解决方案 + shortDescEn: Distributed, highly available, and data center aware solution + type: tool + crossVersionUpdate: true + limit: 0 + recommend: 0 + website: https://www.consul.io + github: https://github.com/hashicorp/consul + document: https://learn.hashicorp.com/consul \ No newline at end of file diff --git a/apps/consul/logo.png b/apps/consul/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..589c9152567a141078dcd87280ca263ce9fa110d GIT binary patch literal 1584 zcmV-02G9A4P)%>Ot0t5nH?GW>|7x`K!{qw$+PSy}j4hS*zg6qFc;8OzZ`bf0Nmk8AE(tO4 zCFdv3(6!@d>@O?>1c5+Z!#k<}z=*~g2BS?3A;9dR6FQ3XAuI(})BD8kM4q86M$#e# z0byV%xxSD1+m#+CE1WDKTITSKt4F7SH~wr4lMY2v~>?pTZUcP7y-1 z8#=6nCB{ZKi&m)mlGtKQjeXn}&7u`57Lt#1Q&xlk1MfU9-BenNku@PyqE;j7qD~=% z*Du^!afR9cOM5 zeEza^-1zM;TK?q4uZ15JcmskDWN%gWq!TL?k3HfMqgsP^G8`x+wB+3^XV7< zYrgvte62Q`u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