From d47740935d496753bb961914788765c53aa52b16 Mon Sep 17 00:00:00 2001 From: Enno Runne <458526+ennru@users.noreply.github.com> Date: Mon, 23 Sep 2024 11:14:34 +0200 Subject: [PATCH 1/7] docs: revise URL structure (libraries) --- README.md | 2 +- build.sbt | 14 +++++++------- docs/release-train-issue-template.md | 4 ++-- docs/src/main/paradox/.htaccess | 2 +- docs/src/main/paradox/bootstrap/istio.md | 4 ++-- .../kubernetes-deployment/building-using-sbt.md | 2 +- .../paradox/kubernetes-deployment/deploying.md | 4 ++-- .../preparing-for-production.md | 2 +- docs/src/main/paradox/kubernetes-lease.md | 2 +- docs/src/main/paradox/loglevels/log4j2.md | 2 +- docs/src/main/paradox/loglevels/logback.md | 2 +- docs/src/main/paradox/rolling-updates.md | 2 +- .../kubernetes/internal/KubernetesApiImpl.scala | 2 +- native-image-tests/src/main/resources/logback.xml | 2 +- .../kubernetes/KubernetesApiImpl.scala | 2 +- .../akka-sample-cluster-kubernetes-java/README.md | 4 ++-- .../akka-sample-cluster-kubernetes-scala/README.md | 4 ++-- 17 files changed, 28 insertions(+), 28 deletions(-) diff --git a/README.md b/README.md index 6fa7c8591..efd9bcc12 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ Future additions may extend these concepts to other parts of Akka. Documentation ------------- -See [reference](https://doc.akka.io/docs/akka-management/current/) and [API](https://doc.akka.io/api/akka-management/current/akka/management/index.html) +See [reference](https://doc.akka.io/libraries/akka-management/current/) and [API](https://doc.akka.io/api/akka-management/current/akka/management/index.html) Contributions & Maintainers --------------------------- diff --git a/build.sbt b/build.sbt index 04657ed57..cd1d6cade 100644 --- a/build.sbt +++ b/build.sbt @@ -369,17 +369,17 @@ lazy val docs = project Paradox / siteSubdirName := s"docs/akka-management/${if (isSnapshot.value) "snapshot" else version.value}", Compile / paradoxProperties ++= Map( "date.year" -> Common.currentYear, - "project.url" -> "https://doc.akka.io/docs/akka-management/current/", - "canonical.base_url" -> "https://doc.akka.io/docs/akka-management/current", + "project.url" -> "https://doc.akka.io/libraries/akka-management/current/", + "canonical.base_url" -> "https://doc.akka.io/libraries/akka-management/current", "scala.binary.version" -> scalaBinaryVersion.value, "akka.version" -> Dependencies.AkkaVersion, "akka.binary.version" -> Dependencies.AkkaBinaryVersion, - "extref.akka.base_url" -> s"https://doc.akka.io/docs/akka/current/%s", - "scaladoc.akka.base_url" -> s"https://doc.akka.io/api/akka/current/", - "extref.akka-http.base_url" -> s"https://doc.akka.io/docs/akka-http/${Dependencies.AkkaHttpBinaryVersion}/%s", + "extref.akka.base_url" -> s"https://doc.akka.io/libraries/akka-core/current/%s", + "scaladoc.akka.base_url" -> s"https://doc.akka.io/api/akka-core/current/", + "extref.akka-http.base_url" -> s"https://doc.akka.io/libraries/akka-http/${Dependencies.AkkaHttpBinaryVersion}/%s", "scaladoc.akka.http.base_url" -> s"https://doc.akka.io/api/akka-http/${Dependencies.AkkaHttpBinaryVersion}/", - "extref.akka-grpc.base_url" -> s"https://doc.akka.io/docs/akka-grpc/current/%s", - "extref.akka-enhancements.base_url" -> s"https://doc.akka.io/docs/akka-enhancements/current/%s", + "extref.akka-grpc.base_url" -> s"https://doc.akka.io/libraries/akka-grpc/current/%s", + "extref.akka-enhancements.base_url" -> s"https://doc.akka.io/libraries/akka-enhancements/current/%s", "scaladoc.akka.management.base_url" -> s"/${(Preprocess / siteSubdirName).value}/" ), publishRsyncArtifacts += makeSite.value -> "www/", diff --git a/docs/release-train-issue-template.md b/docs/release-train-issue-template.md index 183bc9dc4..309a396f5 100644 --- a/docs/release-train-issue-template.md +++ b/docs/release-train-issue-template.md @@ -27,7 +27,7 @@ Variables to be expanded in this template: ### Check availability - [ ] Check [API](https://doc.akka.io/api/akka-management/$VERSION$/) documentation -- [ ] 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). +- [ ] 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). - [ ] Check the release on https://repo.akka.io/maven/com/lightbend/akka/management/akka-management_2.13/$VERSION$/akka-management_2.13-$VERSION$.pom ### When everything is on https://repo.akka.io/maven @@ -56,7 +56,7 @@ For minor or major releases: ### Afterwards -- [ ] 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) +- [ ] 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) - [ ] Update [Akka Guide samples](https://github.com/lightbend/akka-guide) - Close this issue diff --git a/docs/src/main/paradox/.htaccess b/docs/src/main/paradox/.htaccess index b19de75fd..e37a66496 100644 --- a/docs/src/main/paradox/.htaccess +++ b/docs/src/main/paradox/.htaccess @@ -1,2 +1,2 @@ # Sample redirect when renaming pages -# RedirectMatch 301 ^/docs/akka-management/([^/]+)/release-notes/1.0.html https://doc.akka.io/docs/akka-management/$1/release-notes/1.0.x.html +# 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 --git a/docs/src/main/paradox/bootstrap/istio.md b/docs/src/main/paradox/bootstrap/istio.md index 2cc6be883..7fdfe35e8 100644 --- a/docs/src/main/paradox/bootstrap/istio.md +++ b/docs/src/main/paradox/bootstrap/istio.md @@ -4,7 +4,7 @@ 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. -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. +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. 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. @@ -72,4 +72,4 @@ spec: httpGet: path: "/alive" port: management -``` \ No newline at end of file +``` diff --git a/docs/src/main/paradox/kubernetes-deployment/building-using-sbt.md b/docs/src/main/paradox/kubernetes-deployment/building-using-sbt.md index dac844ce1..580d2f97b 100644 --- a/docs/src/main/paradox/kubernetes-deployment/building-using-sbt.md +++ b/docs/src/main/paradox/kubernetes-deployment/building-using-sbt.md @@ -34,7 +34,7 @@ We recommend using the Eclipse Temurin 17 base image: dockerBaseImage := "docker.io/library/eclipse-temurin:17-jre" ``` -For a full list of Lightbend certified JDK builds and versions, see [here](https://doc.akka.io/docs/akka-dependencies/current/java-versions.html). +For a full list of Lightbend certified JDK builds and versions, see [here](https://doc.akka.io/libraries/akka-dependencies/current/java-versions.html). ### Git hash based version numbers diff --git a/docs/src/main/paradox/kubernetes-deployment/deploying.md b/docs/src/main/paradox/kubernetes-deployment/deploying.md index fe2a278fe..c7357e5f2 100644 --- a/docs/src/main/paradox/kubernetes-deployment/deploying.md +++ b/docs/src/main/paradox/kubernetes-deployment/deploying.md @@ -61,7 +61,7 @@ make the logs quieter, but for now it will help us to understand what is happeni 1 [INFO] [akka.remote.artery.tcp.ArteryTcpTransport] - Remoting started with transport [Artery tcp]; listening on address [akka://Appka@172.17.0.6:25520] with UID [4609278524397890522] MDC: {akkaAddress=akka://Appka@172.17.0.6:25520, sourceThread=main, akkaSource=ArteryTcpTransport(akka://Appka), sourceActorSystem=Appka, akkaTimestamp=10:04:51.188UTC} [INFO] [akka.cluster.Cluster] [] [Appka-akka.actor.default-dispatcher-3] - Cluster Node [akka://Appka@172.17.0.6:25520] - Starting up, Akka version [2.6.5] ... MDC: {akkaAddress=akka://Appka@172.17.0.6:25520, sourceThread=main, akkaSource=Cluster(akka://Appka), sourceActorSystem=Appka, akkaTimestamp=10:04:51.240UTC} - [INFO] [akka.cluster.Cluster] [] [Appka-akka.actor.default-dispatcher-6] - Cluster Node [akka://Appka@172.17.0.6:25520] - No seed-nodes configured, manual cluster join required, see https://doc.akka.io/docs/akka/current/typed/cluster.html#joining MDC: {akkaAddress=akka://Appka@172.17.0.6:25520, sourceThread=Appka-akka.actor.internal-dispatcher-5, akkaSource=Cluster(akka://Appka), sourceActorSystem=Appka, akkaTimestamp=10:04:51.619UTC} + [INFO] [akka.cluster.Cluster] [] [Appka-akka.actor.default-dispatcher-6] - Cluster Node [akka://Appka@172.17.0.6: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://Appka@172.17.0.6:25520, sourceThread=Appka-akka.actor.internal-dispatcher-5, akkaSource=Cluster(akka://Appka), sourceActorSystem=Appka, akkaTimestamp=10:04:51.619UTC} [INFO] [akka.cluster.bootstrap.demo.DemoApp] [] [Appka-akka.actor.default-dispatcher-6] - Started [akka://Appka], cluster.selfAddress = akka://Appka@172.17.0.6:25520) MDC: {akkaAddress=akka://Appka@172.17.0.6:25520, akkaSource=akka://Appka/user, sourceActorSystem=Appka} 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://Appka@172.17.0.6: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': kubectl expose deployment appka --type=LoadBalancer --name=appka-service -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). +You can inspect the Akka Cluster membership status with the [Cluster HTTP Management](https://doc.akka.io/libraries/akka-management/current/cluster-http-management.html). curl http://127.0.0.1:8558/cluster/members/ diff --git a/docs/src/main/paradox/kubernetes-deployment/preparing-for-production.md b/docs/src/main/paradox/kubernetes-deployment/preparing-for-production.md index 79d0a8b96..c0d8fdf65 100644 --- a/docs/src/main/paradox/kubernetes-deployment/preparing-for-production.md +++ b/docs/src/main/paradox/kubernetes-deployment/preparing-for-production.md @@ -73,7 +73,7 @@ Here are a few things to note: We will discuss how to select an appropriate version number below. * 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 deploying to a real deployment. Note that we also haven't set a CPU limit, this is because it's - [recommended that JVMs do not set a CPU limit](https://doc.akka.io/docs/akka/current/additional/deploying.html#resource-limits). + [recommended that JVMs do not set a CPU limit](https://doc.akka.io/libraries/akka-core/current/additional/deploying.html#resource-limits). * We've configured a liveness probe and readiness probe. These are provided out of the box by Akka Management and are discussed later. ## Image version number diff --git a/docs/src/main/paradox/kubernetes-lease.md b/docs/src/main/paradox/kubernetes-lease.md index 34e475ce2..4c8ad2206 100644 --- a/docs/src/main/paradox/kubernetes-lease.md +++ b/docs/src/main/paradox/kubernetes-lease.md @@ -7,7 +7,7 @@ The API, configuration and behavior may change based on feedback from initial us @@@ -This module is an implementation of an [Akka Coordination Lease](https://doc.akka.io/docs/akka/current/coordination.html#lease) backed +This module is an implementation of an [Akka Coordination Lease](https://doc.akka.io/libraries/akka-core/current/coordination.html#lease) backed by a [Custom Resource Definition (CRD)](https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/) in Kubernetes. Resources in Kubernetes offer [concurrency control and consistency](https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/) that have been used to build a distributed lease/lock. diff --git a/docs/src/main/paradox/loglevels/log4j2.md b/docs/src/main/paradox/loglevels/log4j2.md index 17bca6aba..193a41251 100644 --- a/docs/src/main/paradox/loglevels/log4j2.md +++ b/docs/src/main/paradox/loglevels/log4j2.md @@ -71,7 +71,7 @@ curl -X PUT "http://127.0.0.1:8558/loglevel/log4j2?logger=com.example.MyActor&le #### Classic and Internal Akka Logger Level -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 +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 `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. The current level configured with `akka.loglevel` can be inspected with a GET request to `loglevel/akka`. diff --git a/docs/src/main/paradox/loglevels/logback.md b/docs/src/main/paradox/loglevels/logback.md index 0ba7a068d..bdb359273 100644 --- a/docs/src/main/paradox/loglevels/logback.md +++ b/docs/src/main/paradox/loglevels/logback.md @@ -71,7 +71,7 @@ curl -X PUT "http://127.0.0.1:8558/loglevel/logback?logger=com.example.MyActor&l #### Classic and Internal Akka Logger Level -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 +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 `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. The current level configured with `akka.loglevel` can be inspected with a GET request to `loglevel/akka`. diff --git a/docs/src/main/paradox/rolling-updates.md b/docs/src/main/paradox/rolling-updates.md index decbc6de2..974027ccc 100644 --- a/docs/src/main/paradox/rolling-updates.md +++ b/docs/src/main/paradox/rolling-updates.md @@ -206,7 +206,7 @@ roleRef: ## app-version from Deployment -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. +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. This works well unless you use `kubectl rollout undo` which deploys the previous ReplicaSet configuration which contains the previous value for that config. diff --git a/lease-kubernetes/src/main/scala/akka/coordination/lease/kubernetes/internal/KubernetesApiImpl.scala b/lease-kubernetes/src/main/scala/akka/coordination/lease/kubernetes/internal/KubernetesApiImpl.scala index dbb8ecd23..9fe5c1c0e 100644 --- a/lease-kubernetes/src/main/scala/akka/coordination/lease/kubernetes/internal/KubernetesApiImpl.scala +++ b/lease-kubernetes/src/main/scala/akka/coordination/lease/kubernetes/internal/KubernetesApiImpl.scala @@ -210,7 +210,7 @@ PUTs must contain resourceVersions. Response: .to[String] .map(body => throw new LeaseException( - 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")) + 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")) } private def pathForLease(name: String): Uri.Path = diff --git a/native-image-tests/src/main/resources/logback.xml b/native-image-tests/src/main/resources/logback.xml index 7aff05869..b6ace3478 100644 --- a/native-image-tests/src/main/resources/logback.xml +++ b/native-image-tests/src/main/resources/logback.xml @@ -1,6 +1,6 @@ + logging config, see the Akka docs: https://doc.akka.io/libraries/akka-core/2.6/typed/logging.html#logback --> [%date{ISO8601}] [%level] [%logger] [%thread] [%X{akkaSource}] - %msg%n diff --git a/rolling-update-kubernetes/src/main/scala/akka/rollingupdate/kubernetes/KubernetesApiImpl.scala b/rolling-update-kubernetes/src/main/scala/akka/rollingupdate/kubernetes/KubernetesApiImpl.scala index bf8dd05f9..39312ee2d 100644 --- a/rolling-update-kubernetes/src/main/scala/akka/rollingupdate/kubernetes/KubernetesApiImpl.scala +++ b/rolling-update-kubernetes/src/main/scala/akka/rollingupdate/kubernetes/KubernetesApiImpl.scala @@ -301,7 +301,7 @@ PUTs must contain resourceVersions. Response: .map(body => throw new UnauthorizedException( "Unauthorized to communicate with Kubernetes API server. See " + - "https://doc.akka.io/docs/akka-management/current/rolling-updates.html#role-based-access-control " + + "https://doc.akka.io/libraries/akka-management/current/rolling-updates.html#role-based-access-control " + s"for setting up access control. Body: $body")) } diff --git a/samples/akka-sample-cluster-kubernetes-java/README.md b/samples/akka-sample-cluster-kubernetes-java/README.md index 7e896ebc9..2342d0a86 100644 --- a/samples/akka-sample-cluster-kubernetes-java/README.md +++ b/samples/akka-sample-cluster-kubernetes-java/README.md @@ -53,6 +53,6 @@ as described in the [Starting](#starting) section. ## How it works -This example uses [Akka Cluster Bootstrap](https://doc.akka.io/docs/akka-management/current/bootstrap/index.html) -to initialize the cluster, using the [Kubernetes API discovery mechanism](https://doc.akka.io/docs/akka-management/current/discovery/index.html#discovery-method-kubernetes-api) +This example uses [Akka Cluster Bootstrap](https://doc.akka.io/libraries/akka-management/current/bootstrap/index.html) +to initialize the cluster, using the [Kubernetes API discovery mechanism](https://doc.akka.io/libraries/akka-management/current/discovery/index.html#discovery-method-kubernetes-api) to find peer nodes. diff --git a/samples/akka-sample-cluster-kubernetes-scala/README.md b/samples/akka-sample-cluster-kubernetes-scala/README.md index 4df9ea723..cb7a73e83 100644 --- a/samples/akka-sample-cluster-kubernetes-scala/README.md +++ b/samples/akka-sample-cluster-kubernetes-scala/README.md @@ -55,6 +55,6 @@ as described in the [Starting](#starting) section. ## How it works -This example uses [Akka Cluster Bootstrap](https://doc.akka.io/docs/akka-management/current/bootstrap/index.html) -to initialize the cluster, using the [Kubernetes API discovery mechanism](https://doc.akka.io/docs/akka-management/current/discovery/index.html#discovery-method-kubernetes-api) +This example uses [Akka Cluster Bootstrap](https://doc.akka.io/libraries/akka-management/current/bootstrap/index.html) +to initialize the cluster, using the [Kubernetes API discovery mechanism](https://doc.akka.io/libraries/akka-management/current/discovery/index.html#discovery-method-kubernetes-api) to find peer nodes. From 34c3fc7e17886be8be788ef00cf62818aee0fc32 Mon Sep 17 00:00:00 2001 From: Enno Runne <458526+ennru@users.noreply.github.com> Date: Mon, 23 Sep 2024 11:22:42 +0200 Subject: [PATCH 2/7] New docs target folder --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index cd1d6cade..b3eb792b5 100644 --- a/build.sbt +++ b/build.sbt @@ -366,7 +366,7 @@ lazy val docs = project ), previewPath := (Paradox / siteSubdirName).value, paradoxGroups := Map("Language" -> Seq("Java", "Scala")), - Paradox / siteSubdirName := s"docs/akka-management/${if (isSnapshot.value) "snapshot" else version.value}", + Paradox / siteSubdirName := s"libraries/akka-management/${if (isSnapshot.value) "snapshot" else version.value}", Compile / paradoxProperties ++= Map( "date.year" -> Common.currentYear, "project.url" -> "https://doc.akka.io/libraries/akka-management/current/", From 34fb54c7a1cae7740005538c4c78a1c19a336a77 Mon Sep 17 00:00:00 2001 From: Enno Runne <458526+ennru@users.noreply.github.com> Date: Mon, 23 Sep 2024 11:38:17 +0200 Subject: [PATCH 3/7] Release template --- docs/release-train-issue-template.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/release-train-issue-template.md b/docs/release-train-issue-template.md index 309a396f5..cdfcafd2b 100644 --- a/docs/release-train-issue-template.md +++ b/docs/release-train-issue-template.md @@ -37,7 +37,7 @@ Variables to be expanded in this template: ``` cd ~/www git status - git add docs/akka-management/current docs/akka-management/$VERSION$ + git add libraries/akka-management/current libraries/akka-management/$VERSION$ git add api/akka-management/current api/akka-management/$VERSION$ git commit -m "Akka Management $VERSION$" ``` From 73cc7ebebc13577553c3b98f031e520e81be2b1e Mon Sep 17 00:00:00 2001 From: Enno Runne <458526+ennru@users.noreply.github.com> Date: Mon, 23 Sep 2024 12:19:36 +0200 Subject: [PATCH 4/7] Use sbt's Version matcher for binary versions --- project/Dependencies.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/project/Dependencies.scala b/project/Dependencies.scala index 94439dba2..12f850793 100644 --- a/project/Dependencies.scala +++ b/project/Dependencies.scala @@ -8,10 +8,10 @@ object Dependencies { // Align the versions in integration-test/kubernetes-api-java/pom.xml val AkkaVersion = "2.9.3" - val AkkaBinaryVersion = "2.9" + val AkkaBinaryVersion = VersionNumber(AkkaVersion).numbers match { case Seq(major, minor, _*) => s"$major.$minor" } // Align the versions in integration-test/kubernetes-api-java/pom.xml val AkkaHttpVersion = "10.6.3" - val AkkaHttpBinaryVersion = "10.6" + val AkkaHttpBinaryVersion = VersionNumber(AkkaHttpVersion).numbers match { case Seq(major, minor, _*) => s"$major.$minor" } val ScalaTestVersion = "3.2.19" val ScalaTestPlusJUnitVersion = ScalaTestVersion + ".0" From f85e9f9f0c107ec7bc713a2201157aabd18adcae Mon Sep 17 00:00:00 2001 From: Enno Runne <458526+ennru@users.noreply.github.com> Date: Mon, 23 Sep 2024 16:23:47 +0200 Subject: [PATCH 5/7] Use link-validator; configure JavaDoc --- .github/workflows/link-validator.yml | 46 +++++++++++++++++++ .../building-using-maven.md | 2 +- .../kubernetes-deployment/deploying.md | 2 +- docs/src/main/paradox/loglevels/logback.md | 2 +- project/Common.scala | 15 ++++-- project/Dependencies.scala | 4 ++ project/project-info.conf | 4 -- scripts/link-validator.conf | 35 ++++++++++++++ 8 files changed, 100 insertions(+), 10 deletions(-) create mode 100644 .github/workflows/link-validator.yml create mode 100644 scripts/link-validator.conf diff --git a/.github/workflows/link-validator.yml b/.github/workflows/link-validator.yml new file mode 100644 index 000000000..34a776f28 --- /dev/null +++ b/.github/workflows/link-validator.yml @@ -0,0 +1,46 @@ +name: Link Validator + +on: + workflow_dispatch: + pull_request: + schedule: + - cron: '0 6 * * 1' + +permissions: + contents: read + +jobs: + validate-links: + runs-on: ubuntu-22.04 + if: github.repository == 'akka/akka-management' + steps: + - name: Checkout + # https://github.com/actions/checkout/releases + # v4.1.1 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 + with: + # See https://github.com/actions/checkout/issues/299#issuecomment-677674415 + ref: ${{ github.event.pull_request.head.sha }} + fetch-depth: 100 + + - name: Fetch tags + run: git fetch --depth=100 origin +refs/tags/*:refs/tags/* + + - name: Cache Coursier cache + # https://github.com/coursier/cache-action/releases + # v6.4.5 + uses: coursier/cache-action@1ff273bff02a8787bc9f1877d347948af647956d + + - name: Set up JDK 11 + # https://github.com/coursier/setup-action/releases + # v1.3.5 + uses: coursier/setup-action@7bde40eee928896f074dbb76d22dd772eed5c65f + with: + jvm: temurin:1.11.0 + apps: cs + + - name: sbt site + run: sbt docs/makeSite + + - name: Run Link Validator + run: cs launch net.runne::site-link-validator:0.2.5 -- scripts/link-validator.conf diff --git a/docs/src/main/paradox/kubernetes-deployment/building-using-maven.md b/docs/src/main/paradox/kubernetes-deployment/building-using-maven.md index 425b53a9b..9fd526d33 100644 --- a/docs/src/main/paradox/kubernetes-deployment/building-using-maven.md +++ b/docs/src/main/paradox/kubernetes-deployment/building-using-maven.md @@ -99,7 +99,7 @@ To build and publish the image run the following. The Docker username and regist Note that the registry to push to must include the username, for example `-Ddocker.registry=docker.io/youruser`. -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). +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). ``` mvn -Ddocker.username= -Ddocker.registry=/ package docker:push diff --git a/docs/src/main/paradox/kubernetes-deployment/deploying.md b/docs/src/main/paradox/kubernetes-deployment/deploying.md index c7357e5f2..0e6bad6c7 100644 --- a/docs/src/main/paradox/kubernetes-deployment/deploying.md +++ b/docs/src/main/paradox/kubernetes-deployment/deploying.md @@ -150,7 +150,7 @@ for 'hello world': kubectl expose deployment appka --type=LoadBalancer --name=appka-service -You can inspect the Akka Cluster membership status with the [Cluster HTTP Management](https://doc.akka.io/libraries/akka-management/current/cluster-http-management.html). +You can inspect the Akka Cluster membership status with the @ref:[Cluster HTTP Management](../cluster-http-management.md). curl http://127.0.0.1:8558/cluster/members/ diff --git a/docs/src/main/paradox/loglevels/logback.md b/docs/src/main/paradox/loglevels/logback.md index bdb359273..5cb38e949 100644 --- a/docs/src/main/paradox/loglevels/logback.md +++ b/docs/src/main/paradox/loglevels/logback.md @@ -6,7 +6,7 @@ Dynamic Log Levels for Logback hooks into Akka Management and provides a route w @@project-info{ projectId="loglevels-logback" } -Requires @ref:[Akka Management](../akka-management.md) and that the application uses [Logback](http://logback.qos.ch) as logging backend. +Requires @ref:[Akka Management](../akka-management.md) and that the application uses [Logback](https://logback.qos.ch) as logging backend. The Akka dependencies are available from Akka's library repository. To access them there, you need to configure the URL for this repository. diff --git a/project/Common.scala b/project/Common.scala index 4d5b5d375..28f51e6c3 100644 --- a/project/Common.scala +++ b/project/Common.scala @@ -71,9 +71,18 @@ object Common extends AutoPlugin { "-doc-version", version.value ) ++ - // for some reason Scaladoc creates this - (if (scalaVersion.value.startsWith("3")) Seq.empty - else Seq("-skip-packages", "akka.pattern")), + // make use of https://github.com/scala/scala/pull/8663 + (if (scalaBinaryVersion.value.startsWith("3")) { + Seq(s"-external-mappings:https://docs.oracle.com/en/java/javase/${Dependencies.JavaDocLinkVersion}/docs/api/java.base/") // different usage in scala3 + } else if (scalaBinaryVersion.value.startsWith("2.13")) { + Seq( + "-jdk-api-doc-base", + s"https://docs.oracle.com/en/java/javase/${Dependencies.JavaDocLinkVersion}/docs/api/java.base/", + // for some reason Scaladoc creates this + "-skip-packages", + "akka.pattern" + ) + } else Nil), Compile / doc / scalacOptions ++= Seq( "-doc-source-url", { val branch = if (isSnapshot.value) "master" else s"v${version.value}" diff --git a/project/Dependencies.scala b/project/Dependencies.scala index 12f850793..387a54c6c 100644 --- a/project/Dependencies.scala +++ b/project/Dependencies.scala @@ -2,6 +2,10 @@ import sbt.* object Dependencies { + // Java Platform version for JavaDoc creation + // sync with Java version in .github/workflows/release.yml#documentation + lazy val JavaDocLinkVersion = 17 + val Scala213 = "2.13.14" val Scala3 = "3.3.3" val CrossScalaVersions = Seq(Scala213, Scala3) diff --git a/project/project-info.conf b/project/project-info.conf index 823dd5175..9b33f5708 100644 --- a/project/project-info.conf +++ b/project/project-info.conf @@ -20,10 +20,6 @@ project-info { text: "Lightbend Discuss" url: "https://discuss.lightbend.com/c/akka/" } - { - text: "akka/akka Gitter channel" - url: "https://gitter.im/akka/akka" - } ] api-docs: [ { diff --git a/scripts/link-validator.conf b/scripts/link-validator.conf new file mode 100644 index 000000000..a5b40e8a9 --- /dev/null +++ b/scripts/link-validator.conf @@ -0,0 +1,35 @@ +// config for https://github.com/ennru/site-link-validator/ +site-link-validator { + root-dir = "./docs/target/site/" + # relative to `root-dir` + start-file = "libraries/akka-management/snapshot/index.html" + + # Resolves URLs with the given prefix as local files instead + link-mappings = [ + { + prefix = "https://doc.akka.io/libraries/akka-management/snapshot/" + replace = "/libraries/akka-management/snapshot/" + } + { + prefix = "https://doc.akka.io/api/akka-management/snapshot/" + replace = "/api/akka-management/snapshot/" + } + ] + + ignore-missing-local-files-regex = "" + + ignore-files = [] + + ignore-prefixes = [ + # GitHub will block with "429 Too Many Requests" + "https://github.com/akka/akka-management/" + # MVN repository forbids access after a few requests + "https://mvnrepository.com/artifact/", + "https://repo.akka.io/", + "http://127.0.0.1:8080" + ] + + non-https-whitelist = [ + "http://logback.qos.ch/" + ] +} From b66da523590b27c76128dd59fdd68cad84eb335d Mon Sep 17 00:00:00 2001 From: Enno Runne <458526+ennru@users.noreply.github.com> Date: Mon, 23 Sep 2024 16:27:15 +0200 Subject: [PATCH 6/7] Use JDK 17 in Link validator --- .github/workflows/link-validator.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/link-validator.yml b/.github/workflows/link-validator.yml index 34a776f28..bf5912b63 100644 --- a/.github/workflows/link-validator.yml +++ b/.github/workflows/link-validator.yml @@ -31,12 +31,12 @@ jobs: # v6.4.5 uses: coursier/cache-action@1ff273bff02a8787bc9f1877d347948af647956d - - name: Set up JDK 11 + - name: Set up JDK 17 # https://github.com/coursier/setup-action/releases # v1.3.5 uses: coursier/setup-action@7bde40eee928896f074dbb76d22dd772eed5c65f with: - jvm: temurin:1.11.0 + jvm: temurin:1.17.0.5 apps: cs - name: sbt site From 6c18ee3a279878c877a00d302797f5ecf136375c Mon Sep 17 00:00:00 2001 From: Enno Runne <458526+ennru@users.noreply.github.com> Date: Mon, 23 Sep 2024 16:34:48 +0200 Subject: [PATCH 7/7] Fix broken links to k8s docs --- docs/src/main/paradox/discovery/kubernetes.md | 2 +- .../paradox/kubernetes-deployment/preparing-for-production.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/src/main/paradox/discovery/kubernetes.md b/docs/src/main/paradox/discovery/kubernetes.md index c5b25945c..38d79b29e 100644 --- a/docs/src/main/paradox/discovery/kubernetes.md +++ b/docs/src/main/paradox/discovery/kubernetes.md @@ -118,7 +118,7 @@ spec: ### Role-Based Access Control -If your Kubernetes cluster has [Role-Based Access Control (RBAC)](https://kubernetes.io/docs/admin/authorization/rbac/) +If your Kubernetes cluster has [Role-Based Access Control (RBAC)](https://kubernetes.io/docs/reference/access-authn-authz/rbac/) enabled, you'll also have to grant the Service Account that your pods run under access to list pods. The following configuration can be used as a starting point. It creates a `Role`, `pod-reader`, which grants access to query pod information. It then binds the default Service Account to the `Role` by creating a `RoleBinding`. diff --git a/docs/src/main/paradox/kubernetes-deployment/preparing-for-production.md b/docs/src/main/paradox/kubernetes-deployment/preparing-for-production.md index c0d8fdf65..b2159b342 100644 --- a/docs/src/main/paradox/kubernetes-deployment/preparing-for-production.md +++ b/docs/src/main/paradox/kubernetes-deployment/preparing-for-production.md @@ -66,7 +66,7 @@ spec: Here are a few things to note: * We're using a Kubernetes deployment. Deployments are logical groupings of pods that represent a single service using the same template. - They support [configurable rolling updates](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.11/#deploymentstrategy-v1-apps), + They support configurable rolling updates, 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. * 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. * The image we're using is `akka-sample-cluster-kubernetes:latest`. This corresponds to the name and version of the service in our build.