aws / amazon-kinesis-streams-for-fluent-bit

A Fluent Bit output plugin for Kinesis Streams
Apache License 2.0
69 stars 34 forks source link

Support for Windows Environment. #11

Open leandroandrade-hotmart opened 4 years ago

leandroandrade-hotmart commented 4 years ago

Hello, i'm trying build a image for execute in a cluster with Windows pods and i wanna know if it's possible to generate a image for this purpose.

I created a image with the code below, but don't work :(

FROM mcr.microsoft.com/windows/servercore:ltsc2019

# Metadata indicating an image maintainer.

ENV ENV_HOME 'C:'
ENV INSTALL_HOME $ENV_HOME'\install'

# Copy Files to Install
COPY ./fluentbit-kinesis-windows/* /install/
WORKDIR /install

RUN powershell -Command "Expand-Archive -Path ./td-agent-bit-1.3.6-win64.zip -DestinationPath . "

EXPOSE 2020 

ENTRYPOINT ["cmd", "/k", "td-agent-bit-1.3.6-win64\\bin\fluent-bit.exe", "-e", "./amazon-kinesis-streams-for-fluent-bit.exe", "-c", "$Env:INSTALL_HOME\\fluent-bit.conf"]

My pods is based in a mcr.microsoft.com/windows/servercore:ltsc2019

Thanks

PettitWesley commented 4 years ago

@leandroandrade-hotmart long term, we want to create a release of AWS for Fluent Bit for Windows. I can't give you a hard timeline for when that will happen, but it'll probably be later in this year (i.e. not soon).

The Fluent Bit core maintainers are working on Windows support:

Take a look at those pull requests; you might be able to get it working.

The current recommendation from AWS is to use the Fluentd windows image and use the Fluentd Kinesis plugin: https://github.com/awslabs/aws-fluent-plugin-kinesis

leandroandrade-hotmart commented 4 years ago

Thanks @PettitWesley . I tryed use this image, but my cluster runs a different version of windows (servercore:1903) and this image use servercore:1903

PettitWesley commented 4 years ago

Unfortunately I do not know very much about Windows containers. Did you try the non-merged/experimental Fluent Bit windows Dockerfile? I'm curious if that works. https://github.com/fluent/fluent-bit/pull/1760

If it does, then you should be able to add this Go plugin. It looks like go shared C libraries can be built on Windows: https://github.com/golang/go/commit/bb0bfd002ada7e3eb9198d4287b32c2fed6e8da6

If you try this out, let me know, and I'll try to help.

amjanoni commented 3 years ago

Can anyone answer me if this plugin compatible with Windows Fluentbit? Trying to execute there but I'm having some issues, I didn't find in the doc if it's supported there.

PettitWesley commented 3 years ago

@amjanoni Unfortunately I do not think it is. Last I checked the Golang interface had not been ported to Windows and was not planned to be. I could be wrong through.

PettitWesley commented 3 years ago

@amjanoni Check if the CMAKE arg FLB_PROXY_GO can be enabled on windows.

If the golang interface is exposed, then it will work. You just need to compile this plugin on a windows machine, which should work too.