You can run all AI services in one computer node, or distribute the load that the services create into more than one computer node.
Installation of services in a node via command line
Every node in an aiWARE instance has a certain role, called a run mode. Run modes can be chosen on installation.
The agent uses the run modes assigned to its node to control how to setup the node, what services to install and run.
For example, if you want to set a controller node, then in your environment variable settings, set AIWARE_MODE = controller.
aiWARE has the following services and run modes.
Run Modes
| Run mode | Description, possible bundle for command line installation, and resource consumption |
|---|
| api | Nodes with the api run mode can run Docker images installed on aiWARE as services with the tag of api. This will allow separation of applications by type for larger multi-node aiWARE instances. Bundle: Can bundle with apps. |
| apps | Nodes with the apps run mode handle the aiWARE applications as well as any Veritone applications associated with the instance. Bundle: Can bundle with api. Bundle: Can bundle with api. |
| controller | The node that runs the controller service launches scheduled jobs, retrieves ad-hoc jobs from AI Data to process, and provides the API for engines to process jobs. It also handles the configuration for services. Bundle: Any other run mode modes. Consider that the memory usage can be high depending on current workload. 1-2Gb for prod1. |
| db | For database nodes, use the run mode db. Resource consumption for both CPU and memory are typically higher than for other services. Bundle: For production environments, do not bundle db with other modes. |
| es | For nodes that run the ElasticSearch service, use the es run mode. Bundle: For production environments, do not bundle with other modes. |
| engine | Nodes with the engine mode start engine instances to process jobs. It can be bundled, although it isn't recommended for production environments due to resource consumption. Resource consumption varies depending on the engines. Network isolated engines typically consume 1-3 vCPUs (translation engines for example) and 2-4 GB of memory when processing job data. Cloud engines might be less. There must be at least one node with the engine mode. |
| lb | The node with the lb run mode is for load balancer running HAProxy. The controller will set the HAProxy's configuration with the appropriate ingress based on the services installed. The appropriate prefixes and paths for a service must be included when installing a service. The LB mode must be installed on the same host as the api and app run modes. The api and apps services are only accessible via the endpoints provided through the HAProxy. |
| minio | The minio service makes blob storage available as a resource to aiWARE. This mode is required when running AI Data on aiWARE and when running aiWARE in an air-gapped environment. |
| nfs | Agent nodes with nfs mode should have sufficient disk volumes for storage of job and other processing artifacts. NFS services should be installed if not already done by aiWARE installation. NFS mode is required for multi-node installations. Bundle: nfs can be combined with other modes, but it is not recommended for production environments. |
| nsq | Agent nodes with the nsq run mode provide aiWARE instances with a message queue service. NSQ is available as a resource to services installed on aiWARE. This is a requirement for AI data. |
| prometheus | The prometheus service monitors and provides dynamic targets. If you want to use metrics, then you need to install the Prometheus service and plan for adequate RAM on the node it runs. Prometheus might crash when it runs out of memory. |
| redis | Nodes with the redis service provide aiWARE instances with in-memory data storage that can be used as cache. Redis is available as a resource to services installed on aiWARE. This is a requirement for AI Data. |
| registry | Nodes with the registry service provide local access to engine Docker registry across all nodes of the aiWARE instance. A Docker image of an engine could be located in various Docker registries; having a multi-node Docker registry facilitates local access to the image before searching other locations for the image. Not recommended to bundle with other modes. Engine Docker images are GB in size and require lots of disk storage. |
| automatestudio | The automatestudio run mode is used for Automate Studio's Node-RED instances. The Automate Studio application leverages a dedicated Node-RED runtime for a workflow that is in edit mode. The automatestudio node's agent retrieves requests for new Node-RED containers via the controller. |
| none (cli) | Install the aiWARE agent and the CLI, but do not start the services. This is an install-only option and no node actually runs with these modes. |
| hubagent | The hubagent run mode is the bridge between Hub and aiWARE instances. It synchronizes the entities (engines, applications, etc.) an aiWARE instance has, and vice versa: if new entities such as engines or apps are created in an aiWARE instance, then hubagent pulls the entities' information to be in aiWARE, while honoring whether the entity is designated as public or not. Hub installs hubagent on the host that runs controller run mode. |