Skip to content

Commit 5ae86df

Browse files
authored
Merge pull request #1560 from fluent/lynettemiles/sc-105718/update-installation-source-build-with-static
Updating static configuration for style and consistency
2 parents 82122f5 + 2097cb4 commit 5ae86df

File tree

1 file changed

+43
-21
lines changed

1 file changed

+43
-21
lines changed

installation/sources/build-with-static-configuration.md

Lines changed: 43 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,36 @@
1-
# Build with Static Configuration
1+
# Build with static configuration
22

3-
[Fluent Bit](https://fluentbit.io) in normal operation mode allows to be configurable through [text files](https://github.com/fluent/fluent-bit-docs/tree/8ab2f4cda8dfdd8def7fa0cf5c7ffc23069e5a70/installation/configuration/file.md) or using specific arguments in the command line, while this is the ideal deployment case, there are scenarios where a more restricted configuration is required: static configuration mode.
3+
[Fluent Bit](https://fluentbit.io) in normal operation mode is configurable through
4+
[text files](/installation/configuration/file.md)
5+
or using specific arguments in the command line. Although this is the ideal deployment
6+
case, there are scenarios where a more restricted configuration is required. Static
7+
configuration mode restricts configuration ability.
48

5-
Static configuration mode aims to include a built-in configuration in the final binary of Fluent Bit, disabling the usage of external files or flags at runtime.
9+
Static configuration mode includes a built-in configuration in the final binary of
10+
Fluent Bit, disabling the usage of external files or flags at runtime.
611

7-
## Getting Started
12+
## Get started
813

914
### Requirements
1015

11-
The following steps assumes you are familiar with configuring Fluent Bit using text files and you have experience building it from scratch as described in the [Build and Install](https://github.com/fluent/fluent-bit-docs/tree/8ab2f4cda8dfdd8def7fa0cf5c7ffc23069e5a70/installation/sources/build_install.md) section.
16+
The following steps assume you are familiar with configuring Fluent Bit using text
17+
files and you have experience building it from scratch as described in
18+
[Build and Install](build-and-install.md).
1219

1320
#### Configuration Directory
1421

15-
In your file system prepare a specific directory that will be used as an entry point for the build system to lookup and parse the configuration files. It is mandatory that this directory contain as a minimum one configuration file called _fluent-bit.conf_ containing the required [SERVICE](https://github.com/fluent/fluent-bit-docs/tree/8ab2f4cda8dfdd8def7fa0cf5c7ffc23069e5a70/installation/configuration/file.md#config_section), [INPUT](https://github.com/fluent/fluent-bit-docs/tree/8ab2f4cda8dfdd8def7fa0cf5c7ffc23069e5a70/installation/sources/configuration/file.md#config_input) and [OUTPUT](https://github.com/fluent/fluent-bit-docs/tree/8ab2f4cda8dfdd8def7fa0cf5c7ffc23069e5a70/installation/configuration/file.md#config_output) sections. As an example create a new _fluent-bit.conf_ file with the following content:
22+
In your file system, prepare a specific directory that will be used as an entry
23+
point for the build system to lookup and parse the configuration files. This
24+
directory must contain a minimum of one configuration file called
25+
`fluent-bit.conf` containing the required
26+
[SERVICE](/administration/configuring-fluent-bit/yaml/service-section.md),
27+
[INPUT](/concepts/data-pipeline/input.md), and [OUTPUT](/concepts/data-pipeline/output.md)
28+
sections.
1629

17-
```python
30+
As an example, create a new `fluent-bit.conf` file with the following
31+
content:
32+
33+
```python copy
1834
[SERVICE]
1935
Flush 1
2036
Daemon off
@@ -28,31 +44,37 @@ In your file system prepare a specific directory that will be used as an entry p
2844
Match *
2945
```
3046

31-
the configuration provided above will calculate CPU metrics from the running system and print them to the standard output interface.
47+
This configuration calculates CPU metrics from the running system and prints them
48+
to the standard output interface.
3249

33-
#### Build with Custom Configuration
50+
#### Build with custom configuration
3451

35-
Inside Fluent Bit source code, get into the build/ directory and run CMake appending the FLB\_STATIC\_CONF option pointing the configuration directory recently created, e.g:
52+
1. Go to the Fluent Bit source code build directory:
3653

37-
```bash
38-
$ cd fluent-bit/build/
39-
$ cmake -DFLB_STATIC_CONF=/path/to/my/confdir/
40-
```
54+
```bash copy
55+
cd fluent-bit/build/
56+
```
4157

42-
then build it:
58+
1. Run CMake, appending the `FLB_STATIC_CONF` option pointing to
59+
the configuration directory recently created:
4360

44-
```bash
45-
$ make
46-
```
61+
```bash copy
62+
cmake -DFLB_STATIC_CONF=/path/to/my/confdir/
63+
```
64+
65+
1. Build Fluent Bit:
4766

48-
At this point the fluent-bit binary generated is ready to run without necessity of further configuration:
67+
```bash copy
68+
make
69+
```
70+
71+
The generated `fluent-bit` binary is ready to run without additional configuration:
4972

5073
```bash
51-
$ bin/fluent-bit
74+
$ bin/fluent-bit
5275
Fluent-Bit v0.15.0
5376
Copyright (C) Treasure Data
5477

5578
[2018/10/19 15:32:31] [ info] [engine] started (pid=15186)
5679
[0] cpu.local: [1539984752.000347547, {"cpu_p"=>0.750000, "user_p"=>0.500000, "system_p"=>0.250000, "cpu0.p_cpu"=>1.000000, "cpu0.p_user"=>1.000000, "cpu0.p_system"=>0.000000, "cpu1.p_cpu"=>0.000000, "cpu1.p_user"=>0.000000, "cpu1.p_system"=>0.000000, "cpu2.p_cpu"=>0.000000, "cpu2.p_user"=>0.000000, "cpu2.p_system"=>0.000000, "cpu3.p_cpu"=>1.000000, "cpu3.p_user"=>1.000000, "cpu3.p_system"=>0.000000}]
5780
```
58-

0 commit comments

Comments
 (0)