Adoptable Cookbooks List

Looking for a cookbook to adopt? You can now see a list of cookbooks available for adoption!
List of Adoptable Cookbooks

Supermarket Belongs to the Community

Supermarket belongs to the community. While Chef has the responsibility to keep it running and be stewards of its functionality, what it does and how it works is driven by the community. The chef/supermarket repository will continue to be where development of the Supermarket application takes place. Come be part of shaping the direction of Supermarket by opening issues and pull requests or by joining us on the Chef Mailing List.

Select Badges

Select Supported Platforms

RSS

memcached (38) Versions 6.0.0

Installs memcached and includes memcached_instance resource for setting up memcached instances

Berkshelf
Policyfile
Knife
cookbook 'memcached', '= 6.0.0'
cookbook 'memcached', '= 6.0.0', :supermarket
knife supermarket install memcached
knife supermarket download memcached
README
Dependencies
Changelog
Quality 100%

memcached Cookbook

Cookbook Version Build Status OpenCollective OpenCollective License

Provides a custom resource for installing instances of memcached. Also ships with a default recipe that uses attributes to configure a single memcached instance on a host.

Requirements

Platforms

  • Debian / Ubuntu and derivatives
  • RHEL and derivatives
  • Fedora

Chef

  • Chef 13+

Attributes

The following are node attributes are used to configure the command line options of memcached if using the default.rb recipe. They are not used if using the memcached_instance custom resource.

  • memcached['memory'] - maximum memory for memcached instances.
  • memcached['user'] - user to run memcached as.
  • memcached['port'] - TCP port for memcached to listen on.
  • memcached['udp_port'] - UDP port for memcached to listen on.
  • memcached['listen'] - IP address for memcache to listen on, defaults to 0.0.0.0 (world accessible).
  • memcached['maxconn'] - maximum number of connections to accept (defaults to 1024)
  • memcached['max_object_size'] - maximum size of an object to cache (defaults to 1MB)
  • memcached['logfilepath'] - path to directory where log file will be written.
  • memcached['logfilename'] - logfile to which memcached output will be redirected in $logfilepath/$logfilename.
  • memcached['threads'] - Number of threads to use to process incoming requests. The default is 4.
  • memcached['experimental_options'] - Comma separated list of extended or experimental options. (array)
  • memcached['extra_cli_options'] - Array of single item options suchas -L for large pages.
  • memcached['ulimit'] - maxfile limit to set (needs to be at least maxconn)

Usage

This cookbook can be used to to setup a single memcached instance running under the system's init provider by including memcached::default on your runlist. The above documented attributes can be used to control the configuration of that service.

The cookbook can also within other cookbooks in your infrastructure with the memcached_instance custom resource. See the documentation below for the usage and examples of that custom resource.

Custom Resources

instance

Adds or removes an instance of memcached running under the system's native init system (sys-v, upstart, or systemd).

Actions

  • :start: Starts (and installs) an instance of memcached
  • :stop: Stops an instance of memcached
  • :enable: Enabled (and installs) an instance of memcached to run at boot
  • :restart: Restarts an instance of memcached

Properties

  • :memory - the amount of memory allocated for the cache. default: 64
  • :port - the TCP port to listen on. default: 11,211
  • :udp_port - the UDP port to listen on. default: 11,211
  • :listen - the IP to listen on. default: '0.0.0.0'
  • :socket - the file patch to run memcached as a socket (this disables listening on a port by default)
  • :socket_mode - the file mode for the socket (memcached defaults to 0700)
  • :maxconn - the maximum number of connections to accept. default: 1024
  • :user - the user to run as
  • :binary_path - path of memcached binary, when set we assume memcached is already installed
  • :threads - the number of threads to use
  • :max_object_size - the largest object size to store
  • :experimental_options - an array of experimental config options, such as: ['maxconns_fast', 'hashpower']
  • :extra_cli_options - an array of additional config options, such as: ['-L']
  • :ulimit - the ulimit setting to use for the service
  • :disable_default_instance - disable the default 'memcached' service installed by the package. default: true
  • :no_restart - disable the service restart on configuration change. default: false
  • :log_level - The level at which we log, default to 'info'. Choose from: 'info', 'debug', 'trace' which map to '-v', '-vv' or '-vvv' arguments.

