percona-release PackageHow do you install an application? Nowadays a lot of companies want to use the latest technology and more and more of them are moving infrastructure to clouds. And in order to simplify maintenance, they are using Kubernetes. But still, the vast majority use the bare metal infrastructure with Linux on board, and we will talk about installing applications on such boxes and not in Kubernetes. There are many operating systems, so there would be a big variety of answers. Applications can come from so many sources and each software producer may deliver its software in whatever way might be the best for it and his needs.

The way Percona recommends to install Percona’s software is to use package repositories. Installing from a software repository is the primary method of installing apps on Linux. By default, your OS has a number of installed official repositories, so you would need to install additional repositories manually.

But is it true that you only need to know the link to the packaging repository? The projects and companies providing the packages utilize content distribution networks (CDNs) and mirror sites to make their packages available to consumers. For many open-source projects, including ones hosted by volunteers to detect and avoid malicious replacement packages, package owners can sign the package files, and consumers can verify those signatures.

So in a common scenario, you need to know:

  • The link to the packaging repository
  • GPG key to verify package sign

In our case, we prepared a percona-release package. This package would install the correct GPG key and percona-release script. 

What is a percona-release script? It is a script that should help end-users to work with repository setup, enable or disable repositories just using one command, and also will allow you to set up only needed repositories to prevent any packaging conflicts. Detailed information on how to use this script you can get from its documentation: https://www.percona.com/doc/percona-repo-config/percona-release.html.

As the topic is “hidden magic”, we will check what is really hidden in this package and tool, and what benefits it will bring to users.

  • You just need to install package and basic setup will be done. In most cases, the instructions are how to download the GPG key, install it on the system, edit the repository file to enable the needed repository on the system, and only after that, you will be able to install the needed software. It seems a bit complicated, doesn’t it?

    Percona-release package, during its installation, will do all these actions: it will install the correct GPG key and it will enable our original and prel repositories for you, so immediately after installation you would be able to install the needed software.
  • The percona-repository package can be installed from the prel repository which will be enabled on install and will bring updates to your system. It means that in case we would make any changes in the percona-release script, add a new repository, or add a new GPG key – the only action required for you would be just a package update. You wouldn’t need to surf the internet to understand what happened and what you should do to fix it. Just update the package and that’s it.
  • The percona-release script automatically detects if your OS system is supported and enables only repositories that would work on your OS. You don’t need to have deep knowledge in repository setup on a specific OS;  just enable repository using percona-release script and you will get it enabled.
  • The percona-release script can show what Percona repositories are currently enabled on the system.

Sometimes it is really needed to understand what repos are enabled. For example, you need to install Percona-Xtrabackup but it is available only from the default Debian/Ubuntu or RedHat repository. So you need to understand what Percona repositories are available. With a percona-release script you don’t need to deeply know yum or apt;  just type percona-release show and you will see enabled repositories. 

The following repositories are enabled on your system:

Enable and Disable Repos With One Command

The percona-release script brings a big variety of options to work with repositories:

    • enable – enable the requited repository

By default, only Original and Prel repositories are enabled but in most cases, it is not enough as you might need to install, for example, Percona-XtraBackup-80 version which is stored in a separate repository. So all you need is to type: 

    • enable-only – disable all enabled Percona repositories and enable requested one

In order to prevent any conflicts between version and be sure that you have only the needed repo enabled, you could type:

It will disable all other Percona repositories and enable only the requested one. So no need to disable any repo manually.

    • setup – disable all enabled Percona repositories and enables a set of repositories needed to setup product (for example pxc-80 and tools)

In some cases, it is not enough to enable only one repository to install the requested product. You don’t need to find what repositories should be enabled, just type: 

In this case, percona-release will automatically enable all needed repositories to setup the requested product

    • disable – disable repositories

In order to disable the repository in case you decided to use another repository or want to perform a distribution update, you could easily do this by:

or

In conclusion, the percona-release package would ease your life starting from system setup and further during updates. Just start using it on your system and you will see how beneficial it can be.

1 Comment
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Freddy

This hidden magic is great when you have 1 server to install but if you want to automate the install I would love to have the key and repo in our saltstack host pushed to the server and then install what we need.