Commit d9ae0eb1 authored by Eteri's avatar Eteri

fluentbit: add go output plugin

parent 80756a17
...@@ -19,6 +19,8 @@ bin = ${:home}/bin ...@@ -19,6 +19,8 @@ bin = ${:home}/bin
[fluentbit-service] [fluentbit-service]
recipe = slapos.cookbook:wrapper recipe = slapos.cookbook:wrapper
command-line = {{ fluentbit_source_location }}/build/bin/fluent-bit -i cpu -o stdout #command-line = {{ fluentbit_source_location }}/build/bin/fluent-bit -i cpu -o stdout
command-line = {{ fluentbit_source_location }}/build/bin/fluent-bit -e {{ fluentbit_go_repository_location}}/examples/out_gstdout/out_gstdout.so -i cpu -o gstdout
wrapper-path = ${directory:service}/fluentbit-service wrapper-path = ${directory:service}/fluentbit-service
output = $${:wrapper-path} output = $${:wrapper-path}
...@@ -2,22 +2,28 @@ ...@@ -2,22 +2,28 @@
extends = extends =
../../stack/slapos.cfg ../../stack/slapos.cfg
../../component/cmake/buildout.cfg ../../component/cmake/buildout.cfg
../../component/golang/buildout.cfg
parts = parts =
golang19
slapos-cookbook slapos-cookbook
fluentbit-source fluentbit-source
fluentbit fluentbit
instance-profile instance-profile
fluentbit-go-repository
fluentbit-build-go
[instance-profile] [instance-profile]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = ${:_profile_base_location_}/instance.cfg.in template = ${:_profile_base_location_}/instance.cfg.in
rendered = ${buildout:directory}/instance.cfg rendered = ${buildout:directory}/instance.cfg
md5sum = a4cc579e1a4dd0eb58792a8dc6d47bc9 #md5sum = a4cc579e1a4dd0eb58792a8dc6d47bc9
mode = 0644 mode = 0644
context = context =
section buildout buildout section buildout buildout
key fluentbit_source_location fluentbit-source:location key fluentbit_source_location fluentbit-source:location
key fluentbit_go_repository_location fluentbit-go-repository:location
[fluentbit-source] [fluentbit-source]
recipe = slapos.recipe.build:gitclone recipe = slapos.recipe.build:gitclone
...@@ -28,7 +34,20 @@ recipe = slapos.recipe.cmmi ...@@ -28,7 +34,20 @@ recipe = slapos.recipe.cmmi
path = ${fluentbit-source:location} path = ${fluentbit-source:location}
location = ${buildout:parts-directory}/${:_buildout_section_name_} location = ${buildout:parts-directory}/${:_buildout_section_name_}
configure-command = configure-command =
cd build && ${cmake:location}/bin/cmake .. cd build && ${cmake:location}/bin/cmake -DFLB_DEBUG=On -DFLB_PROXY_GO=On ..
make-targets = make-targets =
make-binary = make-binary =
cd build && make cd build && make
\ No newline at end of file
[fluentbit-go-repository]
recipe = slapos.recipe.build:gitclone
repository = https://github.com/fluent/fluent-bit-go
[fluentbit-build-go]
recipe = slapos.recipe.cmmi
go = ${golang19:location}/bin/go
path = ${fluentbit-go-repository:location}
configure-command = cd ${:path} && ${:go} get github.com/fluent/fluent-bit-go/output
make-binary =
make-targets = cd ${:path}/examples/out_gstdout &&
${:go} build -buildmode=c-shared -o out_gstdout.so out_gstdout.go
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment