Skip to content

Commit b5cc6a5

Browse files
committed
feat(extension-logging): add fluentd docker for testing
1 parent ce68c0a commit b5cc6a5

File tree

8 files changed

+796
-6
lines changed

8 files changed

+796
-6
lines changed

extensions/logging/bin/stop-fluentd.sh

Lines changed: 0 additions & 3 deletions
This file was deleted.

extensions/logging/bin/fluentd.conf renamed to extensions/logging/fixtures/etc/fluentd.conf

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,11 @@
88
port 24224
99
</source>
1010
<match **>
11-
@type stdout
11+
@type file
12+
path /var/log/fluentd/
13+
<buffer>
14+
timekey 1d
15+
timekey_use_utc true
16+
timekey_wait 10m
17+
</buffer>
1218
</match>

extensions/logging/bin/start-fluentd.sh renamed to extensions/logging/fixtures/start-fluentd.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,11 @@ $BASE_DIR/stop-fluentd.sh
44

55
FLUENTD__CONTAINER_NAME="fluentd_lb4"
66
pushd $BASE_DIR >/dev/null
7+
ROOT_DIR=$(pwd)
8+
rm -rf $ROOT_DIR/logs/*
79
docker pull fluent/fluentd:v1.7.4-debian-1.0
810
docker run --name $FLUENTD__CONTAINER_NAME -d \
9-
-p 24224:24224 -p 9880:9880 -v $(pwd):/fluentd/etc \
11+
-p 24224:24224 -p 9880:9880 -v $ROOT_DIR/etc:/fluentd/etc \
12+
-v $ROOT_DIR/logs:/var/log/fluentd \
1013
-e FLUENTD_CONF=fluentd.conf fluent/fluentd
1114
popd >/dev/null
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/bash
2+
FLUENTD__CONTAINER_NAME="fluentd_lb4"
3+
docker rm -f $FLUENTD__CONTAINER_NAME >/dev/null 2>&1

0 commit comments

Comments
 (0)