This blog post is another in the series on the Percona Server for MongoDB 3.4 bundle release. The purpose of this blog post is to demonstrate current best-practices for an in-place Percona Monitoring and Management (PMM) upgrade. Following this method allows you to retain data previously collected by PMM in your MySQL or MongoDB environment, while upgrading to the latest version.
Step 1: Housekeeping
Before beginning this process, I recommend that you use a package manager that installs directly from Percona’s official software repository. The install instructions vary by distro, but for Ubuntu users the commands are:
1 | wget https://repo.percona.com/apt/percona-release_0.1-4.$(lsb_release -sc)_all.deb |
1 | sudo dpkg -i percona-release_0.1-4.$(lsb_release -sc)_all.deb |
Step 2: PMM Server Upgrade
Now that we have ensured we’re using Percona’s official software repository, we can continue with the upgrade. To check which version of PMM server is running, execute the following command on your PMM server host:
1 | docker ps |
This command shows a list of all running Docker containers. The version of PMM server you are running is found in the image description.
Once you’ve verified you are on an older version, it’s time to upgrade!
The first step is to stop and remove your docker pmm-server container with the following command:
1 | docker stop pmm-server && docker rm pmm-server |
Please note that this command may take several seconds to complete.
The next step is to create and run the image with the new version tag. In this case, we are installing version 1.1.0. Please make sure to verify the correct image name in the install instructions.
Run the command below to create and run the new image.
1 2 3 4 5 6 | docker run -d -p 80:80 --volumes-from pmm-data --name pmm-server --restart always percona/pmm-server:1.1.0 |
We can confirm our new image is running with the following command:
1 | docker ps |
As you can see, the latest version of PMM server is installed. The final step in the process is to update the PMM client on each host to be monitored.
Step 3: PMM Client Upgrade
The GA version of Percona Monitoring and Management supports in-place upgrades. Instructions can be found in our documentation. On the client side, update the local apt cache, and upgrade to the new version of pmm-client by running the following commands:
1 | apt-get update |
1 | apt-get install pmm-client |
Congrats! We’ve successfully upgraded to the latest PMM version. As you can tell from the graph below, there is a slight gap in our polling data due to the downtime necessary to upgrade the version. However, we have verified that the data that existed prior to the upgrade is still available and new data is being gathered.
Conclusion
I hope this blog post has given you the confidence to do an in-place Percona Monitoring and Management upgrade. As always, please submit your feedback on our forums with regards to any PMM-related suggestions or questions. Our goal is to make PMM the best-available open-source MySQL and MongoDB monitoring tool.
HI Can I get your Email. I have some issues in Percona PMM Configurations.
Hi Sandeep,
I have sent you an email.