You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Convert the cookbook from recipes and attributes to custom resources with resource documentation and migration guidance.
Verification: berks install; cookstyle; chef exec rspec --format documentation; KITCHEN_LOCAL_YAML=kitchen.dokken.yml kitchen test default-ubuntu-2404 --destroy=always.
This cookbook targets Percona Server for MySQL 8.4 LTS and related Percona packages distributed through the official Percona repositories.
4
+
5
+
## Supported Product Line
6
+
7
+
* Percona Server for MySQL 8.4 uses the `ps-84-lts` repository.
8
+
* Percona XtraDB Cluster 8.4 uses the `pxc-84-lts` repository.
9
+
* Percona XtraBackup 8.4 uses the `percona-xtrabackup-84` package.
10
+
* Percona Server 8.0 support was removed from this cookbook because Percona's lifecycle matrix lists Percona Server for MySQL 8.0 end of life as April 1, 2026.
11
+
12
+
## Platform Support
13
+
14
+
Percona's lifecycle policy says supported operating systems and platforms are provided only as 64-bit packages, with AMD64 and ARM64 available where listed. This cookbook keeps platforms that are current and have Percona 8.4 package support:
15
+
16
+
* AlmaLinux 8, 9, and 10 through RHEL-compatible package support.
17
+
* Amazon Linux 2023.
18
+
* CentOS Stream 9 and 10 through RHEL-compatible package support.
19
+
* Debian 12 and 13.
20
+
* Oracle Linux 8 and 9.
21
+
* Rocky Linux 8, 9, and 10 through RHEL-compatible package support.
22
+
* Ubuntu 22.04 and 24.04 LTS.
23
+
24
+
Ubuntu 20.04 is intentionally removed. Percona Server 8.4 release notes state that Ubuntu 20.04 support ended and Debian 13 support was added.
25
+
26
+
## Package Constraints
27
+
28
+
* The repository setup resource manages Percona's release, telemetry, PMM client, tools, and product repositories directly instead of shelling out to `percona-release`.
29
+
* RHEL-family systems disable the default MySQL DNF module so Percona packages are visible.
30
+
* Percona XtraDB Cluster requires ports 3306, 4444, 4567, and 4568 to be open between cluster nodes. The cookbook does not manage firewall rules.
31
+
* Percona Server and Percona Server Pro are distinct upstream build families. Current Percona Server 8.4 release notes state that Pro build features were consolidated into the main community release; this cookbook manages the standard Percona Server packages.
32
+
33
+
## Sources
34
+
35
+
*[Percona Server for MySQL 8.4 documentation](https://docs.percona.com/percona-server/8.4/print_page.html)
-`percona::cluster` - Installs Percona XtraDB Cluster server components.
56
-
-`percona::configure_server` - Internal: manages server configuration.
57
-
-`percona::replication` - Internal: grants permissions for replication.
58
-
-`percona::access_grants` - Internal: grants permissions for recipes.
59
-
-`percona::ssl` - Internal: sets up SSL certificates for server/client.
48
+
This cookbook now exposes custom resources only. Recipes and node attributes were removed in the breaking custom resource migration. See [migration.md](migration.md) for replacement examples.
-[`percona_mysql_user`](documentation/resource_percona_mysql_user.md): Manage Percona MySQL users and privileges.
64
63
-[`percona_mysql_database`](documentation/resource_percona_mysql_database.md): Manage Percona MySQL databases and execute SQL queries.
65
64
66
65
## Resource Documentation
67
66
68
-
See [documentation/resource_percona_mysql_user.md](documentation/resource_percona_mysql_user.md) and [documentation/resource_percona_mysql_database.md](documentation/resource_percona_mysql_database.md) for full details on custom resources, properties, actions, and usage examples.
67
+
See the files in [documentation/](documentation/) for full details on custom resources, properties, actions, and usage examples.
69
68
70
69
## Usage
71
70
@@ -78,7 +77,7 @@ This cookbook uses inclusive terminology, replacing terms such as `master/slave`
78
77
79
78
This cookbook requires [Encrypted Data Bags](https://docs.chef.io/secrets/#encrypt-a-data-bag-item) for managing passwords and secrets. If you do not use encrypted data bags or override passwords via node attributes, empty passwords will be used (not recommended).
80
79
81
-
By default, the cookbook expects a data bag named `passwords`. You can override this with `node['percona']['encrypted_data_bag']`. Optionally, specify a data bag secret file with `node['percona']['encrypted_data_bag_secret_file']`.
80
+
By default, the cookbook expects a data bag named `passwords`. You can override this with the `encrypted_data_bag` property. Optionally, specify a data bag secret file with `encrypted_data_bag_secret_file`.
82
81
83
82
Required items:
84
83
@@ -87,25 +86,25 @@ Required items:
87
86
88
87
Refer to Chef documentation for setup details. Example data bag items are provided in the test suite under `test/integration/data_bags/passwords/`.
89
88
90
-
You also may set expected item names via attributes `node['percona']['encrypted_data_bag_item_mysql']` and `node['percona']['encrypted_data_bag_item_system']`.
89
+
You also may set expected item names via `encrypted_data_bag_item_mysql` and `encrypted_data_bag_item_system`.
91
90
92
91
### Skip passwords
93
92
94
-
Set the `['percona']['skip_passwords']` attribute to skip setting up passwords. Removes the need for the encrypted data bag if using chef-solo. Is useful for setting up development and ci environments where you just want to use the root user with no password. If you are doing this you may want to set `['percona']['server']['debian_username']` to be `"root"` also.
93
+
Set the `skip_passwords` property to skip setting up passwords. This removes the need for the encrypted data bag if using chef-solo. It is useful for development and CI environments where you just want to use the root user with no password. If you do this, set `server_config(debian_username: 'root')` also.
95
94
96
95
### Skip Configure
97
96
98
-
Set the `['percona']['skip_configure']` attribute to skip having the server recipe include the configure\_server recipe directly after install. This is mostly useful in a wrapper cookbook sort of context. Once skipped, you can then perform any pre-config actions your wrapper needs to, such as dropping a custom configuration file or init script or cleaning up incorrectly sized innodb logfiles. You can then include configure\_server where necessary.
97
+
Set `configure_server false` on `percona_server`to skip server configuration directly after install. This is mostly useful in a wrapper cookbook context. You can then perform pre-configuration actions and call `percona_server_config` where necessary.
99
98
100
99
#### mysql item
101
100
102
101
The mysql item should contain entries for root, backup, and replication. If no value is found, the cookbook will fall back to the default non-encrypted password.
103
102
104
103
#### system item
105
104
106
-
The "system" item should contain an entry for the debian system user as specified in the `node['percona']['server']['debian_username']` attribute. If no such entry is found, the cookbook will fall back to the default non-encrypted password.
105
+
The "system" item should contain an entry for the Debian system user specified in `server_config[:debian_username]`. If no such entry is found, the cookbook falls back to the resource property password.
107
106
108
-
Example: "passwords" data bag - this example assumes that `node['percona']['server']['debian_username'] = spud`
107
+
Example: "passwords" data bag - this example assumes that `server_config(debian_username: 'spud')` is used.
109
108
110
109
```javascript
111
110
{
@@ -126,12 +125,12 @@ Above shows the encrypted password in the data bag. Check out the `encrypted_dat
126
125
127
126
### Install client development package
128
127
129
-
To install the package including header files needed to compile software using the client library (`percona-server-devel` on Centos and `libperconaserverclient-dev` on Debian), set `node['percona']['client']['install_devel_package']` to `true`. This will add those packages to the list to be installed when running the `percona::client` recipe. This attribute is disabled by default.
128
+
To install the package including header files needed to compile software using the client library (`percona-server-devel` on RHEL-family systems and `libperconaserverclient22-dev` on Debian/Ubuntu), set `install_devel_packagetrue` on `percona_client`. This property is disabled by default.
130
129
131
130
### Replication over SSL
132
131
133
-
To enable SSL based replication, you will need to flip the attribute `node['percona']['server']['replication']['ssl_enabled']` to `true` and add a new data\_bag item
134
-
to the percona encrypted data\_bag (see`node['percona']['encrypted_data_bag']` attribute) with the id `ssl_replication` ( see `node['percona']['encrypted_data_bag_item_ssl_replication']` attribute) that contains this data:
132
+
To enable SSL based replication, set `server_config(replication: { ssl_enabled: true })` and add a data bag item
133
+
to the Percona encrypted data bag with the id `ssl_replication` that contains this data:
@@ -225,12 +230,18 @@ Now you need to bring three servers up one at a time with the percona role appli
225
230
226
231
## Explicit my.cnf templating
227
232
228
-
In some situations it is preferable to explicitly define the attributes needed in a `my.cnf` file. This is enabled by adding categories to the `node['percona']['conf']` attributes. All keys found in the `node['percona']['conf']` map will represent categories in the `my.cnf` file. Each category contains a map of attributes that will be written to the `my.cnf` file for that category. See the example for more details.
233
+
In some situations it is preferable to explicitly define the settings needed in a `my.cnf` file. This is enabled by passing categories through the `extra_config` property. All keys found in the `extra_config` map represent categories in the `my.cnf` file.
This configuration would write the `mysqld` category to the `my.cnf` file and have an attribute `slow_query_log_file` whose value would be `/var/lib/mysql/data/mysql-slow.log`.
There's a special attribute `node['percona']['server']['bind_to']` that allows you to dynamically set the bind address. This attribute accepts the values `"public_ip"`, `"private_ip"`, `"loopback"`, or and interface name like `"eth0"`. Based on this, the recipe will find a corresponding ipv4 address, and override the `node['percona']['server']['bind_address']` attribute.
258
+
Set `server_config(bind_to: ...)`to dynamically set the bind address. This accepts `"public_ip"`, `"private_ip"`, `"loopback"`, or an interface name like `"eth0"`.
0 commit comments