Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[24.05] percona: adapt to new release scheme; update nixpkgs #1004

Merged
merged 5 commits into from
May 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 19 additions & 5 deletions doc/src/mysql.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,28 @@

This component sets up a managed instance of the MySQL database server.

We use the [Percona Distribution for MySQL](https://percona.com/software/mysql-database)
which provides useful improvements over the standard Oracle MySQL/MariaDB implementations.

## Supported versions

There's a role for each supported major version, currently:

- mysql57: Percona 5.7.x (End-of-life)
- percona80: Percona 8.0.x
- percona81: Percona 8.1.x

We use the [Percona Distribution for MySQL](https://percona.com/software/mysql-database)
which provides useful improvements over the standard Oracle MySQL/MariaDB implementations.
- percona80: Percona 8.0.x (*LTS* release)
- percona83: Percona 8.3.x (*Innovation* release)

Percona and MySQL currently follow a [two-fold release model](https://www.percona.com/blog/lts-and-innovation-releases-for-percona-server-for-mysql/)
and provide support for 2 releases in parallel:

- *LTS (recommended)*: These long-term support releases are supported throughout the full release life-time
of this NixOS platform release and only receive minor bug and security fixes.
- *Innovation*: A new innovation release is made roughly each quarter of a year,
containing new features and potentially breaking changes.\
Please note that these releases won't receive any further upstream support once the successor
is out. Our platform will keep each Innovation release made during the release life-time
available, enabling you to update at your own pace. But we won't backport changes from
newer Percona Innovation releases.

## Configuration

Expand Down
18 changes: 9 additions & 9 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

40 changes: 23 additions & 17 deletions nixos/roles/mysql.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ with builtins;

let
fclib = config.fclib;
supportedPerconaVersions = ["8.0" "8.3"];
removeDot = builtins.replaceStrings ["."] [""];
in
{
options = with lib;
Expand Down Expand Up @@ -55,31 +57,35 @@ in
};

mysql57 = mkRole "5.7";
percona80 = mkRole "8.0";
percona81 = mkRole "8.1";
};
}
// lib.listToAttrs (builtins.map
(ver: lib.nameValuePair "percona${removeDot ver}" (mkRole ver)
) supportedPerconaVersions);

};

config =
let
mysqlRoles = with config.flyingcircus.roles; {
"5.7" = mysql57.enable;
"8.0" = percona80.enable;
"8.1" = percona81.enable;
};

mysqlPackages = with pkgs; {
"5.7" = percona57;
"8.0" = percona80;
"8.1" = percona81;
};
mysqlRoles = {
"5.7" = config.flyingcircus.roles.mysql57.enable;
}
// lib.listToAttrs (builtins.map (
ver: lib.nameValuePair ver config.flyingcircus.roles."percona${removeDot ver}".enable
) supportedPerconaVersions);

mysqlPackages = {
"5.7" = pkgs.percona57;
}
// lib.listToAttrs (builtins.map (
ver: lib.nameValuePair ver pkgs."percona${removeDot ver}"
) supportedPerconaVersions);

xtrabackupPackages = with pkgs; {
"5.7" = percona-xtrabackup_2_4;
"8.0" = percona-xtrabackup_8_0;
"8.1" = percona-xtrabackup_8_1;
};
}
// lib.listToAttrs (builtins.map (
ver: lib.nameValuePair ver pkgs."percona-xtrabackup_${builtins.replaceStrings ["."] ["_"] ver}"
) supportedPerconaVersions);

cfg = config.flyingcircus.roles.mysql;
fclib = config.fclib;
Expand Down
4 changes: 4 additions & 0 deletions pkgs/overlay.nix
Original file line number Diff line number Diff line change
Expand Up @@ -341,11 +341,15 @@ builtins.mapAttrs (_: patchPhps phpLogPermissionPatch) {

percona80 = super.percona-server_8_0;

# assertion notifies us about the need to vendor the old innovation releases
percona83 = assert self.percona-server_innovation.mysqlVersion == "8.3"; self.percona-server_innovation;

percona-xtrabackup_2_4 = super.callPackage ./percona-xtrabackup/2_4.nix {
boost = self.boost159;
openssl = self.openssl_1_1;
};

percona-xtrabackup_8_3 = assert self.percona-xtrabackup_innovation.mysqlVersion == "8.3"; self.percona-xtrabackup_innovation;
# Has been renamed upstream, backy-extract still wants to use it.
pkgconfig = super.pkg-config;

Expand Down
56 changes: 0 additions & 56 deletions pkgs/percona-xtrabackup/8_1.nix

This file was deleted.

108 changes: 0 additions & 108 deletions pkgs/percona/8.1.nix

This file was deleted.

7 changes: 6 additions & 1 deletion release/important_packages.json
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,14 @@
"percona",
"percona-server",
"percona-xtrabackup_8_0",
"percona-xtrabackup_8_3",
"percona-xtrabackup_lts",
"percona-xtrabackup_innovation",
"percona57",
"percona80",
"percona81",
"percona83",
"percona-server_lts",
"percona-server_innovation",
"php72",
"php73",
"php74",
Expand Down
Loading
Loading