Managing Actors
Within your Cosmonic constellation, you can start and stop actors as you see fit to support your applications.
Launching Actors
To launch an actor, click the Actor+
icon in the tool palette at the top left of the logic
view. You will be prompted with a dialog that looks similar to the following:
Launch Actor Dialog |
---|
![]() |
On this dialog you will need to specify an OCI reference URL, which is the publicly-accessible URL
of the artifact as it resides in an OCI-compliant registry (e.g. GitHub or Azure CR). In the
screenshot we're attempting to launch the "echo" actor demo wasmcloud.azurecr.io/echo:0.3.5
.
The dialog also prompts you for the number of instances you want to start. This defaults to 1
which is a reasonable starting point, adjust the number if you know what kind of horizontally-scaled
footprint you want for your application.
Selecting a Host
To select a host you have two options:
- Select from the Constellation
- Find Host
Selecting from the constellation just provides you with a simple drop-down list containing the friendly names of all of the hosts in the constellation. This is useful when you're in the middle of a rapid iteration cycle and you're just looking for somewhere to put your actor.
Choosing the Find Host option allows you to perform a host auction. In a host auction, you specify a set of key-value pairs that must be present on target hosts. When you click the find host button, Cosmonic will perform an auction within your constellation for all hosts that match your criteria and then give you a list.
While this is useful for actors, it can be downright essential when scheduling providers where you
may need to select hosts with specific characteristics or hardware. For example, you might have a
set of hosts with the key-value pair gpu=true
and you might only schedule actors and providers for
an ML application on those hosts.
Terminating Actors
Terminating actors is a simple matter of selecting the actor node on the logic view. In the details
panel that appears on the right side of the canvas, click the trash can icon link Terminate Actor
.