Automate liveness agent sends keepalive messages to Chef Automate, which prevents nodes that are up but not frequently running Chef Client from appearing as "missing" in the Automate UI.
For more info about Chef Automate, see https://www.chef.io/automate/.
Automate liveness agent is designed to be installed via Chef's "Required Recipe" feature, which is in development. Check back later for full instructions.
Usage instructions will be made available once this software is released.
The config file is a JSON formatted file like this:
{
"chef_server_fqdn": "api.chef.io",
"client_key_path": "/etc/chef/client.pem",
"client_name": "example-node",
"daemon_mode": true,
"data_collector_url": "https://api.chef.io/organizations/chef-oss-dev/data-collector",
"entity_uuid": "3D0F27ED-AA32-4C73-9A18-F342AAABAA62",
"install_check_file": "/opt/chef/embedded/bin/ruby",
"log_file": "/var/log/chef/automate-liveness-agent/automate-liveness-agent.log",
"org_name": "chef-oss-dev",
"scheduled_task_mode": false
"ssl_ca_file": null,
"ssl_ca_path": null,
"ssl_verify_mode": "verify_peer",
"trusted_certs_dir": null,
"unprivileged_uid": 100,
"unprivileged_gid": 200,
}
Settings:
chef_server_fqdn
: what it saysclient_key_path
: Private key used by Chef Client to authenticate API requestsclient_name
: identity used by Chef Client to authenticate API requestsdaemon_mode
: Whether or not the process should daemonizedata_collector_url
: Org-specific data collector endpoint on the Chef Serverentity_uuid
: UUID generated by Chef Client to identify itself to the data collectorinstall_check_file
: Agent will check for this file to detect if chef client has been uninstalled. Setting it to Chef'sGem.ruby
should work. Setting tonull
disables the checklog_file
: Where the agent should output log entriesorg_name
: Chef Server organization namescheduled_task_mode
: Run in single shot mode, eg: update once and exitssl_ca_file
: Override the default CA bundle with a custom filessl_ca_path
: Override the default CA bundle with a directory containing a CA bundlessl_verify_mode
: The SSL verification mode. eg:verify_peer
orverify_none
trusted_certs_dir
: A directory with trusted SSL certificatesunprivileged_uid
: Agent will change it's uid to this after start up. Setting tonull
disables thatunprivileged_gid
: Agent will change it's gid to this after start up. Setting tonull
disables thatinterval
: The number of seconds between agent checkins, defaults to 1800
Setting DEBUG=1
will enable logging of HTTP request data.
By default, the liveness agent will send an update every 30 minutes.
Setting the INTERVAL
variable will configure the agent to send an
update to the specified value (in seconds).
This application is designed to run with rubygems disabled. This can be
done by setting RUBYOPT
like so:
RUBYOPT="--disable-gems"
There are a lot of ways to tune the ruby GC, but setting
RUBY_GC_HEAP_GROWTH_MAX_SLOTS
is an easy way to prevent ruby from
allocating too much extra memory we don't want it to have.
RUBY_GC_HEAP_GROWTH_MAX_SLOTS=500
This project is developed as a typical ruby app with bundler and rspec.
To install deps:
bundle install
To run tests:
bundle exec rspec
To test the compiled recipe on a target platform:
rake compile_recipe vendor_stable_recipe
kitchen converge required-faux-chef-automate
kitchen test $target-platform
To see supported platforms:
kitchen list
Bug reports should be filed with your support representitive.