[VOL-634] Remove fluentd logging reference from voltha services
This update removes the "hardcoded" logging framework (fluentd)
from the voltha, ofagent and netconf services. The logging is
now determined at deployment time. Testing was done in kubernetes
environment and minimally in docker swarm mode environment (docker
swarm mode is not required for voltha 1.3). A separate Jira will
be raised to adjust the docker swarm deployment files, i.e. direct
the logs to fluentd/fluentd-agg listen ports instead of writing locally.
Change-Id: Ic780fc9633f0f833f961c97dc59d89eed2112a53
diff --git a/compose/docker-compose-system-test.yml b/compose/docker-compose-system-test.yml
index 52e3cf7..0ca70fd 100644
--- a/compose/docker-compose-system-test.yml
+++ b/compose/docker-compose-system-test.yml
@@ -114,11 +114,19 @@
#
voltha:
image: "${REGISTRY}${REPOSITORY}voltha-voltha${TAG}"
+ logging:
+ driver: "json-file"
+ options:
+ max-size: "10m"
+ max-file: "3"
+# Use the fluentd driver to push logs to fluentd instead
+# driver: "fluentd"
+# options:
+# fluentd-address: ${DOCKER_HOST_IP}:24224
command: [
"/voltha/voltha/main.py",
"-v",
"--consul=${DOCKER_HOST_IP}:8500",
- "--fluentd=fluentd:24224",
"--rest-port=8880",
"--grpc-port=50556",
"--kafka=@kafka",
@@ -136,7 +144,6 @@
- vconsul
links:
- vconsul
- - fluentd
environment:
SERVICE_8880_NAME: "voltha-health"
SERVICE_8880_CHECK_HTTP: "/health"
@@ -203,11 +210,19 @@
#
ofagent:
image: "${REGISTRY}${REPOSITORY}voltha-ofagent${TAG}"
+ logging:
+ driver: "json-file"
+ options:
+ max-size: "10m"
+ max-file: "3"
+# Use the fluentd driver to push logs to fluentd instead
+# driver: "fluentd"
+# options:
+# fluentd-address: ${DOCKER_HOST_IP}:24224
command: [
"/ofagent/ofagent/main.py",
"-v",
"--consul=${DOCKER_HOST_IP}:8500",
- "--fluentd=fluentd:24224",
"--controller=${DOCKER_HOST_IP}:6653",
"--grpc-endpoint=@voltha-grpc",
"--instance-id-is-container-name",
@@ -221,7 +236,6 @@
- voltha
links:
- vconsul
- - fluentd
volumes:
- "/var/run/docker.sock:/tmp/docker.sock"
restart: unless-stopped
@@ -231,12 +245,20 @@
#
netconf:
image: "${REGISTRY}${REPOSITORY}voltha-netconf${TAG}"
+ logging:
+ driver: "json-file"
+ options:
+ max-size: "10m"
+ max-file: "3"
+# Use the fluentd driver to push logs to fluentd instead
+# driver: "fluentd"
+# options:
+# fluentd-address: ${DOCKER_HOST_IP}:24224
privileged: true
command: [
"/netconf/netconf/main.py",
"-v",
"--consul=${DOCKER_HOST_IP}:8500",
- "--fluentd=fluentd:24224",
"--grpc-endpoint=@voltha-grpc",
"--instance-id-is-container-name",
"-v"
@@ -248,7 +270,6 @@
- voltha
links:
- vconsul
- - fluentd
environment:
SERVICE_1830_NAME: "netconf-server"
volumes: