Tag Archives: puppet

Working With Puppet

Moving on to some new challenges, I had to face the reality that some of my skills and operating procedures were dated. In this brave new era of Cloud-everything – which is really a simple way of saying software defined – what’s really nice is how disposable everything is. It is possible to get a new server instance very quickly and if you “recycle” an existing one DNS propagation is a non-issue and you can literally refresh a server in minutes. Many times you could redeploy a fresh server and your application faster than you could trouble shoot it.

That said, this automagic configuration is not free.

Continue reading

Percona apt repo with Key – Ubuntu

puppet code snippet

It works!

 

 

 

 

 

Using Puppet for configuration management is great.  So is using the high performance Percona DB.  Ditto for Ubuntu 18.04 LTS Bionic.   The issue arises when you are combining them and realize that all of the modules and easily located online resources use the old and deprecated short key, you can read more here:

https://www.percona.com/blog/2016/10/13/new-signing-key-for-percona-debian-and-ubuntu-packages/

You can read in the comments that some people asked for the current key… but didn’t get it.  I found using the installable .deb file that Percona provides to be a PITA with using the PuppetLabs Apt module:

https://www.percona.com/doc/percona-server/LATEST/installation/apt_repo.html

I jumped through some hoops (I should probably have documented that…) with gpg commands and the deb package and determined that the current repo public key is currently:

4D1BB29D63D98E422B2113B19334A25F8507EFA5

Want to put this to work in your own Puppet Module?  Here you go:

apt::source { 'percona':
  ensure   =>; present,
  include  =>; { src => true },
  location =>; 'http://repo.percona.com/apt',
  release  =>; $::lsbdistcodename,
  repos    =>; 'main',
  key      =>; '4D1BB29D63D98E422B2113B19334A25F8507EFA5',
  } ->;
  Class['apt::update']

This should work fine with other flavors of Ubuntu like 16.04 and you can also use it to get a repo installed for xtrabackup (make sure you use apt to get xtrabackup24 otherwise you’ll get the very aged version from Ubuntu sources).