11# macOS
22
3- Fluent Bit is compatible with latest Apple macOS system on x86_64 and Apple Silicon architectures.
3+ Fluent Bit is compatible with the latest Apple macOS software for x86_64 and
4+ Apple Silicon architectures.
45
5- ## Installation Packages
6+ ## Installation packages
67
7- The packages can be found here: < https://packages.fluentbit.io/macos/ >
8+ Installation packages can be found [ here] ( https://packages.fluentbit.io/macos/ ) .
89
910## Requirements
1011
11- For the next steps, you will need to have [ Homebrew] ( https://brew.sh/ ) installed in your system.
12- If is not there, you can install it with the following command:
12+ You must have [ Homebrew] ( https://brew.sh/ ) installed in your system.
13+ If it isn't present, install it with the following command:
1314
14- ``` bash
15+ ``` bash copy
1516/bin/bash -c " $( curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh) "
1617```
1718
1819## Installing from Homebrew
1920
20- The Fluent Bit package on Homebrew is not officially supported, but should work for basic use cases and testing. It can be installed using:
21+ The Fluent Bit package on Homebrew isn't officially supported, but should work for
22+ basic use cases and testing. It can be installed using:
2123
22- ``` bash
24+ ``` bash copy
2325brew install fluent-bit
2426```
2527
26- ## Compile from Source
28+ ## Compile from source
2729
2830### Install build dependencies
2931
@@ -33,97 +35,101 @@ Run the following brew command in your terminal to retrieve the dependencies:
3335brew install git cmake openssl bison
3436```
3537
36- ## Get the source and build it
38+ ## Download and build the source
3739
38- Grab a fresh copy of the Fluent Bit source code (upstream):
40+ 1 . Download a copy of the Fluent Bit source code (upstream):
3941
40- ``` bash
41- git clone https://github.com/fluent/fluent-bit
42- cd fluent-bit
43- ```
42+ ``` bash
43+ git clone https://github.com/fluent/fluent-bit
44+ cd fluent-bit
45+ ```
4446
45- Optionally, if you want to use a specific version, just checkout to the proper tag.
46- If you want to use ` v1.8.13 ` just do :
47+ If you want to use a specific version, checkout to the proper tag.
48+ For example, to use ` v1.8.13 ` , use the command :
4749
48- ``` bash
49- git checkout v1.8.13
50- ```
50+ ``` bash copy
51+ git checkout v1.8.13
52+ ```
5153
52- In order to prepare the build system, we need to expose certain environment variables so Fluent Bit CMake build rules can pick the right libraries:
54+ 1 . To prepare the build system, you must expose certain environment variables so
55+ Fluent Bit CMake build rules can pick the right libraries:
5356
54- ``` bash
55- export OPENSSL_ROOT_DIR=` brew --prefix openssl`
56- export PATH=` brew --prefix bison` /bin:$PATH
57- ```
57+ ``` bash copy
58+ export OPENSSL_ROOT_DIR=` brew --prefix openssl`
59+ export PATH=` brew --prefix bison` /bin:$PATH
60+ ```
5861
59- Change to the _ build/ _ directory inside the Fluent Bit sources:
62+ 1 . Change to the ` build/ ` directory inside the Fluent Bit sources:
6063
61- ``` bash
62- cd build/
63- ```
64+ ``` bash
65+ cd build/
66+ ```
6467
65- Build Fluent Bit.
66- Note that we are indicating to the build system "where" the final binaries and config files should be installed:
68+ 1 . Build Fluent Bit. This example indicates to the build system the location
69+ the final binaries and ` config ` files should be installed:
6770
68- ``` bash
69- cmake -DFLB_DEV=on -DCMAKE_INSTALL_PREFIX=/opt/fluent-bit ../
70- make -j 16
71- ```
71+ ``` bash
72+ cmake -DFLB_DEV=on -DCMAKE_INSTALL_PREFIX=/opt/fluent-bit ../
73+ make -j 16
74+ ```
7275
73- Install Fluent Bit to the directory specified above .
74- Note that this requires root privileges due to the directory we will write information to:
76+ 1 . Install Fluent Bit to the previously specified directory .
77+ Writing to this directory requires root privileges.
7578
76- ``` bash
77- sudo make install
78- ```
79+ ``` bash
80+ sudo make install
81+ ```
7982
8083The binaries and configuration examples can be located at ` /opt/fluent-bit/ ` .
8184
8285## Create macOS installer from source
8386
84- Grab a fresh copy of the Fluent Bit source code (upstream):
87+ 1 . Clone the Fluent Bit source code (upstream):
8588
86- ``` bash
87- git clone https://github.com/fluent/fluent-bit
88- cd fluent-bit
89- ```
89+ ``` bash
90+ git clone https://github.com/fluent/fluent-bit
91+ cd fluent-bit
92+ ```
9093
91- Optionally, if you want to use a specific version, just checkout to the proper tag. If you want to use ` v1.9.2 ` just do:
94+ If you want to use a specific version, checkout to the proper tag. For example,
95+ to use ` v1.9.2 ` do:
9296
93- ``` bash
94- git checkout v1.9.2
95- ```
97+ ``` bash
98+ git checkout v1.9.2
99+ ```
96100
97- In order to prepare the build system, we need to expose certain environment variables so Fluent Bit CMake build rules can pick the right libraries:
101+ 1 . To prepare the build system, you must expose certain environment variables so
102+ Fluent Bit CMake build rules can pick the right libraries:
98103
99- ``` bash
100- export OPENSSL_ROOT_DIR=` brew --prefix openssl`
101- export PATH=` brew --prefix bison` /bin:$PATH
102- ```
104+ ``` bash copy
105+ export OPENSSL_ROOT_DIR=` brew --prefix openssl`
106+ export PATH=` brew --prefix bison` /bin:$PATH
107+ ```
103108
104- And then, creating the specific macOS SDK target (For example, specifying macOS Big Sur (11.3) SDK environment):
109+ 1 . Create the specific macOS SDK target. For example, to specify macOS Big Sur
110+ (11.3) SDK environment:
105111
106- ``` bash
107- export MACOSX_DEPLOYMENT_TARGET=11.3
108- ```
112+ ``` bash copy
113+ export MACOSX_DEPLOYMENT_TARGET=11.3
114+ ```
109115
110- Change to the _ build/ _ directory inside the Fluent Bit sources:
116+ 1 . Change to the ` build/ ` directory inside the Fluent Bit sources:
111117
112- ``` bash
113- cd build/
114- ```
118+ ``` bash copy
119+ cd build/
120+ ```
115121
116- Build the Fluent Bit macOS installer.
122+ 1 . Build the Fluent Bit macOS installer:
117123
118- ``` bash
119- cmake -DCPACK_GENERATOR=productbuild -DCMAKE_INSTALL_PREFIX=/opt/fluent-bit ../
120- make -j 16
121- cpack -G productbuild
122- ```
124+ ``` bash copy
125+ cmake -DCPACK_GENERATOR=productbuild -DCMAKE_INSTALL_PREFIX=/opt/fluent-bit ../
126+ make -j 16
127+ cpack -G productbuild
128+ ```
123129
124- Then, macOS installer will be generated as:
130+ The macOS installer will be generated as:
125131
126- ``` log
132+ ``` text
127133CPack: Create package using productbuild
128134CPack: Install projects
129135CPack: - Run preinstall target for: fluent-bit
@@ -140,27 +146,29 @@ CPack: - Building component package: /Users/fluent-bit-builder/GitHub/fluent-b
140146CPack: - package: /Users/fluent-bit-builder/GitHub/fluent-bit/build/fluent-bit-1.9.2-apple.pkg generated.
141147```
142148
143- Finally, fluent-bit-` <fluent-bit version> ` - ` (intel or apple) ` .pkg will be generated.
149+ Finally, the ` fluent-bit-<fluent-bit version>- (intel or apple) ` .pkg will be generated.
144150
145151The created installer will put binaries at ` /opt/fluent-bit/ ` .
146152
147153## Running Fluent Bit
148154
149- To make the access path easier to Fluent Bit binary, in your terminal extend the ` PATH ` variable:
155+ To make the access path easier to Fluent Bit binary, extend the ` PATH ` variable:
150156
151- ``` bash
157+ ``` bash copy
152158export PATH=/opt/fluent-bit/bin:$PATH
153159```
154160
155- Now as a simple test, try Fluent Bit by generating a simple dummy message which will be printed to the standard output interface every 1 second:
161+ To test, try Fluent Bit by generating a test message using the
162+ [ Dummy input plugin] ( https://docs.fluentbit.io/manual/pipeline/inputs/dummy )
163+ which prints to the standard output interface every one second:
156164
157- ``` bash
158- fluent-bit -i dummy -o stdout -f 1
165+ ``` bash copy
166+ fluent-bit -i dummy -o stdout -f 1
159167```
160168
161169You will see an output similar to this:
162170
163- ``` bash
171+ ``` text
164172Fluent Bit v1.9.0
165173* Copyright (C) 2015-2021 The Fluent Bit Authors
166174* Fluent Bit is a CNCF sub-project under the umbrella of Fluentd
0 commit comments