Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Drop unmaintained Consul discovery module #1252

Merged
merged 1 commit into from
Jan 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ for the following modules.
* akka-discovery-marathon-api
* akka-discovery-aws-api
* akka-discovery-aws-api-async
* akka-discovery-consul



Expand Down
12 changes: 0 additions & 12 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ lazy val `akka-management-root` = project
// in AkkaManagement should also be updated
`akka-discovery-aws-api`,
`akka-discovery-aws-api-async`,
`akka-discovery-consul`,
`akka-discovery-kubernetes-api`,
`akka-discovery-marathon-api`,
`akka-management`,
Expand Down Expand Up @@ -97,17 +96,6 @@ lazy val `akka-discovery-aws-api-async` = project
mimaPreviousArtifactsSet
)

lazy val `akka-discovery-consul` = project
.in(file("discovery-consul"))
.enablePlugins(AutomateHeaderPlugin)
.disablePlugins(com.geirsson.CiReleasePlugin)
.settings(
name := "akka-discovery-consul",
organization := "com.lightbend.akka.discovery",
libraryDependencies := Dependencies.DiscoveryConsul,
mimaPreviousArtifactsSet
)

// gathers all enabled routes and serves them (HTTP or otherwise)
lazy val `akka-management` = project
.in(file("management"))
Expand Down
25 changes: 0 additions & 25 deletions discovery-consul/src/main/resources/reference.conf

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

81 changes: 2 additions & 79 deletions docs/src/main/paradox/discovery/consul.md
Original file line number Diff line number Diff line change
@@ -1,81 +1,4 @@
## Consul

@@@ warning

This module is community maintained and the Lightbend subscription doesn't cover support for this module.
It is also marked as @extref:[may change](akka:common/may-change.html).
That means that the API, configuration or semantics can change without warning or deprecation period.

@@@

Consul currently ignores all fields apart from service name. This is expected to change.

If you are using Consul to do the service discovery this would allow you to base your Cluster on Consul services.

## Project Info

@@project-info{ projectId="akka-discovery-consul" }

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

@@repository [sbt,Gradle,Maven] {
id="akka-repository"
name="Akka library repository"
url="https://repo.akka.io/maven"
}

Additionally, add the dependency as below.

@@dependency[sbt,Gradle,Maven] {
symbol1=AkkaManagementVersion
value1=$project.version$
group="com.lightbend.akka.discovery"
artifact="akka-discovery-consul_$scala.binary.version$"
version=AkkaManagementVersion
}

`akka-discovery-consul` can be used with Akka $akka.version$ or later.
You have to override the following Akka dependencies by defining them explicitly in your build and
define the Akka version to the one that you are using. Latest patch version of Akka is recommended and
a later version than $akka.version$ can be used.

@@dependency[sbt,Gradle,Maven] {
symbol=AkkaVersion
value=$akka.version$
group=com.typesafe.akka
artifact=akka-cluster_$scala.binary.version$
version=AkkaVersion
group2=com.typesafe.akka
artifact2=akka-discovery_$scala.binary.version$
version2=AkkaVersion
}

In your application conf add:
```
akka.discovery {
method = akka-consul
akka-consul {

#How to connect to Consul to fetch services data
consul-host = "127.0.0.1"
consul-port = 8500

# Prefix for consul tag with the name of the actor system / application name,
# services with this tag present will be found by the discovery mechanism
# i.e. `system:test` will be found in cluster if the cluster system is named `test`
application-name-tag-prefix = "system:"

# Prefix for tag containing port number where akka management is set up so that
# the seed nodes can be found, an example value for the tag would be `akka-management-port:19999`
application-akka-management-port-tag-prefix = "akka-management-port:"
}
}
```

Notes:

* Since tags in Consul services are simple strings, prefixes are necessary to ensure that proper values are read.

* If Akka management port tag is not found on service in Consul the implementation defaults to catalog service port.


The akka-discovery-consul module had upstream security issues and was not maintained, it has therefore been dropped
from Akka Management. The last published version of this module was with Akka Management 1.5.0.
3 changes: 1 addition & 2 deletions docs/src/main/paradox/discovery/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ Akka Discovery module in Akka.
Akka Management contains methods for:

* @ref[Kubernetes](kubernetes.md)
* @ref[Consul](consul.md)
* @ref[Marathon](marathon.md)
* @ref[AWS](aws.md)

Expand All @@ -18,8 +17,8 @@ part of the build and release process.
@@@ index

- [Kubernetes](kubernetes.md)
- [Consul](consul.md)
- [Marathon](marathon.md)
- [AWS](aws.md)
- [Consul (discontinued)](consul.md)

@@@
Loading
Loading