Warning
Chef Backend is deprecated and no longer under active development. Contact your Chef account representative for information about migrating to Chef Automate HA.
This document is no longer maintained.
Run chef-backend-ctl gen-sample-backend-config to generate the chef-backend.rb file. This will control most of the various feature and configuration flags going into a Chef HA backend node. A number of these options control the reliability, stability, and uptime of the backend PostgreSQL databases, the Elasticsearch index, and the leader election system. Please refrain from changing them unless you have been advised to do so.
fqdnhide_sensitivefalse if you wish to print deltas of sensitive files and templates during chef-backend-ctl reconfigure runs.true.ip_version'ipv4' or 'ipv6'.'ipv4'.publish_addressSee https://github.com/chef-cookbooks/runit for details. Many of the flags are repeated across the various backend services, but they are only documented once at the top here. The same defaults are used unless specified below.
postgresql.enabletrue.postgresql.environmentpostgresql.log_directorysvlogd log service will run.'/var/log/chef-backend/postgresql/<version>'.postgresql.log_rotation.file_maxbytes104857600 (100MB).postgresql.log_rotation.num_to_keep10.etcd.enabletrue.etcd.log_directorysvlogd log service will run.'/var/log/chef-backend/etcd'.etcd.log_rotation.file_maxbytes104857600 (100MB).etcd.log_rotation.num_to_keep10.elasticsearch.enabletrue.elasticsearch.log_directorysvlogd log service will run. Also affects path.logs in the Elasticsearch configuration YAML.'/var/log/chef-backend/elasticsearch'.elasticsearch.log_rotation.file_maxbytes104857600 (100MB).elasticsearch.log_rotation.num_to_keep10.leaderl.enabletrue.leaderl.log_directorysvlogd log service will run.'/var/log/chef-backend/leaderl'.leaderl.start_downdown by creating <sv_dir>/down file.true.leaderl.log_rotation.file_maxbytes104857600 (100MB).leaderl.log_rotation.num_to_keep10.postgresql.db_superuserchef-backend-secrets.json.'chef_pgsql'.postgresql.md5_auth_cidr_addressessamehost and samenet are special symbols to allow connections from the this node’s IP address and its subnet. You may also use all to match any IP address. You may specify a hostname or IP address in CIDR format (172.20.143.89/32 for a single host, or 172.20.143.0/24 for a small network. See https://www.postgresql.org/docs/9.5/static/auth-pg-hba-conf.html for alternative formats.["samehost", "samenet"].postgresql.replication_user'replicator'.postgresql.username'chef_pgsql'.postgresql.conf
See PostgreSQL’s documentation for details. Some defaults are provided:
postgresql.archive_command''.postgresql.archive_mode'off'.postgresql.archive_timeout0.postgresql.checkpoint_completion_target0.5.postgresql.checkpoint_timeout'5min'.postgresql.checkpoint_warning'30s'.postgresql.effective_cache_sizepostgresql.hot_standby'on'.postgresql.keepalives_counttcp_keepalives_count.2.postgresql.keepalives_idletcp_keepalives_idle.60.postgresql.keepalives_intervaltcp_keepalives_interval.15.postgresql.log_checkpointstrue.postgresql.log_min_duration_statement-1.postgresql.max_connections350.postgresql.max_replication_slots12.postgresql.max_wal_senders12.postgresql.max_wal_size64.postgresql.min_wal_size5.postgresql.port5432.postgresql.shared_bufferspostgresql.wal_keep_segments32.postgresql.wal_level'hot_standby'.postgresql.wal_log_hintson.postgresql.work_mem'8MB'.etcd.client_port2379.etcd.peer_port2380.The following settings relate to etcd’s consensus protocol. Chef Backend builds its own leader election on top of etcd’s consensus protocol. Updating these settings may be advisable if you are seeing frequent failover events as a result of spurious etcd connection timeouts. The current defaults assume a high-latency environment, such as those you might find if deploying Chef Backend to various cloud providers.
etcd.heartbeat_interval500, (100 by default before Chef Backend 1.2).etcd.election_timeoutetcd.heartbeat_interval. Increasing etcd.election_timeout increases the time it will take for etcd to detect a failure.5000, (1000 by default before Chef Backend 1.2).etcd.snapshot_count5000.etcd.ionice.class2.etcd.ionice.leveletcd.ionice.class is changed, but in almost all cases it should not be modified.0.Note
See etcd’s documentation on tunables for more information.
elasticsearch.heap_sizeelasticsearch.java_optselasticsearch.new_sizeSee Elasticsearch’s configuration documentation for additional information.
elasticsearch.plugins_directorypath.plugins value.'/var/opt/chef-backend/elasticsearch/plugins'.elasticsearch.porthttp.port value.9200.elasticsearch.scripts_directorypath.scripts value.'/var/opt/chef-backend/elasticsearch/scripts'.leaderl.db_timeout2000.leaderl.http_acceptors10.leaderl.http_address127.0.0.1. It should be reachable from any front-end node.'0.0.0.0'.leaderl.http_port7331.leaderl.leader_ttl_seconds30. (10 by default before Chef Backend 1.2).leaderl.required_active_followers0.leaderl.runsv_group'chef_pgsql'.leaderl.status_internal_update_interval_seconds5.leaderl.status_post_update_interval_seconds10.leaderl.usernamepostgresql.username.'chef_pgsql'.leaderl.log_rotation.max_messages_per_second1000.leaderl.etcd_pool.ibrowse_optionsleaderl.epmd_monitor.check_interval60000.leaderl.health_check.interval_secondsleaderl.leader_ttl_seconds.5, (2 by default before version Chef Backend 1.2).leaderl.health_check.max_bytes_behind_leader52428800 (50MB).leaderl.health_check.max_elasticsearch_failures5.leaderl.health_check.max_etcd_failures5.leaderl.health_check.max_pgsql_failures5.leaderl.health_check.fatal_system_checksfalse.leaderl.health_check.disk_paths[/var/log/chef-backend, /var/opt/chef-backend].leaderl.health_check.disk_min_space_mb250.See https://github.com/seth/pooler/blob/master/README.org for details. These are internal settings that affect the responsiveness, uptime and reliability of the backend cluster. They should not be modified unless you are advised to do so by Support.
leaderl.etcd_pool.cull_interval_seconds60.leaderl.etcd_pool.http_timeout_ms5000.leaderl.etcd_pool.init_count10.leaderl.etcd_pool.max_age_seconds60.leaderl.etcd_pool.max_connection_duration_seconds300.leaderl.etcd_pool.max_count10.If certificate and certificate_key are nil, the SSL Certificate will be auto-generated using the other parameters provided. Otherwise, they are on-disk locations to user-provided certificate.
ssl.certificatessl.certificate_keyssl.ciphersssl.company_namessl.country_namessl.data_dir'/var/opt/chef-backend/ssl/'.ssl.duration3650 (10 years).ssl.key_length2048.ssl.organizational_unit_nameThe Chef Infra Server backend HA cluster includes a command-line utility named chef-backend-ctl. This command-line tool is used to manage the Chef Infra Server backend HA cluster, start and stop individual services, and tail Chef Infra Server log files. For more information, see the chef-backend-ctl documentation.
© Chef Software, Inc.
Licensed under the Creative Commons Attribution 3.0 Unported License.
The Chef™ Mark and Chef Logo are either registered trademarks/service marks or trademarks/servicemarks of Chef, in the United States and other countries and are used with Chef Inc's permission.
We are not affiliated with, endorsed or sponsored by Chef Inc.
https://docs.chef.io/server/config_rb_backend/