Technical Sharing: Apply Configuration Changes on Milvus 2.0 Using Docker Compose
After having tried different approaches, I’ve found a reliable way to apply changes to configuration files for Milvus 2.0 standalone and cluster. Let's take a look.
Join the DZone community and get the full member experience.Join For Free
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 releases 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 and cluster. Let's take a look.
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
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
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.
First, download and modify the milvus.yaml file to suit your needs.
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.
Finally, you can start the 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 the Docker container.
For standalone, you need to map the local path to milvus.yaml onto the corresponding docker container path to the 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.
Lastly, start Milvus standalone or cluster using
docker-compose up -d and check the log files to see if the modification is successful.
Opinions expressed by DZone contributors are their own.