Deploying & Using Clusters
Deploying an AI model in a Cluster
Navigator's Canvas is a great tool to test out your AI Flows and quickly iterate on them. Running a flow is coupled to the Navigator application, which means that the moment you close Navigator or shut down your machine, any flow that might still be running will be stopped. In an actual production setup you will probably want to decouple running a flow from your Navigator instance and even your machine.
This can be achieved via "Clusters", which allow you to assign flows to a set of computers and input devices that are controlled by another machine.
To deploy an AI model in a cluster, you'll need
• Navigator installed
• A flow created in Canvas that you want to deploy
• One or more computers running the webAI Runtime Agent
• Input devices (e.g., cameras) if required by your flow
Understanding Clusters
Navigator is the interactive UI that allows you to create and manage your AI Flows, as well as deploy them to a given Hardware-setup. The execution of these Flows is handled by the webAI Runtime Agent. Each Navigator installation comes with a built-in Runtime Agent that can assume the role of a Cluster Controller.
You can think of a Cluster as a hub to which computers and devices can be connected to for the purpose of running AI Flows. For as long as this Cluster are running, the Flows deployed to it will continue to be executed.
What is a Deployment?
While you “run” Flows on Canvas, you “deploy” Flows in Clusters. Deployments are the units of execution in each Cluster. They can be created, stopped, and restarted. Deployments can only be created within a Cluster, which you will have to create (in case of your local one) or connect to (in case of remote ones) first.
Connecting to a Cluster and Creating a Deployment
-
Design Your Flow
In order to create a Deployment, you start by designing your AI Flow on Canvas. Canvas will automatically provision and assign your computer and your local camera to any Element you pull onto Canvas, to provide a local test environment. -
Saving a Version of your Flow
Once you are happy with your Flow and it is ready to be deployed, you need to save a Version of it. A Canvas Version is a snapshot of the Flow in its current configuration that you can refer to later on when creating Deployments.- Click on the context menu of your project on the left (three dots)
- Select "Save for Deployment"
- To review all saved Versions:
- Click on the context menu of the project
- Select "View Canvas Versions"
- In the Versions History, you can:
- Rename previously saved Versions
- Delete previously saved Versions
-
Creating or connecting to a Cluster
In order to deploy a Flow, you need a Cluster. Even the Cluster that is running on your local Runtime Agent won't show up by default. Click on the Network button at the bottom left and navigate to Clusters. Click on Add Cluster and select "Host a new Cluster", which will set up the Cluster of your local Agent for you and others to use for Deployments.In case you want to connect to an existing Cluster to manage Devices and Deployments there, you can do so via the same flow. Navigator will detect any Cluster running in the same (virtual) network and offers you to connect directly via IP address as well.
-
Setting up your Devices
As mentioned above, Navigator will auto-assign your computer and your camera to all Elements pulled onto it. For a Deployment, you will likely want to use different Devices to deploy your AI Flow to. In order to make the Devices available for Deployments, you need to provision them on the Devices page of the Cluster where you want to use them. When you click on the Cluster you just created you can find the Devices under the Tab of the same name.Navigator differentiates between two kinds of Devices, Nodes and Input Devices. Input Devices are currently limited to Cameras, but will soon be extended with additional options. Nodes are computing devices that run the webAI Runtime Agent to power your AI Flows.
To provision your Devices, click on the "Add Node" or "Add Input Device" buttons, respectively. The Devices provisioned in a Cluster are available to all users who connect to that Cluster.
-
Creating a Deployment
Deployments are associated with the Cluster they run on and can be based off of any Canvas Version in your Projects.-
To create a new Deployment, click on the New button in the Cluster of your choice.
In the process you can
• Give a name and description
• Select a Version that you would like to deploy -
Based on this Version, you need to assign a set of provisioned Devices to the Elements that are part of the Flow:
You'll need to assign
• Input types like "Camera" to a provisioned Input Device
• Elements like "Person Detector" to a provisioned Computer to run on -
Once you have assigned all Elements to their corresponding provisioned Devices, you can click Build to create the Deployment.
-