Skip to content

Commit d2f5a77

Browse files
committed
feat: nicer docs :)
1 parent 226d122 commit d2f5a77

File tree

19 files changed

+380
-254
lines changed

19 files changed

+380
-254
lines changed

spring-boot-admin-docs/pom.xml

Lines changed: 55 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -28,60 +28,75 @@
2828
<version>${revision}</version>
2929
<relativePath>../spring-boot-admin-build</relativePath>
3030
</parent>
31+
32+
<properties>
33+
<site.skin.version>2.2.7</site.skin.version>
34+
</properties>
35+
3136
<build>
3237
<plugins>
3338
<plugin>
34-
<groupId>pl.project13.maven</groupId>
35-
<artifactId>git-commit-id-plugin</artifactId>
36-
<executions>
37-
<execution>
38-
<goals>
39-
<goal>revision</goal>
40-
</goals>
41-
<configuration>
42-
<failOnNoGitDirectory>false</failOnNoGitDirectory>
43-
<skipPoms>false</skipPoms>
44-
<generateGitPropertiesFile>false</generateGitPropertiesFile>
45-
<dateFormat>dd.MM.yyyy</dateFormat>
46-
</configuration>
47-
</execution>
48-
</executions>
49-
</plugin>
50-
<plugin>
51-
<groupId>org.asciidoctor</groupId>
52-
<artifactId>asciidoctor-maven-plugin</artifactId>
39+
<groupId>org.apache.maven.plugins</groupId>
40+
<artifactId>maven-site-plugin</artifactId>
41+
<version>${maven-site-plugin.version}</version>
5342
<executions>
5443
<execution>
5544
<id>output-html</id>
5645
<phase>generate-resources</phase>
5746
<goals>
58-
<goal>process-asciidoc</goal>
47+
<goal>site</goal>
5948
</goals>
6049
<configuration>
61-
<sourceDocumentName>index.adoc</sourceDocumentName>
62-
<backend>html5</backend>
63-
<resources>
64-
<resource>
65-
<directory>src/main/asciidoc</directory>
66-
<excludes>
67-
<exclude>**/*.adoc</exclude>
68-
</excludes>
69-
</resource>
70-
</resources>
71-
<attributes>
72-
<source-highlighter>coderay</source-highlighter>
73-
<commit-id>${git.commit.id.abbrev}</commit-id>
74-
<commit-time>${git.commit.time}</commit-time>
75-
<project-version>${project.version}</project-version>
76-
<spring-cloud-version>${spring-cloud.version}</spring-cloud-version>
77-
<samples-dir>${basedir}/../spring-boot-admin-samples/</samples-dir>
78-
<main-dir>${basedir}/../</main-dir>
79-
<github-src>https://github.com/codecentric/spring-boot-admin/tree/master</github-src>
80-
</attributes>
50+
<outputDirectory>target/generated-docs</outputDirectory>
8151
</configuration>
8252
</execution>
8353
</executions>
54+
<configuration>
55+
<!-- Disable generateReports if you don't want to include the built-in reports -->
56+
<generateReports>false</generateReports>
57+
<generateSitemap>false</generateSitemap>
58+
<relativizeDecorationLinks>false</relativizeDecorationLinks>
59+
<locales>en</locales>
60+
<inputEncoding>UTF-8</inputEncoding>
61+
<outputEncoding>UTF-8</outputEncoding>
62+
<asciidoc>
63+
<!-- Optional site-wide AsciiDoc attributes -->
64+
<attributes>
65+
<icons>font</icons>
66+
<source-highlighter>coderay</source-highlighter>
67+
<commit-id>${git.commit.id.abbrev}</commit-id>
68+
<commit-time>${git.commit.time}</commit-time>
69+
<project-version>${project.version}</project-version>
70+
<spring-cloud-version>${spring-cloud.version}</spring-cloud-version>
71+
<samples-dir>${basedir}/../spring-boot-admin-samples/</samples-dir>
72+
<main-dir>${basedir}/../</main-dir>
73+
<github-src>https://github.com/codecentric/spring-boot-admin/tree/master</github-src>
74+
</attributes>
75+
</asciidoc>
76+
</configuration>
77+
<dependencies>
78+
<dependency>
79+
<groupId>org.asciidoctor</groupId>
80+
<artifactId>asciidoctor-maven-plugin</artifactId>
81+
<version>${asciidoctor-maven-plugin.version}</version>
82+
</dependency>
83+
<dependency>
84+
<groupId>com.bernardomg.maven.skins</groupId>
85+
<artifactId>docs-maven-skin</artifactId>
86+
<version>${site.skin.version}</version>
87+
</dependency>
88+
</dependencies>
8489
</plugin>
8590
</plugins>
8691
</build>
92+
93+
<reporting>
94+
<plugins>
95+
<plugin>
96+
<groupId>org.apache.maven.plugins</groupId>
97+
<artifactId>maven-project-info-reports-plugin</artifactId>
98+
<version>3.3.0</version>
99+
</plugin>
100+
</plugins>
101+
</reporting>
87102
</project>

spring-boot-admin-docs/src/main/asciidoc/changes-2.x.adoc

Lines changed: 0 additions & 51 deletions
This file was deleted.

spring-boot-admin-docs/src/main/asciidoc/index.adoc

Lines changed: 0 additions & 35 deletions
This file was deleted.
File renamed without changes.

spring-boot-admin-docs/src/main/asciidoc/server-clustering.adoc renamed to spring-boot-admin-docs/src/site/asciidoc/_server-clustering.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
[[clustering-support]]
3-
=== Clustering ===
3+
== Clustering ==
44
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.
55
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].
66

spring-boot-admin-docs/src/main/asciidoc/server-discovery.adoc renamed to spring-boot-admin-docs/src/site/asciidoc/_server-discovery.adoc

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
[[spring-cloud-discovery-support]]
2-
=== Spring Cloud Discovery ===
2+
== Spring Cloud Discovery ==
33

44
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.
55

66
[[spring-cloud-discovery-static-config]]
7-
==== Static Configuration using SimpleDiscoveryClient ====
7+
=== Static Configuration using SimpleDiscoveryClient ===
88

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

@@ -35,20 +35,18 @@ spring:
3535
management.context-path: /actuator
3636
----
3737

38-
==== Other DiscoveryClients ====
38+
=== Other DiscoveryClients ===
3939
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.
40-
An <<discover-clients-via-spring-cloud-discovery,example setup using Eureka>> is shown above.
40+
An <<getting-started#discover-clients-via-spring-cloud-discovery,example setup using Eureka>> is shown above.
4141

42-
==== Converting ServiceInstances ====
42+
=== Converting ServiceInstances ===
4343

4444
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.
4545

4646
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`.
4747

4848
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`.
4949

50-
WARNING: Consul does not allow dots (`.`) in metadata keys, use dashes instead (e.g. `management-context-path`).
51-
5250
.Instance metadata options
5351
|===
5452
| Key |Value |Default value
@@ -112,7 +110,7 @@ user.password
112110
|
113111
|===
114112

115-
==== CloudFoundry ====
113+
=== CloudFoundry ===
116114
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.
117115
Here is a sample configuration for Eureka:
118116

spring-boot-admin-docs/src/main/asciidoc/client.adoc renamed to spring-boot-admin-docs/src/site/asciidoc/client.adoc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[[client-applications]]
2-
== Client Applications ==
2+
= Client Applications =
33

44
[[show-version-in-application-list]]
5-
=== Show Version in Application List ===
5+
== Show Version in Application List ==
66

77
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`.
88
See also the http://docs.spring.io/spring-boot/docs/current-SNAPSHOT/reference/htmlsingle/#howto-build-info[Spring Boot Reference Guide].
@@ -39,7 +39,7 @@ springBoot {
3939
----
4040

4141
[[jmx-bean-management]]
42-
=== JMX-Bean Management ===
42+
== JMX-Bean Management ==
4343

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

5858
[[logfile]]
59-
=== Logfile Viewer ===
59+
== Logfile Viewer ==
6060

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

8282
[[show-instance-tags]]
83-
=== Show Tags per Instance ===
83+
== Show Tags per Instance ==
8484

8585
`Tags` are a way to add visual markers per instance, they will appear in the application list as well as in the instance view.
8686
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.
@@ -95,7 +95,7 @@ info.tags.environment=test
9595
----
9696

9797
[[spring-boot-admin-client]]
98-
=== Spring Boot Admin Client ===
98+
== Spring Boot Admin Client ==
9999

100100
The Spring Boot Admin Client registers the application at the admin server.
101101
This is done by periodically doing a HTTP post request to the SBA Server providing information about the application.

spring-boot-admin-docs/src/main/asciidoc/faqs.adoc renamed to spring-boot-admin-docs/src/site/asciidoc/faq.adoc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
[[faqs]]
2-
== FAQs ==
2+
= FAQ =
3+
34
[q-and-a]
45
Can I include spring-boot-admin into my business application?::
56
*tl;dr* You can, but you shouldn't. +

0 commit comments

Comments
 (0)