feat(database): add Nacos Pulsar Qdrant and ZooKeeper recipes

This commit is contained in:
二丫讲梵 authored and GitHub committed 2026-07-20 01:51:45 +08:00
1 parent 48dc2dee88
commit 21652bc797
25 files changed
+506 -4

No files matched your search

@@ -0,0 +1,18 @@
services:
database:
image: docker.cnb.cool/znb/images/zookeeper:3.9.5
container_name: dbx-zookeeper-3.9
ports:
- "${DB_BIND_ADDRESS:-127.0.0.1}:${DB_PORT:-2182}:2181"
volumes:
- data:/data
- datalog:/datalog
healthcheck:
test: ["CMD-SHELL", "zkServer.sh status | grep -q 'Mode: standalone'"]
interval: 5s
timeout: 5s
retries: 30
start_period: 15s
volumes:
data:
datalog:
@@ -0,0 +1,3 @@
# ZooKeeper 3.9 initialization
The recipe runner creates `/dbx` with a Digest ACL for `root` and password `123456` (or `DB_PASSWORD`). ZooKeeper does not have a global username/password login switch; clients must authenticate with `addauth digest root:<password>` before accessing this protected node.
+17
View File
@@ -0,0 +1,17 @@
{
"database": "zookeeper",
"name": "ZooKeeper",
"version": "3.9.5",
"displayVersion": "3.9",
"image": "docker.cnb.cool/znb/images/zookeeper:3.9.5",
"platforms": ["linux/amd64", "linux/arm64"],
"service": "database",
"defaultPort": 2181,
"connection": { "host": "127.0.0.1", "port": 2182, "username": "root", "password": "123456", "database": "dbx", "authScheme": "digest" },
"bootstrap": {
"check": { "command": ["sh", "-ec", "printf 'addauth digest root:%s\\nget /dbx\\nquit\\n' \"$1\" | zkCli.sh -server 127.0.0.1:2181", "sh", "${DB_PASSWORD}"], "expect": "DBX smoke" },
"steps": [{ "name": "create Digest-protected smoke node", "command": ["sh", "-ec", "printf 'addauth digest root:%s\\ncreate /dbx \"DBX smoke\" auth:root:%s:cdrwa\\nquit\\n' \"$1\" \"$1\" | zkCli.sh -server 127.0.0.1:2181", "sh", "${DB_PASSWORD}"], "expect": "Created /dbx" }]
},
"shell": ["zkCli.sh", "-server", "127.0.0.1:2181"],
"smoke": { "steps": [{ "name": "reject anonymous access to protected node", "command": ["sh", "-ec", "printf 'get /dbx\\nquit\\n' | zkCli.sh -server 127.0.0.1:2181 || true"], "expect": "Insufficient permission" }, { "name": "read protected node with Digest credentials", "command": ["sh", "-ec", "printf 'addauth digest root:%s\\nget /dbx\\nquit\\n' \"$1\" | zkCli.sh -server 127.0.0.1:2181", "sh", "${DB_PASSWORD}"], "expect": "DBX smoke" }] }
}