milvus版本升级

环境:
OS:Centos 7
milvus:2.4.6
部署方式:docker-compose部署的standalone

说明:
计划将milvus升级到2.4.15,其他组件保持不变.

1.下载私人镜像

[root@host135 milvus]# docker pull registry.cn-shenzhen.aliyuncs.com/hxlk8s/milvus:v2.4.15
v2.4.15: Pulling from hxlk8s/milvus
2ec76a50fe7c: Pull complete 
1843205aaf00: Pull complete 
748474a198ce: Pull complete 
75f8a77b55ac: Pull complete 
4ba680cd8483: Pull complete 
6210f175eb4d: Pull complete 
Digest: sha256:de92ccd363aa79e4c225ff78aee29422e29f643530f5563c6617bec15d22ba38
Status: Downloaded newer image for registry.cn-shenzhen.aliyuncs.com/hxlk8s/milvus:v2.4.15
registry.cn-shenzhen.aliyuncs.com/hxlk8s/milvus:v2.4.15

 

查看

[root@host135 milvus]# docker images
REPOSITORY                                        TAG                            IMAGE ID       CREATED         SIZE
registry.cn-shenzhen.aliyuncs.com/hxlk8s/milvus   v2.4.15                        278de20b4f8d   9 days ago      1.6GB
zilliz/attu                                       v2.4.6                         3d15903f4290   3 months ago    293MB
milvusdb/milvus                                   v2.4.6                         636269526977   4 months ago    1.79GB
minio/minio                                       RELEASE.2023-03-20T20-16-18Z   400c20c8aac0   20 months ago   252MB
quay.io/coreos/etcd                               v3.5.5                         673f29d03de9   2 years ago     182MB
[root@host135 milvus]# 

打标签,打标签的目的是名称与docker-compose.yml文件定义的名称保持一致

[root@host135 2.4.6]# docker tag 278de20b4f8d milvusdb/milvus:v2.4.15

[root@host135 milvus]# docker images
REPOSITORY                                        TAG                            IMAGE ID       CREATED         SIZE
milvusdb/milvus                                   v2.4.15                        278de20b4f8d   9 days ago      1.6GB
registry.cn-shenzhen.aliyuncs.com/hxlk8s/milvus   v2.4.15                        278de20b4f8d   9 days ago      1.6GB
zilliz/attu                                       v2.4.6                         3d15903f4290   3 months ago    293MB
milvusdb/milvus                                   v2.4.6                         636269526977   4 months ago    1.79GB
minio/minio                                       RELEASE.2023-03-20T20-16-18Z   400c20c8aac0   20 months ago   252MB
quay.io/coreos/etcd                               v3.5.5                         673f29d03de9   2 years ago     182MB
[root@host135 milvus]#

发现这个有2个镜像,我们尝试删除一个

[root@host135 milvus]# docker rmi registry.cn-shenzhen.aliyuncs.com/hxlk8s/milvus:v2.4.15
Untagged: registry.cn-shenzhen.aliyuncs.com/hxlk8s/milvus:v2.4.15
Untagged: registry.cn-shenzhen.aliyuncs.com/hxlk8s/milvus@sha256:de92ccd363aa79e4c225ff78aee29422e29f643530f5563c6617bec15d22ba38

 

最后的效果:

[root@host135 milvus]# docker images          
REPOSITORY            TAG                            IMAGE ID       CREATED         SIZE
milvusdb/milvus       v2.4.15                        278de20b4f8d   9 days ago      1.6GB
zilliz/attu           v2.4.6                         3d15903f4290   3 months ago    293MB
milvusdb/milvus       v2.4.6                         636269526977   4 months ago    1.79GB
minio/minio           RELEASE.2023-03-20T20-16-18Z   400c20c8aac0   20 months ago   252MB
quay.io/coreos/etcd   v3.5.5                         673f29d03de9   2 years ago     182MB

3.删除容器

[root@host135 milvus]# cd /home/middle/milvus
[root@host135 milvus]# docker-compose down
Stopping attu              ... done
Stopping milvus-standalone ... done
Stopping milvus-minio      ... done
Stopping milvus-etcd       ... done
Removing attu              ... done
Removing milvus-standalone ... done
Removing milvus-minio      ... done
Removing milvus-etcd       ... done
Removing network milvus

4.修改配置文件docker-compose.yml

  standalone:
    container_name: milvus-standalone
    image: milvusdb/milvus:v2.4.6
修改为:
  standalone:
    container_name: milvus-standalone
    image: milvusdb/milvus:v2.4.15

 

5.重新加载使用

[root@host135 milvus]# docker-compose up -d
Creating network "milvus" with the default driver
Creating milvus-etcd  ... done
Creating milvus-minio ... done
Creating milvus-standalone ... done
Creating attu              ... done

 

6.attu登录查看新版本
http://192.168.1.135:8000/#/
root/Milvus

说明:
整个过程数据不会丢失;

 

posted @ 2024-11-15 11:37  slnngk  阅读(203)  评论(0)    收藏  举报