百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
C

cassandra-chef-cookbook

> 编程语言
开源

用于 Apache Cassandra、DataStax Enterprise (DSE) 和 DataStax 代理的主厨手册

163 stars0 点赞0 次浏览
访问官网GitHub

工具介绍

用于 Apache Cassandra、DataStax Enterprise (DSE) 和 DataStax 代理的主厨手册

Apache Cassandra Chef Cookbook

This is a Chef cookbook for Apache Cassandra (DataStax Community Edition) as well as DataStax Enterprise.

It uses officially released packages and provides an Upstart service script. It has fairly complete support for adjustment of Cassandra configuration parameters using Chef node attributes.

It was originally created for CI and development environments and now supports cluster discovery using Chef search. Feel free to contribute what you find missing!

Supported Chef Versions

This cookbook targets Chef 12 and later versions.

Cookbook Dependencies

ruby
depends 'java'
depends 'ulimit'
depends 'apt'
depends 'yum'
depends 'ark'

Cassandra Dependencies

Modern Cassandra versions require OracleJDK 8.

Berkshelf

Most Recent Release

ruby
cookbook 'cassandra-dse', '~> 4.5.0'

From Git

ruby
cookbook 'cassandra-dse', github: 'michaelklishin/cassandra-chef-cookbook'

Supported Apache Cassandra Version

This cookbook currently provides

  • Cassandra via tarballs
  • Cassandra (DataStax Community Edition) via apt and yum packages
  • DataStax Enterprise (DSE) via packages

Supported OS Distributions

  • Ubuntu 14.04 through 18.04 via DataStax apt repo.
  • RHEL/CentOS via DataStax yum repo.
  • RHEL/CentOS/Amazon via tarball

Support JDK Versions

Cassandra 2.x requires JDK 7+, later versions require Oracle JDK 8+.

Recipes

The main recipe is cassandra-dse::default which together with the node[:cassandra][:install_method] attribute will be responsible for including the proper installation recipe and recipe cassandra-dse::config for configuring both datastax and tarball C* installation.

Two actual installation recipes are cassandra-dse::tarball and cassandra-dse::datastax. The former uses official tarball and thus can be used to provision any specific version.

The latter uses DataStax repository via packages. You can install different versions (ex. dsc20 for v2.0) available in the repository by altering :package_name attribute (dsc20 by default).

Recently we have moved all the configuration resources to a separate recipe cassandra-des::config, which means recipes cassandra-dse::tarball and cassandra-dse::datastax are only responsible for C* installation.

