1
1
# macOS
2
2
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.
4
5
5
- ## Installation Packages
6
+ ## Installation packages
6
7
7
- The packages can be found here: < https://packages.fluentbit.io/macos/ >
8
+ Installation packages can be found [ here] ( https://packages.fluentbit.io/macos/ ) .
8
9
9
10
## Requirements
10
11
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:
13
14
14
- ``` bash
15
+ ``` bash copy
15
16
/bin/bash -c " $( curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh) "
16
17
```
17
18
18
19
## Installing from Homebrew
19
20
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:
21
23
22
- ``` bash
24
+ ``` bash copy
23
25
brew install fluent-bit
24
26
```
25
27
26
- ## Compile from Source
28
+ ## Compile from source
27
29
28
30
### Install build dependencies
29
31
@@ -33,97 +35,101 @@ Run the following brew command in your terminal to retrieve the dependencies:
33
35
brew install git cmake openssl bison
34
36
```
35
37
36
- ## Get the source and build it
38
+ ## Download and build the source
37
39
38
- Grab a fresh copy of the Fluent Bit source code (upstream):
40
+ 1 . Download a copy of the Fluent Bit source code (upstream):
39
41
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
+ ```
44
46
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 :
47
49
48
- ``` bash
49
- git checkout v1.8.13
50
- ```
50
+ ``` bash copy
51
+ git checkout v1.8.13
52
+ ```
51
53
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:
53
56
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
+ ```
58
61
59
- Change to the _ build/ _ directory inside the Fluent Bit sources:
62
+ 1 . Change to the ` build/ ` directory inside the Fluent Bit sources:
60
63
61
- ``` bash
62
- cd build/
63
- ```
64
+ ``` bash
65
+ cd build/
66
+ ```
64
67
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:
67
70
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
+ ```
72
75
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.
75
78
76
- ``` bash
77
- sudo make install
78
- ```
79
+ ``` bash
80
+ sudo make install
81
+ ```
79
82
80
83
The binaries and configuration examples can be located at ` /opt/fluent-bit/ ` .
81
84
82
85
## Create macOS installer from source
83
86
84
- Grab a fresh copy of the Fluent Bit source code (upstream):
87
+ 1 . Clone the Fluent Bit source code (upstream):
85
88
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
+ ```
90
93
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:
92
96
93
- ``` bash
94
- git checkout v1.9.2
95
- ```
97
+ ``` bash
98
+ git checkout v1.9.2
99
+ ```
96
100
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:
98
103
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
+ ```
103
108
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:
105
111
106
- ``` bash
107
- export MACOSX_DEPLOYMENT_TARGET=11.3
108
- ```
112
+ ``` bash copy
113
+ export MACOSX_DEPLOYMENT_TARGET=11.3
114
+ ```
109
115
110
- Change to the _ build/ _ directory inside the Fluent Bit sources:
116
+ 1 . Change to the ` build/ ` directory inside the Fluent Bit sources:
111
117
112
- ``` bash
113
- cd build/
114
- ```
118
+ ``` bash copy
119
+ cd build/
120
+ ```
115
121
116
- Build the Fluent Bit macOS installer.
122
+ 1 . Build the Fluent Bit macOS installer:
117
123
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
+ ```
123
129
124
- Then, macOS installer will be generated as:
130
+ The macOS installer will be generated as:
125
131
126
- ``` log
132
+ ``` text
127
133
CPack: Create package using productbuild
128
134
CPack: Install projects
129
135
CPack: - Run preinstall target for: fluent-bit
@@ -140,27 +146,29 @@ CPack: - Building component package: /Users/fluent-bit-builder/GitHub/fluent-b
140
146
CPack: - package: /Users/fluent-bit-builder/GitHub/fluent-bit/build/fluent-bit-1.9.2-apple.pkg generated.
141
147
```
142
148
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.
144
150
145
151
The created installer will put binaries at ` /opt/fluent-bit/ ` .
146
152
147
153
## Running Fluent Bit
148
154
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:
150
156
151
- ``` bash
157
+ ``` bash copy
152
158
export PATH=/opt/fluent-bit/bin:$PATH
153
159
```
154
160
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:
156
164
157
- ``` bash
158
- fluent-bit -i dummy -o stdout -f 1
165
+ ``` bash copy
166
+ fluent-bit -i dummy -o stdout -f 1
159
167
```
160
168
161
169
You will see an output similar to this:
162
170
163
- ``` bash
171
+ ``` text
164
172
Fluent Bit v1.9.0
165
173
* Copyright (C) 2015-2021 The Fluent Bit Authors
166
174
* Fluent Bit is a CNCF sub-project under the umbrella of Fluentd
0 commit comments