Examples

Create a new memcached instance named super_custom_memcached:

memcached_instance 'super_custom_memcached' do
  port 11_212
  memory 128
end

Stop and disable the super_custom_memcached instance:

memcached_instance 'super_custom_memcached'  do
  action :remove
end

Contributors

This project exists thanks to all the people who contribute.

Backers

Thank you to all our backers!

https://opencollective.com/sous-chefs#backers

Sponsors

Support this project by becoming a sponsor. Your logo will show up here with a link to your website.

https://opencollective.com/sous-chefs/sponsor/0/website https://opencollective.com/sous-chefs/sponsor/1/website https://opencollective.com/sous-chefs/sponsor/2/website https://opencollective.com/sous-chefs/sponsor/3/website https://opencollective.com/sous-chefs/sponsor/4/website https://opencollective.com/sous-chefs/sponsor/5/website https://opencollective.com/sous-chefs/sponsor/6/website https://opencollective.com/sous-chefs/sponsor/7/website https://opencollective.com/sous-chefs/sponsor/8/website https://opencollective.com/sous-chefs/sponsor/9/website

Dependent cookbooks

This cookbook has no specified dependencies.

Contingent cookbooks

chef-manageiq Applicable Versions
ftp-cloudfs Applicable Versions
gitorious Applicable Versions
graphite Applicable Versions
mcrouter Applicable Versions
nodestack Applicable Versions
noosfero Applicable Versions
openstack-common Applicable Versions
phpstack Applicable Versions
pythonstack Applicable Versions
simplesamlphp Applicable Versions
stack_commons Applicable Versions

CHANGELOG

This file is used to list changes made in each version of the memcached cookbook. The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

[v6.0.0] - 2020-04-07

Added

  • Adoption by Sous-Chefs, adds CircleCI configuration for supported Os
  • CentOS 8 to test-kitchen platforms and include CentOS to workflow matrix
  • Debian 10 & Ubuntu 20.04 to test-kitchen platforms and workflow matrix
  • Amazon Linux 2 test-kitchen platforms and workflow matrix
  • 'socket' and 'socket_mode' property to the resource
  • ChefSpec tests for test::instance recipe

Changed

  • Switched to using systemd_unit resource
  • migrated to github actions
  • Update and improved ChefSpec tests
  • Move library helper functions into a Memcached::Helpers namespace

Removed

  • Support / testing for Ubuntu 14.04 & CentOS 6
  • Testing for Debian 8, OpenSUSE, Fedora & AmazonLinux
  • Upstart support
  • SysV init support and memcached_instance_sysv_init resource

[v5.1.1] - 2018-07-24

Fixed

  • Logging directory default to be /var/log/memcached not /var/log/

Removed

  • ChefSpec matchers since these are autogenerated by Chefspec now

[5.1.0] - 2018-01-30

Added

  • 'binary-path' property to the resource
  • 'no-restart' property to the resource

[5.0.2] - 2018-01-17

Changed

  • Use binary_path helper throughout code for consistency

[5.0.1] - 2018-01-10

Changed

  • Use Systemd User directive which is more secure

Fixed

  • Ulimit for runit based services
  • Experimental_options to be properly spaced

[5.0.0] - 2017-09-06

Removed

  • Support for RHEL 5. This removes the cookbook dependency on yum-epel as well

Deprecated

  • Runit support has been marked as deprecated and will be removed in a future release of this cookbook. We highly recommend you utilize the native init system of your distro to have the best experience with memcached.

Fixed

  • Using the resource to setup a sys-v init script on Fedora platforms
  • Amazon Linux support on Chef >= 13
  • Don't delete the memcached init script if the instance name is 'memcached' and we're specifying the instance_name on the resource instead of using the resource's name
  • Run failures with runit have been resolved

Added

  • New resource property for log_level and fixed logging setup in the resources
  • Debian Sys-V script for Debian to allow for Debian 7 support
  • Pull in systemd unit file security settings from upstream

Removed

  • Minor property cleanup in the resources
  • Avoid an extra blank line in the command options

[4.1.0] - 2017-05-06

Changed

  • Require Chef 12.7+ to workaround action_class bug

