Skip to content

Commit 84ae1a8

Browse files
committed
docs(workflow): add fluentbit component
1 parent 6b679d9 commit 84ae1a8

12 files changed

Lines changed: 47 additions & 128 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Please see below for links and descriptions of each component:
1515
- [controller](https://github.com/drycc/controller) - Workflow API server
1616
- [builder](https://github.com/drycc/builder) - Git server and source-to-image component
1717
- [imagebuilder](https://github.com/drycc/imagebuilder) - The builder for [Docker](https://www.docker.com/) and [CNCF Buildpacks](https://buildpacks.io/) based applications
18-
- [fluentd](https://github.com/drycc/fluentd) - Backend log shipping mechanism for `drycc logs`
18+
- [fluentbit](https://github.com/drycc/fluentbit) - Backend log shipping mechanism for `drycc logs`
1919
- [postgres](https://github.com/drycc/postgres) - The central database
2020
- [registry](https://github.com/drycc/registry) - The Docker registry
2121
- [logger](https://github.com/drycc/logger) - The (in-memory) log buffer for `drycc logs`

_scripts/install.sh

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -439,10 +439,8 @@ timeseries:
439439
size: ${TIMESERIES_PERSISTENCE_SIZE:-5Gi}
440440
storageClass: ${TIMESERIES_PERSISTENCE_STORAGE_CLASS:-""}
441441
442-
fluentd:
443-
imageRegistry: ${DRYCC_REGISTRY}
444-
daemonEnvironment:
445-
CONTAINER_TAIL_PARSER_TYPE: "/^(?<time>.+) (?<stream>stdout|stderr)( (?<tags>.))? (?<log>.*)$/"
442+
fluentbit:
443+
imageRegistry: ${DRYCC_REGISTRY}
446444
447445
controller:
448446
apiReplicas: ${CONTROLLER_API_REPLICAS}

charts/workflow/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ dependencies:
1616
- name: timeseries
1717
repository: oci://registry.drycc.cc/charts-testing
1818
version: x.x.x
19-
- name: fluentd
19+
- name: fluentbit
2020
repository: oci://registry.drycc.cc/charts-testing
2121
version: x.x.x
2222
- name: gateway

charts/workflow/values.yaml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -237,14 +237,9 @@ rabbitmq:
237237
## If the PV uses a different storage class, specify that here.
238238
storageClass: ""
239239

240-
fluentd:
241-
syslog:
242-
# Configure the following ONLY if using Fluentd to send log messages to both
243-
# the Logger component and external syslog endpoint
244-
# external syslog endpoint url
245-
host: ""
246-
# external syslog endpoint port
247-
port: ""
240+
fluentbit:
241+
# Interval to flush output (seconds)
242+
flush: 5
248243

249244
monitor:
250245
grafana:

src/_includes/install-workflow.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@ drycc-builder-hy3xv 1/1 Running 5 5m
4444
drycc-controller-g3cu8 1/1 Running 5 5m
4545
drycc-controller-celery-cmxxn 3/3 Running 0 5m
4646
drycc-database-rad1o 1/1 Running 0 5m
47-
drycc-logger-fluentd-1v8uk 1/1 Running 0 5m
48-
drycc-logger-fluentd-esm60 1/1 Running 0 5m
47+
drycc-logger-fluentbit-1v8uk 1/1 Running 0 5m
48+
drycc-logger-fluentbit-esm60 1/1 Running 0 5m
4949
drycc-logger-sm8b3 1/1 Running 0 5m
50-
drycc-storage-4ww3t 1/1 Running 0 5m
50+
drycc-storage-4ww3t 1/1 Running 0 5m
5151
drycc-registry-asozo 1/1 Running 1 5m
5252
drycc-rabbitmq-0 1/1 Running 0 5m
5353
```

src/installing-workflow/gateway.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ drycc-builder-hy3xv 1/1 Running 5 5m
5252
drycc-controller-g3cu8 1/1 Running 5 5m
5353
drycc-controller-celery-cmxxn 3/3 Running 0 5m
5454
drycc-database-rad1o 1/1 Running 0 5m
55-
drycc-logger-fluentd-1v8uk 1/1 Running 0 5m
56-
drycc-logger-fluentd-esm60 1/1 Running 0 5m
55+
drycc-logger-fluentbit-1v8uk 1/1 Running 0 5m
56+
drycc-logger-fluentbit-esm60 1/1 Running 0 5m
5757
drycc-logger-sm8b3 1/1 Running 0 5m
5858
drycc-storage-4ww3t 1/1 Running 0 5m
5959
drycc-registry-asozo 1/1 Running 1 5m

src/installing-workflow/index.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ $ helm install drycc oci://registry.drycc.cc/charts/workflow \
6868
--set imagebuilder.imageRegistry=quay.io \
6969
--set controller.imageRegistry=quay.io \
7070
--set database.imageRegistry=quay.io \
71-
--set fluentd.imageRegistry=quay.io \
71+
--set fluentbit.imageRegistry=quay.io \
7272
--set redis.imageRegistry=quay.io \
7373
--set rabbitmq.imageRegistry=quay.io \
7474
--set logger.imageRegistry=quay.io \
@@ -106,9 +106,9 @@ drycc-controller-3953262871-pncgq 1/1 Running 2 4m
106106
drycc-controller-celery-cmxxn 3/3 Running 0 4m
107107
drycc-database-83844344-47ld6 1/1 Running 0 4m
108108
drycc-logger-176328999-wjckx 1/1 Running 4 4m
109-
drycc-logger-fluentd-zxnqb 1/1 Running 0 4m
109+
drycc-logger-fluentbit-zxnqb 1/1 Running 0 4m
110110
drycc-redis-304849759-1f35p 1/1 Running 0 4m
111-
drycc-storage-676004970-nxqgt 1/1 Running 0 4m
111+
drycc-storage-676004970-nxqgt 1/1 Running 0 4m
112112
drycc-monitor-grafana-432627134-lnl2h 1/1 Running 0 4m
113113
drycc-monitor-telegraf-wmcmn 1/1 Running 1 4m
114114
drycc-registry-756475849-lwc6b 1/1 Running 1 4m
Lines changed: 7 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Platform Logging
22

3-
The logging platform is made up of 2 components - [Fluentd](https://github.com/drycc/fluentd) and [Logger](https://github.com/drycc/logger).
3+
The logging platform is made up of 2 components - [Fluentbit](https://github.com/drycc/fluentbit) and [Logger](https://github.com/drycc/logger).
44

5-
[Fluentd](https://github.com/drycc/fluentd) runs on every worker node of the cluster and is deployed as a [Daemon Set](http://kubernetes.io/v1.1/docs/admin/daemons.html). The Fluentd pods capture all of the stderr and stdout streams of every container running on the host (even those not hosted directly by kubernetes). Once the log message arrives in our [custom fluentd plugin](https://github.com/drycc/fluentd/tree/main/rootfs/opt/fluentd/drycc-output) we determine where the message originated.
5+
[Fluentbit](https://github.com/drycc/fluentbit) runs on every worker node of the cluster and is deployed as a [Daemon Set](http://kubernetes.io/v1.1/docs/admin/daemons.html). The Fluentbit pods capture all of the stderr and stdout streams of every container running on the host (even those not hosted directly by kubernetes). Once the log message arrives in our [custom fluentbit plugin](https://github.com/drycc/fluentbit/tree/main/plugin) we determine where the message originated.
66

77
If the message was from the [Workflow Controller](https://github.com/drycc/controller) or from an application deployed via workflow we send it to the logs topic on the local [Redis Stream](http://redis.io) instance.
88

@@ -27,9 +27,9 @@ If the `drycc logs` command encounters an error it will return the following mes
2727

2828
```
2929
Error: There are currently no log messages. Please check the following things:
30-
1) Logger and fluentd pods are running.
30+
1) Logger and fluentbit pods are running.
3131
2) The application is writing logs to the logger component by checking that an entry in the ring buffer was created: kubectl --namespace=drycc logs <logger pod>
32-
3) Making sure that the container logs were mounted properly into the fluentd pod: kubectl --namespace=drycc exec <fluentd pod> ls /var/log/containers
32+
3) Making sure that the container logs were mounted properly into the fluentbit pod: kubectl --namespace=drycc exec <fluentbit pod> ls /var/log/containers
3333
```
3434

3535
## Architecture Diagram
@@ -43,78 +43,12 @@ Error: There are currently no log messages. Please check the following things:
4343
│ │
4444
▼ │
4545
┌────────┐ ┌─────────┐ logs/metrics ┌──────────────┐
46-
│App Logs│──Log File──▶│ fluentd │───────topics─────▶│ Redis Stream │
46+
│App Logs│──Log File──▶│Fluentbit│───────topics─────▶│ Redis Stream │
4747
└────────┘ └─────────┘ └──────────────┘
4848
4949
```
5050

5151
## Default Configuration
5252

53-
By default the Fluentd pod can be configured to talk to numerous syslog endpoints. So for example it is possible to have Fluentd send log messages to both the Logger component and [Papertrail](https://papertrailapp.com/). This allows production deployments of Drycc to satisfy stringent logging requirements such as offsite backups of log data.
54-
55-
Configuring Fluentd to talk to multiple syslog endpoints means modifying the Fluentd daemonset
56-
manifest.
57-
This means you will need to fetch the chart with `helm fetch oci://registry.drycc.cc/charts/workflow --untar`, then
58-
modify `workflow/charts/fluentd/templates/logger-fluentd-daemon.yaml` with the following:
59-
60-
```
61-
env:
62-
- name: "SYSLOG_HOST_1"
63-
value: "my.syslog.host"
64-
- name: "SYSLOG_PORT_1"
65-
value: "5144"
66-
....
67-
- name: "SYSLOG_HOST_N"
68-
value: "my.syslog.host.n"
69-
- name: "SYSLOG_PORT_N"
70-
value: "51333"
71-
```
72-
73-
If you only need to talk to 1 Syslog endpoint you can use the following configuration within your chart:
74-
75-
```
76-
env:
77-
- name: "SYSLOG_HOST"
78-
value: "my.syslog.host"
79-
- name: "SYSLOG_PORT"
80-
value: "5144"
81-
```
82-
83-
Then run `helm install ./workflow --namespace drycc` to install the modified chart.
84-
85-
### Customizing:
86-
87-
We currently support logging information to Syslog, Elastic Search, and Sumo Logic. However, we will gladly accept pull requests that add support to other locations. For more information please visit the [fluentd repository](https://github.com/drycc/fluentd).
88-
89-
90-
### Custom Fluentd Plugins
91-
92-
That are many output plugins available for [Fluentd](https://github.com/search?q=fluentd+output&ref=opensearch). But, we purposefully do not ship our Fluentd image with these installed. Instead, we provide a mechanism that allows users to install a plugin at startup time of the container and configure it.
93-
94-
If you would like to install a plugin you can set an environment variable such as the following: `FLUENTD_PLUGIN_N=some-fluentd-plugin` where N is a positive integer that is incremented for every plugin you wish to install. After you set this value you must then set the configuration text for the `FILTER` or `STORE` plugin you are installing. You can do that by setting `CUSTOM_STORE_N=configuration text` where N is the corresponding index value of the plugin you just installed.
95-
96-
Here is an example of setting the values directly in the manifest of the daemonset.
97-
98-
```
99-
env:
100-
- name: "FLUENTD_PLUGIN_1"
101-
value: "fluent-plugin-kafka"
102-
- name: "CUSTOM_STORE_1"
103-
value: |
104-
<store>
105-
@type kafka \
106-
default_topic some_topic
107-
</store>
108-
```
109-
110-
Or you could configure it using the `daemonEnvironment` key in the `values.yaml`:
111-
112-
```
113-
fluentd:
114-
daemonEnvironment:
115-
FLUENTD_PLUGIN_1: "fluent-plugin-kafka"
116-
CUSTOM_STORE_1: "|\n <store>\n @type kafka\n default_topic some_topic\n </store>"
117-
INSTALL_BUILD_TOOLS: "|\n true"
118-
```
119-
120-
For more information please see the [Custom Plugins](https://github.com/drycc/fluentd#custom-plugins) section of the README.
53+
Fluent Bit is based in a pluggable architecture where different plugins plays a major role in the data pipeline, more than 70 built-in plugins available.
54+
Please refer to charts [values.yaml](https://github.com/drycc/fluentbit/blob/main/charts/fluentbit/values.yaml) for specific configurations.

src/managing-workflow/tuning-component-settings.md

Lines changed: 13 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -115,26 +115,18 @@ Setting | Description
115115
BACKUP_FREQUENCY | how often the database should perform a base backup (default: "12h")
116116
BACKUPS_TO_RETAIN | number of base backups the backing store should retain (default: 5)
117117

118-
## Customizing Fluentd
119-
120-
The following values can be changed in the `values.yaml` file or by using the `--set` flag with the Helm CLI.
121-
122-
Key | Default | Description
123-
------------------| --------| ---------------------------------
124-
syslog.host | "" | Host value of a syslog endpoint
125-
syslog.port | "" | Port value of a syslog endpoint
126-
sources.startScript | false | Capture kubernetes start script logs
127-
sources.docker | false | Capture docker daemon logs
128-
sources.etcd | false | Capture etcd logs
129-
sources.kubelet | false | Capture kubelet logs
130-
sources.kubeApi | false | Capture Kubernetes API logs
131-
sources.controller | false | Capture Kubernetes Controller logs
132-
sources.scheduler | false | Capture Kubernetes Scheduler logs
133-
output.disableDrycc | false | Disable the Drycc output plugin
134-
boot.installBuildTools | false | Install the build tools package. This is useful when using custom plugins
135-
daemonEnvironment | | Takes key-value pairs and turns them into environment variables.
136-
137-
For more information about the various environment variables that can be set please see the [README](https://github.com/drycc/fluentd/blob/main/README.md)
118+
## Customizing Fluentbit
119+
120+
The following values can be changed in the `values.yaml` file or by using the `--values` flag with the Helm CLI.
121+
122+
Key | Description
123+
------------------| ---------------------------------
124+
config.service | The service section defines the global properties of the service.
125+
config.inputs | An input section defines a source (related to an input plugin).
126+
config.filters | A filter section defines a filter (related to a filter plugin)
127+
config.outputs | The outputs section specify a destination that certain records should follow after a Tag match.
128+
129+
For more information about the various variables that can be set please see the [fluentbit](https://github.com/drycc/fluentbit).
138130

139131
## Customizing the Logger
140132

@@ -203,7 +195,7 @@ API_VERSION | The version number Workflow Manager sends to the versions AP
203195
[downward-api]: http://kubernetes.io/docs/user-guide/downward-api/
204196
[gunicorn]: http://gunicorn.org/
205197
[kubernetes-deployment-revision]: http://kubernetes.io/docs/user-guide/deployments/#revision-history-limit
206-
[logger]: ../understanding-workflow/components.md#logger-fluentd-logger
198+
[logger]: ../understanding-workflow/components.md#logger-fluentbit-logger
207199
[monitor]: ../understanding-workflow/components.md#monitor
208200
[pull-policy]: http://kubernetes.io/docs/user-guide/images/
209201
[registry]: ../understanding-workflow/components.md#registry

src/managing-workflow/upgrading-workflow.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,10 @@ drycc-controller-1410285775-ipc34 1/1 Running 3 5m
4848
drycc-controller-celery-694f75749b-cmxxn 3/3 Running 0 5m
4949
drycc-database-e7c5z 1/1 Running 0 5m
5050
drycc-logger-cgjup 1/1 Running 3 5m
51-
drycc-logger-fluentd-45h7j 1/1 Running 0 5m
52-
drycc-logger-fluentd-4z7lw 1/1 Running 0 5m
53-
drycc-logger-fluentd-k2wsw 1/1 Running 0 5m
54-
drycc-logger-fluentd-skdw4 1/1 Running 0 5m
51+
drycc-logger-fluentbit-45h7j 1/1 Running 0 5m
52+
drycc-logger-fluentbit-4z7lw 1/1 Running 0 5m
53+
drycc-logger-fluentbit-k2wsw 1/1 Running 0 5m
54+
drycc-logger-fluentbit-skdw4 1/1 Running 0 5m
5555
drycc-redis-8nazu 1/1 Running 0 5m
5656
drycc-monitor-grafana-tm266 1/1 Running 0 5m
5757
drycc-monitor-telegraf-51zel 1/1 Running 1 5m

0 commit comments

Comments
 (0)