Skip to content

Commit

Permalink
Merge pull request #714 from naphelps/issue-646
Browse files Browse the repository at this point in the history
Issue 646:  Transitions The Exchange From Akka To Pekko
  • Loading branch information
naphelps authored Jan 29, 2024
2 parents 1e2b35d + fd28c4e commit cbf5cdf
Show file tree
Hide file tree
Showing 131 changed files with 590 additions and 593 deletions.
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,22 @@

All notable changes to this project will be documented in this file.

## [2.122.0] - 2024-01-23
- Issue 646: Transitioned The Exchange to Apache Pekko from Lightbind's Akka.
- akka-http 10.2.7 -> pekko-http 1.0.0
- akka-http-testkit 10.2.7 -> pekko-http-testkit 1.0.0
- akka-http-xml 10.2.7 -> pekko-http-xml 1.0.0
- akka-stream-testkit 2.6.16 -> pekko-stream-testkit 1.0.2
- akka-testkit 2.6.16 -> pekko-testkit 1.0.2
- Scala 2.13.10 -> Scala 2.13.11
- akka-http-cors 1.1.2 -> pekko-http-cors 1.0.0
- akka-http-jackson 1.39.2 -> pekko-http-jackson 2.0.0
- postgresql 42.6.0 -> 42.7.1
- SBT 1.9.6 -> 1.9.8
- swagger-akka-http 2.6.0 -> swagger-pekko-http 2.12.0
- swagger-scala-module 2.11.0 -> 2.12.0
- Swagger UI 5.1.0 -> 5.11.0

## [2.121.0] - 2023-11-16
- Restructured the source for Catalog, Deployment Patterns and Policies, Management Policies, Nodes, Node Groups, and Services.

Expand Down
44 changes: 22 additions & 22 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import com.typesafe.sbt.packager.docker._
enablePlugins(JavaAppPackaging, DockerPlugin)

// For latest versions, see https://mvnrepository.com/
lazy val akkaHttpVersion = settingKey[String]("Version of Akka-Http")
lazy val akkaVersion = settingKey[String]("Version of Akka")
lazy val pekkoHttpVersion = settingKey[String]("Version of Pekko-Http")
lazy val pekkoVersion = settingKey[String]("Version of Pekko")

// Red Hat certification Docker labels.
lazy val release = settingKey[String]("A number used to identify the specific build for this image.")
Expand All @@ -28,14 +28,14 @@ Global / excludeLintKeys += dockerEnvVars

