forked from elastic/logstash
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request elastic#4230 from palecur/offline-plugins
Adds new material to Managing Plugins
- Loading branch information
Showing
3 changed files
with
133 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
[[offline-plugins]] | ||
=== Offline Plugin Management | ||
|
||
The Logstash <<working-with-plugins,plugin manager>> was introduced in the 1.5 release. This section discusses setting up | ||
local repositories of plugins for use on systems without access to the Internet. | ||
|
||
The procedures in this section require a staging machine running Logstash that has access to a public or private Rubygems | ||
server. This staging machine downloads and packages the files used for offline installation. | ||
|
||
See the <<private-rubygem,Private Gem Repositories>> section for information on setting up your own private | ||
Rubygems server. | ||
|
||
[float] | ||
=== Building the Offline Package | ||
|
||
Working with offline plugins requires you to create an _offline package_, which is a compressed file that contains all of | ||
the plugins your offline Logstash installation requires, along with the dependencies for those plugins. | ||
|
||
. Create the offline package with the `bin/plugin pack` subcommand. | ||
+ | ||
When you run the `bin/plugin pack` subcommand, Logstash creates a compressed bundle that contains all of the currently | ||
installed plugins and the dependencies for those plugins. By default, the compressed bundle is a GZipped TAR file when you | ||
run the `bin/plugin pack` subcommand on a UNIX machine. By default, when you run the `bin/plugin pack` subcommand on a | ||
Windows machine, the compressed bundle is a ZIP file. See <<managing-packs,Managing Plugin Packs>> for details on changing | ||
these default behaviors. | ||
+ | ||
NOTE: Downloading all dependencies for the specified plugins may take some time, depending on the plugins listed. | ||
|
||
. Move the compressed bundle to the offline machines that are the source for offline plugin installation, then use the | ||
`bin/plugin unpack` subcommand to make the packaged plugins available. | ||
|
||
[float] | ||
=== Install or Update a local plugin | ||
|
||
To install or update a local plugin, use the `--local` option with the install and update commands, as in the following | ||
examples: | ||
|
||
.Installing a local plugin | ||
============ | ||
`bin/plugin install --local logstash-input-jdbc` | ||
============ | ||
|
||
.Updating a local plugin | ||
============ | ||
`bin/plugin update --local logstash-input-jdbc` | ||
============ | ||
|
||
[float] | ||
[[managing-packs]] | ||
=== Managing Plugin Packs | ||
|
||
The `pack` and `unpack` subcommands for `bin/plugin` take the following options: | ||
|
||
[horizontal] | ||
`--tgz`:: Generate the offline package as a GZipped TAR file. The default behavior on UNIX systems. | ||
`--zip`:: Generate the offline package as a ZIP file. The default behavior on Windows systems. | ||
`[packname] --override`:: Generates a new offline package that overwrites an existing offline with the specified name. | ||
`[packname] --[no-]clean`: Deletes offline packages matching the specified name. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
[[private-rubygem]] | ||
=== Private Gem Repositories | ||
|
||
The Logstash plugin manager connects to a Ruby gems repository to install and update Logstash plugins. By default, this | ||
repository is http://rubygems.org. | ||
|
||
Some use cases are unable to use the default repository, as in the following examples: | ||
|
||
* A firewall blocks access to the default repository. | ||
* You are developing your own plugins locally. | ||
* Airgap requirements on the local system. | ||
|
||
When you use a custom gem repository, be sure to make plugin dependencies available. | ||
|
||
Several open source projects enable you to run your own plugin server, among them: | ||
|
||
* https://github.com/geminabox/geminabox[Geminabox] | ||
* https://github.com/PierreRambaud/gemirro[Gemirro] | ||
* https://gemfury.com/[Gemfury] | ||
* http://www.jfrog.com/open-source/[Artifactory] | ||
|
||
==== Editing the Gemfile | ||
|
||
The gemfile is a configuration file that specifies information required for plugin management. Each gem file has a | ||
`source` line that specifies a location for plugin content. | ||
|
||
By default, the gemfile's `source` line reads: | ||
|
||
[source,shell] | ||
---------- | ||
# This is a Logstash generated Gemfile. | ||
# If you modify this file manually all comments and formatting will be lost. | ||
source "https://rubygems.org" | ||
---------- | ||
|
||
To change the source, edit the `source` line to contain your preferred source, as in the following example: | ||
|
||
[source,shell] | ||
---------- | ||
# This is a Logstash generated Gemfile. | ||
# If you modify this file manually all comments and formatting will be lost. | ||
source "https://my.private.repository" | ||
---------- | ||
|
||
After saving the new version of the gemfile, use <<working-with-plugins,plugin management commands>> normally. | ||
|
||
The following links contain further material on setting up some commonly used repositories: | ||
|
||
* https://github.com/geminabox/geminabox/blob/master/README.markdown[Geminabox] | ||
* https://www.jfrog.com/confluence/display/RTF/RubyGems+Repositories[Artifactory] | ||
* Running a http://guides.rubygems.org/run-your-own-gem-server/[rubygems mirror] |