Google Cloud Plugin
As with our other application logging tutorials, we are using the example application, and adding a remote logging service container using Fluentd with Stackdriver.
WARNING: Tutorial Requirements
To continue, you will need an account with Google Cloud, to use Stackdriver.
INFO Provider Security Requirements
In order to secure sending your logs, you will need to clone and customize component-fluentd
to add your organization security credentials.
Clone the component-fluentd repository
Clone component-fluentd
git clone https://github.com/OakLabsInc/component-fluentd
The fluentd.conf (for Google Cloud Plugin) is configured for Stackdriver.
Install the example application and configure Fluentd
Once you have finished configuring the Dockerfile and fluentd.conf, build a Docker image and install the container from your DockerHub.
Oak Platform (API): Install
{
"services": [{
"image": "index.docker.io/oaklabs/app-example:release-1.0.1",
"environment": {
"TZ": "America/Phoenix"
}
},
{
"image": "index.docker.io/{{dockerHub}}/component-fluentd:latest"
}
]
}
Depending on how you configure your DockerHub, you may change the name of the image, instead of using component-fluentd:latest
, you could go by a version or assign a named tag: component-fluentd:stackdriver
.
NOTE: {{dockerHub}}
will be your private organization repository.