Users with cookbook version `=v2.1 Attributes

  • node[:cassandra][:config][:broadcast_rpc_address] RPC address to broadcast to drivers and other Cassandra nodes (default: node[:ipaddress])
  • node[:cassandra][:config][:tombstone_failure_threshold] tombstone attribute, check C* documentation for more info (default: 100000)
  • node[:cassandra][:config][:tombstone_warn_threshold] tombstone attribute, check C* documentation for more info (default: 1000)
  • node[:cassandra][:config][:sstable_preemptive_open_interval_in_mb] This helps to smoothly transfer reads between the sstables, reducing page cache churn and keeping hot rows hot (default: 50)
  • node[:cassandra][:config][:memtable_allocation_type] Specify the way Cassandra allocates and manages memtable memory (default: heap_buffers)
  • node[:cassandra][:config][:index_summary_capacity_in_mb] A fixed memory pool size in MB for for SSTable index summaries. If left empty, this will default to 5% of the heap size (default: nil)
  • node[:cassandra][:config][:index_summary_resize_interval_in_minutes] How frequently index summaries should be resampled (default: 60)
  • node[:cassandra][:config][:concurrent_counter_writes] Concurrent writes, since writes are almost never IO bound, the ideal number of "concurrent_writes" is dependent on the number of cores in your system; (8 * number_of_cores) (default: 32)
  • node[:cassandra][:config][:counter_cache_save_period] Duration in seconds after which Cassandra should save the counter cache (keys only) (default: 7200)
  • node[:cassandra][:config][:counter_cache_size_in_mb] Counter cache helps to reduce counter locks' contention for hot counter cells. Default value is empty to make it "auto" (min(2.5% of Heap (in MB), 50MB)). Set to 0 to disable counter cache. (default: nil)
  • node[:cassandra][:config][:counter_write_request_timeout_in_ms] How long the coordinator should wait for counter writes to complete (default: 5000)
  • node[:cassandra][:config][:commit_failure_policy] policy for commit disk failures (default: stop)
  • node[:cassandra][:config][:cas_contention_timeout_in_ms] How long a coordinator should continue to retry a CAS operation that contends with other proposals for the same row (default: 1000)
  • node[:cassandra][:config][:batch_size_warn_threshold_in_kb] Log WARN on any batch size exceeding this value. 5kb per batch by default (default: 5)
  • node[:cassandra][:config][:batchlog_replay_throttle_in_kb] Maximum throttle in KBs per second, total. This will be reduced proportionally to the number of nodes in the cluster (default: 1024)

JAMM Attributes

  • node[:cassandra][:setup_jamm] (default: false): install the jamm jar file and use it to set java option -javaagent, obsolete for C* versions >v0.8.0
  • node[:cassandra][:jamm][:sha256sum] (default: calculated): jamm lib sha256sum for calculated version
  • node[:cassandra][:jamm][:base_url] (default: calculated): jamm lib jar url
  • node[:cassandra][:jamm][:jar_name] (default: calculated): jamm lib jar name
  • node[:cassandra][:jamm][:version] (default: calculated): jamm lib version

JNA Attributes (Prior C* version 2.1.0)

  • node[:cassandra][:jna][:base_url] The base url to fetch the JNA jar (default: https://github.com/twall/jna/tree/4.0/dist)
  • node[:cassandra][:jna][:jar_name] The name of the jar to download from the base url. (default: jna.jar)
  • node[:cassandra][:jna][:sha256sum] The SHA-256 checksum of the file. If the local jna.jar file matches the checksum, the chef-client will not re-download it. (default: dac270b6441ce24d93a96ddb6e8f93d8df099192738799a6f6fcfc2b2416ca19)

Priam Attributes

  • node[:cassandra][:setup_priam] (default: false): install the priam jar file and use it to set java option -javaagent, uses the priam version corresponding to the cassandra version
  • node[:cassandra][:priam][:sha256sum] (default: 9fde9a40dc5c538adee54f40fa9027cf3ebb7fd42e3592b3e6fdfe3f7aff81e1): priam lib sha256sum for version 2.2.0
  • node[:cassandra][:priam][:base_url] (default: priam url on maven.org): priam lib jar url
  • node[:cassandra][:priam][:jar_name] (default: calculated): priam lib jar name

Logback Attributes

  • node[:cassandra][:logback][:file][:max_file_size] (default: "20MB"): logback File appender log file rotation size
  • node[:cassandra][:logback][:file][:max_index] (default: 20): logback File appender log files max_index
  • node[:cassandra][:logback][:file][:min_index] (default: 1): logback File appender log files min_index
  • node[:cassandra][:logback][:file][:pattern] (default: "%-5level [%thread] %date{ISO8601} %F:%L - %msg%n"): logback File appender log pattern
  • node[:cassandra][:logback][:debug][:enable] (default: false): enable logback File appender log debug
  • node[:cassandra][:logback][:debug][:max_file_size] (default: "20MB"): logback File appender log file rotation size
  • node[:cassandra][:logback][:debug][:max_index] (default: 20): logback File appender log files max_index
  • node[:cassandra][:logback][:debug][:min_index] (default: 1): logback File appender log files min_index
  • node[:cassandra][:logback][:debug][:pattern] (default: "%-5level [%thread] %date{ISO8601} %F:%L - %msg%n"): logback File appender log pattern
  • node[:cassandra][:logback][:stdout][:enable] (default: true): enable logback STDOUT appender
  • node[:cassandra][:logback][:stdout][:pattern] (default: "%-5level %date{HH:mm:ss,SSS} %msg%n"): logback STDOUT appender log pattern
  • node[:cassandra][:logback][:syslog][:enable] (default: false): enable logback SYSLOG appender. Requires RSYSLOG be installed and running on the node.
  • node[:cassandra][:logback][:syslog][:host] (default: localhost): The host name the syslog is written to.
  • node[:cassandra][:logback][:syslog][:facility] (default: USER) The facility specified for the appender.
  • node[:cassandra][:logback][:syslog][:pattern] (default: "%-5level [%thread] %F:%L - %msg%n") lockback SYSLOG appender log pattern
  • node[:cassandra][:logback][:override_loggers] (default: {}) Override log level of specific logger (i.e { 'org.apache.cassandra.utils.StatusLogger' => 'WARN' })

Ulimit Attributes

  • node[:cassandra][:limits][:memlock] (default: "unlimited"): memory ulimit for Cassandra node process
  • node[:cassandra][:limits][:nofile] (default: 48000): file ulimit for Cassandra node process
  • node[:cassandra][:limits][:nproc] (default: "unlimited"): process ulimit for Cassandra node process

Yum Attributes

  • node[:cassandra][:yum][:repo] (default: datastax): name of the repo from which to install
  • node[:cassandra][:yum][:description] (default: "DataStax Repo for Apache Cassandra"): description of the repo
  • node[:cassandra][:yum][:baseurl] (default: "http://rpm.datastax.com/community"): repo url
  • node[:cassandra][:yum][:mirrorlist] (default: nil): a mirrorlist file
  • node[:cassandra][:yum][:gpgcheck] (default: false): whether to use gpgcheck
  • node[:cassandra][:yum][:enabled] (default: true): whether the repo is enabled by default
  • node[:cassandra][:yum][:options] (default: ""): Additional options to pass to yum_package

OpsCenter Attributes

DataStax Ops Center Server attributes

  • node[:cassandra][:opscenter][:server][:package_name] (default: opscenter-free)
  • node[:cassandra][:opscenter][:server][:port] (default: 8888)
  • node[:cassandra][:opscenter][:server][:interface] (default: 0.0.0.0)
  • node[:cassandra][:opscenter][:server][:authentication] (default: false)
  • node[:cassandra][:opscenter][:cassandra_metrics][:ignored_keyspaces] (default: [system, OpsCenter])
  • node[:cassandra][:opscenter][:cassandra_metrics][:ignored_column_families] (default: [])
  • node[:cassandra][:opscenter][:cassandra_metrics][:1min_ttl] (default: 604800)
  • node[:cassandra][:opscenter][:cassandra_metrics][:5min_ttl] (default: 2419200)
  • node[:cassandra][:opscenter][:cassandra_metrics][:2hr_ttl] (default: 31536000)
  • node[:cassandra][:opscenter][:custom_configuration] (default: {}) a hash of custom configuration sections to add to opscenterd.conf, e.g.:
{
 'ui' => {
   'default_api_timeout' => 300
 },
 'stat_reporter' => {
   'interval' => 1
 }
}

DataStax Ops Center Agent Tarball attributes

  • node[:cassandra][:opscenter][:agent][:download_url] (default: "") Required. You need to specify agent download url, because that could be different for each opscenter server version. ( S3 is a great place to store packages )
  • node[:cassandra][:opscenter][:agent][:checksum] (default: nil)
  • node[:cassandra][:opscenter][:agent][:install_dir] (default: /opt)
  • node[:cassandra][:opscenter][:agent][:install_folder_name] (default: opscenter_agent)
  • node[:cassandra][:opscenter][:agent][:binary_name] (default: opscenter-agent) Introduced since Datastax changed agent binary name from opscenter-agent to datastax-agent. Make sure to set it right if you are updating to 4.0.2
  • node[:cassandra][:opscenter][:agent][:server_host] (default: "" ). If left empty, will use search to get IP by opscenter server_role role.
  • node[:cassandra][:opscenter][:agent][:server_role] (default: opscenter_server). Will be use for opscenter server IP lookup if :server_host is not set.
  • node[:cassandra][:opscenter][:agent][:use_chef_search] (default: true). Determines whether chef search will be used for locating the data agent server.
  • `node[:cassandra][:opscenter][:agent][:use_

Issues· 15 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Rubycassandrachefchef-cookbookcookbook

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言