Skip to content
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

BREAKING: Create grafana_plugin resource type and change grafana::plugins #63

Merged
merged 1 commit into from
Sep 20, 2017
Merged

Conversation

wyardley
Copy link

@wyardley wyardley commented Sep 20, 2017

This switches grafana plugins to be configured via type / provider.

  • It replaces the grafana::plugin defined type with a (not backwards-compatible) grafana::plugins passthrough to create_resources.
  • It now implements deinstallation [ensuring specific versions is not yet implemented], and the ability to run puppet resource ...
  • Installing a plugin will restart the service (currently not configurable).

@wyardley
Copy link
Author

@bastelfreak @ekohl did a few more updates. Could still probably have some slight improvements, but I think this is ready for review.

@bastelfreak bastelfreak merged commit bfc24c8 into voxpupuli:master Sep 20, 2017
@wyardley wyardley mentioned this pull request Sep 20, 2017
@sfinke0
Copy link

sfinke0 commented Sep 20, 2017

Is there a way to use this with http_proxy since my Grafana servers are not allowed to connect to the internet directly?

@wyardley
Copy link
Author

@carazzim0 FWIW, it still uses grafana-cli as the provider, so if that works, you should be good.

@wyardley wyardley deleted the plugin_types branch September 20, 2017 21:15
@sfinke0
Copy link

sfinke0 commented Sep 21, 2017

@wyardley currently I use my custom provider for plugins using an exec ressource. This is the only way I can install plugins.

  exec{"install ${plugin}":
    environment => [
      "http_proxy=http://${proxy}",
      "https_proxy=http://${proxy}",
    ],
    command     => "/usr/sbin/grafana-cli plugins install ${plugin}",
    creates     => "/var/lib/grafana/plugins/${plugin}",
    notify      => Service['grafana-server'],
  }

How could this be implemented?

@wyardley
Copy link
Author

wyardley commented Sep 21, 2017

@carazzim0 I'm not sure whether adding support for it would be useful for the module in general
From a quick search, seems like it might work to add a Exec { environment => [ "foo=$bar" ] } in the Puppet run before including the class (or configure it wherever global env vars for non-interactive sessions get set)? Or, you can set env variables for the provider's call in
https://github.com/voxpupuli/puppet-grafana/blob/master/lib/puppet/provider/grafana_plugin/grafana_cli.rb#L3

similar to what's done here:
https://github.com/voxpupuli/puppet-rabbitmq/blob/master/lib/puppet/provider/rabbitmq_binding/rabbitmqadmin.rb#L11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants