一、官方升级方案
官方升级文档:https://milvus.io/docs/v2.3.x/upgrade_milvus_standalone-docker.md
根据官方文档上写的,升级主要是以下几点:
1、在milvus v2.2.5版本以后,MinIO 的版本升级到了 RELEASE.2023-03-20T20-16-18Z ,如果使用的版本小于这个,需要迁移minio数据,我们使用的2.2.8版本不需要
2、升级Milvus版本,修改docker-compose.yaml ,如下:
standalone:
container_name: milvus-standalone
image: milvusdb/milvus:v2.3.15
3、 迁移etcd中的元数据
二、具体操作思路
由于我们使用的 milvus 2.2.8和milvus 2.3.15版本的minio 和etcd组件的版本都是一样的,只是一些其他配置略微不通,所以比较简单,如下:
1、停止原理的所有组件服务,备份老版本docker-compose.yaml 文件
# cd /opt/Milvus
# docker-compose stop
# docker ps
# cp docker-compose.yaml docker-compose.yaml.bak
2、下载milvus 2.3.15 版本的docker-compose.yaml ,将其放到老的milvus目录
# cd /opt/Milvus
# wget https://github.com/milvus-io/milvus/releases/download/v3.15/milvus-standalone-docker-compose.yml -O docker-compose.yml
# cat docker-compose.yaml (attu 服务是我自己添加)
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
command: etcd -advertise-client-urls=http://127.0.0.1:2379 -listen-client-urls http://0.0.0.0:2379 --data-dir /etcd
healthcheck:
test: ["CMD", "etcdctl", "endpoint", "health"]
interval: 30s
timeout: 20s
retries: 3
minio:
container_name: milvus-minio
image: minio/minio:RELEASE.2023-03-20T20-16-18Z
environment:
MINIO_ACCESS_KEY: minioadmin
MINIO_SECRET_KEY: minioadmin
ports:
- "9001:9001"
- "9000:9000"
volumes:
- ${DOCKER_VOLUME_DIRECTORY:-.}/volumes/minio:/minio_data
command: minio server /minio_data --console-address ":9001"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 30s
timeout: 20s
retries: 3
standalone:
container_name: milvus-standalone
image: milvusdb/milvus:v2.3.15
command: ["milvus", "run", "standalone"]
security_opt:
- seccomp:unconfined
environment:
ETCD_ENDPOINTS: etcd:2379
MINIO_ADDRESS: minio:9000
volumes:
- ${DOCKER_VOLUME_DIRECTORY:-.}/volumes/milvus:/var/lib/milvus
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9091/healthz"]
interval: 30s
start_period: 90s
timeout: 20s
retries: 3
ports:
- "19530:19530"
- "9091:9091"
depends_on:
- "etcd"
- "minio"
attu:
container_name: attu
image: zilliz/attu:v2.2.3
environment:
MILVUS_URL: milvus-standalone:19530
ports:
- "18000:3000"
depends_on:
- "standalone"
networks:
default:
name: milvus
3、启动milvus所有组件服务,查看各组件状态
# cd /opt/Milvus
# docker-compose up -d
# docker ps
- 本文固定链接: http://www.jiagou.cc/633/
- 转载请注明: 摘星怪 于 架构迷 发表