Skip to content

Commit

Permalink
akka-management 利用時は akka.remote.artery.canonical を利用しないため固定値を取り除き、sb…
Browse files Browse the repository at this point in the history
…t もしくは java コマンドによる起動時に java 環境変数にセットして呼び出すように変更、この時点で akka-management による k8s クラスター起動はできるようになった(祝)
  • Loading branch information
kuramapommel committed Dec 8, 2024
1 parent 688b701 commit f6f0401
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 4 additions & 2 deletions sample/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@

1. `sbt` コマンドで sbt を起動
2. `set javaOptions += "-DSEED_NODES.0=akka://[email protected]:2551"` コマンドで環境変数を設定
3. `run` コマンドでサーバを起動
3. `set javaOptions += "-DSEED_HOST=0.0.0.0"` コマンドで環境変数を設定
4. `set javaOptions += "-DSEED_PORT=2551"` コマンドで環境変数を設定
5. `run` コマンドでサーバを起動

### java -jar を使用

1. `sbt assembly` コマンドで FAT jar ファイルを作成
2. `java -DSEED_NODES.0="akka://[email protected]:2551" -jar ./target/scala-3.4.3/til-akka-typed.jar` コマンドでサーバを起動
2. `java -DSEED_NODES.0="akka://[email protected]:2551" -DSEED_HOST="0.0.0.0" -DSEED_PORT="2551" -jar ./target/scala-3.4.3/til-akka-typed.jar` コマンドでサーバを起動

### docker を使用

Expand Down
2 changes: 0 additions & 2 deletions sample/src/main/resources/application.conf
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@ akka {
allow-java-serialization = "on"
}
remote.artery.canonical {
hostname = "0.0.0.0"
hostname = ${?SEED_HOST}
port = 2551
port = ${?SEED_PORT}
}

Expand Down

0 comments on commit f6f0401

Please sign in to comment.