Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Seth Chisamore <schisamo@chef.io>
- Loading branch information
Showing
4 changed files
with
52 additions
and
0 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,8 @@ | ||
input { | ||
file { | ||
path => "{{pkg.svc_var_path}}/log/logstash-plain.log" | ||
} | ||
} | ||
output { | ||
stdout { codec => rubydebug } | ||
} |
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,6 @@ | ||
#!/bin/sh | ||
|
||
exec 2>&1 | ||
|
||
mkdir -p {{pkg.svc_var_path}}/data | ||
mkdir -p {{pkg.svc_var_path}}/log |
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,11 @@ | ||
#!/bin/sh | ||
|
||
exec 2>&1 | ||
|
||
export USE_RUBY=1 | ||
|
||
exec {{pkg.path}}/bin/logstash \ | ||
--path.config {{pkg.svc_config_path}} \ | ||
--path.data {{pkg.svc_var_path}}/data \ | ||
--path.logs {{pkg.svc_var_path}}/log \ | ||
--path.settings {{pkg.path}}/settings |
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,27 @@ | ||
pkg_origin=core | ||
pkg_name=logstash | ||
pkg_version=5.0.2 | ||
pkg_maintainer="The Habitat Maintainers <humans@habitat.sh>" | ||
pkg_license=(Apache-2.0) | ||
pkg_source=https://artifacts.elastic.co/downloads/${pkg_name}/${pkg_name}-${pkg_version}.tar.gz | ||
pkg_shasum=eff45f965118b6ef767f719d85f6dbca438ea2daa5e901907a32fa5bf1a70d9c | ||
pkg_deps=(core/bash core/jre8 core/jruby1) | ||
pkg_build_deps=(core/bash) | ||
pkg_bin_dirs=(bin) | ||
pkg_lib_dirs=(lib) | ||
|
||
do_build() { | ||
return 0 | ||
} | ||
|
||
do_install() { | ||
mkdir -p $pkg_prefix | ||
cp -r * $pkg_prefix | ||
# The `config/' directory is special in Habitat so we'll just move | ||
# the various config files that ship with Logstash into `settings' | ||
# as Logstash refers to this location as SETTINGS_DIR. | ||
mv $pkg_prefix/config $pkg_prefix/settings | ||
rm -rf $pkg_prefix/data | ||
rm -rf $pkg_prefix/vendor/jruby | ||
fix_interpreter "${pkg_prefix}/bin/*" core/bash bin/sh | ||
} |