[4.0.1] - 2017-04-26

Changed

  • Update apache2 license string

[4.0.0] - 2017-03-13

Changed

  • Require 12.5 and remove dependency on compat_resource
  • Let chef pick the best init system instead of hardcoding init systems per distro / version
  • Avoid Chef 13 deprecation warnings
  • Test with Local Delivery instead of Rake
  • Use a consistent memcached path in the sysv script

Added

  • Extra_cli_options for passing anything else you want in to the binary

[3.0.3] - 2017-01-19

Added

  • Missing user variable to template in instance_sysv_init resource

Changed

  • Move testing to a test recipe and improve that testing
  • Depend on the latest compat_resource
  • Use :template_cookbook property for all template resources to fix specifying a different cookbook

[3.0.2] - 2016-06-28

Removed

  • Chef 11 compatibility check in the metadata

Changed

  • Better handle specifying non-standard init systems

[3.0.1] - 2016-06-23

Removed

  • Smartos from the supported platforms metadata as it's not longer supported

Added

  • Opensuse and opensuseleap as supported platforms in the metadata
  • Requirement of Chef 12 to the metadata

Changed

  • Increase the compat_resource depdency from >= 12.9 to >= 12.10 to bring in important fixes
  • Restart the service on failure when running under systemd
  • Disable FC023 in Foodcritic tests

[3.0.0] - 2016-05-24

Removed

  • SmartOS support. SmartOS support was never properly implemented and didn't support the custom resource. We've chosen to remove it instead of leaving partially functional and untested code in place.

Added

  • Support for platforms that lacked the Runit package, specifically opensuse -

Changed

  • The preferred method of use for this cookbook is now the custom resources via your own wrapper cookbook. The default recipe simply wraps the custom resource and allows you to set attributes instead of directly changing custom resource properties. To support this goal, the custom resource now uses the native init system of your OS by default (sys-v, upstart or systemd). The Runit provider is still present for backwards compatibility, but must be specified. See the readme for an example of how to do that with the custom resource. The default recipe does not support using runit and runit is no longer an init system we suggest users use.
  • The ulimit attribute and custom resource property behavior. Ulimit now takes the actual ulimit value as a string or int. Previously a boolean value was passed and if true the connection max was set. This gives users additional control over the ulimit value.
  • Testing has been improved with additional specs and integration tests that better match the capabilities of the cookbook

[2.1.0] 2016-03-16

Added

  • New property, disable_default_instance, to the instance custom resource for disabling the package installed memcached service. This prevents resource merging from resulting in a service that isn't disabled.
  • Maintainers files

Changed

  • Updated the custom resource to avoid potential namespace conflicts
  • Require the latest custom_resource to avoid failures and extra warning messages
  • Resolved nil attribute deprecation warnings

[2.0.3] 2016-02-16

Fixed

  • Template whitespace location that resulted in bad command

[2.0.2] 2015-11-20

Changed

  • Push new version to Supermarket to deal with bad artifact

[2.0.1] 2015-11-19

Changed

  • Push new version to Supermarket to deal with bad artifact

[2.0.0] 2015-11-10

Removed

  • The user and group attributes and are instead handled by a helper that picks the appropriate user / group based on the platform

Changed

  • The memcached_instance definition that used both passed values and node attributes for configuration has been rewritten as a 12.5 custom resource with compat_resource providing backwards compatibility to all Chef 12.X releases. This new custom resource handles the installation of memcached and all configuration is passed in via custom resource properties. See the readme for examples of how to use this new resource. This change should greatly improve the ability to use memcached_instance within wrapper cookbooks.

[1.9.0] - 2015-11-05

NOTE: This will be the last version of this cookbook that supports Chef 11 and the traditional attribute / resource hybrid setup for memcached instances. After this release this cookbook will function with attributes for a simple install or Chef 12.5 custom resources for creating individual memcached instances. If you utilize memcached instances using the attributes to define the config you'll need to pin to ~1.0 and later update to the new format in ~2.0.

Removed

  • Use of shellout that was causing issues for users
  • All hash rockets
  • Yum as a dependency as it wasn't being used.
  • Attributes from the metadata as they hadn't been updated

