Seeking direction re MySQL update
I've taken over an IT job and I'm new to puppet so please forgive my ignorance.
I'm running puppet 3.7.4. The nodes that puppet manages are running MySQL 5.1.73. Management has asked me to upgrade MySQL on the nodes to 5.7.13.
I see that there is a modules/mysql directory. metadata.json has this identifying information:
"name": "puppetlabs-mysql", "version": "2.1.0", "summary": "Mysql module", "author": "Puppet Labs", "description": "Mysql module"
I've got a couple of general questions. I'm sure I'll have more over time.
How can I figure out how the current version of MySQL is installed on the agents? I'm guessing it's through yum but I'd like to find evidence that puppet is doing that. I imagine I can look through /var/log/messages on an agent but I'd like to understand how puppet is picking the version and doing the MySQL install.
What's a reasonable approach to upgrading MySQL and leaving a copy of the current version on the agents in case I need to revert back?
At this point I'm just hoping for some direction.
Thanks very much.
Update 6/11/16: Since posting this question I do see that yum is managing the mysql packages. I was able to update mysql as follows:
curl -OL http://dev.mysql.com/get/mysql57-community-release-el6-8.noarch.rpm rpm -Uvh mysql57-community-release-el6-8.noarch.rpm yum update mysql
I had to make two changes in my.cnf. Then I had to do this in one shell window:
And, I had to do this is another shell window:
mysql_upgrade -u root -p
My remaining question is how do I puppetize this upgrade? In particular, this business of having to run mysqldsafe skipping the grant tables so that I can then run mysqlupgrade seems a little bit tricky. I have 100 VMs to update so I do need to automate this!