Petabridge.Cmd.Host
1.4.1
Prefix Reserved
See the version list below for details.
dotnet add package Petabridge.Cmd.Host --version 1.4.1
NuGet\Install-Package Petabridge.Cmd.Host -Version 1.4.1
<PackageReference Include="Petabridge.Cmd.Host" Version="1.4.1" />
paket add Petabridge.Cmd.Host --version 1.4.1
#r "nuget: Petabridge.Cmd.Host, 1.4.1"
// Install Petabridge.Cmd.Host as a Cake Addin #addin nuget:?package=Petabridge.Cmd.Host&version=1.4.1 // Install Petabridge.Cmd.Host as a Cake Tool #tool nuget:?package=Petabridge.Cmd.Host&version=1.4.1
Petabridge.Cmd
Petabridge.Cmd is a command-line interface (CLI) for Akka.NET, designed to help monitor and manage live ActorSystem
s through simple commands.
- Website: https://cmd.petabridge.com/
- Chat: 🗣️ https://discord.gg/kgsruUF889
- Issue Tracker: 🪲 https://github.com/petabridge/petabridge.cmd-issues
Use
After you've installed the Petabridge.Cmd.Host into your Akka.NET application and the pbm
client onto your workstation, you can connect to your server, download any commands that are defined on them, and begin executing them right away!
Some examples:
Print Current Actor Hierarchy
pbm actor hierarchy
Print Current Cluster Status
Only works when Petabridge.Cmd.Cluster is installed.
pbm cluster show
Down All Unreachable Nodes in Cluster
Only works when Petabridge.Cmd.Cluster is installed.
pbm cluster down-unreachable
There are dozens of built-in Petabridge.Cmd commands and it's quite easy to build your own custom ones!
Installation
In order to use Petabridge.Cmd you must follow our installation instructions and get both a server and a client up and running.
Default Ports and Hostnames
By default, Petabridge.Cmd.Host will open the following ports for accepting TCP connections from pbm
clients:
- Port: 9110
- Host: All addresses (0.0.0.0)
Server and Command Pallette Installation
Before we can use the Petabridge.Cmd client (pbm
) we need to install the Petabridge.Cmd server inside one of our Akka.NET applications - which we can do by installing the Petabridge.Cmd.Host NuGet package:
dotnet add package Petabridge.Cmd.Host
Next, we just need to hook this up into our ActorSystem
.
Using Akka.Hosting (Recommended)
Akka.Hosting is a HOCON-less approach to configuring and instantiating Akka.NET applications, and it's the easiest way to configure Petabridge.Cmd inside your ActorSystem
- using the AddPetabridgeCmd
method found in the Petabridge.Cmd.Host package:
using var host = await (new HostBuilder().ConfigureServices((context, collection) =>
{
collection.AddAkka("PbmSys", builder =>
{
builder.WithRemoting("localhost", 29909)
.WithClustering(new ClusterOptions(){ SeedNodes = new[]{ "akka.tcp://PbmSys@localhost:29909" }})
.AddPetabridgeCmd(
new PetabridgeCmdOptions(){ Host = "localhost", Port = 8222}, // optional - customize pbm bindings
cmd =>
{
cmd.RegisterCommandPalette(new RemoteCommands());
cmd.RegisterCommandPalette(ClusterCommands.Instance);
});
});
}).StartAsync());
You can register all of your CommandPalette instances using the builder and Petabridge.Cmd will be started up automatically. All HOCON values can still be used to configure binding addresses.
Manually Starting Petabridge.Cmd
In order to active Petabridge.Cmd.Host inside your Akka.NET application, you need to make the following call inside your application (if you're not using Akka.Hosting:)
private static void Main(string[] args)
{
using (var a = ActorSystem.Create("Foo"))
{
var cmd = PetabridgeCmd.Get(a);
cmd.Start();
a.WhenTerminated.Wait();
}
}
Registering Additional Command Palettes
Petabridge.Cmd ships with an additional set of commands for managing Akka.Cluster applications, which are not loaded by default. After installing the Petabridge.Cmd.Cluster
NuGet package into your host application, you an register the commands with the PetabridgeCmd
plugin via the following syntax:
using (var a = ActorSystem.Create("webcrawler"))
{
var cmd = PetabridgeCmd.Get(a);
cmd.RegisterCommandPalette(ClusterCommands.Instance); // non-default command palette
cmd.Start();
a.WhenTerminated.Wait();
}
Or when using Akka.Hosting:
collection.AddAkka("PbmSys", builder =>
{
builder.WithRemoting("localhost", 29909)
.WithClustering(new ClusterOptions(){ SeedNodes = new[]{ "akka.tcp://PbmSys@localhost:29909" }})
.AddPetabridgeCmd(
new PetabridgeCmdOptions(){ Host = "localhost", Port = 8222}, // optional - customize pbm bindings
cmd =>
{
cmd.RegisterCommandPalette(new RemoteCommands());
cmd.RegisterCommandPalette(ClusterCommands.Instance); // non-default command palette
});
});
Client Installation
The easiest way to install Petabridge.Cmd's client is to install the pbm
.NET global tool:
> dotnet tool install --global pbm
To see full details about how the Petabridge.Cmd client and server connectivity model works, please see "How Petabridge.Cmd Works."
Need Help?
To get help with Petabridge.Cmd you can file a bug on our issue tracker or contact us in Discord.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- Akka (>= 1.5.18)
- Akka.Hosting (>= 1.5.18)
- Petabridge.Cmd.Common (>= 1.4.1)
- Phobos.Actor.Common (>= 1.1.1)
-
net6.0
- Akka (>= 1.5.18)
- Akka.Hosting (>= 1.5.18)
- Petabridge.Cmd.Common (>= 1.4.1)
- Phobos.Actor.Common (>= 1.1.1)
NuGet packages (13)
Showing the top 5 NuGet packages that depend on Petabridge.Cmd.Host:
Package | Downloads |
---|---|
Petabridge.Cmd.Cluster
Akka.Cluster Petabridge.Cmd palettes for cluster management and monitoring. |
|
Petabridge.Cmd.Remote
Akka.Remote Petabridge.Cmd palettes for connection and monitoring. |
|
Petabridge.Cmd.Cluster.Sharding
Akka.Cluster.Sharding Petabridge.Cmd palettes for shard management and monitoring. |
|
Petabridge.Cmd.Remote.FailureInjection
Akka.Cluster Petabridge.Cmd palettes for injecting failures into Akka cluster. |
|
FAkka.Shared
Package Description |
GitHub repositories (2)
Showing the top 2 popular GitHub repositories that depend on Petabridge.Cmd.Host:
Repository | Stars |
---|---|
petabridge/akkadotnet-code-samples
Akka.NET professional reference code samples
|
|
Aaronontheweb/InMemoryCQRSReplication
Akka.NET Reference Architecture - CQRS + Sharding + In-Memory Replication
|
Version | Downloads | Last updated |
---|---|---|
1.4.3 | 29,308 | 6/17/2024 |
1.4.2 | 1,182 | 6/11/2024 |
1.4.1 | 25,771 | 3/18/2024 |
1.4.0 | 24,469 | 1/12/2024 |
1.3.3 | 724 | 1/10/2024 |
1.3.2 | 72,751 | 7/18/2023 |
1.3.1 | 25,178 | 5/4/2023 |
1.3.0 | 19,392 | 3/3/2023 |
1.3.0-beta1 | 394 | 3/1/2023 |
1.2.2 | 16,383 | 1/19/2023 |
1.2.1 | 3,696 | 12/19/2022 |
1.2.0 | 4,873 | 11/18/2022 |
1.1.4 | 1,926 | 7/17/2023 |
1.1.3 | 17,660 | 10/20/2022 |
1.1.2 | 7,614 | 9/28/2022 |
1.1.1 | 1,513 | 9/23/2022 |
1.1.0 | 77,406 | 6/9/2022 |
1.0.2 | 88,220 | 11/16/2021 |
1.0.1 | 40,601 | 8/3/2021 |
1.0.0 | 3,180 | 7/26/2021 |
0.8.5 | 83,761 | 5/3/2021 |
0.8.4 | 1,050 | 4/30/2021 |
0.8.3 | 12,853 | 3/18/2021 |
0.8.2 | 44,799 | 11/24/2020 |
0.8.1 | 10,218 | 11/16/2020 |
0.8.0 | 70,880 | 3/11/2020 |
0.8.0-rc2 | 794 | 3/10/2020 |
0.8.0-rc1 | 712 | 3/3/2020 |
0.7.1 | 24,958 | 3/3/2020 |
0.7.0 | 45,477 | 10/3/2019 |
0.6.3 | 15,988 | 7/30/2019 |
0.6.2 | 7,859 | 6/19/2019 |
0.6.1 | 4,531 | 5/19/2019 |
0.6.0 | 9,128 | 5/9/2019 |
0.5.0 | 51,769 | 3/6/2019 |
0.4.1 | 6,520 | 12/7/2018 |
0.4.0 | 1,820 | 11/27/2018 |
0.3.3 | 64,680 | 2/27/2018 |
0.3.2 | 17,539 | 12/20/2017 |
0.3.1 | 4,776 | 9/19/2017 |
0.3.0 | 1,905 | 9/14/2017 |
0.2.2 | 6,744 | 6/25/2017 |
0.2.1 | 1,360 | 6/6/2017 |
0.2.0 | 6,154 | 5/21/2017 |
0.1.2 | 1,233 | 4/25/2017 |
0.1.1 | 1,201 | 4/21/2017 |
0.1.0 | 1,877 | 4/18/2017 |
Update [Akka.NET to v1.5.18](https://github.com/akkadotnet/akka.net/releases/tag/1.5.18).
Update [Akka.Hosting to v1.5.18](https://github.com/akkadotnet/Akka.Hosting/releases/tag/1.5.18)
Fix remote client memory leak bug