Commit graph

373 commits

Author SHA1 Message Date
Suyog Rao
270c90f8c6 Add cef codec to default plugins
Fixes #6270
2016-11-17 13:26:47 -05:00
Colin Surprenant
761f9f1bc9 merge feature/java_persistence into master 2016-11-01 17:13:23 -04:00
Suyog Rao
e7a393e6f8 Remove logrotate completely
Fixes #5903
2016-09-13 19:39:27 -04:00
Suyog Rao
3f2123ae9f use the right props file
Fixes #5903
2016-09-13 19:39:27 -04:00
Suyog Rao
c01a3df235 add package specific log4j2 logging props
Fixes #5894

Fixes #5903
2016-09-13 19:39:26 -04:00
Suyog Rao
65a8676a86 Bump master to 6.0.0-alpha1 (#5880)
* Bump master to 6.0.0-alpha1
2016-09-08 08:33:27 -07:00
Tal Levy
1b2f7a7668 Migrate Logstash to Log4j2 Logging (#5651)
Migrate to use Log4j2 for Logstash logging
2016-08-25 10:30:22 -07:00
Pier-Hugues Pellerin
22c857556f Remove spec/integration
With the addition of the qa acceptance test suite we have decide that we
don't need to maintain this suite also since the acceptance test are
running really similar test.

Fixes: #5744

Fixes #5760
2016-08-14 15:09:29 -04:00
Pere Urbón
48bd2e344d add bin/rspec and bin/rspec.bat to the packaging exclude list (#5667) 2016-07-26 13:12:13 -07:00
Pere Urbon-Bayes
a0db616fca remove jms from skip list
Fixes #5555
2016-06-28 04:59:26 -04:00
Joao Duarte
c0c9a3babc add data.path setting
Fixes #5528
2016-06-24 07:32:25 -04:00
Joao Duarte
645eee4a70 avoid using duplicate logstash.yml for rpm/deb
Fixes #5537
2016-06-22 14:10:18 -04:00
Joao Duarte
a859bd4a3f add single command release task and other release support tooling
Purpose:

* manage releases through a minimum number of rake tasks
* simplify building of snapshot builds
* create staged artifacts, candidates for releases, that required no changes to become releases
* this means the snapshot release process will not involve publishing gems, therefore:
* the gem artifacts should only be published to rubygems as a final artifact, at the time of GA

Changes:

* release artifacts no longer depend on gems of core components
* all core components are used locally AS-IS to minimize code changes between snapshot, RC and GA
* `versions.yml` describes the versions of all logstash parts and package
  * `rake version:set[version]` manage the yaml file and push the changes to the gemspecs/version.rb files
  * `rake version:set_plugin_api[version]` manage the yaml file and push the changes to the gemspecs/version.rb files
  * `rake artifact:all` generates SNAPSHOT artifacts: tar.gz, zip, rpm, deb
  * `RELEASE=1 rake artifact:all` creates release candidate artifacts + 4 gems: logstash-core, logstash-core-event, logstash-core-event-java and logstash-core-plugin-api

implements #5416 and #5414

Fixes #5460
2016-06-20 04:23:48 -04:00
Pier-Hugues Pellerin
f74e339e77 Allow to run acceptance test with the local logstash
This change introduce a new command ci/ci_acceptance which is
responsable of building the packages, bootstraping the acceptance test
environment, launching the VMs and running the tests.

You can use the following command to target specific platform.

```
ci/ci_acceptance.sh all
ci/ci_acceptance.sh centos
ci/ci_acceptance.sh debian
```

This PR also add a new rake task to build all the artifacts in a single
run called rake artifact:all it make sure we only install the plugin
only once and make the build process faster.

Fixes #5350
2016-06-02 14:37:15 +00:00
Aaron Mildenstein
e40ecbb6b8 Update existing packaging to use /usr/lib/logstash
Update after-install scripts

Use /usr/lib/logstash instead of /opt/logstash

More revisions.

Using `/usr/share/logstash` instead of `/usr/lib/logstash`

Track these new files

More work in progress.

Proper arg parsing obtained

WIP: Use jvm.options like ES

Remove facter dependency

Due to an update from @jordansissel on pleaserun, facter is no longer necessary

Revert Gemfile to proper version

Latest work in progress.

I added a simple test to logstash.lib.sh to catch empty strings in java options.

Added `startup.options`, and touched up `jvm.options`

Edited the package scripts to make things play nice with new paths.

Tweaked `system-install` to allow users to provide their own `startup.options` file.

Patch up merge failure

Changes to work with the new logstash.yml

Add fpm dependency (build fails without it)

Fix missing gems in Gemfile

Don't know how these got lost

Use /etc/logstash for configuration in packages

Update the instructions/documentation for...

...startup.options

Merging proposed changes

Remove mustache and clamp

They're covered by pleaserun anyway

Prune config dir from /usr/share/logstash...

...but only when using RPM/DEB packages

Fixes #5341
2016-05-25 17:25:26 +00:00
Joao Duarte
7783f76a4c introduce yaml settings file and cli long switches
* by default lives in LOGSTASH_HOME/config/logstash.yml
* location can be changed by $LS_SETTINGS_DIR or --path.settings
* overrides defaults of LogStash::Environment, BUT
* CLI flags override the yaml file
* several breaking changes to cli flag names (see config/logstash.yml)
* setting values are now type checked (see Setting and Settings classes)

Fixes #5313
2016-05-19 18:15:12 +00:00
Suyog Rao
d94bae6a40 Remove java7 from rakelib
Fixes #5298
2016-05-13 22:29:29 +00:00
Suyog Rao
33771c1a64 Remove more plugins, add back netflow
Fixes #5254
2016-05-13 18:04:03 +00:00
Suyog Rao
96c09ea718 Update default plugins for 5.0
5.0 is a chance for us to review and remove any plugins that we don't have to bundle by default. These plugins are still supported and maintained, but the default package should only contain most popular, most used plugins.

Removed plugins:

logstash-filter-anonymize: Replaced with newer logstash-filter-fingerprint
logstash-input-zeromq/output: Not a lot of users. Most users seem to prefer rabbitmq, redis, kafka as broker

Please comment if you'd like to remove more/less

Fixes #5254
2016-05-13 18:04:03 +00:00
Pere Urbon-Bayes
a546bdc874 move micro benchmarks and the check pull changelog tool inside the tools folder
Fixes #5268
2016-05-12 06:56:25 +00:00
Pere Urbon-Bayes
bf12902496 refactor integration test to be inside the specs directory and not in the main level
Fixes #5268
2016-05-12 06:56:24 +00:00
Pier-Hugues Pellerin
779ee4abbe Remove the architecture in the RPM and Debian artifacts
Logstash will now generate theses filenames instead:

```
logstash-5.0.0.rpm
logstash-5.0.0.deb
```
Fixes #5249

Fixes #5262
2016-05-09 19:21:57 +00:00
Pier-Hugues Pellerin
3d875c8f70 Remove oldlogstashjson from the default plugin list
This plugins was used to migrate from logstash json schema 0 to 1.

Fixes #5245
2016-05-05 17:18:28 +00:00
Colin Surprenant
ccefeaeb84 add --preserve option to plugin install
add missing overwrite method and preserve @gems_by_name when updating

log options preservation

discards no constrains constrains

rewording
2016-04-29 16:10:11 -04:00
Joao Duarte
dd02422912 converted static I18n test to rspec
Fixes #5158
2016-04-27 14:49:41 +00:00
Joao Duarte
b77b021607 add static analysis rake task for i18n usage
Fixes #5158
2016-04-27 14:49:41 +00:00
Pier-Hugues Pellerin
cb18b76596 1g
Fixes #5198
2016-04-26 19:35:17 +00:00
Pier-Hugues Pellerin
04dfefcff1 Set the HEAP Size to 1gig when running rake tasks
Logstash uses by default in the shell script 1 gig of memory for the
JVM. but when we use rake it uses the default settings of JRUBY and
start a vm 500megs of memory. The recent changes in JRUBY and
JRuby-OpenSSL have increased the base memory and make the installing of
plugins with a OOM issues. This PR make sure the CI scripts and the rake
jruby launch uses the default of 1gig.

Fixes: #5179

Fixes #5198
2016-04-26 19:35:17 +00:00
Jordan Sissel
8809a632b4 Force RPM OS to be set to linux. Fixes #5147
Fixes #5156
2016-04-21 15:08:46 +00:00
Colin Surprenant
5de3ce40d1 upgrade to JRuby 1.7.25 and required jruby-openssl 0.9.16 to match JRuby 2016-04-20 14:04:53 -04:00
Pier-Hugues Pellerin
b85845706c Normalize the name of the generated artifacts
This PR introduce a unified naming scheme for all our artifacts and will
produce the following files:

logstash-5.0.0-alpha1_all.deb
logstash-5.0.0-alpha1.tar.gz
logstash-5.0.0-alpha1.zip
logstash-5.0.0-alpha1.noarch.rpm

Fix #5100

Fixes #5125
2016-04-18 13:22:28 +00:00
Tal Levy
6c609a3010 build core gems in same process as rake command instead of spawning new process
Fixes #5075
2016-04-11 21:26:23 +00:00
Pier-Hugues Pellerin
97352c7960 Remove some plugins that failed the build when creating the tar.gz
Fixes #5054
2016-04-07 14:39:36 +00:00
Pere Urbon-Bayes
147937643c fix Rakelib package.rake to use logstash-plugin pack to generate the plugins bundle
Fixes #5049
2016-04-07 13:06:00 +00:00
Colin Surprenant
3862514388 revert to jruby 1.7.23 for regex regression 2016-04-04 14:37:38 -04:00
Pere Urbon-Bayes
613a7d6924 Make the logstash-core-plugin-api install locally in case of having a :path in the Gemfile, works the same way as other "core" gems used for master branch.
Fixes #4908
2016-03-29 13:47:17 +00:00
Suyog Rao
683302e26d Rename bin/plugin to bin/logstash-plugin
This adds support for packs and fixes the problem where bin/plugin
pollutes the PATH namespace

Fixes #4871

Fixes #4874
2016-03-24 00:23:15 +00:00
Joao Duarte
fffe5883ae include hidden ruby-maven directory in packaging
ruby-maven ships a hidden directory called .mvn that
needs to be included in the package.
Currently the list of files to be packaged is generated using
Rake::FileList[globs] which excludes hidden files by default
(same happens with Dir.glob).

The fix is to ensure the contents of that directory are included
by explicitly referencing it.

For example, the file "extensions.xml", included in this directory,
is responsible for loading the ruby DSL for POMs. Not carrying this
file in the logstash package breaks any plugin update that uses
jar-dependencies.

Fixes #4845
2016-03-18 20:48:29 +00:00
Pere Urbon-Bayes
42710a4ffd add expectations for json and plain text responses for the hot threads api tests
format test properly for the node_spec api

Introduce a more proper organization of the dummy/mock runner to avoid
having wrong state propagaged across the different tests. This was
discovered by the unnecessary need to have the rubydebug codec as it was
due to wrong pipeline startup.

make the node stats test sync with last changes in data formats

improve web api service logic from reviews

remove the requirement of using output-null as only with output {} you get the same effect

Fixes #4782
2016-03-14 14:07:25 +00:00
Pere Urbon-Bayes
79e2d0040f Make sure all web api test are actually going through the hole pipe and getting data out of a real logstash execution.
Test improvements:

* Cleanup non used fixture.
* Improve node_stats tests by adding omre context and format checks.
* Add a new node_specs endpoint test that checks the expected data is
  returned for the hot_threads resource.

Fixes #4782
2016-03-14 14:07:25 +00:00
JWhy
c75a7af326 Fix deb packaging task description
Fix description of the task package("ubuntu", ...). Likely caused by copy-paste.

Fixes #4601
2016-02-02 14:25:51 +00:00
Colin Surprenant
5a522a0037 code cleanups and integration work for defaulting to Java Event implementation
cleaned dependencies, removed Guava code

default to java event

also compile java event

use json-unit for json result assertions

remove Java 8 specific constructs to be able to compile on Java 7

use jar-dependencies

better jar file loading

copy jar into lib after build

add post-build copy and clean of gem jar and re-indented file

fix jar destination

include generated jar in gem

remove useless ArrayList constructions

add tests for KeyNode.join method

remove useless  shadow and disable unchecked warnings

update gradle dependency to 2.8

fix deprecated asserEquals usage

simplify convoluted list contruction

fix array fields nil values handling

moar nil value tests

simplify for loop
2016-01-26 12:39:35 -05:00
Pier-Hugues Pellerin
f10ed19457 Upgrade to JRuby 1.7.24
This release fix the following problems we have:
- File.stat on 32 bits JVM on windows https://github.com/logstash-plugins/logstash-input-file/issues/82
- Annoying io/console warning on Windows https://github.com/elastic/logstash/issues/3087

Full changelog http://jruby.org/2016/01/20/jruby-1-7-24.html

Fixes #4541
2016-01-21 16:10:31 +00:00
Suyog Rao
62f56ec274 Fix issue when building regular tar
Thanks to @ph who caught this issue in review
https://github.com/elastic/logstash/pull/4435#discussion_r49224181

Fixes #4440
2016-01-09 02:27:28 +00:00
Suyog Rao
6e94d0c68b Add rake tasks to create uber packages
Add rake tasks to create zip and tar.gz for LS package with all plugins
installed from losgtash-repo

Fixes #4435
2016-01-08 23:08:21 +00:00
Andrew Cholakian
c2715d0ded Add http poller to default plugins list
Fixes #4409
2016-01-03 23:06:44 +00:00
Vincent Bernat
4bc5261895 pkg: ensure dev/beta/rc are ordered before a regular version
```ruby
class DpkgVersion
  include Comparable
  attr :version
  def <=>(anOther)
    return -1 if system("dpkg --compare-versions #{version} lt #{anOther.version}")
    return 1 if system("dpkg --compare-versions #{version} gt #{anOther.version}")
    return 0
  end
  def initialize(version)
    @version = version
  end
  def to_s
    @version
  end
end

versions="1.5.1 1.5.0 1.5.0.rc3 1.5.0.beta2 1.5.0.alpha3".split
versions=versions.map { |x| DpkgVersion.new(x.gsub(/\.([[:alpha:]])/, '~\1')) }
versions=versions.sort
puts versions
```

This outputs:

```
1.5.0~alpha3
1.5.0~beta2
1.5.0~rc3
1.5.0
1.5.1
```

Fixes #2461
2015-12-11 20:17:33 +00:00
Joao Duarte
00a99c19e5 refactor concerns of runner, agent and pipeline
* move cli argument handling from agent to runner
* add a short-help message
* add interactive shell option
* log fatal messages to terminal when logging to file
* change docs:generate task to use bundle exec

Fixes #3872
2015-11-25 12:11:36 +00:00
Pere Urbon-Bayes
245319e9b8 update jruby to last 1.7.23 release
Fixes #4260
2015-11-25 10:04:04 +00:00
Pere Urbon-Bayes
2195f145b2 This adds a feature to let users dump all their installed plugins,
including dependencies, and reuse them in an offline installation by
providing an package for it. It adds two important commands to the
plugin manager, the pack and upack, to handle package creation and
installation and adds the --local flag to install and update to pull
plugins from the installed local packages.

Former commits:

add a task to create a bundle, under vendor/cache of the installed gems + their dependencies, this can be used later on to be installed offline

add an option to pass the --local flag to the bin/plugin update task, so it fetch plugins from a local cache, by default under vendor/cache

rename package:build to package:build-cache as is more meaningfull

add a --local flag to bin/plugin install to users can install plugins from the local cache, under the default directory of vendor/cache

add a plugin manager command to build the local cache of installed plugins using bundler package alike command

It adds code for compressing and extracting in zip and tar formats to
the utils module of logstash. The zip module is only jruby dependant as
it uses functions provided by java.
There is also code add in the plugin manager package command to handle
compression of plugins dumping.

Cleanup the custom java code to compress and extract zip files as it has
been known that using rubyzip is good and it has a more ruby like
features so the code is more clean and portable.

set of smallish improvement requested during review

added several options to handle situation when the package of plugins we want to generate is already there

clean up old code

applyed feedback from review, mostly changed in documentating behaviour plus better wording for messages

relocate the Environment.windows? check to the bootstrap side as it's used also in the plugin manager

add an unpack bin/plugin command so users can install packages of plugins throw the plugin manager

document override behaviour in the compress helpers (for zip and tar) plus add a fix for the tar extract when reading entries

made the unpack filename parameter a required one

add a force option to the bin/plugin unpack command

add a notice to that if using a local cache the --local flag should be passed with

Code cleanup and refactor introduced during review

add two wording suggestions comming from review

ammend more wording

skip the major version validation as in situation where there is no internet connection like when using the local vendor/cache to do the update

move compress to the bootstrap environment as being used in the plugin manager means not being loaded with logstash-core

Bring pack cached gems in the vendor directory so they can be used for bundler when packaging dependencies

Revert "Bring pack cached gems in the vendor directory so they can be used for bundler when packaging dependencies"

This reverts commit a9d7f46649932b06efaafebdd0eed2b4c63c2235.

patch the Bundler::Source::Rubygems to fetch only gems from a remote  source

small changes in several parts of the plugin manager and the creation of a common pack command with shared code

change compress to read in chuncks

fix wrong var name in the bootstrap compress utils module

fix namespacing conflicts

add basic test for the compress utility module

ammend more namespace issues

add a comment to the rubygems mockey patch to rebuild the gem cache

apply cosmetic changes

make the compress module raise CompressError

remove vendor_path and pattern_path form environment as they where mix up during rebase

change the bin/pack force option to be force-delete-cache

rename force_delete_cache to overwrite

change force for overwrite in tha pack command

remove the override option for bin/plugin unpack

revert Gemfile and Genfile.lock wrong committed
2015-11-18 12:03:51 +01:00