Worker Configuration
The Oakestra worker is managed by two components:
- The NodeEngine is responsible for worker ↔ cluster communication
- The NetManager is responsible for worker ↔ worker communication
The NodeEngine regularly collects system information and sends it to the cluster manager. It is also responsible for handling deployment commands. Only the NodeEngine is required to register a worker with a cluster, however the NetManager is required for service-to-service communication through the overlay network.
Useful References
Set up a Worker
Connect your first worker to an Oakestra cluster
Worker Architecture
Explore the components of an Oakestra worker
Overlay Network
Learn more on the overlay network
Installation
You can install the latest bundled NodeEngine and NetManager with
curl -sfL oakestra.io/install-worker.sh | sh - Specify the Version
You can specify which version to install by setting
export OAKESTRA_VERSION=<release version>and then re-running the above install command.
Configuration
The NodeEngine and NetManager are implemented as systemd services. While it is possible to run the former without the latter, this configuration is impractical for most applications, therefore the NodeEngine service internally calls on the NetManager service. The NetManager cannot be run without the NodeEngine. The NodeEngine and NetManager commands require elevated privileges
Commands supported by both components
| Command | Description |
|---|---|
help | Displays an overview of the service and the available commands |
version | Prints the current version |
status | Shows the systemd service status |
logs | Tails the service logs |
Configuring the NetManager
You can configure the NetManager by editing /etc/netmanager/netcfg.json:
| Property | Description |
|---|---|
| NodePublicAddress | The IP address by which the worker node can be reached. With default value 0.0.0.0 the worker infers the address from the default interface |
| NodePublicPort | The port by which the worker node can be reached (default 50103) |
| ClusterUrl | The URL/address by which the cluster can be reached. With the default value 0.0.0.0 the Cluster URL will be inherited from the NodeEngine component |
| ClusterMqttPort | The port by which the cluster MQTT broker can be reached (default 10000) |
| DefaultInterface | Should the system have multiple default interfaces (e.g. eth0 and wlan0) the appropriate one must be specified |
| Debug | Toggles more verbose logging |
| PublicIPNetworking | Set to true or false. Toggles the NetManager from resolving its public or private IP address. Overridden by NodePublicAddress |
| MqttCert | The path to the certificate file to facilitate MQTTS |
| MqttKey | The path to the key file to facilitate MQTTS |
Configuring the NodeEngine
The NodeEngine is configured interactively with NodeEngine config [command], the following config commands are available:
addon
Enables or disables addons.
| Command | Options | Description |
|---|---|---|
FLOps | [on/off] | Enables the FLOps addon |
imageBuilder | [on/off] | Enables the imageBuilder addon |
applogs
Change where the application logs are written to.
| Argument | Description |
|---|---|
[path] | Specify the directory to which the applications should write their logs |
auth
Enables MQTT Authentication if the following flags are set.
| Flag | Description |
|---|---|
-c, --certfile | Path to the TLS certificate file |
-k, --keyfile | Path to the TLS key file |
cluster
NodeEngine config cluster <url> sets a new cluster connection. Similar to NodeEngine -a <url> except it does not start the NodeEngine.
| Flag | Description |
|---|---|
-p, --clusterPort | Specify the port on which the cluster is reachable |
default
Resets the NodeEngine configuration to the default settings.
network
Configures networking support and how the NetManager is integrated.
| Command | Description |
|---|---|
auto | Automatically manage the overlay network |
manual | The NetManager is no longer automatically started and must be managed manually. The NodeEngine will try to connect on the socket /etc/netmanager/netmanager.sock |
off | Disable the overlay network |
virtualization
Enables or disables a virtualization runtime support
| Command | Options | Description |
|---|---|---|
unikernel | [on/off] | Enables Unikernel virtualization |
Manually connect to the NetManager
If you wish to manually start and connect to a custom NetManager build (e.g. for debugging) follow these steps:
Build the NetManager by navigating to
.../oakestra-net/node-net-managerand executinggo build .Run the NetManager with
sudo ./NetManagerEnable manual network management
sudo NodeEngine config network manualStart the NodeEngine
sudo NodeEngine
Build the NetManager
The NetManager can be built and run manually from it’s source code