Added

  • Oracle to the metadata
  • Issues_url and source_url to the metadata
  • New contributing.md, maintainers.md, and testing.md docs
  • Travis and cookbook version badges to the readme
  • Rakefile to simplify testing
  • .foodcritic file with exclusions
  • Chefignore file

Changed

  • Clarified Chef 11 is the minimum required chef release
  • Updated platforms in the Kitchen config
  • Updated travis to use their container infrastructure, chef-dk for testing deps, and kitchen-docker for integration testing
  • Debian/Ubuntu switched the user that memcached runs under from nobody to memcache. Updated the cookbook to use this user on those platforms and create it in case we're on an older distro release that didn't yet have that user
  • Improved the workaround on Debian/Ubuntu for not starting the service on package install so that it doesn't show up as a changed resource on every Chef run
  • Updated Chefspec to 4.X and added additional specs

[1.8.0] - 2015-08-11

Added

  • Attributes logfilepath, version, threads, experimental_options, and ulimit

Changed

  • Updated serverspec tests to pass (See 3c7b5c9)
  • Deconflict memcached_instance runit definition from default init (See b06d2d)
  • Split default.rb into install.rb and configure.rb so that memcached_instance only starts the specified number of instances

NOTE: if memcached_instance name is not specified or set to "memcached", the instance name will be "memcached". If anything else is specified, the instance name will be "memcached-${name}"

[1.7.2] - 2014-03-12

Changed

  • [COOK-4308] - Enable memcache on RHEL, Fedora, and Suse
  • [COOK-4212] - Support max_object_size rhel and fedora

[1.7.0] - 2013-12-18

Changed

  • Updating for yum ~> 3.0. Fixing up style issues for rubocop. Updating test-kitchen harness

[1.6.6] - 2013-12-12

Fixed

  • Metadata version error. locking to 3.0

[1.6.4] - 2013-12-12

Changed

  • Locking yum dependency to '< 3'

[1.6.2] - 2013-10-26

Changed

  • [COOK-3741] UDP settings for memcached

[1.6.0] - 2013-10-04

Changed

  • COOK-3682 - Set user when using Debian packages
  • COOK-3336 - Add an option to specify the logfile (fix)

[1.5.0] - 2013-08-28

Added

Changed

  • COOK-3299 - Document that memcached is exposed by default
  • COOK-2990 - Include listen, maxconn, and user in the runit service

[1.4.0] - 2013-05-23

Added

  • [COOK-2756]: SUSE support to memcached cookbook
  • [COOK-2600]: support memcached on SmartOS

Removed

  • [COOK-2791]: Remove the template for Karmic from the memcached cookbook

[1.3.0] - 2013-02-14

Changed

  • [COOK-2386] - update memcached_instance definition for runit_service resource

[1.2.0] - 2013-01-25

Changed

  • [COOK-1469] - include yum epel recipe on RHEL 5 (introduces yum cookbook dependency)
  • [COOK-2266] - pin runit dependency

Fixed

  • [COOK-2202] - Typo in previous ticket/commits

[1.1.2] - 2012-12-18

Changed

  • [COOK-990] - params insite runit_service isn't the same as outside

[1.1.0] - 2012-11-27

Added

  • [COOK-1764] - Max Connections to memcached.conf and fix typos

[1.0.4] - 2012-08-22

Changed

  • [COOK-1192] - metadata doesn't include RH platforms (supported)
  • [COOK-1354] - dev package changed name on centos6

[1.0.2] - 2012-03-08

Added

  • [COOK-1081] - support for centos/rhel

[1.0.0] - 2012-02-28

Added

  • [COOK-706] - Additional info in README
  • [COOK-828] - Package for RHEL systems

[0.10.4] - 2012-02-28

Changed

  • Preparing repository for splitting cookbooks into their own repos

Collaborator Number Metric
            

6.0.0 passed this metric

Contributing File Metric
            

6.0.0 passed this metric

Foodcritic Metric
            

6.0.0 passed this metric

No Binaries Metric
            

6.0.0 passed this metric

Publish Metric
            

6.0.0 passed this metric

Supported Platforms Metric
            

6.0.0 passed this metric

Testing File Metric
            

6.0.0 passed this metric

Version Tag Metric
            

6.0.0 passed this metric