Skip to content

Commit 8dced29

Browse files
authored
docs: revise URL structure (libraries) (#1319)
* docs: revise URL structure (libraries) * Use sbt's Version matcher for binary versions * Use link-validator; configure JavaDoc
1 parent 435650d commit 8dced29

File tree

24 files changed

+133
-43
lines changed

24 files changed

+133
-43
lines changed

Diff for: .github/workflows/link-validator.yml

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Link Validator
2+
3+
on:
4+
workflow_dispatch:
5+
pull_request:
6+
schedule:
7+
- cron: '0 6 * * 1'
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
validate-links:
14+
runs-on: ubuntu-22.04
15+
if: github.repository == 'akka/akka-management'
16+
steps:
17+
- name: Checkout
18+
# https://github.com/actions/checkout/releases
19+
# v4.1.1
20+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
21+
with:
22+
# See https://github.com/actions/checkout/issues/299#issuecomment-677674415
23+
ref: ${{ github.event.pull_request.head.sha }}
24+
fetch-depth: 100
25+
26+
- name: Fetch tags
27+
run: git fetch --depth=100 origin +refs/tags/*:refs/tags/*
28+
29+
- name: Cache Coursier cache
30+
# https://github.com/coursier/cache-action/releases
31+
# v6.4.5
32+
uses: coursier/cache-action@1ff273bff02a8787bc9f1877d347948af647956d
33+
34+
- name: Set up JDK 17
35+
# https://github.com/coursier/setup-action/releases
36+
# v1.3.5
37+
uses: coursier/setup-action@7bde40eee928896f074dbb76d22dd772eed5c65f
38+
with:
39+
jvm: temurin:1.17.0.5
40+
apps: cs
41+
42+
- name: sbt site
43+
run: sbt docs/makeSite
44+
45+
- name: Run Link Validator
46+
run: cs launch net.runne::site-link-validator:0.2.5 -- scripts/link-validator.conf

Diff for: README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Future additions may extend these concepts to other parts of Akka.
88
Documentation
99
-------------
1010

11-
See [reference](https://doc.akka.io/docs/akka-management/current/) and [API](https://doc.akka.io/api/akka-management/current/akka/management/index.html)
11+
See [reference](https://doc.akka.io/libraries/akka-management/current/) and [API](https://doc.akka.io/api/akka-management/current/akka/management/index.html)
1212

1313
Contributions & Maintainers
1414
---------------------------

Diff for: build.sbt

+8-8
Original file line numberDiff line numberDiff line change
@@ -366,20 +366,20 @@ lazy val docs = project
366366
),
367367
previewPath := (Paradox / siteSubdirName).value,
368368
paradoxGroups := Map("Language" -> Seq("Java", "Scala")),
369-
Paradox / siteSubdirName := s"docs/akka-management/${if (isSnapshot.value) "snapshot" else version.value}",
369+
Paradox / siteSubdirName := s"libraries/akka-management/${if (isSnapshot.value) "snapshot" else version.value}",
370370
Compile / paradoxProperties ++= Map(
371371
"date.year" -> Common.currentYear,
372-
"project.url" -> "https://doc.akka.io/docs/akka-management/current/",
373-
"canonical.base_url" -> "https://doc.akka.io/docs/akka-management/current",
372+
"project.url" -> "https://doc.akka.io/libraries/akka-management/current/",
373+
"canonical.base_url" -> "https://doc.akka.io/libraries/akka-management/current",
374374
"scala.binary.version" -> scalaBinaryVersion.value,
375375
"akka.version" -> Dependencies.AkkaVersion,
376376
"akka.binary.version" -> Dependencies.AkkaBinaryVersion,
377-
"extref.akka.base_url" -> s"https://doc.akka.io/docs/akka/current/%s",
378-
"scaladoc.akka.base_url" -> s"https://doc.akka.io/api/akka/current/",
379-
"extref.akka-http.base_url" -> s"https://doc.akka.io/docs/akka-http/${Dependencies.AkkaHttpBinaryVersion}/%s",
377+
"extref.akka.base_url" -> s"https://doc.akka.io/libraries/akka-core/current/%s",
378+
"scaladoc.akka.base_url" -> s"https://doc.akka.io/api/akka-core/current/",
379+
"extref.akka-http.base_url" -> s"https://doc.akka.io/libraries/akka-http/${Dependencies.AkkaHttpBinaryVersion}/%s",
380380
"scaladoc.akka.http.base_url" -> s"https://doc.akka.io/api/akka-http/${Dependencies.AkkaHttpBinaryVersion}/",
381-
"extref.akka-grpc.base_url" -> s"https://doc.akka.io/docs/akka-grpc/current/%s",
382-
"extref.akka-enhancements.base_url" -> s"https://doc.akka.io/docs/akka-enhancements/current/%s",
381+
"extref.akka-grpc.base_url" -> s"https://doc.akka.io/libraries/akka-grpc/current/%s",
382+
"extref.akka-enhancements.base_url" -> s"https://doc.akka.io/libraries/akka-enhancements/current/%s",
383383
"scaladoc.akka.management.base_url" -> s"/${(Preprocess / siteSubdirName).value}/"
384384
),
385385
publishRsyncArtifacts += makeSite.value -> "www/",

Diff for: docs/release-train-issue-template.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Variables to be expanded in this template:
2727
### Check availability
2828

2929
- [ ] Check [API](https://doc.akka.io/api/akka-management/$VERSION$/) documentation
30-
- [ ] Check [reference](https://doc.akka.io/docs/akka-management/$VERSION$/) documentation. Check that the reference docs were deployed and show a version warning (see section below on how to fix the version warning).
30+
- [ ] Check [reference](https://doc.akka.io/libraries/akka-management/$VERSION$/) documentation. Check that the reference docs were deployed and show a version warning (see section below on how to fix the version warning).
3131
- [ ] Check the release on https://repo.akka.io/maven/com/lightbend/akka/management/akka-management_2.13/$VERSION$/akka-management_2.13-$VERSION$.pom
3232

3333
### When everything is on https://repo.akka.io/maven
@@ -37,7 +37,7 @@ Variables to be expanded in this template:
3737
```
3838
cd ~/www
3939
git status
40-
git add docs/akka-management/current docs/akka-management/$VERSION$
40+
git add libraries/akka-management/current libraries/akka-management/$VERSION$
4141
git add api/akka-management/current api/akka-management/$VERSION$
4242
git commit -m "Akka Management $VERSION$"
4343
```
@@ -56,7 +56,7 @@ For minor or major releases:
5656
5757
### Afterwards
5858
59-
- [ ] Update [akka-dependencies bom](https://github.com/lightbend/akka-dependencies) and version for [Akka module versions](https://doc.akka.io/docs/akka-dependencies/current/) in [akka-dependencies repo](https://github.com/akka/akka-dependencies)
59+
- [ ] Update [akka-dependencies bom](https://github.com/lightbend/akka-dependencies) and version for [Akka module versions](https://doc.akka.io/libraries/akka-dependencies/current/) in [akka-dependencies repo](https://github.com/akka/akka-dependencies)
6060
- [ ] Update [Akka Guide samples](https://github.com/lightbend/akka-guide)
6161
- Close this issue
6262

Diff for: docs/src/main/paradox/.htaccess

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# Sample redirect when renaming pages
2-
# RedirectMatch 301 ^/docs/akka-management/([^/]+)/release-notes/1.0.html https://doc.akka.io/docs/akka-management/$1/release-notes/1.0.x.html
2+
# RedirectMatch 301 ^/docs/akka-management/([^/]+)/release-notes/1.0.html https://doc.akka.io/libraries/akka-management/$1/release-notes/1.0.x.html

Diff for: docs/src/main/paradox/bootstrap/istio.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
To bootstrap an Akka cluster in Istio, Istio must be configured to allow Akka cluster communication to bypass the Istio sidecar proxy. Istio's routing design is made such that services don't need to be aware of each others location, they just communicate with the proxy, and the mesh figures out how to route and secure the communication. However, Akka cluster communication is fundamentally location aware, in order to, for example, route messages to sharded actors. Hence a service mesh is not a suitable communication medium for cluster traffic, so it needs to be bypassed.
66

7-
It is important to be aware that since Istio's proxy is bypassed, the Akka cluster communication will not be secured by Istio using TLS. If you wish to secure your cluster communication, you will need to configure [Akka remoting with mTLS](https://doc.akka.io/docs/akka/current/remoting-artery.html#remote-security) yourself.
7+
It is important to be aware that since Istio's proxy is bypassed, the Akka cluster communication will not be secured by Istio using TLS. If you wish to secure your cluster communication, you will need to configure [Akka remoting with mTLS](https://doc.akka.io/libraries/akka-core/current/remoting-artery.html#remote-security) yourself.
88

99
Booting an Akka cluster in Istio requires a minimum Istio version of 1.2.0, as it requires the outbound port exclusions feature that was added in there. It also requires using the @ref[Kubernetes API](kubernetes-api.md) contact point discovery method to be used. The instructions below are for the additional configuration necessary to ensure an Akka cluster can be bootstrapped in Istio.
1010

@@ -72,4 +72,4 @@ spec:
7272
httpGet:
7373
path: "/alive"
7474
port: management
75-
```
75+
```

Diff for: docs/src/main/paradox/discovery/kubernetes.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ spec:
118118

119119
### Role-Based Access Control
120120

121-
If your Kubernetes cluster has [Role-Based Access Control (RBAC)](https://kubernetes.io/docs/admin/authorization/rbac/)
121+
If your Kubernetes cluster has [Role-Based Access Control (RBAC)](https://kubernetes.io/docs/reference/access-authn-authz/rbac/)
122122
enabled, you'll also have to grant the Service Account that your pods run under access to list pods. The following
123123
configuration can be used as a starting point. It creates a `Role`, `pod-reader`, which grants access to query pod
124124
information. It then binds the default Service Account to the `Role` by creating a `RoleBinding`.

Diff for: docs/src/main/paradox/kubernetes-deployment/building-using-maven.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ To build and publish the image run the following. The Docker username and regist
9999

100100
Note that the registry to push to must include the username, for example `-Ddocker.registry=docker.io/youruser`.
101101

102-
Security information (i.e. user and password) can be specified in multiple ways as described in section [docker-maven-plugin authentication](http://dmp.fabric8.io/#authentication).
102+
Security information (i.e. user and password) can be specified in multiple ways as described in section [docker-maven-plugin authentication](https://dmp.fabric8.io/#authentication).
103103

104104
```
105105
mvn -Ddocker.username=<user> -Ddocker.registry=<registry>/<user> package docker:push

Diff for: docs/src/main/paradox/kubernetes-deployment/building-using-sbt.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ We recommend using the Eclipse Temurin 17 base image:
3434
dockerBaseImage := "docker.io/library/eclipse-temurin:17-jre"
3535
```
3636

37-
For a full list of Lightbend certified JDK builds and versions, see [here](https://doc.akka.io/docs/akka-dependencies/current/java-versions.html).
37+
For a full list of Lightbend certified JDK builds and versions, see [here](https://doc.akka.io/libraries/akka-dependencies/current/java-versions.html).
3838

3939
### Git hash based version numbers
4040

Diff for: docs/src/main/paradox/kubernetes-deployment/deploying.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ make the logs quieter, but for now it will help us to understand what is happeni
6161
6262
1 [INFO] [akka.remote.artery.tcp.ArteryTcpTransport] - Remoting started with transport [Artery tcp]; listening on address [akka://[email protected]:25520] with UID [4609278524397890522] MDC: {akkaAddress=akka://[email protected]:25520, sourceThread=main, akkaSource=ArteryTcpTransport(akka://Appka), sourceActorSystem=Appka, akkaTimestamp=10:04:51.188UTC}
6363
[INFO] [akka.cluster.Cluster] [] [Appka-akka.actor.default-dispatcher-3] - Cluster Node [akka://[email protected]:25520] - Starting up, Akka version [2.6.5] ... MDC: {akkaAddress=akka://[email protected]:25520, sourceThread=main, akkaSource=Cluster(akka://Appka), sourceActorSystem=Appka, akkaTimestamp=10:04:51.240UTC}
64-
[INFO] [akka.cluster.Cluster] [] [Appka-akka.actor.default-dispatcher-6] - Cluster Node [akka://[email protected]:25520] - No seed-nodes configured, manual cluster join required, see https://doc.akka.io/docs/akka/current/typed/cluster.html#joining MDC: {akkaAddress=akka://[email protected]:25520, sourceThread=Appka-akka.actor.internal-dispatcher-5, akkaSource=Cluster(akka://Appka), sourceActorSystem=Appka, akkaTimestamp=10:04:51.619UTC}
64+
[INFO] [akka.cluster.Cluster] [] [Appka-akka.actor.default-dispatcher-6] - Cluster Node [akka://[email protected]:25520] - No seed-nodes configured, manual cluster join required, see https://doc.akka.io/libraries/akka-core/current/typed/cluster.html#joining MDC: {akkaAddress=akka://[email protected]:25520, sourceThread=Appka-akka.actor.internal-dispatcher-5, akkaSource=Cluster(akka://Appka), sourceActorSystem=Appka, akkaTimestamp=10:04:51.619UTC}
6565
[INFO] [akka.cluster.bootstrap.demo.DemoApp] [] [Appka-akka.actor.default-dispatcher-6] - Started [akka://Appka], cluster.selfAddress = akka://[email protected]:25520) MDC: {akkaAddress=akka://[email protected]:25520, akkaSource=akka://Appka/user, sourceActorSystem=Appka}
6666
6767
2a [INFO] [akka.management.internal.HealthChecksImpl] [] [Appka-akka.actor.default-dispatcher-3] - Loading readiness checks [(cluster-membership,akka.management.cluster.scaladsl.ClusterMembershipCheck), (example-ready,akka.cluster.bootstrap.demo.DemoHealthCheck)] MDC: {akkaAddress=akka://[email protected]:25520, sourceThread=Appka-akka.actor.default-dispatcher-6, akkaSource=HealthChecksImpl(akka://Appka), sourceActorSystem=Appka, akkaTimestamp=10:04:53.510UTC}
@@ -150,7 +150,7 @@ for 'hello world':
150150

151151
kubectl expose deployment appka --type=LoadBalancer --name=appka-service
152152

153-
You can inspect the Akka Cluster membership status with the [Cluster HTTP Management](https://doc.akka.io/docs/akka-management/current/cluster-http-management.html).
153+
You can inspect the Akka Cluster membership status with the @ref:[Cluster HTTP Management](../cluster-http-management.md).
154154

155155
curl http://127.0.0.1:8558/cluster/members/
156156

Diff for: docs/src/main/paradox/kubernetes-deployment/preparing-for-production.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -66,14 +66,14 @@ spec:
6666
Here are a few things to note:
6767
6868
* We're using a Kubernetes deployment. Deployments are logical groupings of pods that represent a single service using the same template.
69-
They support [configurable rolling updates](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.11/#deploymentstrategy-v1-apps),
69+
They support configurable rolling updates,
7070
meaning the cluster will be gradually upgraded, rather than upgrading every node at once and incurring an outage. Be sure to consult @ref:[Kubernetes Rolling Updates](../rolling-updates.md#kubernetes-rolling-updates) for recommendations.
7171
* We label the pod in the `template` with `app: appka`. This must match the ActorSystem name so that @ref[Akka Bootstrap](../bootstrap/index.md) finds the other nodes in the cluster.
7272
* The image we're using is `akka-sample-cluster-kubernetes:latest`. This corresponds to the name and version of the service in our build.
7373
We will discuss how to select an appropriate version number below.
7474
* We've only requested minimal CPU to the pods for this service. This is suitable for a local deployment, but you may wish to increase it if you're
7575
deploying to a real deployment. Note that we also haven't set a CPU limit, this is because it's
76-
[recommended that JVMs do not set a CPU limit](https://doc.akka.io/docs/akka/current/additional/deploying.html#resource-limits).
76+
[recommended that JVMs do not set a CPU limit](https://doc.akka.io/libraries/akka-core/current/additional/deploying.html#resource-limits).
7777
* We've configured a liveness probe and readiness probe. These are provided out of the box by Akka Management and are discussed later.
7878

7979
## Image version number

Diff for: docs/src/main/paradox/kubernetes-lease.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ The API, configuration and behavior may change based on feedback from initial us
77

88
@@@
99

10-
This module is an implementation of an [Akka Coordination Lease](https://doc.akka.io/docs/akka/current/coordination.html#lease) backed
10+
This module is an implementation of an [Akka Coordination Lease](https://doc.akka.io/libraries/akka-core/current/coordination.html#lease) backed
1111
by a [Custom Resource Definition (CRD)](https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/) in Kubernetes.
1212
Resources in Kubernetes offer [concurrency control and consistency](https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/)
1313
that have been used to build a distributed lease/lock.

Diff for: docs/src/main/paradox/loglevels/log4j2.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ curl -X PUT "http://127.0.0.1:8558/loglevel/log4j2?logger=com.example.MyActor&le
7171

7272
#### Classic and Internal Akka Logger Level
7373

74-
Internal Akka actors and classic Akka does logging through the built in API there is an [additional level of filtering](https://doc.akka.io/docs/akka/current/logging.html#slf4j) using the
74+
Internal Akka actors and classic Akka does logging through the built in API there is an [additional level of filtering](https://doc.akka.io/libraries/akka-core/current/logging.html#slf4j) using the
7575
`akka.loglevel` setting. If you have not set `akka.loglevel` to `DEBUG` (recommended) log entries from the classic logging API may never reach the logger backend at all.
7676

7777
The current level configured with `akka.loglevel` can be inspected with a GET request to `loglevel/akka`.

Diff for: docs/src/main/paradox/loglevels/logback.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Dynamic Log Levels for Logback hooks into Akka Management and provides a route w
66

77
@@project-info{ projectId="loglevels-logback" }
88

9-
Requires @ref:[Akka Management](../akka-management.md) and that the application uses [Logback](http://logback.qos.ch) as logging backend.
9+
Requires @ref:[Akka Management](../akka-management.md) and that the application uses [Logback](https://logback.qos.ch) as logging backend.
1010

1111
The Akka dependencies are available from Akka's library repository. To access them there, you need to configure the URL for this repository.
1212

@@ -71,7 +71,7 @@ curl -X PUT "http://127.0.0.1:8558/loglevel/logback?logger=com.example.MyActor&l
7171

7272
#### Classic and Internal Akka Logger Level
7373

74-
Internal Akka actors and classic Akka does logging through the built in API there is an [additional level of filtering](https://doc.akka.io/docs/akka/current/logging.html#slf4j) using the
74+
Internal Akka actors and classic Akka does logging through the built in API there is an [additional level of filtering](https://doc.akka.io/libraries/akka-core/current/logging.html#slf4j) using the
7575
`akka.loglevel` setting. If you have not set `akka.loglevel` to `DEBUG` (recommended) log entries from the classic logging API may never reach the logger backend at all.
7676

7777
The current level configured with `akka.loglevel` can be inspected with a GET request to `loglevel/akka`.

Diff for: docs/src/main/paradox/rolling-updates.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ roleRef:
206206

207207
## app-version from Deployment
208208

209-
When using Cluster Sharding, it is [recommended](https://doc.akka.io/docs/akka/current/additional/rolling-updates.html#cluster-sharding) to define an increasing `akka.cluster.app-version` configuration property for each roll out.
209+
When using Cluster Sharding, it is [recommended](https://doc.akka.io/libraries/akka-core/current/additional/rolling-updates.html#cluster-sharding) to define an increasing `akka.cluster.app-version` configuration property for each roll out.
210210

211211
This works well unless you use `kubectl rollout undo` which deploys the previous ReplicaSet configuration which contains the previous value for that config.
212212

Diff for: lease-kubernetes/src/main/scala/akka/coordination/lease/kubernetes/internal/KubernetesApiImpl.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ PUTs must contain resourceVersions. Response:
210210
.to[String]
211211
.map(body =>
212212
throw new LeaseException(
213-
s"Unauthorized to communicate with Kubernetes API server. See https://doc.akka.io/docs/akka-management/current/kubernetes-lease.html#role-based-access-control for setting up access control. Body: $body"))
213+
s"Unauthorized to communicate with Kubernetes API server. See https://doc.akka.io/libraries/akka-management/current/kubernetes-lease.html#role-based-access-control for setting up access control. Body: $body"))
214214
}
215215

216216
private def pathForLease(name: String): Uri.Path =

Diff for: native-image-tests/src/main/resources/logback.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<configuration>
22
<!-- This is a development logging configuration that logs to standard out, for an example of a production
3-
logging config, see the Akka docs: https://doc.akka.io/docs/akka/2.6/typed/logging.html#logback -->
3+
logging config, see the Akka docs: https://doc.akka.io/libraries/akka-core/2.6/typed/logging.html#logback -->
44
<appender name="STDOUT" target="System.out" class="ch.qos.logback.core.ConsoleAppender">
55
<encoder>
66
<pattern>[%date{ISO8601}] [%level] [%logger] [%thread] [%X{akkaSource}] - %msg%n</pattern>

0 commit comments

Comments
 (0)