Skip to content

Commit 9d62564

Browse files
committed
installation: add instructions for macOS
Signed-off-by: Eduardo Silva <[email protected]>
1 parent 3a78f10 commit 9d62564

File tree

3 files changed

+94
-1
lines changed

3 files changed

+94
-1
lines changed

SUMMARY.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,9 @@
4141
* [Containers on AWS](installation/aws-container.md)
4242
* [Amazon EC2](installation/amazon-ec2.md)
4343
* [Kubernetes](installation/kubernetes.md)
44-
* [Yocto / Embedded Linux](installation/yocto-embedded-linux.md)
44+
* [macOS](installation/macos.md)
4545
* [Windows](installation/windows.md)
46+
* [Yocto / Embedded Linux](installation/yocto-embedded-linux.md)
4647

4748
## Administration
4849

installation/macos.md

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
# macOS
2+
3+
Fluent Bit is compatible with latest Apple macOS system on x86_64 and Apple Silicon M1 architectures. At the moment there is no official supported package but you can build it from sources by following the instructions below.
4+
5+
## Requirements
6+
7+
For the next steps, you will need to have [Homebrew](https://brew.sh/) installed in your system, if is not there, you can install it with the following command:
8+
9+
```bash
10+
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
11+
```
12+
13+
### Install build dependencies
14+
15+
Run the following brew command in your terminal to retrieve the dependencies:
16+
17+
```bash
18+
brew install git cmake openssl bison
19+
```
20+
21+
## Get the source and build it
22+
23+
Grab a fresh copy of the Fluent Bit source code (upstream):
24+
25+
```bash
26+
git clone https://github.com/fluent/fluent-bit
27+
cd fluent-bit
28+
```
29+
30+
Optionally, if you want to use a specific version, just checkout to the proper tag. If you want to use `v1.8.13` just do:
31+
32+
```bash
33+
git checkout v1.8.13
34+
```
35+
36+
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:
37+
38+
```bash
39+
export OPENSSL_ROOT_DIR=`brew --prefix openssl`
40+
export PATH=`brew --prefix bison`/bin:$PATH
41+
```
42+
43+
Build Fluent Bit. Note that we are indicating to the build system "where" the final binaries and config files should be installed:
44+
45+
```bash
46+
cmake -DFLB_DEV=on -DCMAKE_INSTALL_PREFIX=/opt/fluent-bit ../
47+
make -j 16
48+
```
49+
50+
Install the data. Note that this requires root privileges due to the directory we will write information to:
51+
52+
```bash
53+
sudo make install
54+
```
55+
56+
The binaries and configuration examples can be located at `/opt/fluent-bit/`.
57+
58+
## Running Fluent Bit
59+
60+
To make the access path easier to Fluent Bit binary, in your terminal extend the `PATH` variable:
61+
62+
```bash
63+
export PATH=/opt/fluent-bit/bin:$PATH
64+
```
65+
66+
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:
67+
68+
```bash
69+
fluent-bit -i dummy -o stdout -f 1
70+
```
71+
72+
You will see an output similar to this:
73+
74+
```bash
75+
Fluent Bit v1.9.0
76+
* Copyright (C) 2015-2021 The Fluent Bit Authors
77+
* Fluent Bit is a CNCF sub-project under the umbrella of Fluentd
78+
* https://fluentbit.io
79+
80+
[2022/02/08 17:13:52] [ info] [engine] started (pid=14160)
81+
[2022/02/08 17:13:52] [ info] [storage] version=1.1.6, initializing...
82+
[2022/02/08 17:13:52] [ info] [storage] in-memory
83+
[2022/02/08 17:13:52] [ info] [storage] normal synchronization mode, checksum disabled, max_chunks_up=128
84+
[2022/02/08 17:13:52] [ info] [cmetrics] version=0.2.2
85+
[2022/02/08 17:13:52] [ info] [sp] stream processor started
86+
[0] dummy.0: [1644362033.676766000, {"message"=>"dummy"}]
87+
[0] dummy.0: [1644362034.676914000, {"message"=>"dummy"}]
88+
```
89+
90+
To halt the process, press `ctrl-c` in the terminal.
91+

installation/supported-platforms.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ The following operating systems and architectures are supported in Fluent Bit.
1414
| | [Ubuntu 18.04 \(Bionic Beaver\)](linux/ubuntu.md) | x86\_64, Arm64v8 |
1515
| | [Ubuntu 16.04 \(Xenial Xerus\)](linux/ubuntu.md) | x86\_64 |
1616
| | [Raspbian 10 \(Buster\)](linux/raspbian-raspberry-pi.md) | Arm32v7 |
17+
| macOS | * | x86_64, Apple M1 |
1718
| Windows | [Windows Server 2019](windows.md) | x86\_64, x86 |
1819
| | [Windows 10 1903](windows.md) | x86\_64, x86 |
1920

0 commit comments

Comments
 (0)