Giter Site home page Giter Site logo

cameront / fly-log-shipper Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 1.0 8 KB

everything you need to ship logs from fly.io app instances to GCP, S3, or BetterStack (basically https://github.com/superfly/fly-log-shipper but with the configurations I prefer)

License: MIT License

Dockerfile 51.05% Shell 48.95%

fly-log-shipper's Introduction

fly-log-shipper

everything you need to ship logs from fly.io app instances to GCP, S3, or BetterStack (basically https://github.com/superfly/fly-log-shipper but with the configurations I prefer)

Setting up GCP

Use gcloud command line to...

  1. Create a new logging bucket that will eventually store logs
gcloud logging buckets create my-new-logs-bucket --location=global --retention-days=180 --description="some description"
  1. Create a new logging sink that will receive the logs from the shipper and write them to the bucket
gcloud logging sinks create my-new-log-sink my-new-logs-bucket [--description=DESCRIPTION]  --project=PROJECT_ID
  1. Create a new service account user
gcloud iam service-accounts create your-service-user-name --description="DESCRIPTION"  --display-name="DISPLAY_NAME"
  1. Create service account credentials for the user, and prepare to ship those in this docker container
gcloud iam service-accounts keys create ./gcp_logging_user_credentials.json --iam-account=your-service-user-name@your-project.iam.gserviceaccount.com
  1. Grant the service account the ability to write logs
gcloud projects add-iam-policy-binding PROJECT_ID --member=serviceAccount:your-service-user-name@PROJECT_ID.iam.gserviceaccount.com --role=roles/logging.logWriter

Then bake the credentials file in the docker container, set your GOOGLE_CREDNETIALS env var, and deploy

fly-log-shipper's People

Contributors

cameront avatar

Watchers

 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.