microservices-demo/catalogue

Name: catalogue

Owner: Microservices Demo

Description: null

Created: 2016-08-10 08:30:12.0

Updated: 2018-05-16 11:29:54.0

Pushed: 2018-04-27 16:02:20.0

Homepage: null

Size: 42025

Language: Go

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Build Status Coverage Status Go Report Card Microbadger

Catalogue

A microservices-demo service that provides catalogue/product information. This service is built, tested and released by travis.

Bugs, Feature Requests and Contributing

We'd love to see community contributions. We like to keep it simple and use Github issues to track bugs and feature requests and pull requests to manage contributions.

API Spec

Checkout the API Spec here

To build this service
Dependencies
et -u github.com/FiloSottile/gvt
restore
Go tools

In order to build the project locally you need to make sure that the repository directory is located in the correct $GOPATH directory: $GOPATH/src/github.com/microservices-demo/catalogue/. Once that is in place you can build by running:

GOPATH/src/github.com/microservices-demo/catalogue/cmd/cataloguesvc/
uild -o catalogue

The result is a binary named catalogue, in the current directory.

Docker

docker-compose build

To run the service on port 8080
Go native

If you followed to Go build instructions, you should have a “catalogue” binary in $GOPATH/src/github.com/microservices-demo/catalogue/cmd/cataloguesvc/. To run it use:

talogue
Docker

docker-compose up

Run tests before submitting PRs

make test

Check whether the service is alive

curl http://localhost:8080/health

Use the service endpoints

curl http://localhost:8080/catalogue

Push the service to Docker Container Registry

GROUP=weaveworksdemos COMMIT=test ./scripts/push.sh

Test Zipkin

To test with Zipkin

er-compose -f docker-compose-zipkin.yml build
er-compose -f docker-compose-zipkin.yml up

It takes about 10 seconds to seed data

you should see it at: http://localhost:9411/

be sure to hit the “Find Traces” button. You may need to reload the page.

when done you can run:

er-compose -f docker-compose-zipkin.yml down

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.