feat: update oceanbase

This commit is contained in:
Sun-ZhenXing
2026-07-16 16:39:59 +08:00
parent 0351b31cf6
commit 3432c9da65
6 changed files with 39 additions and 19 deletions
+1 -1
View File
@@ -140,7 +140,7 @@ These services require building custom Docker images from source.
| [Netdata](./src/netdata) | latest | | [Netdata](./src/netdata) | latest |
| [Nginx](./src/nginx) | 1.29.4 | | [Nginx](./src/nginx) | 1.29.4 |
| [Node Exporter](./src/node-exporter) | v1.8.2 | | [Node Exporter](./src/node-exporter) | v1.8.2 |
| [OceanBase](./src/oceanbase) | 4.3.3 | | [OceanBase](./src/oceanbase) | 4.4.2.1 |
| [Odoo](./src/odoo) | 19.0 | | [Odoo](./src/odoo) | 19.0 |
| [Ollama](./src/ollama) | 0.14.3 | | [Ollama](./src/ollama) | 0.14.3 |
| [Open WebUI](./src/open-webui) | main | | [Open WebUI](./src/open-webui) | main |
+1 -1
View File
@@ -140,7 +140,7 @@ docker compose exec redis redis-cli ping
| [Netdata](./src/netdata) | latest | | [Netdata](./src/netdata) | latest |
| [Nginx](./src/nginx) | 1.29.4 | | [Nginx](./src/nginx) | 1.29.4 |
| [Node Exporter](./src/node-exporter) | v1.8.2 | | [Node Exporter](./src/node-exporter) | v1.8.2 |
| [OceanBase](./src/oceanbase) | 4.3.3 | | [OceanBase](./src/oceanbase) | 4.4.2.1 |
| [Odoo](./src/odoo) | 19.0 | | [Odoo](./src/odoo) | 19.0 |
| [Ollama](./src/ollama) | 0.14.3 | | [Ollama](./src/ollama) | 0.14.3 |
| [Open WebUI](./src/open-webui) | main | | [Open WebUI](./src/open-webui) | main |
+3 -3
View File
@@ -1,11 +1,11 @@
# OceanBase version # OceanBase version
OCEANBASE_VERSION=4.3.3.1-106000012024110114 OCEANBASE_VERSION=4.4.2.1-101000022026050611
# Timezone # Timezone
TZ=UTC TZ=UTC
# Root password # Sys tenant root password
OB_ROOT_PASSWORD=oceanbase OB_SYS_PASSWORD=oceanbase
# Cluster configuration # Cluster configuration
OB_CLUSTER_NAME=obcluster OB_CLUSTER_NAME=obcluster
+15 -5
View File
@@ -12,7 +12,8 @@ docker compose up -d
Key environment variables: Key environment variables:
- `OB_ROOT_PASSWORD`: Root user password (default: `oceanbase`) - `OCEANBASE_VERSION`: Exact image version (default: `4.4.2.1-101000022026050611`)
- `OB_SYS_PASSWORD`: sys tenant root password (default: `oceanbase`)
- `OB_TENANT_NAME`: Tenant name (default: `test`) - `OB_TENANT_NAME`: Tenant name (default: `test`)
- `OB_TENANT_PASSWORD`: Tenant password (default: `oceanbase`) - `OB_TENANT_PASSWORD`: Tenant password (default: `oceanbase`)
- `OB_MEMORY_LIMIT`: Memory limit (default: `8G`, minimum: `8G`) - `OB_MEMORY_LIMIT`: Memory limit (default: `8G`, minimum: `8G`)
@@ -26,24 +27,33 @@ Key environment variables:
## Connection ## Connection
Connect using MySQL client: Connect to the default tenant with `OB_TENANT_PASSWORD` (default: `oceanbase`):
```bash ```bash
mysql -h127.0.0.1 -P2881 -uroot@test -poceanbase mysql -h127.0.0.1 -P2881 -uroot@test -poceanbase
``` ```
Or connect to sys tenant: Or connect to the sys tenant with `OB_SYS_PASSWORD` (default: `oceanbase`):
```bash ```bash
mysql -h127.0.0.1 -P2881 -uroot -poceanbase mysql -h127.0.0.1 -P2881 -uroot -poceanbase
``` ```
## Storage
Database data is stored in the named volume `oceanbase_data`.
## Security
Change the default values of `OB_SYS_PASSWORD` and `OB_TENANT_PASSWORD` before exposing OceanBase beyond a trusted local environment.
## Notes ## Notes
- OceanBase requires at least 8GB of memory to run properly - OceanBase requires at least 8GB of memory to run properly
- First startup may take several minutes to initialize - First startup may take several minutes to initialize
- Use `slim` mode for development/testing environments - This stack defaults to `mini` mode; use `normal` mode for dedicated production clusters
- For production, consider using `normal` mode and a dedicated cluster - Avoid `slim` fastboot mode because it ignores sys password and resource configuration
- A direct in-place upgrade from 4.3.3 to 4.4.2 is not documented here. Back up your data and follow the official upgrade path instead of reusing an old volume.
## References ## References
+15 -5
View File
@@ -12,7 +12,8 @@ docker compose up -d
主要环境变量: 主要环境变量:
- `OB_ROOT_PASSWORD`root 用户密码(默认:`oceanbase` - `OCEANBASE_VERSION`:精确镜像版本(默认:`4.4.2.1-101000022026050611`
- `OB_SYS_PASSWORD`:sys 租户 root 用户密码(默认:`oceanbase`
- `OB_TENANT_NAME`:租户名称(默认:`test` - `OB_TENANT_NAME`:租户名称(默认:`test`
- `OB_TENANT_PASSWORD`:租户密码(默认:`oceanbase` - `OB_TENANT_PASSWORD`:租户密码(默认:`oceanbase`
- `OB_MEMORY_LIMIT`:内存限制(默认:`8G`,最小:`8G` - `OB_MEMORY_LIMIT`:内存限制(默认:`8G`,最小:`8G`
@@ -26,24 +27,33 @@ docker compose up -d
## 连接方式 ## 连接方式
使用 MySQL 客户端连接 使用 `OB_TENANT_PASSWORD` 连接默认租户(默认:`oceanbase`
```bash ```bash
mysql -h127.0.0.1 -P2881 -uroot@test -poceanbase mysql -h127.0.0.1 -P2881 -uroot@test -poceanbase
``` ```
或连接 sys 租户: 使用 `OB_SYS_PASSWORD` 连接 sys 租户(默认:`oceanbase`
```bash ```bash
mysql -h127.0.0.1 -P2881 -uroot -poceanbase mysql -h127.0.0.1 -P2881 -uroot -poceanbase
``` ```
## 存储
数据库数据存储在命名卷 `oceanbase_data` 中。
## 安全
将 OceanBase 暴露到可信本地环境之外前,请更改 `OB_SYS_PASSWORD``OB_TENANT_PASSWORD` 的默认值。
## 注意事项 ## 注意事项
- OceanBase 需要至少 8GB 内存才能正常运行 - OceanBase 需要至少 8GB 内存才能正常运行
- 首次启动可能需要几分钟时间进行初始化 - 首次启动可能需要几分钟时间进行初始化
- 使用 `slim` 模式适合开发/测试环境 - 此服务栈默认使用 `mini` 模式;专用生产集群请使用 `normal` 模式
- 生产环境建议使用 `normal` 模式和专用集群 - 请勿使用 `slim` 快速启动模式,因为它会忽略 sys 密码和资源配置
- 本文档未说明从 4.3.3 到 4.4.2 的直接原地升级。请先备份数据并遵循官方升级路径,不要复用旧卷。
## 参考资料 ## 参考资料
+4 -4
View File
@@ -9,11 +9,11 @@ x-defaults: &defaults
services: services:
oceanbase: oceanbase:
<<: *defaults <<: *defaults
image: ${GLOBAL_REGISTRY:-}oceanbase/oceanbase-ce:${OCEANBASE_VERSION:-4.3.3.1-106000012024110114} image: ${GLOBAL_REGISTRY:-}oceanbase/oceanbase-ce:${OCEANBASE_VERSION:-4.4.2.1-101000022026050611}
environment: environment:
TZ: ${TZ:-UTC} TZ: ${TZ:-UTC}
MODE: slim MODE: mini
OB_ROOT_PASSWORD: ${OB_ROOT_PASSWORD:-oceanbase} OB_SYS_PASSWORD: ${OB_SYS_PASSWORD:-oceanbase}
OB_CLUSTER_NAME: ${OB_CLUSTER_NAME:-obcluster} OB_CLUSTER_NAME: ${OB_CLUSTER_NAME:-obcluster}
OB_TENANT_NAME: ${OB_TENANT_NAME:-test} OB_TENANT_NAME: ${OB_TENANT_NAME:-test}
OB_TENANT_PASSWORD: ${OB_TENANT_PASSWORD:-oceanbase} OB_TENANT_PASSWORD: ${OB_TENANT_PASSWORD:-oceanbase}
@@ -34,7 +34,7 @@ services:
cpus: ${OCEANBASE_CPU_RESERVATION:-0.1} cpus: ${OCEANBASE_CPU_RESERVATION:-0.1}
memory: ${OCEANBASE_MEMORY_RESERVATION:-8G} memory: ${OCEANBASE_MEMORY_RESERVATION:-8G}
healthcheck: healthcheck:
test: [CMD-SHELL, "mysql -h127.0.0.1 -P2881 -uroot -p$$OB_ROOT_PASSWORD -e 'SELECT 1' || exit 1"] test: [CMD-SHELL, 'obclient -h127.0.0.1 -P2881 -u"root@$$OB_TENANT_NAME" -p"$$OB_TENANT_PASSWORD" -e "SELECT 1" >/dev/null 2>&1 || exit 1']
interval: 30s interval: 30s
timeout: 10s timeout: 10s
retries: 5 retries: 5