Create override settings
When you created the Courier Runner skill definition in the previous section,
it contained a base64-encoded TOML string in the value of content
key. This TOML includes settings that can or should be overridden with settings for your Chef 360 Platform system.
When Node Management runs on a node, it executes Courier Runner using values in the TOML file that are set by values stored in the Courier Runner’s default settings or the Courier Runner’s override settings.
Prerequisites
Create override settings
Create node override settings for the Courier Runner and Gohai skills.
Create a file named
node-override-setting.json
and paste in the following JSON:{ "name":"sample-node-setting", "skills":[ { "skillName":"chef-gohai", "settings":[ { "name":"log_level", "value":"debug" }, { "name":"log_file_path", "value":"/hab/svc/chef-gohai/logs/logs.log" }, { "name":"log_to_file", "value": true }, { "name":"log_to_stdout", "value": false } ] }, { "skillName":"courier-runner", "settings":[ { "name":"credentials_api_key", "value":"" }, { "name":"credentials_api_secret", "value":"" }, { "name":"shell_interpreter", "value":"chef-platform/shell-interpreter" }, { "name":"restart_interpreter", "value":"chef-platform/restart-interpreter" }, { "name":"inspec_interpreter", "value":"chef-platform/inspec-interpreter" }, { "name":"chef_client_interpreter", "value":"chef-platform/chef-client-interpreter" }, { "name":"log_dir", "value":"/hab/svc/courier-runner/logs" }, { "name":"log_format", "value":"json" }, { "name":"log_level", "value":"debug" }, { "name":"log_output", "value":"file" }, { "name":"queue_provider", "value":"0" }, { "name":"reporter_authentication_type", "value":"basic" }, { "name":"reporter_dir", "value":"/hab/svc/courier-runner/data" }, { "name":"reporter_host_url", "value":"" }, { "name":"reporter_interval_in_sec", "value":"3" }, { "name":"reporter_name", "value":"server" }, { "name":"reporter_retry_interval_in_sec", "value":"4" }, { "name":"reporter_total_retry_duration_in_min", "value":"2" } ] } ] }
This JSON file creates settings for Courier Runner.
Use the
create-setting
subcommand to create the override setting:chef-node-management-cli management setting create-setting --body-file node-override-setting.json
which returns:
{ "item": { "settingId": "<SETTING_ID>" } }
Save the setting ID, you’ll use it to create a node cohort.
Verify that the setting was created.
chef-node-management-cli management setting find-one-setting --settingId <SETTING_ID>
More information
- See the documentation on override settings.