Skip to content

Commit 90ba394

Browse files
authoredMar 25, 2021
Merge pull request #194 from petabridge/dev
v1.5.1 Lighthouse Release
2 parents 4dc611c + cbc8962 commit 90ba394

File tree

3 files changed

+53
-8
lines changed

3 files changed

+53
-8
lines changed
 

‎README.md

+47-1
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,56 @@ Here's an example of running a single Lighthouse instance as a Docker container:
4545
PS> docker run --name lighthouse1 --hostname lighthouse1 -p 4053:4053 -p 9110:9110 --env ACTORSYSTEM=webcrawler --env CLUSTER_IP=lighthouse1 --env CLUSTER_PORT=4053 --env CLUSTER_SEEDS="akka.tcp://webcrawler@lighthouse1:4053" petabridge/lighthouse:latest
4646
```
4747

48+
#### Enabling Additional Akka.NET Settings
49+
Lighthouse uses [`Akka.Bootstrap.Docker` under the covers, which allows for any Akka.NET HOCON setting to be overridden via environment variables](https://github.com/petabridge/akkadotnet-bootstrap/tree/dev/src/Akka.Bootstrap.Docker#using-environment-variables-to-configure-akkanet).
50+
51+
**Enabling a Split Brain Resolver in Lighthouse**
52+
Here's one example of how to enable a split brain resolver in Lighthouse using these `Akka.Bootstrap.Docker` environment variable substitution, using `docker-compose` syntax:
53+
54+
```
55+
version: '3'
56+
57+
services:
58+
lighthouse.main:
59+
image: petabridge/lighthouse:latest
60+
hostname: lighthouse.main
61+
ports:
62+
- '9110:9110'
63+
environment:
64+
ACTORSYSTEM: "LighthouseTest"
65+
CLUSTER_PORT: 4053
66+
CLUSTER_IP: "lighthouse.main"
67+
CLUSTER_SEEDS: "akka.tcp://LighthouseTest@lighthouse.main:4053,akka.tcp://LighthouseTest@lighthouse.second:4053,akka.tcp://LighthouseTest@lighthouse.third:4053"
68+
AKKA__CLUSTER__DOWNING_PROVIDER_CLASS: "Akka.Cluster.SplitBrainResolver, Akka.Cluster"
69+
AKKA__CLUSTER__SPLIT_BRAIN_RESOLVER__ACTIVE_STRATEGY: "keep-majority"
70+
```
71+
4872
### Running in .NET Framework
4973
You can still run Lighthouse under .NET Framework 4.6.1 if you wish. Clone this repository and build the project. Lighthouse will run as a [Topshelf Windows Service](http://topshelf-project.com/) and can be installed as such.
5074

5175
### Examples of Lighthouse in the Wild
5276
Looking for some complete examples of how to use Lighthouse? Here's some:
5377

54-
1. [Cluster.WebCrawler - webcrawling Akka.Cluster + Akka.Streams sample application.](https://github.com/petabridge/Cluster.WebCrawler)
78+
1. [Cluster.WebCrawler - webcrawling Akka.Cluster + Akka.Streams sample application.](https://github.com/petabridge/Cluster.WebCrawler)
79+
80+
## Customizing Lighthouse / Avoiding Serialization Errors
81+
82+
When using Akka.NET with extension modules like DistributedPubSub or custom serializers (like [Hyperion](https://github.com/akkadotnet/Hyperion)),
83+
serialization errors may appear in the logs because these modules are not installed and configured into Lighthouse by default. That is, required assemblies should be built into Lighthouse container.
84+
85+
As you may see in [project file references](src/Lighthouse/Lighthouse.csproj), only `Akka.Cluster` and basic `Petabridge.Cmd.Remote` / `Petabridge.Cmd.Cluster`
86+
[pbm](https://cmd.petabridge.com/) modules are referenced by default, which means that if you need DistributedPubSub serializers to be discovered,
87+
you have to build your own Lighthouse image from source, with required references included.
88+
89+
Basically, what you have to do is:
90+
1. Get a list of Akka.NET extension modules you are using (`Akka.Cluster.Tools` might be the most popular, or any custom Akka.NET serialization package)
91+
2. Clone this Lighthouse repo, take Lighthouse project and add this references so that Lighthouse had all the same dependencies your Akka.Cluster nodes are using
92+
3. Build your own Docker image using Dockerfile ([windows](src/Lighthouse/Dockerfile-windows) / [linux](src/Lighthouse/Dockerfile-linux)) from this repository,
93+
and use your customized image instead of the default one
94+
95+
### Workaround for DistributedPubSub
96+
97+
`DistributedPubSub` extension has [`role`](https://getakka.net/articles/clustering/distributed-publish-subscribe.html#distributedpubsub-extension) configuration setting, which allows to select nodes that
98+
are hosting DistributedPubSub mediators. You can use any role (let's say, `pub-sub-host`) in all your cluster nodes and set `akka.cluster.pub-sub.role = "pub-sub-host"` everywhere to exclude nodes that do not have this role configured.
99+
100+
If Lighthouse container is not configured to have this role, DistributedPubSub will not even touch it's node, which should also resolve the issue with serialization errors.

‎RELEASE_NOTES.md

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#### 1.5.0 December 30 2020 ####
2-
* Updated to use Akka.NET v1.4.14.
3-
* Should resolve high idle CPU utilization issues detected in earlier versions of Lighthouse.
4-
* Upgrades to Petabridge.Cmd v0.8.2
1+
#### 1.5.1 March 25 2021 ####
2+
* Updated to use Akka.NET v1.4.18
3+
* Upgrades to Petabridge.Cmd v0.8.3

‎src/common.props

+3-3
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ Should resolve high idle CPU utilization issues detected in earlier versions of
1616
</PropertyGroup>
1717
<PropertyGroup>
1818
<XunitVersion>2.4.1</XunitVersion>
19-
<MicrosoftSdkVersion>16.8.3</MicrosoftSdkVersion>
19+
<MicrosoftSdkVersion>16.9.1</MicrosoftSdkVersion>
2020
<FluentAssertionsVersion>5.10.3</FluentAssertionsVersion>
2121
<NetCoreVersion>netcoreapp3.1</NetCoreVersion>
2222
<NetStandardVersion>netstandard1.6</NetStandardVersion>
2323
<NetFrameworkLibVersion>net461</NetFrameworkLibVersion>
2424
<NetFrameworkTestVersion>net461</NetFrameworkTestVersion>
25-
<AkkaVersion>1.4.14</AkkaVersion>
26-
<PbmVersion>0.8.2</PbmVersion>
25+
<AkkaVersion>1.4.18</AkkaVersion>
26+
<PbmVersion>0.8.3</PbmVersion>
2727
</PropertyGroup>
2828
</Project>

0 commit comments

Comments
 (0)
Please sign in to comment.