Skip to content

Commit

Permalink
feat: 新增 Consul (#670)
Browse files Browse the repository at this point in the history
  • Loading branch information
wanghe-fit2cloud committed Dec 7, 2023
1 parent df69783 commit 467761e
Show file tree
Hide file tree
Showing 9 changed files with 75 additions and 0 deletions.
18 changes: 18 additions & 0 deletions apps/consul/1.17.0/data.yml
Original file line number Diff line number Diff line change
@@ -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
Empty file.
Empty file.
Empty file.
22 changes: 22 additions & 0 deletions apps/consul/1.17.0/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -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
3 changes: 3 additions & 0 deletions apps/consul/1.17.0/scripts/init.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

chown -R 1000:1000 data
12 changes: 12 additions & 0 deletions apps/consul/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Consul

**Consul** 是一种分布式、高度可用且数据中心感知的解决方案,用于跨动态、分布式基础设施连接和配置应用程序。

## 主要功能:

- **多数据中心**:Consul 旨在感知数据中心,并且可以支持任意数量的区域,而无需复杂的配置。
- **服务网格**:Consul 服务网格通过自动 TLS 加密和基于身份的授权实现安全的服务间通信。应用程序可以在服务网格配置中使用 sidecar 代理,通过透明代理为入站和出站连接建立 TLS 连接。
- **API 网关**:Consul API 网关管理对 Consul 服务网格内服务的访问,允许用户定义网格内部署的服务的流量和授权策略。
- **服务发现**:Consul 使服务可以轻松注册自身并通过 DNS 或 HTTP 接口发现其他服务。也可以注册 SaaS 提供商等外部服务。
- **健康检查**:健康检查使 Consul 能够快速提醒操作员集群中的任何问题。与服务发现的集成可防止将流量路由到不健康的主机并启用服务级别断路器。
- **动态应用程序配置**:一个 HTTP API,允许用户在 Consul 中存储索引对象,用于存储配置参数和应用程序元数据。
20 changes: 20 additions & 0 deletions apps/consul/data.yml
Original file line number Diff line number Diff line change
@@ -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
Binary file added apps/consul/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 467761e

Please sign in to comment.