Commit graph

7 commits

Author SHA1 Message Date
Josh Soref
df57e410cc Spelling fixes (#6806)
Spelling fixes across the board.
2017-04-04 12:07:16 -07:00
Pier-Hugues Pellerin
5ba9d77457 Downloading gem in binary format
This PR chagne the File's open mode to make sure we correctly download
the file in binary mode on windows, without doing that the gem will be
corrupt and will throw the following message.

```
ERROR:  While executing gem ... (Gem::Package::FormatError)
    package is corrupt, exception while verifying: Unexpected end of ZLIB input stream (Zlib::GzipFile::Error) in logstash-filter-dissect-1.0.8.gem
```

Fixes #6840
2017-03-24 14:07:57 -04:00
Pier-Hugues Pellerin
1b812af23c Add bin/logstash-plugin prepare-offline-pack command
This new command replace the old workflow of `pack`, `unpack` and the `install --local`, and wrap all the logic into one uniform way of installing plugins.
The work is based on the flow developed for installing an x-pack inside Logstash, when you call prepare-offline-pack, the specified plugins and their dependencies will be packaged in a zip.
And this zip can be installed with the same flow as the pack.

Definition:

Source Logstash: Where you run the prepare-offline-pack.
Target Logstash: Where you install the offline package.

PROS:
- If you install a .gem in the source logstash, the .gem and his dependencies will be bundled.
- The install flow doesn't need to have access to the internet.
- Nothing special need to be setup in the target logstash environment.

CONS:
- The is one minor drawback, the plugins need to have their JARS bundled with them for this flow to work, this is currently the case for all the official plugins.
- The source Logstash need to have access to the internet when you install plugins before packaging them.

Usage examples:
bin/logstash-plugin prepare-offline-pack logstash-input-beats
bin/logstash-plugin prepare-offline-pack logstash-filter-jdbc logstash-input-beats
bin/logstash-plugin prepare-offline-pack logstash-filter-*
bin/logstash-plugin prepare-offline-pack logstash-filter-* logstash-input-beats

How to install:
bin/logstash-plugin install file:///tmp/logstash-offline-plugins-XXXX.zip

Fixes #6404
2017-01-03 13:59:51 -05:00
Pier-Hugues Pellerin
6791bedfc5 Adding the unit tests and an integration test for the gem pack
Fixes #6271
2016-12-16 10:13:10 -05:00
Pier-Hugues Pellerin
468876c3f0 code reorg and adding unit tests
Fixes #6271
2016-12-16 10:13:10 -05:00
Pier-Hugues Pellerin
c6c2fd9370 fix the readme and make sure we raise an exception when we dont understand the http response
Fixes #6271
2016-12-16 10:13:10 -05:00
Pier-Hugues Pellerin
01699a29e5 Feature: Paquet, a tool to pack dependencies
This tool allow to generate a logstash pack of plugin and it is required
by #6168.

This allow the developer to specify which gems it need to be included in
the pack, it will also take care get the parent dependencies.

```ruby
require "paquet"

TARGET_DIRECTORY = File.join(File.dirname(__FILE__), "dependencies")

Paquet::Task.new(TARGET_DIRECTORY) do
  pack "manticore"
  pack "gemoji"
  pack "logstash-output-elasticsearch"

  # Ignore some dependencies that the core will provide
  ignore "logstash-core-plugin-api"
  ignore "logstash-core"
end
```

Fixes #6271
2016-12-16 10:13:10 -05:00