lazy val root = (project in file("."))
.settings(
akkaHttpVersion := "[10.2.7]",
akkaVersion := "[2.6.16]",
description := "'Containerized exchange-api'",
name := "amd64_exchange-api",
organization := "org.openhorizon",
pekkoHttpVersion := "[1.0.0]",
pekkoVersion := "[1.0.2]",
release := sys.env.getOrElse("GIT_SHORT_SHA", versionFunc()),
resolvers += Classpaths.typesafeReleases,
scalaVersion := "2.13.10",
scalaVersion := "2.13.11",
summary := "'Open Horizon exchange-api image'",
vendor := "'Open Horizon'",
version := sys.env.getOrElse("IMAGE_VERSION", versionFunc()),
Expand All @@ -45,28 +45,28 @@ lazy val root = (project in file("."))

// Sbt uses Ivy for dependency resolution, so it supports its version syntax: http://ant.apache.org/ivy/history/latest-milestone/ivyfile/dependency.html#revision
libraryDependencies ++= Seq(
"com.typesafe.akka" %% "akka-http" % akkaHttpVersion.value,
"com.typesafe.akka" %% "akka-http-xml" % akkaHttpVersion.value,
// "com.typesafe.akka" %% "akka-stream" % "[2.6.14,)",
// "com.typesafe.akka" %% "akka-http-spray-json" % "[10.2.1,)",
"de.heikoseeberger" %% "akka-http-jackson" % "[1.39.2]",
// "com.typesafe.akka" %% "akka-http-jackson" % "[10.2.1,)", // Can not find any recent documentation on how to use this
"ch.megard" %% "akka-http-cors" % "[1.1.2]",
"org.apache.pekko" %% "pekko-http" % pekkoHttpVersion.value,
"org.apache.pekko" %% "pekko-http-xml" % pekkoHttpVersion.value,
// "org.apache.pekko" %% "pekko-stream" % "[2.6.14,)",
// "org.apache.pekko" %% "pekko-http-spray-json" % "[10.2.1,)",
"com.github.pjfanning" %% "pekko-http-jackson" % "[2.0.0,)",
"org.apache.pekko" %% "pekko-http-cors" % "[1.0.0,)",

"org.json4s" %% "json4s-native" % "4.0.6",
"org.json4s" %% "json4s-jackson" % "4.0.6",

"jakarta.ws.rs" % "jakarta.ws.rs-api" % "[3.1.0,)",
"com.github.swagger-akka-http" %% "swagger-akka-http" % "[2.6.0]", // Deprecated in v2.8.0 due to Akka license change to BSL v1.1
"com.github.swagger-akka-http" %% "swagger-scala-module" % "[2.11.0,)",
"io.swagger.core.v3" % "swagger-core-jakarta" % "[2.1.12]", // Version 2.1.13+ requires newer versions of slick and slick-hikaricp
"io.swagger.core.v3" % "swagger-jaxrs2-jakarta" % "[2.1.12]", // Version 2.1.13+ requires newer versions of slick and slick-hikaricp
// "org.glassfish.jersey.core" % "jersey-common" % "1.2.1", // Required at runtime by javax.ws.rs-api
"com.github.swagger-akka-http" %% "swagger-pekko-http" % "[2.12.0]", // Deprecated in v2.8.0 due to Akka license change to BSL v1.1
"com.github.swagger-akka-http" %% "swagger-scala-module" % "[2.12.0,)",
//"io.swagger.core.v3" % "swagger-core-jakarta" % "[2.1.12]", // Version 2.1.13+ requires newer versions of slick and slick-hikaricp
//"io.swagger.core.v3" % "swagger-jaxrs2-jakarta" % "[2.1.12]", // Version 2.1.13+ requires newer versions of slick and slick-hikaricp

// "com.typesafe.slick" %% "slick" % "[3.3.3]", // Version 3.4.1 depends on slick-pg and slick-pg_json4s v0.21.0
"com.typesafe.slick" %% "slick-hikaricp" % "[3.3.3]", // Version 3.4.1 depends on slick-pg and slick-pg_json4s v0.21.0
"com.typesafe.slick" %% "slick-hikaricp" % "[3.4.1]", // Version 3.4.1 depends on slick-pg and slick-pg_json4s v0.21.0
// "com.github.tminglei" %% "slick-pg" % "[0.20.4]", // Version 0.21.0 depends on version 3.4.0 of slick and slick-hikaricp
"com.github.tminglei" %% "slick-pg_json4s" % "[0.20.4]", // Version 0.21.0 depends on version 3.4.0 of slick and slick-hikaricp
"org.postgresql" % "postgresql" % "[42.6.0,)",
"com.github.tminglei" %% "slick-pg_json4s" % "[0.21.0]", // Version 0.21.0 depends on version 3.4.0 of slick and slick-hikaricp
"org.postgresql" % "postgresql" % "[42.7.1,)",
// "com.zaxxer" % "HikariCP" % "[3.4.5,)",
// "org.slf4j" % "slf4j-simple" % "[1.7.25]", // Version 1.7.35+ requires newer versions of slick and slick-hikaricp
// "ch.qos.logback" % "logback-classic" % "1.3.0-alpha5",
Expand All @@ -78,9 +78,9 @@ lazy val root = (project in file("."))
"com.github.cb372" %% "scalacache-guava" % "[0.28.0,)",
"com.osinka.i18n" %% "scala-i18n" % "[1.0.3,)",

"com.typesafe.akka" %% "akka-http-testkit" % akkaHttpVersion.value % Test,
"com.typesafe.akka" %% "akka-testkit" % akkaVersion.value % Test,
"com.typesafe.akka" %% "akka-stream-testkit" % akkaVersion.value % Test,
"org.apache.pekko" %% "pekko-http-testkit" % pekkoHttpVersion.value % Test,
"org.apache.pekko" %% "pekko-testkit" % pekkoVersion.value % Test,
"org.apache.pekko" %% "pekko-stream-testkit" % pekkoVersion.value % Test,

"org.scalatest" %% "scalatest" % "[3.3.0-SNAP2,)" % "test",
"org.scalatestplus" %% "junit-4-12" % "[3.3.0.0-SNAP2,)" % "test",
Expand Down
21 changes: 10 additions & 11 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ services in the exchange.

```json
{
"akka": {
"pekko": {
"loglevel": "DEBUG"
},
"api": {
Expand Down Expand Up @@ -210,8 +210,7 @@ Project uses Scapegoat. To use:
### Notes About the Docker Image Build Process
- See https://www.codemunity.io/tutorials/dockerising-akka-http/
- Uses the sbt-native-packager plugin. See the above URL for what to add to your sbt-related files
- Uses the sbt-native-packager plugin.
- Build docker image: `sbt docker:publishLocal`
- Manually build and run the exchange executable
- `make runexecutable`
Expand Down Expand Up @@ -348,31 +347,31 @@ Now you can disable root by setting `api.root.enabled` to `false` in `/etc/horiz
`src/main/resources/config.json` is the default configuration file for the Exchange. This file is bundled in the Exchange jar. To run the exchange server with different values, copy this to `/etc/horizon/exchange/config.json`. In your version of the config file, you only have to set what you want to override.
### akka
### pekko
Akka Actor: https://doc.akka.io/docs/akka/current/general/configuration-reference.html
Pekko Actor: https://pekko.apache.org/docs/pekko/current/general/configuration-reference.html#pekko-actor
</br>
Akka-Http: https://doc.akka.io/docs/akka-http/current/configuration.html
Pekko-Http: https://pekko.apache.org/docs/pekko-http/current/configuration.html
</br>
Log Level: http://logback.qos.ch/apidocs/ch/qos/logback/classic/Level.html
| Parameter Name | Default Value | Description |
|----------------|----------------|-------------|
| loglevel | `"INFO"` | |
- #### akka.coordinated-shutdown
- #### pekko.coordinated-shutdown
| Parameter Name | Default Value | Description |
|-------------------------------|---------------|--------------------------------------------------------------------------------|
| phases.service-unbind.timeout | `"60s"` | Number of seconds to let in-flight requests complete before exiting the server |
- #### akka.http.parsing
- #### pekko.http.parsing
| Parameter Name | Default Value | Description |
|------------------------|---------------|-------------|
| max-header-name-length | `128` | |
- #### akka.http.server
- #### pekko.http.server
| Paramater Name | Default Value | Description |
|------------------|---------------|-------------|
Expand All @@ -385,9 +384,9 @@ Log Level: http://logback.qos.ch/apidocs/ch/qos/logback/classic/Level.html
| request-timeout | `"45s"` | |
| server-header | `""` | |
### akka-http-cors
### pekko-http-cors
https://github.com/lomigmegard/akka-http-cors#configuration
https://pekko.apache.org/docs/pekko-http/current/configuration.html
| Parameter Name | Default Value | Description |
|-----------------------------|---------------------------------------------------|--------------------------------------------------------------------------|
Expand Down
2 changes: 1 addition & 1 deletion docs/openapi-3-developer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"name" : "Apache License Version 2.0",
"url" : "https://www.apache.org/licenses/LICENSE-2.0"
},
"version" : "2.121.0"
"version" : "2.122.0"
},
"externalDocs" : {
"description" : "Open-horizon ExchangeAPI",
Expand Down
2 changes: 1 addition & 1 deletion docs/openapi-3-user.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"name" : "Apache License Version 2.0",
"url" : "https://www.apache.org/licenses/LICENSE-2.0"
},
"version" : "2.121.0"
"version" : "2.122.0"
},
"externalDocs" : {
"description" : "Open-horizon ExchangeAPI",
Expand Down
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.9.6
sbt.version=1.9.8
4 changes: 2 additions & 2 deletions src/main/resources/config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"akka": {
"pekko": {
"coordinated-shutdown": {
"phases.service-unbind.timeout": "60s"
},
Expand All @@ -20,7 +20,7 @@
}
}
},
"akka-http-cors": {
"pekko-http-cors": {
"allow-credentials": true,
"allow-generic-http-requests": true,
"allowed-headers": ["*"],
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/swagger/swagger-ui-bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/main/resources/swagger/swagger-ui-bundle.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/main/resources/swagger/swagger-ui-es-bundle-core.js

Large diffs are not rendered by default.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/main/resources/swagger/swagger-ui-es-bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/main/resources/swagger/swagger-ui-es-bundle.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/main/resources/swagger/swagger-ui-standalone-preset.js

Large diffs are not rendered by default.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/main/resources/swagger/swagger-ui.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/main/resources/swagger/swagger-ui.css.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/main/resources/swagger/swagger-ui.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/main/resources/swagger/swagger-ui.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/main/resources/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.121.0
2.122.0
Loading

0 comments on commit cbf5cdf

Please sign in to comment.