(milvus本地集群部署非k8s)
部署etcd和minio
使用docker-compose部署,docker-compose.yml内容如下:
version: '3.5'
services:
etcd:
container_name: milvus-etcd
image: quay.io/coreos/etcd:v3.5.5
environment:
- ETCD_AUTO_COMPACTION_MODE=revision
- ETCD_AUTO_COMPACTION_RETENTION=1000
- ETCD_QUOTA_BACKEND_BYTES=4294967296
- ETCD_SNAPSHOT_COUNT=50000
volumes:
- ${DOCKER_VOLUME_DIRECTORY:-.}/volumes/etcd:/etcd
ports:
- "2379:2379"
command: etcd -advertise-client-urls=http://127.0.0.1:2379 -listen-client-urls http://0.0.0.0:2379 --data-dir /etcd
minio:
container_name: milvus-minio
image: minio/minio:RELEASE.2023-03-20T20-16-18Z
environment:
MINIO_ACCESS_KEY: minioadmin
MINIO_SECRET_KEY: minioadmin
volumes:
- ${DOCKER_VOLUME_DIRECTORY:-.}/volumes/minio:/minio_data
command: minio server /minio_data --console-address ":9001"
ports:
- "9000:9000"
- "9001:9001"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 30s
timeout: 20s
retries: 3
networks:
default:
name: milvus
docker-compose up -d 后台启动
docker-compose ps 查看容器
docker-compose stop 停止容器
docker-compose start 启动容器
docker-compose down 停止并删除容器
部署attu
milvus的web图形化界面。
docker run -d --name=attu -p 8000:3000 -e MILVUS_URL=192.168.230.71:19530 zilliz/attu:v2.3.1
访问地址:
http://192.168.230.71:8000/
部署pulsar
milvus集群环境下,消息中间件不能使用rocksmq,这里使用pulsar。
docker run -d -it \
--name pulsar -p 6650:6650 -p 8080:8080 \
apachepulsar/pulsar:2.11.2 \
bin/pulsar standalone
部署pulsar-manager
提供web界面访问pulsar:
docker run -d -it \
--name pulsarmanager \
-p 9527:9527 -p 7750:7750 \
-e SPRING_CONFIGURATION_FILE=/pulsar-manager/pulsar-manager/application.properties \
apachepulsar/pulsar-manager:v0.4.0
设置登录用户和密码:
CSRF_TOKEN=$(curl http://localhost:7750/pulsar-manager/csrf-token)
curl \
-H 'X-XSRF-TOKEN: $CSRF_TOKEN' \
-H 'Cookie: XSRF-TOKEN=$CSRF_TOKEN;' \
-H "Content-Type: application/json" \
-X PUT http://localhost:7750/pulsar-manager/users/superuser \
-d '{"name": "admin", "password": "pulsar123", "description": "test", "email": "[email protected]"}'
访问地址:
http://192.168.230.71:9527/
启动milvus集群
这里使用v2.3.1版本
. scripts/setenv.sh
nohup bin/milvus run rootcoord > log-rootcoord.log 2>&1 &
nohup bin/milvus run proxy > log-proxy.log 2>&1 &
nohup bin/milvus run querycoord > log-querycoord.log 2>&1 &
nohup bin/milvus run datacoord > log-datacoord.log 2>&1 &
nohup bin/milvus run querynode > log-querynode.log 2>&1 &
nohup bin/milvus run datanode > log-datanode.log 2>&1 &
nohup bin/milvus run indexnode > log-indexnode.log 2>&1 &
标签:run,log,集群,pulsar,docker,k8s,milvus,minio
From: https://blog.51cto.com/huangzhimao/8316159