Skip to content

Policyfiles and chef-apply/chef-run #145

Description

@kmf

Describe the Enhancement:

Running chef-run somehost.com my_policyfile.rb

Describe the Need:

Using a wrapper cookbook is cumbersome in adhoc situations.

Current Alternative

  • chef cookbook generate install_datadog
  • add dependancy datadog to install_datadog/metadata.rb
depends 'datadog'

  • add install code to install_datadog/recipes/default.rb
include_recipe 'datadog::dd-agent'

  • add attributes to install_datadog/attributes/default.rb
default['datadog']['api_key'] = '8uLllbAPTnxa39z42M'
default['datadog']['application_key'] = 'WlmB9RYwGzzhLHKn81'
default['datadog']['enable_process_agent'] = true

  • ensure you are in the right path
  • chef-run somehost.com install_datadog or chef-apply somehost.com install_datadog

With the Beauty of a Policyfile

  • chef generate policyfile install_datadog
  • add code to ONE file install_datadog.rb
name 'install_datadog'
default_source :supermarket
run_list 'datadog::dd-agent'
default['datadog']['api_key'] = '8uLllbAPTnxa39z42M'
default['datadog']['application_key'] = 'WlmB9RYwGzzhLHKn81'
default['datadog']['enable_process_agent'] = true
  • chef-run somehost.com install_datadog.rb or chef-apply somehost.com install_datadog.rb

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Aspect: UXHow users feel interacting with the project, focusing on function, ease-of-use and accessibility.Triage: ConfirmedIndicates and issue has been confirmed as described.Triage: Feature RequestIndicates an issue requesting new functionality.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions