New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support arbitrary customization of logrotate configurations #107

Closed
nickmarden opened this Issue Aug 29, 2017 · 0 comments

Comments

Projects
None yet
1 participant
@nickmarden
Contributor

nickmarden commented Aug 29, 2017

As an opsworks_ruby user, I'd like to be able to configure any and all options related to logrotate generation for my application, so that I can deploy it an environment where the default logrotate_app behaviors in Drivers::Dsl::Logrotate would be deemed acceptable.

Implementation expectations:

  • node['deploy'][app_name][driver_type]['logrotate_name'] and node['deploy'][app_name][driver_type]['logrotate_log_paths'] (driver_type =framework or webserver) can be used to override the framework- or webserver-level defaults for logrotate_app resource name, and path property, respectively. These two settings would not have node['defaults']['global'], node['defaults'][driver_type] or node['deploy'][app_name]['global'] equivalent settings because it is meaningless to talk about a cookbook-wide or app-wide default for either setting; it must be an app+driver_type-level setting. The app+driver_type-level defaults for these two settings would continue to be "#{app['shortname']}-#{adapter}-#{deploy_env}" and whatever is set via the class method .log_paths, respectively.
  • As a special case, setting node['deploy'][app_name][driver_type]['logrotate_log_paths'] to an empty array ([]) will disable logrotate file generation for that app+driver_type.
  • Any other setting X related to logrotate can be configured by setting one of the four following settings, in the following order from highest to lowest precedence:
    • node['deploy'][app_name][driver_type]['logrotate_X']
    • node['deploy'][app_name]['global']['logrotate_X']
    • node['defaults'][driver_type]['logrotate_X']
    • node['defaults']['global']['logrotate_X']
      Only properties for which an explicit setting exists at one of these four levels will explicitly configured in the corresponding logrotate_app resource. Global defaults:
    • logrotate_rotate: 30
    • logrotate_frequency: 'daily'
    • logrotate_options: %w[missingok compress delaycompress notifempty copytruncate sharedscripts]

nickmarden added a commit to RapidRiverSoftware/opsworks_ruby that referenced this issue Aug 29, 2017

nickmarden added a commit to RapidRiverSoftware/opsworks_ruby that referenced this issue Aug 29, 2017

nickmarden added a commit to RapidRiverSoftware/opsworks_ruby that referenced this issue Aug 30, 2017

nickmarden added a commit to RapidRiverSoftware/opsworks_ruby that referenced this issue Aug 30, 2017

nickmarden added a commit to RapidRiverSoftware/opsworks_ruby that referenced this issue Aug 30, 2017

nickmarden added a commit to RapidRiverSoftware/opsworks_ruby that referenced this issue Aug 30, 2017

nickmarden added a commit to RapidRiverSoftware/opsworks_ruby that referenced this issue Aug 30, 2017

nickmarden added a commit to RapidRiverSoftware/opsworks_ruby that referenced this issue Aug 31, 2017

nickmarden added a commit to RapidRiverSoftware/opsworks_ruby that referenced this issue Aug 31, 2017

nickmarden added a commit to RapidRiverSoftware/opsworks_ruby that referenced this issue Aug 31, 2017

@ajgon ajgon closed this in #109 Aug 31, 2017

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