standalone部署的milvus暴露2379端口

说明:2380端口不需要暴露,内部通信使用.

 

1.修改配置文件

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
    ports:
      - "2379:2379"

 

2.重新部署milvus
cd /home/middle/milvus
docker-compose down
docker-compose up -d

 

3.查看暴露的端口
[root@host135 milvus]# ss -nlp|grep 2379
tcp LISTEN 0 65535 *:2379 *:* users:(("docker-proxy",pid=31104,fd=4))
tcp LISTEN 0 65535 :::2379 :::* users:(("docker-proxy",pid=31109,fd=4))


4.尝试使用birdwatcher链接
[root@localhost birdwatcher]# ./birdwatcher
Offline > connect --etcd 192.168.1.135:2379
Using meta path: by-dev/meta/
Milvus(by-dev) > help

Milvus(by-dev) > help
Usage:
   [command]

Available Commands:
  backup                     backup etcd key-values
  check-partiton-key         check partition key field file
  completion                 Generate the autocompletion script for the specified shell
  consume                    consume msgs from provided topic
  disconnect                 disconnect from current etcd instance
  download                   download etcd data
  download-pk                download segment pk with provided collection/segment id
  download-segment           download segment file with provided segment id
  dry-mode                   enter dry mode to select instance
  exit                       Close this CLI tool
  explain-balance            explain segments and channels current balance status
  fetch-metrics              fetch metrics from milvus instances
  force-release              
  garbage-collect            scan oss of milvus instance for garbage(dry-run)
  healthz-check              perform healthz check for connect instance
  help                       Help about any command
  inspect-pk                 inspect pk column remote or local
  kill                       Kill component session from etcd
  list                       
  listen-events              
  parse-ts                   parse hybrid timestamp
  pprof                      get pprof from online components
  probe                      probe service state with internal apis
  release-dropped-collection Clean loaded collections meta if it's dropped from QueryCoord
  remove                     
  repair                     
  scan-binlog                test expr
  set                        
  show                       
  show-log-level             show log level of milvus roles
  test                       
  test-minio-cfg             
  update-log-level           update log level of milvus role 
  verify-segment             Verify segment file matches storage
  version                    print version
  visit                      enter state that could visit some service of component
  web                        start a web server to see more details on browser

 

posted @ 2024-11-12 15:53  slnngk  阅读(10)  评论(0编辑  收藏  举报