Skip to content

Runs services that implement the Health Checks API to be used when testing the Microservice Graph Explorer

License

Notifications You must be signed in to change notification settings

hootsuite/microservice-graph-explorer-test

Repository files navigation

Introduction

This project uses Docker and Docker Compose to build and run test services that can be used to demo the Health Checks API and Microservice Graph Explorer.

Running the Services

Install the Build Tools

To build and run the test services, you must install the following:

Docker

Install Docker from https://docs.docker.com/install/.

Docker Compose

Install Docker Compose from https://docs.docker.com/compose/install/.

Run the Services

Each service is written in Go and exposes the Health Checks API using the Go Health Checks Framework.

To build and run the services using Docker compose by running the follwing command:

docker-compose up -d --build

Check Services are Running

Once you have the services running locally in Docker, you can do a sanity check to make sure each service is running by loading the /status/about endpoint for demo app, service 1 and service 2.

Exploring the Service Graph

Check the Microservice Graph Explorer app is running by loading http://localhost:9000 in your favorite browser. At this point you should see the homepage of the Microservice Graph Explorer with a link to Test Service Graph under Quick Links.

Microservice Graph Explorer Homepage

To start exploring, click on Test Service Graph and you'll see a page like: For more info, watch the demo video For more info, watch the demo video

Advanced Testing

If you want to simulate other failure types, like a warning or a cascading failure, you can do this by modifying the local.yml conf file for a service and then rebuild/deploy the services using Docker Compose.

Example - A Cascading Failure

To make the Mongo dependency of Service 1 fail, open docker/service-1/conf/local.yml and update the MONGO item under checks from result: "OK" to result: "CRIT" and enter an error message like details: "Can't connect" and then run:

docker-compose up -d --build

To make the Mongo dependency fail randomly, change the value randomlyfail: "false" to randomlyfail: "true" and then build/deploy again using:

docker-compose up -d --build

Stopping the Services

To stop the services running on your machine, run:

docker-compose down --rmi all

How To Contribute

Contribute by submitting a PR and a bug report in GitHub.

Maintainers

About

Runs services that implement the Health Checks API to be used when testing the Microservice Graph Explorer

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages