logstash/lib/pluginmanager/ui.rb
Pier-Hugues Pellerin 00e225a849 Feature: A way to install/remove a plugin pack
A pack in this context is a *bundle* of plugins that can be distributed outside of rubygems; it is similar to what ES and kibana are doing, and
the user interface is modeled after them. See https://www.elastic.co/downloads/x-pack

**Do not mix it with the `bin/logstash-plugin pack/unpack` command.**

- it contains one or more plugins that need to be installed
- it is self-contains with the gems and the needed jars
- it is distributed as a zip file
- the file structure needs to follow some rules.

- As a reserved name name on elastic.co download http server
    - `bin/plugin install logstash-mypack` will check on the download server if a pack for the current specific logstash version exist and it will be downloaded, if it doesn't exist we fallback on rubygems.
    - The file on the server will follow this convention `logstash-mypack-{LOGSTASH_VERSION}.zip`

- As a fully qualified url
    - `bin/plugin install http://test.abc/logstash-mypack.zip`, if it exists it will be downloaded and installed if it does not we raise an error.

- As a local file
    - `bin/plugin install file:///tmp/logstash-mypack.zip`, if it exists it will be installed

Fixes #6168
2016-11-17 14:00:02 -05:00

24 lines
467 B
Ruby

# encoding: utf-8
module LogStash module PluginManager
# The command line commands should be able to report but they shouldn't
# require an explicit logger like log4j.
class Shell
def info(message)
puts message
end
alias_method :error, :info
alias_method :warn, :info
def debug(message)
puts message if ENV["DEBUG"]
end
end
def self.ui
@ui ||= Shell.new
end
def self.ui=(new_ui)
@ui = new_ui
end
end end