Zilliz logo
Zilliz logo

Technical Sharing: Apply Configuration Changes on Milvus 2.0 using Docker Compose

October 18, 2021 by Jingjing

Link copied

Jingjing Jia, Zilliz Data Engineer, graduated from Xi’an Jiaotong University with a degree in Computer Science. After joining Zilliz, she mainly works on data pre-processing, AI model deployment, Milvus related technology research, and helping community users to implement application scenarios. SHe is very patient, likes to communicate with community partners, and enjoys listening to music and watching anime.

As a frequent user of Milvus, I was very excited about the newly released Milvus 2.0 RC. According to the introduction on the official website, Milvus 2.0 seems to outmatch its predecessors by a large margin. I was so eager to try it out myself.

And I did. However, when I truly got my hands on Milvus 2.0, I realized that I wasn't able to modify the configuration file in Milvus 2.0 as easily as I did with Milvus 1.1.1. I couldn't change the configuration file inside the docker container of Milvus 2.0 started with Docker Compose, and even force change wouldn't take effect. Later, I learned that Milvus 2.0 RC was unable to detect changes to the configuration file after installation. And future stable release will fix this issue.

Having tried different approaches, I've found a reliable way to apply changes to configuration files for Milvus 2.0 standalone & cluster, and here is how.

Note that all changes to configuration must be made before restarting Milvus using Docker Compose.

Modify configuration file in Milvus standalone

First, you will need to download a copy of milvus.yaml file to your local device.

Then you can change the configurations in the file. For instance, you can change the log format as .json.

1.1.png

Once milvus.yaml file is modified, you will also need to download and modify in docker-compose.yaml file for standalone by mapping the local path to milvus.yaml onto the corresponding docker container path to configuration file /milvus/configs/milvus.yaml under the volumes section.

1.2.png

Lastly, start Milvus standalone using docker-compose up -d and check if the modifications are successful. For instance, run docker logs to check the log format.

1.3.png

Modify configuration file in Milvus cluster

First, download and modify the milvus.yaml file to suit your needs.

1.4.png

Then you will need to download and modify the cluster docker-compose.yml file by mapping the local path to milvus.yaml onto the corresponding path to configuration files in all components, i.e. root coord, data coord, data node, query coord, query node, index coord, index node, and proxy.

1.5.png

1.6.png 1.7.png

Finally, you can start Milvus cluster using docker-compose up -d and check if the modifications are successful.

Change log file path in configuration file

First, download the milvus.yaml file, and change the rootPath section as the directory where you expect to store the log files in Docker container.

1.8.png

After that, download the corresponding docker-compose.yml file for Milvus standalone or cluster.

For standalone, you need to map the local path to milvus.yaml onto the corresponding docker container path to configuration file /milvus/configs/milvus.yaml, and map the local log file directory onto the Docker container directory you created previously.

For cluster, you will need to map both paths in every component.

1.9.png

Lastly, start Milvus standalone or cluster using docker-compose up -d and check the log files to see if the modification is successful.

Make sense of

unstructured data.

Subscribe to our newsletter.