Add environment configuration and documentation for various services

- Created .env.example files for Kafka, Kibana, KodBox, Kong, Langfuse, Logstash, n8n, Nginx, OceanBase, OpenCoze, RocketMQ, TiDB, and TiKV.
- Added README.md and README.zh.md files for OceanBase, RocketMQ, TiDB, and TiKV, detailing usage, configuration, and access instructions.
- Implemented docker-compose.yaml files for OceanBase, RocketMQ, TiDB, and TiKV, defining service configurations, health checks, and resource limits.
- Included broker.conf for RocketMQ to specify broker settings.
- Established a consistent timezone (UTC) across all services.
- Provided optional port overrides in .env.example files for flexibility in deployment.
This commit is contained in:
Sun-ZhenXing
2025-10-22 11:46:50 +08:00
parent 84e8b85990
commit ece59b42bf
49 changed files with 2326 additions and 0 deletions

12
src/hbase/.env.example Normal file
View File

@@ -0,0 +1,12 @@
# HBase version
HBASE_VERSION=2.6
# Timezone
TZ=UTC
# Port overrides (optional)
# HBASE_MASTER_PORT_OVERRIDE=16000
# HBASE_MASTER_INFO_PORT_OVERRIDE=16010
# HBASE_REGIONSERVER_PORT_OVERRIDE=16020
# HBASE_REGIONSERVER_INFO_PORT_OVERRIDE=16030
# HBASE_ZOOKEEPER_PORT_OVERRIDE=2181

63
src/hbase/README.md Normal file
View File

@@ -0,0 +1,63 @@
# HBase
HBase is a distributed, scalable, big data store built on top of Hadoop. It provides random, real-time read/write access to your Big Data.
## Usage
```bash
docker compose up -d
```
## Configuration
This setup runs HBase in standalone mode with embedded ZooKeeper.
## Ports
- `16000`: HBase Master port
- `16010`: HBase Master Web UI
- `16020`: HBase RegionServer port
- `16030`: HBase RegionServer Web UI
- `2181`: ZooKeeper client port
## Access
### HBase Shell
Access HBase shell:
```bash
docker compose exec hbase hbase shell
```
### Web UI
- HBase Master UI: <http://localhost:16010>
- HBase RegionServer UI: <http://localhost:16030>
### Example Commands
```bash
# List tables
echo "list" | docker compose exec -T hbase hbase shell -n
# Create a table
echo "create 'test', 'cf'" | docker compose exec -T hbase hbase shell -n
# Put data
echo "put 'test', 'row1', 'cf:a', 'value1'" | docker compose exec -T hbase hbase shell -n
# Scan table
echo "scan 'test'" | docker compose exec -T hbase hbase shell -n
```
## Notes
- This is a standalone setup suitable for development and testing
- For production, consider using a distributed HBase cluster with external ZooKeeper and HDFS
- Data is persisted in named volumes
## References
- [HBase Official Documentation](https://hbase.apache.org/book.html)
- [HBase Docker Image](https://hub.docker.com/r/harisekhon/hbase)

63
src/hbase/README.zh.md Normal file
View File

@@ -0,0 +1,63 @@
# HBase
HBase 是一个构建在 Hadoop 之上的分布式、可扩展的大数据存储系统,提供对大数据的随机、实时读写访问。
## 使用方法
```bash
docker compose up -d
```
## 配置说明
此配置运行 HBase 独立模式,内置 ZooKeeper。
## 端口说明
- `16000`HBase Master 端口
- `16010`HBase Master Web UI
- `16020`HBase RegionServer 端口
- `16030`HBase RegionServer Web UI
- `2181`ZooKeeper 客户端端口
## 访问方式
### HBase Shell
访问 HBase shell
```bash
docker compose exec hbase hbase shell
```
### Web UI
- HBase Master UI<http://localhost:16010>
- HBase RegionServer UI<http://localhost:16030>
### 示例命令
```bash
# 列出所有表
echo "list" | docker compose exec -T hbase hbase shell -n
# 创建表
echo "create 'test', 'cf'" | docker compose exec -T hbase hbase shell -n
# 插入数据
echo "put 'test', 'row1', 'cf:a', 'value1'" | docker compose exec -T hbase hbase shell -n
# 扫描表
echo "scan 'test'" | docker compose exec -T hbase hbase shell -n
```
## 注意事项
- 这是一个独立模式配置,适合开发和测试
- 生产环境建议使用分布式 HBase 集群,配合外部 ZooKeeper 和 HDFS
- 数据持久化在命名卷中
## 参考资料
- [HBase 官方文档](https://hbase.apache.org/book.html)
- [HBase Docker 镜像](https://hub.docker.com/r/harisekhon/hbase)

View File

@@ -0,0 +1,42 @@
x-default: &default
restart: unless-stopped
logging:
driver: json-file
options:
max-size: 100m
max-file: "3"
services:
hbase:
<<: *default
image: harisekhon/hbase:${HBASE_VERSION:-2.6}
hostname: hbase
environment:
TZ: ${TZ:-UTC}
volumes:
- hbase_data:/hbase-data
- hbase_zookeeper_data:/zookeeper-data
ports:
- "${HBASE_MASTER_PORT_OVERRIDE:-16000}:16000"
- "${HBASE_MASTER_INFO_PORT_OVERRIDE:-16010}:16010"
- "${HBASE_REGIONSERVER_PORT_OVERRIDE:-16020}:16020"
- "${HBASE_REGIONSERVER_INFO_PORT_OVERRIDE:-16030}:16030"
- "${HBASE_ZOOKEEPER_PORT_OVERRIDE:-2181}:2181"
deploy:
resources:
limits:
cpus: '4.0'
memory: 4G
reservations:
cpus: '1.0'
memory: 2G
healthcheck:
test: ["CMD-SHELL", "echo 'status' | hbase shell -n || exit 1"]
interval: 30s
timeout: 10s
retries: 5
start_period: 60s
volumes:
hbase_data:
hbase_zookeeper_data: