Skip to content

Commit

Permalink
feat: nicer docs :)
Browse files Browse the repository at this point in the history
  • Loading branch information
SteKoe committed Oct 22, 2022
1 parent 226d122 commit d2f5a77
Show file tree
Hide file tree
Showing 19 changed files with 380 additions and 254 deletions.
95 changes: 55 additions & 40 deletions spring-boot-admin-docs/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,60 +28,75 @@
<version>${revision}</version>
<relativePath>../spring-boot-admin-build</relativePath>
</parent>

<properties>
<site.skin.version>2.2.7</site.skin.version>
</properties>

<build>
<plugins>
<plugin>
<groupId>pl.project13.maven</groupId>
<artifactId>git-commit-id-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>revision</goal>
</goals>
<configuration>
<failOnNoGitDirectory>false</failOnNoGitDirectory>
<skipPoms>false</skipPoms>
<generateGitPropertiesFile>false</generateGitPropertiesFile>
<dateFormat>dd.MM.yyyy</dateFormat>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.asciidoctor</groupId>
<artifactId>asciidoctor-maven-plugin</artifactId>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>${maven-site-plugin.version}</version>
<executions>
<execution>
<id>output-html</id>
<phase>generate-resources</phase>
<goals>
<goal>process-asciidoc</goal>
<goal>site</goal>
</goals>
<configuration>
<sourceDocumentName>index.adoc</sourceDocumentName>
<backend>html5</backend>
<resources>
<resource>
<directory>src/main/asciidoc</directory>
<excludes>
<exclude>**/*.adoc</exclude>
</excludes>
</resource>
</resources>
<attributes>
<source-highlighter>coderay</source-highlighter>
<commit-id>${git.commit.id.abbrev}</commit-id>
<commit-time>${git.commit.time}</commit-time>
<project-version>${project.version}</project-version>
<spring-cloud-version>${spring-cloud.version}</spring-cloud-version>
<samples-dir>${basedir}/../spring-boot-admin-samples/</samples-dir>
<main-dir>${basedir}/../</main-dir>
<github-src>https://github.com/codecentric/spring-boot-admin/tree/master</github-src>
</attributes>
<outputDirectory>target/generated-docs</outputDirectory>
</configuration>
</execution>
</executions>
<configuration>
<!-- Disable generateReports if you don't want to include the built-in reports -->
<generateReports>false</generateReports>
<generateSitemap>false</generateSitemap>
<relativizeDecorationLinks>false</relativizeDecorationLinks>
<locales>en</locales>
<inputEncoding>UTF-8</inputEncoding>
<outputEncoding>UTF-8</outputEncoding>
<asciidoc>
<!-- Optional site-wide AsciiDoc attributes -->
<attributes>
<icons>font</icons>
<source-highlighter>coderay</source-highlighter>
<commit-id>${git.commit.id.abbrev}</commit-id>
<commit-time>${git.commit.time}</commit-time>
<project-version>${project.version}</project-version>
<spring-cloud-version>${spring-cloud.version}</spring-cloud-version>
<samples-dir>${basedir}/../spring-boot-admin-samples/</samples-dir>
<main-dir>${basedir}/../</main-dir>
<github-src>https://github.com/codecentric/spring-boot-admin/tree/master</github-src>
</attributes>
</asciidoc>
</configuration>
<dependencies>
<dependency>
<groupId>org.asciidoctor</groupId>
<artifactId>asciidoctor-maven-plugin</artifactId>
<version>${asciidoctor-maven-plugin.version}</version>
</dependency>
<dependency>
<groupId>com.bernardomg.maven.skins</groupId>
<artifactId>docs-maven-skin</artifactId>
<version>${site.skin.version}</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>

<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>3.3.0</version>
</plugin>
</plugins>
</reporting>
</project>
51 changes: 0 additions & 51 deletions spring-boot-admin-docs/src/main/asciidoc/changes-2.x.adoc

This file was deleted.

35 changes: 0 additions & 35 deletions spring-boot-admin-docs/src/main/asciidoc/index.adoc

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

[[clustering-support]]
=== Clustering ===
== Clustering ==
Spring Boot Admin Server supports cluster replication via Hazelcast. It is automatically enabled when a `HazelcastConfig`- or `HazelcastInstance`-Bean is present. You can also configure the Hazelcast instance to be persistent, to keep the status over restarts.
Also have a look at the http://docs.spring.io/spring-boot/docs/current-SNAPSHOT/reference/htmlsingle/#boot-features-hazelcast/[Spring Boot support for Hazelcast].

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[[spring-cloud-discovery-support]]
=== Spring Cloud Discovery ===
== Spring Cloud Discovery ==

The Spring Boot Admin Server can use Spring Clouds `DiscoveryClient` to discover applications. The advantage is that the clients don't have to include the `spring-boot-admin-starter-client`. You just have to add a `DiscoveryClient` implementation to your admin server - everything else is done by AutoConfiguration.

[[spring-cloud-discovery-static-config]]
==== Static Configuration using SimpleDiscoveryClient ====
=== Static Configuration using SimpleDiscoveryClient ===

Spring Cloud provides a `SimpleDiscoveryClient`. It allows you to specify client applications via static configuration:

Expand Down Expand Up @@ -35,20 +35,18 @@ spring:
management.context-path: /actuator
----

==== Other DiscoveryClients ====
=== Other DiscoveryClients ===
Spring Boot Admin supports all other implementations of Spring Cloud's `DiscoveryClient` (https://docs.spring.io/spring-cloud-netflix/docs/current/reference/html/#service-discovery-eureka-clients/[Eureka], https://docs.spring.io/spring-cloud-zookeeper/docs/current/reference/html/#spring-cloud-zookeeper-discovery[Zookeeper], https://docs.spring.io/spring-cloud-consul/docs/current/reference/html/#spring-cloud-consul-discovery[Consul], https://docs.spring.io/spring-cloud-kubernetes/docs/current/reference/html/#discoveryclient-for-kubernetes[Kubernetes], ...). You need to add it to the Spring Boot Admin Server and configure it properly.
An <<discover-clients-via-spring-cloud-discovery,example setup using Eureka>> is shown above.
An <<getting-started#discover-clients-via-spring-cloud-discovery,example setup using Eureka>> is shown above.

==== Converting ServiceInstances ====
=== Converting ServiceInstances ===

The information from the service registry are converted by the `ServiceInstanceConverter`. Spring Boot Admin ships with a default and Eureka converter implementation. The correct one is selected by AutoConfiguration.

TIP: You can modify how the information from the registry is used to register the application by using SBA Server configuration options and instance metadata. The values from the metadata takes precedence over the server config. If the plenty of options don't fit your needs you can provide your own `ServiceInstanceConverter`.

NOTE: When using Eureka, the `healthCheckUrl` known to Eureka is used for health-checking, which can be set on your client using `eureka.instance.healthCheckUrl`.

WARNING: Consul does not allow dots (`.`) in metadata keys, use dashes instead (e.g. `management-context-path`).

.Instance metadata options
|===
| Key |Value |Default value
Expand Down Expand Up @@ -112,7 +110,7 @@ user.password
|
|===

==== CloudFoundry ====
=== CloudFoundry ===
If you are deploying your applications to CloudFoundry then `vcap.application.application_id` and `vcap.application.instance_index` *_must_* be added to the metadata for proper registration of applications with Spring Boot Admin Server.
Here is a sample configuration for Eureka:

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[[client-applications]]
== Client Applications ==
= Client Applications =

[[show-version-in-application-list]]
=== Show Version in Application List ===
== Show Version in Application List ==

For *Spring Boot* applications the easiest way to show the version, is to use the `build-info` goal from the `spring-boot-maven-plugin`, which generates the `META-INF/build-info.properties`.
See also the http://docs.spring.io/spring-boot/docs/current-SNAPSHOT/reference/htmlsingle/#howto-build-info[Spring Boot Reference Guide].
Expand Down Expand Up @@ -39,7 +39,7 @@ springBoot {
----

[[jmx-bean-management]]
=== JMX-Bean Management ===
== JMX-Bean Management ==

To interact with JMX-beans in the admin UI you have to include https://jolokia.org/[Jolokia] in your application.
As Jolokia is servlet based there is no support for reactive applications.
Expand All @@ -56,7 +56,7 @@ With Spring Boot 2.2.0 you might want to set `spring.jmx.enabled=true` if you wa
----

[[logfile]]
=== Logfile Viewer ===
== Logfile Viewer ==

By default the logfile is not accessible via actuator endpoints and therefore not visible in Spring Boot Admin.
In order to enable the logfile actuator endpoint you need to configure Spring Boot to write a logfile, either by setting
Expand All @@ -80,7 +80,7 @@ Enables the logfile actuator endpoint.
<2> File log pattern using ANSI colors.

[[show-instance-tags]]
=== Show Tags per Instance ===
== Show Tags per Instance ==

`Tags` are a way to add visual markers per instance, they will appear in the application list as well as in the instance view.
By default no tags are added to instances, and it's up to the client to specify the desired tags by adding the information to the metadata or info endpoint.
Expand All @@ -95,7 +95,7 @@ info.tags.environment=test
----

[[spring-boot-admin-client]]
=== Spring Boot Admin Client ===
== Spring Boot Admin Client ==

The Spring Boot Admin Client registers the application at the admin server.
This is done by periodically doing a HTTP post request to the SBA Server providing information about the application.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[[faqs]]
== FAQs ==
= FAQ =

[q-and-a]
Can I include spring-boot-admin into my business application?::
*tl;dr* You can, but you shouldn't. +
Expand Down
Loading

0 comments on commit d2f5a77

Please sign in to comment.