Install Milvus Cluster

This topic describes how to install Milvus cluster with Docker Compose or on Kubernetes.

Check the requirements for hardware and software prior to your installation.

If you run into image loading errors while installing, you can Install Milvus Offline.

You can also build Milvus from source code at GitHub.

Download an installation file

Download milvus-cluster-docker-compose.yml directly or with the following command, and save it as docker-compose.yml.

$ wget https://github.com/milvus-io/milvus/releases/download/v2.0.0-pre-ga/milvus-cluster-docker-compose.yml -O docker-compose.yml

Configure Milvus (optional)

Download milvus.yaml directly or with the following command.

$ wget https://raw.githubusercontent.com/milvus-io/milvus/v2.0.0-pre-ga/configs/milvus.yaml

Modify the configurations to suit your needs. See Milvus Cluster System Configurations for more information.

In docker-compose.yml, add a volumes section under each Milvus component, i.e. root coord, data coord, data node, query coord, query node, index coord, index node, and proxy.

Map the local path to your milvus.yaml file onto the corresponding docker container paths to the configuration files /milvus/configs/milvus.yaml under all volumes sections.

...
proxy:
    container_name: milvus-proxy
    image: milvusdb/milvus:v2.0.0-rc7-20211011-d567b21
    command: ["milvus", "run", "proxy"]
    volumes:       # Add a volumes section.
      - /local/path/to/your/file:/milvus/configs/milvus.yaml   # Map the local path to the container path
    environment:
      ETCD_ENDPOINTS: etcd:2379
      MINIO_ADDRESS: minio:9000
      PULSAR_ADDRESS: pulsar://pulsar:6650
    ports:
      - "19530:19530"
...
Data is stored in the /volumes folder according to the default configuration in docker-compose.yml. To change the folder to store data, edit docker-compose.yml or run $ export DOCKER_VOLUME_DIRECTORY=.

Start Milvus

$ sudo docker-compose up -d
Docker Compose is now in the Docker CLI, try `docker compose up`
Creating milvus-etcd   ... done
Creating milvus-minio  ... done
Creating milvus-pulsar ... done
Creating milvus-proxy      ... done
Creating milvus-rootcoord  ... done
Creating milvus-indexcoord ... done
Creating milvus-querycoord ... done
Creating milvus-datacoord  ... done
Creating milvus-querynode  ... done
Creating milvus-indexnode  ... done
Creating milvus-datanode   ... done

Check the status of the containers.

$ sudo docker ps

After Milvus cluster starts, 11 running docker containers appear including three dependencies and eight Milvus services.

      Name                     Command                  State                          Ports
----------------------------------------------------------------------------------------------------------------
milvus-datacoord    /tini -- milvus run datacoord    Up
milvus-datanode     /tini -- milvus run datanode     Up
milvus-etcd         etcd -listen-peer-urls=htt ...   Up (healthy)   2379/tcp, 2380/tcp
milvus-indexcoord   /tini -- milvus run indexcoord   Up
milvus-indexnode    /tini -- milvus run indexnode    Up
milvus-minio        /usr/bin/docker-entrypoint ...   Up (healthy)   9000/tcp
milvus-proxy        /tini -- milvus run proxy        Up             0.0.0.0:19530->19530/tcp,:::19530->19530/tcp
milvus-pulsar       bin/pulsar standalone            Up
milvus-querycoord   /tini -- milvus run querycoord   Up
milvus-querynode    /tini -- milvus run querynode    Up
milvus-rootcoord    /tini -- milvus run rootcoord    Up

Stop Milvus

To stop Milvus cluster, run $ sudo docker-compose down.

To delete data after stopping Milvus, run $ sudo rm -rf volumes.

What's next

Having installed Milvus, you can:

Is this page helpful?
Scored Successfully!