Skip to content
This repository has been archived by the owner on May 5, 2023. It is now read-only.

Dashboard for visualizing Spring Boot microservices and the components they link to.

License

Notifications You must be signed in to change notification settings

Ordina-Group/microservices-dashboard

Repository files navigation

CircleCI
codecov
Download
License
Gitter

Microservices Dashboard

Overview

The primary goal of this project is to provide a server implementation for the Microservices Dashboard UI project. This implementation is for now only supporting Spring Boot microservices. It will query other Spring Boot applications for their actuator endpoints (such as /health) to get information on their status and their dependencies. After gathering these details from all available applications, it will aggregate these into a single snapshot. This snapshot can be retrieved by the Microservices Dashboard UI application.

Reference documentation

To learn everything there is to know about the Microservices Dashboard, please consult the reference documentation.

Building from source

The Microservices Dashboard Server requires Java 8 or later and is built using maven:

./mvnw install

Contributing

Ordina’s Microservices Dashboard Server is released under the non-restrictive Apache 2.0 license, and follows a very standard GitHub development process, using GitHub tracker for issues and merging pull requests into master. If you want to contribute even something trivial please do not hesitate, but follow the guidelines below.

Code of Conduct

This project adheres to the Contributor Covenant code of conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to the maintainers.

Code Conventions and Housekeeping

None of these is essential for a pull request, but they will all help. They can also be added after the original pull request but before a merge.

  • Use our code format conventions. If you use Eclipse you can import the formatter settings using the eclipse-code-formatter.xml file. If using IntelliJ, you can use the Eclipse Code Formatter Plugin to import the same file.

  • Make sure all new .java files to have a simple Javadoc class comment with at least an @author tag identifying you, and preferably at least a paragraph on what the class is for.

  • Add the ASF license header comment to all new .java files (copy from existing files in the project)

  • Add yourself as an @author to the .java files that you modify substantially (more than cosmetic changes).

  • Add some Javadocs and, if you change the namespace, some XSD doc elements.

  • A few unit tests would help a lot as well — someone has to do it.

  • If no-one else is using your branch, please rebase it against the current master (or other target branch in the main project).

  • When writing a commit message please follow these conventions. If you are fixing an existing issue please add Fixes gh-XXXX at the end of the commit message (where XXXX is the issue number).

Checkstyle

This project comes with a set of checkstyle rules. You can find them in the checkstyle directory.

projectRoot
└── checkstyle
    ├── checkstyle.xml (1)
    ├── checkstyle-header.txt (2)
    ├── checkstyle-suppressions.xml (3)
    ├── import-control.xml (4)
  1. Default Checkstyle rules

  2. File header setup

  3. Default suppression rules

  4. Default import rules

Checkstyle configuration

Checkstyle rules are enabled by default, but the build will not fail when there are validation errors. However, to keep this project maintainable we will change this in the near future.

If you need to suppress some rules, then it’s enough for you to make changes to checkstyle-suppressions.xml with your suppressions. Example:

projectRoot/checkstyle/checkstyle-suppresions.xml
<?xml version="1.0"?>
<!DOCTYPE suppressions PUBLIC
		"-//Puppy Crawl//DTD Suppressions 1.1//EN"
		"http://www.puppycrawl.com/dtds/suppressions_1_1.dtd">
<suppressions>
	<suppress files=".+Application\.java" checks="HideUtilityClassConstructor" />
	<suppress files=".+Configuration\.java" checks="HideUtilityClassConstructor" />
	<suppress files="[\\/]src[\\/]test[\\/]java[\\/]" checks="Javadoc*" />
	<suppress files="[\\/]autoconfigure[\\/]" checks="JavadocType" />
	<suppress files="[\\/]autoconfigure[\\/]" checks="JavadocVariable" />
</suppressions>

IDE setup

IntelliJ IDEA

In order to setup IntelliJ you should import our coding conventions, inspection profiles and set up the checkstyle plugin.

projectRoot
└── checkstyle
    ├── checkstyle.xml (1)
    ├── checkstyle-header.txt (2)
    ├── checkstyle-suppressions.xml (3)
    ├── import-control.xml (4)
    └── intellij
        ├── IntelliJ_Project_Defaults.xml (5)
        └── IntelliJ_Ordina_OSS_Java_Conventions.xml (5)
  1. Default Checkstyle rules

  2. File header setup

  3. Default suppression rules

  4. Default import control rules

  5. Project defaults for IntelliJ that apply most of Checkstyle rules

  6. Project style conventions for IntelliJ that apply most of Checkstyle rules

Code style
Figure 1. Code style

Go to FileSettingsEditorCode style. There click on the icon next to the Scheme section. There, click on the Import Scheme value and pick the IntelliJ IDEA code style XML option. Import the checkstyle/intellij/IntelliJ_Ordina_Java_Conventions.xml file.

Inspection profiles
Figure 2. Inspection profiles

Go to FileSettingsEditorInspections. There click on the icon next to the Profile section. There, click on the Import Profile and import the checkstyle/intellij/IntelliJ_Project_Defaults.xml file.

Checkstyle

To have IntelliJ work with Checkstyle, you have to install the Checkstyle plugin. It’s advisable to also install the Assertions2Assertj to automatically convert the JUnit assertions

Checkstyle

Go to FileSettingsOther settingsCheckstyle. There click on the + icon in the Configuration file section. There, you’ll have to define where the checkstyle rules should be picked from. In the image above, we’ve picked the rules from the cloned repository. However, you can point to the project’s GitHub repository (e.g. for the checkstyle.xml : https://raw.githubusercontent.com/ordina-jworks/microservices-dashboard/master/checkstyle/checkstyle.xml). We need to provide the following variables:

Important
Remember to set the Scan Scope to All sources since we apply checkstyle rules for production and test sources.

About

Dashboard for visualizing Spring Boot microservices and the components they link to.

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages