Coder Social home page Coder Social logo

logspout-firehose's Introduction

logspout-firehose

Logspout adapter for writing Docker container logs to AWS Kinesis Firehose

Deploy

Build a logspout image with this firehose adapter (see Build section below).

Then run using whatever docker launch method you prefer. The important things to note are the AWS config ENV vars, the volume mount for docker socket, and the firehose launch command.

$ docker run --name="logspout" \
    --volume=/var/run/docker.sock:/var/run/docker.sock \
    -e AWS_ACCESS_KEY_ID=... \
    -e AWS_REGION=us-east-1 \
    -e AWS_SECRET_ACCESS_KEY=... \
    your-logspout-image \
    firehose://delivery-stream-name

See the logspout docs for more launch options.

Build

To use, you must build a container image of logspout which contains the firehose adapter.

The easiest way to do this reliably is to fork the official logspout repo and add this this repo to the modules.go file.

Then docker build . -t <your-image-tag> in your forked logspout repo.

I find this approach to work best as it ensures you use a known version of logspout as the base.

Side note: GO dependencies and imports are idiotic constructs so if your fork of logspout breaks later because it is trying to download incompatible versions of dependencies via go get just blame the stupidity of GO.

Development

Similar to the above Build process except you should use the Dockerfile.dev in the logspout repo (if it still exists) to build your base logspout image.

In your logspout repo clone/fork.

docker build -t logspout -f Dockerfile.dev .`

Then use the dev.sh script in this repo to launch a container with a shell where you will build and run logspout as you iterate.

In the container, run the following as you make changes.

go build -ldflags "-X main.Version=dev" -o /bin/logspout
/bin/logspout firehose://stream-name

logspout-firehose's People

Contributors

defunctzombie avatar

Stargazers

Rajan Ponnappan avatar Evan avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.