-
Notifications
You must be signed in to change notification settings - Fork 618
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding functional test for fluentd logging driver
- Loading branch information
richardpen
committed
Apr 12, 2017
1 parent
5da2ac5
commit 3054281
Showing
10 changed files
with
183 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
agent/functional_tests/testdata/taskdefinitions/fluentd-driver/task-definition.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{ | ||
"family":"ecs-fts-fluentd-driver", | ||
"containerDefinitions":[ | ||
{ | ||
"memory":100, | ||
"name":"fluentd-driver", | ||
"cpu":10, | ||
"image":"127.0.0.1:51670/amazon/fluentd:latest", | ||
"portMappings":[ | ||
{ | ||
"containerPort":24224, | ||
"hostPort":24224 | ||
} | ||
], | ||
"mountPoints":[ | ||
{ | ||
"sourceVolume":"logs", | ||
"containerPath":"/fluentd/log" | ||
} | ||
] | ||
} | ||
], | ||
"volumes":[ | ||
{ | ||
"name":"logs", | ||
"host":{ | ||
"sourcePath":"/tmp" | ||
} | ||
} | ||
] | ||
} |
24 changes: 24 additions & 0 deletions
24
agent/functional_tests/testdata/taskdefinitions/fluentd-log-tag/task-definition.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"family":"ecs-fluentd-test", | ||
"containerDefinitions":[ | ||
{ | ||
"name":"fluentd-test", | ||
"image":"127.0.0.1:51670/ubuntu:latest", | ||
"essential":true, | ||
"cpu":10, | ||
"memory":10, | ||
"command":[ | ||
"sh", | ||
"-c", | ||
"echo hello, this is fluentd functional test; sleep 30s;" | ||
], | ||
"logConfiguration":{ | ||
"logDriver":"fluentd", | ||
"options":{ | ||
"fluentd-address":"localhost:24224", | ||
"fluentd-tag":"ecs.{{.Name}}.{{.FullID}}" | ||
} | ||
} | ||
} | ||
] | ||
} |
24 changes: 24 additions & 0 deletions
24
agent/functional_tests/testdata/taskdefinitions/fluentd-tag/task-definition.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"family":"ecs-fluentd-test", | ||
"containerDefinitions":[ | ||
{ | ||
"name":"fluentd-test", | ||
"image":"127.0.0.1:51670/ubuntu:latest", | ||
"essential":true, | ||
"cpu":10, | ||
"memory":10, | ||
"command":[ | ||
"sh", | ||
"-c", | ||
"echo hello, this is fluentd functional test; sleep 30s;" | ||
], | ||
"logConfiguration":{ | ||
"logDriver":"fluentd", | ||
"options":{ | ||
"fluentd-address":"localhost:24224", | ||
"tag":"ecs.{{.Name}}.{{.FullID}}" | ||
} | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
FROM fluent/fluentd@sha256:db333f72095e3b982e3f6b105d9c593840ab354beee6486d75536945d372453f | ||
|
||
COPY fluent.conf /fluentd/etc/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.PHONY: all | ||
all: | ||
docker build -t amazon/fluentd:make . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<source> | ||
@type forward | ||
port 24224 | ||
</source> | ||
|
||
<match **> | ||
@type file | ||
path /fluentd/log/ftslog/ecsfts.*.log | ||
flush_interval 1s | ||
</match> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters