Zram
The zram
cookbook is intended to convert a set percentage of the system’s memory into compressed swap space. https://en.wikipedia.org/wiki/Zram
The cookbook is formatted to act as a base from which other cookbooks wrap around. It sets default attributes that may be tweaked by the wrapper cookbook.
- chef_version ‘>= 13.0’
- supports ‘redhat’, ‘>= 7.0’
- supports ‘ubuntu’, ‘>= 18.04’
Theorg
attribute is used as a way to delineate your specific attribute sets from default ones. Setting it as an attribute accommodates environments with multiple organizations to prevent crosstalk. Usually theorg
value is set within theenvironment
(s) for that organization.
Include with an application/alternate cookbook.
- Add to metadata.rb:
depends 'zram'
- Add to a recipe where desired:
include_recipe 'zram::default'
- Adjust attributes in application/alternate cookbook as desired.
Or you may add this to the run_list
of a node/role/environment.
- Remove all references of
zram
from a cookbook/node/role/environment. - Run the uninstall recipe on the servers:
chef-client -o 'recipe[zram::uninstall]