Telemetry Pipelines Workshop: Installing Fluent Bit From Source
This series continues its exploration of cloud-native observability with telemetry pipelines using the CNCF project Fluent Bit.
Join the DZone community and get the full member experience.
Join For FreeAre you ready to get started with cloud-native observability with telemetry pipelines?
This article is part of a series exploring a workshop guiding you through the open source project Fluent Bit, what it is, a basic installation, and setting up the first telemetry pipeline project. Learn how to manage your cloud-native data from source to destination using the telemetry pipeline phases covering collection, aggregation, transformation, and forwarding from any source to any destination.
The previous article in this series provided an introduction to Fluent Bit where we gained an understanding of its role in the cloud native observability world. This article dives into the installation of Fluent Bit on your local machine using the project source code. You can find more details in the accompanying workshop lab.
It's easy enough to go to the Fluent Bit project site and sort through the documentation to build the project from scratch, but I've always been partial to providing an easy installation project that is entirely self-contained.
We only need to use this with a single command to run dependency checks and build the project from the source on your local machine.
Easy Install Project
Installing on your local machine can be done in just a few steps with our Fluent Bit Easy Install project. This contains the source code from a released version of Fluent Bit (see README for the exact version) and uses a simple automated installation script.
It takes just 3 steps to a running server:
- Download and unzip the easy-install project.
- Run the init.sh file in a console.
- Test install by running a version check (
fluent-bit --version
).
The first step is to download the project. Unzipping (use your file manager or console) should look something like the following:
$ unzip fluentbit-install-demo-v1.0.zip Archive: fluentbit-install-demo-v1.0.zip creating: fluentbit-install-demo-v1.0/ extracting: fluentbit-install-demo-v1.0/.gitignore inflating: fluentbit-install-demo-v1.0/README.md creating: fluentbit-install-demo-v1.0/docs/ creating: fluentbit-install-demo-v1.0/docs/demo-images/ inflating: fluentbit-install-demo-v1.0/docs/demo-images/workshop.png inflating: fluentbit-install-demo-v1.0/init.bat inflating: fluentbit-install-demo-v1.0/init.sh creating: fluentbit-install-demo-v1.0/installs/ inflating: fluentbit-install-demo-v1.0/installs/README inflating: fluentbit-install-demo-v1.0/installs/fluent-bit-2.2.2.zip creating: fluentbit-install-demo-v1.0/support/ extracting: fluentbit-install-demo-v1.0/support/README inflating: fluentbit-install-demo-v1.0/support/functions.shinflating: fluentbit-install-demo-v1.0/support/unzip.vbs
After unzipping, you can start the installation by running the init.sh
script found in the project root directory. Note there is an init.bat
for Windows environments, but this is yet untested (I don't have a Windows machine). Please feel free to use and test for me, other users would be super happy with any fixes you might provide.
The install script needs an argument source
to indicate you are building the Fluent Bit project from the source.
$ ./init.sh source ################################################################ ## ## ## Setting up the Fluent Bit Easy Install demo ## ## ## ## ##### # # ##### # # ##### #### ##### ##### ## ## # # # # ## # # # # # # ## ## #### # # ### # # # # #### # # ## ## # # # # # ## # # # # # ## ## # ##### ##### # # # #### ##### # ## ## ## ## ##### ### #### # # ## ## # # # # # # ## ## ### ##### ### # ## ## # # # # # ## ## ##### # # #### # ## ## ## ## ##### # # #### ##### ### # # ## ## # ## # # # # # # # ## ## # # # # ### # ##### # # ## ## # # ## # # # # # # ## ## ##### # # #### # # # ##### ##### ## ## ## ## brought to you by Eric D. Schabell ## ## ## ## git@gitlab.com:o11y-workshops/fluentbit-install-demo.git ## ## ## ################################################################
A bit of fun ASCII art is presented to kick off the installation, followed by some checks to make sure you have the dependencies needed to build Fluent Bit. Should any fail, you will be pointed to installation help. As seen below, all checks are passing (noting your versions reported might be different, as long as they pass).
... Checking the build mode arguments... Installing from source... Installing Fluent Bit version 2.2.2 from the source project... - removing existing installation directory... Checking for bison version needed to build: Bison major version is good... ...
As you scroll further down the output, you see Fluent Bit is installed in the target directory. We then run phase one of building the project.
... Unpacking Fluent Bit project into target directory... Fluent Bit project unpacked successfully into target directory! Moving to the Fluent Bit project build directory... Building Fluent Bit (phase 1): [BUILDING_CODE_STARTS_HERE] ...
Eventually (cut out of the log here due to the length of the build), the build phase one should complete, and you'll see the message below as it continues to phase two of the build.
... -- Configuring done (21.9s) -- Generating done (1.3s) -- Build files have been written to: fluentbit-install-demo/target/fluent-bit-2.2.2/build Phase 1 build successful, building continuing with phase 2: [BUILDING_CODE_CONTINUES_HERE] ...
When phase two completes successfully, the next step is to copy the build binaries to our target execution directory.
... Fluent Bit built successfully! Copying to ./target/fluent-bit-2.2.2/bin for use. ...
Finally, Fluent Bit is ready to use.
============================================================= = = = Install complete, get ready to rock Fluent Bit! = = = = The binary build is available to run at: = = = = $ cd target/fluent-bit-2.2.2/bin/fluent-bit = = $ bin/fluent-bit --version = = = = Fluent Bit v2.2.2 = = = = Getting started workshop available online: = = https://o11y-workshops.gitlab.io/workshop-fluentbit = = = =============================================================
Here you see the end report with the final instructions on where to find the executable and how to test it by checking its version.
Testing the Install
To verify that the source code was installed, you can run the following from a console or terminal window and see that the version of Fluent Bit works!
$ cd target/fluent-bit-2.2.2/bin/fluent-bit $ bin/fluent-bit --version Fluent Bit v2.2.2
In this case, we are using Fluent Bit version 2.2.2, and in the articles to follow, we'll start building our first telemetry pipelines.
What's Next?
This article helped us get Fluent Bit installed on our local machine using the project source code. The series continues with the next step in this workshop, installing Fluent Bit on your local machine using container images.
Stay tuned for more hands-on material to help you with your cloud-native observability journey.
Opinions expressed by DZone contributors are their own.
Comments