Giter VIP home page Giter VIP logo

firehose-nozzle's Introduction

Firehose Nozzle

A minimal example for connecting to Cloud Foundry's Loggregator system.

Setup

This code uses Glide for dependency management. After you install Glide, run glide install to install the Firehose Nozzle dependencies. After that, a go install should build and install the firehose-nozzle executable.

There are two options for creating credentials that can talk to the API:

  • UAA API user account (choose this route unless you have a reason not to)
  • UAA Client

UAA API User Account

Create a UAA user with access to the Firehose and Cloud Controller:

  • Install the UAA CLI, uaac.
gem install cf-uaac
  • Use the uaac target uaa.YOUR-SYSTEM-DOMAIN command to target your UAA server.
uaac target uaa.sys.example.com
  • Record the uaa:admin:client_secret from either

    • The cf deployment manifest or
    • The Ops Manager UI, click on Pivotal Elastic Runtime tile, go to credentials tab, UAA -> Admin Client Credentials
  • Authenticate to UAA using the client_secret from the previous step

uaac token client get admin -s ADMIN-CLIENT-SECRET
  • Create a Nozzle user for your app with the password of your choosing.
uaac -t user add my-firehose-nozzle-user --password PASSWORD --emails na
  • Add the user to the Cloud Controller Admin Read-Only group.
uaac -t member add cloud_controller.admin_read_only my-firehose-nozzle-user
  • Add the user to the Doppler Firehose group.
uaac -t member add doppler.firehose my-firehose-nozzle-user

UAA Client

Create a UAA client with access to the Firehose and Cloud Controller:

  • Install the UAA CLI, uaac.
gem install cf-uaac
  • Use the uaac target uaa.YOUR-SYSTEM-DOMAIN command to target your UAA server.
uaac target uaa.sys.example.com
  • Record the uaa:admin:client_secret from either

    • The cf deployment manifest or
    • The Ops Manager UI, click on Pivotal Elastic Runtime tile, go to credentials tab, UAA -> Admin Client Credentials
  • Authenticate to UAA using the client_secret from the previous step

uaac token client get admin -s ADMIN-CLIENT-SECRET
  • Create a new UAA client for your firehose
uaac client add my-firehose-nozzle \
    --access_token_validity 1209600 \
    --authorized_grant_types authorization_code,client_credentials,refresh_token \
    -s <SECRET> \
    --scope openid,oauth.approvals,doppler.firehose \
    --authorities oauth.login,doppler.firehose

For information about creating a UAA user, see the Creating and Managing Users with the UAA CLI topic.

Development

For development against bosh-lite, copy scripts/dev.sh.template to scripts/dev.sh and supply missing values. Then run ./scripts/dev.sh to see events on standard out.

Install dependencies

glide install

Setup Tests

go get github.com/onsi/ginkgo/ginkgo  # installs the ginkgo CLI
go get github.com/onsi/gomega         # fetches the matcher library

Run test from toplevel directory

run ginkgo -r  -skipPackage vendor/   # runs test recursively

References

Other nozzles

General

firehose-nozzle's People

Contributors

cholick avatar jeenalshah avatar mboldt avatar

Watchers

James Cloos 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.