Deploying Models
After a model is developed, it can be put into execution to view the output of its patterns, or to verify that its pattern detection logic works as intended. This process involves creating and configuring deployments.
For more information about deployments, see Model Artifacts.
Viewing Deployments
Deployment-related resources are found in the Deployments window. To access it, click the Deployments button on the project screen toolbar.
The Deployments window displays all existing deployments in a table with the following columns:
- Name: Displays the name of the deployment.
- Patterns: Displays the number of event patterns included in the deployment.
- Status: Shows the current status of the deployment.
- Issues: Indicates the number of issues, if any, that the deployment is experiencing. If issues are occurring, click the ! icon to open the open the deployment's Issues Log and assess the problem(s). For more information, see Addressing Issues.
Clicking the Expand (>) icon to the left of a deployment's name reveals additional fields:
- Description: Shows a description for the deployment, if available.
- Date Created: Displays the date and time when the deployment was created.
- Date Modified: Displays the date and time when the most recent change to the deployment was made.
- Patterns: Displays the names of the individual event patterns included in the deployment.
- Flink Cluster Name: Indicates WHAT. Click the Copy icon to copy the value to the clipboard for pasting in other locations.
Click the Collapse (v) icon to hide the additional fields.
Editable deployments have an Edit (pencil) icon on the far right of their corresponding row. Click it to edit the deployment's details. For more information, see Editing Deployments. Read-only deployments have a View icon instead, which can be clicked to show the deployment's configuration.
To the right of the Edit or View icon is the More (⋮) menu. The options it contains vary depending on the status of the deployment. It may include the following options:
- Deploy: Deploys the deployment. For more information, see Initiating Deployments.
- Flink Dashboard: Opens the Flink Dashboard for the deployment as a new browser tab. For more information, refer to the official Flink documentation.
- Pause & Edit: Pauses the deployment and opens its configuration for editing. For more information, see Editing Deployments.
- Pause: Pauses the deployment (but keeps it online).
- Stop: Stops the deployment and takes it offline. For more information, see Terminating Deployments.
- Export: Downloads the deployment as a file to your local machine. This file can be imported into the same project at another time, into other projects, or into other instances of Cogynt. For more information, see Importing Deployments.
- Duplicate: Makes a copy of the current deployment.
- Delete: Deletes the deployment.
Configuring Deployments
A deployment's details must be specified before the deployment can be put to use. This process is called "configuring" the deployment.
Creating Deployments
New deployments can be added to projects as needed.
To create a deployment:
- On the project screen, click Deployments.
- In the Deployments window, click + New Deployment.
- In the New Deployment window:
- Under Step 1: Patterns:
- In the Name field, enter a name for the deployment.
- In the Description field, enter a description for the deployment if desired.
- In the Patterns list, select any patterns that should be included in the deployment. (Note: If a pattern is utilized by another deployment, it will be marked with a rocket symbol.)
- Filter the Patterns list using any of the following features if needed:
- Enter the name of a pattern in the Search field to include only matching terms in the Patterns list.
- Select the Filter By dropdown menu to filter patterns by tag. The Patterns list will display only patterns that have been given the selected tag(s). (If no tags are selected, all patterns are displayed.)
- Set the Hide Utilized toggle to On to remove utilized patterns from the list.
- Under Step 2: Deployment Configs:
- Select the Custom option button.
- Set the Auto Scale toggle to On to enable auto-scaling. When auto-scaling is enabled, certain configuration fields (such as Number of Slots) allow defining a minimum and maximum setting.
- Click the More (⋮) menu for additional options:
- Select Apply Settings from Template to use an existing deployment template to define the deployment configuration, if desired. For more information, see Using Deployment Templates.
- Click Reset All to Defaults to set every field of the current deployment configuration back to its default value, if necessary. Note that each field has its own Reset (circular arrow) icon for resetting individual values.
- Under General Settings:
- Under Number of Slots, enter the total number of parallel tasks that the deployment should run in the Number field. When more than one slot is assigned to a deployment, Cogynt divides the task load across the equivalent amount of parallel processes as there are slots. (Note: Due to the distributed nature of deployments, the total number of slots must be a divisible number.)
- Under Memory, specify the Number and Unit for how much memory to make available per slot. This memory is used for storing constraint and state information. Typically, the more partitioned entities and constraint states, the more memory required.
- Under CPU Cores, in the Decimal field, specify how much computing power to give to each slot. (For example, a value of
1.2
takes 100% of an entire core, and 20% of another core.) - Under Advanced Settings, configure the following settings as needed:
- Under Job Manager CPU Core, specify the number of CPUs assigned to the job manager. The more event patterns included in the deployment, the more CPUs required.
- Under Job Manager Memory, specify the amount of memory assigned to the job manager. The more event patterns included in the deployment, the more memory required.
- Under Deployment Timeout Duration, specify the amount of time the system should wait for the deployment to start before marking it as failed.
- Under Fraction of Memory for State Management, specify the fraction of allotted memory assigned to manage storage and state. Higher values can improve performance for deployments with large state volume.
- Under Network Buffer Size, specify the amount of memory assigned to each message segment to facilitate inter-task communication. (Reduce this value when encountering deployment errors relating to insufficient network buffer memory.)
- Under Network Memory Fraction, specify the fraction of allotted memory to use as the network memory.
- Under Minimum Network Memory, specify the minimum amount of memory to be used for network memory.
- Under Drilldown Batch Interval, specify the amount of time to aggregate drilldown records before they are published. (Increase the value if drilldown performance in Cogynt Analyst Workstation is slow.)
- Under Check Point Settings:
- Under Checkpoint Interval, use the Number and Unit fields to specify how frequently a checkpoint should be saved. The smaller the value, the higher the frequency.
- Under Advanced Settings, configure the following settings as needed:
- Under Checkpoint Timeout Duration, specify the maximum amount of time a checkpoint will run before timing out.
- Under Enable Periodic Save Point Intervals, specify whether to create save (recovery) points.
- Under Periodic Save Point Intervals, specify the time between the start of each save point.
- Under Fault Tolerance Configs:
- Under Restart Attempts Before Failure, use the Number field to specify the total number of restarts that should be permitted before the deployment fails indefinitely.
- Under Restart Counter Reset Threshold, use the Number and Unit fields to specify the amount of time that deployment should run without failure to reset the restart attempt counter.
- Under Custom Settings:
- Click + NEW to add a new custom setting:
- In the Config Name field, specify the setting's configuration key.
- In the Value field, specify the setting's configuration value.
- Remove any unnecessary custom settings by clicking the corresponding X icon.
- Click + NEW to add a new custom setting:
- Under Debug Configurations, configure the following settings as needed:
- Under Log Level, specify the logging (verbosity) level for Cogynt.
- Under Enable Error Collection, specify whether errors and warnings should be detected and shown in the Issues column.
- Under Flame Graph Enabled, specify whether to enable the Flame Graph feature on the Flink dashboard.
- Under Flame Graph Samples, specify the number of samples required to build a flame graph.
- Under Flame Graph Refresh Interval, specify the time after which available statistics are deprecated and need to be refreshed (by resampling).
- Under Flame Graph Stack Design, specify the maximum depth of stack traces use to create Flame Graphs.
- Under Flame Graph Delay, specify the delay between individual stack trace samples taken for building Flame Graphs.
- Under Step 3: Data Ingestion:
- Click + Add Event Type to add new ingestion settings as necessary:
- From the Event Type dropdown menu, select the event type to filter against.
- From the Referenced Date Field, select the timestamp that the ingestion start date should reference (for example,
Kafka Ingestion Time
orCOG_timestamp
). WARNING: If you pick a field inside of your data and make it a filter, Cogynt will have to traverse every entry in your topic to find the time to filter against. UseKafka Ingestion Time
when you can, as it jumps to a time index inside of the message, which saves time and resources. - In the Ingestion Start Date field, specify the date and time to begin ingestion.
- Remove any unnecessary events by clicking the corresponding X icon.
- Click + Add Event Type to add new ingestion settings as necessary:
- Under Step 1: Patterns:
- Click Create to create the deployment, or Cancel to discard it. Alternatively, click Create and Deploy to deploy the deployment once it is created.
Editing Deployments
A paused or stopped deployment's configurations can be modified as needed.
To edit a deployment's configuration:
- Ensure the deployment has been paused or stopped. For more information, see Terminating Deployments.
- In the Deployments window, click the Edit (pencil) icon for the corresponding deployment.
- Modify the configuration details as necessary. For more information about the various fields, see the procedure for Creating Deployments.
- When finished, click Save to retain the changes, or Cancel to discard them.
Importing Deployments
Exported deployments can be imported into Cogynt. This can be useful for copying deployments from one project into other projects or other Cogynt instances.
To import a deployment:
- On the project screen, click Deployments.
- In the Deployments window, beside the + New Deployment button, click v.
- From the available options, select Import Deployments.
- Locate the file on your local machine containing the deployment to import.
- Click and drag the file into the field in the import dialog.
Working with Deployment Templates
Deployment templates provide a means of storing and retrieving frequently-used deployment configurations. They can make it easier and more convenient to create new deployments.
Creating Deployment Templates
New deployment templates can be created as needed.
To create a deployment template:
- On the project screen, click the Settings icon.
- Select the Deployment Templates tab.
- Click + New Template.
- In the New Deployment Template window:
- In the Name field, enter a name for the deployment template.
- In the Description field, enter a description for the deployment template if desired.
- Set the Auto Scale toggle to On to enable auto-scaling. When auto-scaling is enabled, certain configuration fields (such as Number of Slots) allow defining a minimum and maximum setting.
- Under General Settings:
- Under Number of Slots, enter the total number of parallel tasks that the deployment should run in the Number field. When more than one slot is assigned to a deployment, Cogynt divides the task load across the equivalent amount of parallel processes as there are slots. (Note: Due to the distributed nature of deployments, the total number of slots must be a divisible number.)
- Under Memory, specify the Number and Unit for how much memory to make available per slot. This memory is used for storing constraint and state information. Typically, the more partitioned entities and constraint states, the more memory required.
- Under CPU Cores, in the Decimal field, specify how much computing power to give to each slot. (For example, a value of
1.2
takes 100% of an entire core, and 20% of another core.) - Under Advanced Settings, configure the following settings as needed:
- Under Job Manager CPU Core, specify the number of CPUs assigned to the job manager. The more event patterns included in the deployment, the more CPUs required.
- Under Job Manager Memory, specify the amount of memory assigned to the job manager. The more event patterns included in the deployment, the more memory required.
- Under Deployment Timeout Duration, specify the amount of time the system should wait for the deployment to start before marking it as failed.
- Under Fraction of Memory for State Management, specify the fraction of allotted memory assigned to manage storage and state. Higher values can improve performance for deployments with large state volume.
- Under Network Buffer Size, specify the amount of memory assigned to each message segment to facilitate inter-task communication. (Reduce this value when encountering deployment errors relating to insufficient network buffer memory.)
- Under Network Memory Fraction, specify the fraction of allotted memory to use as the network memory.
- Under Minimum Network Memory, specify the minimum amount of memory to be used for network memory.
- Under Drilldown Batch Interval, specify the amount of time to aggregate drilldown records before they are published. (Increase the value if drilldown performance in Cogynt Analyst Workstation is slow.)
- Under Check Point Settings:
- Under Checkpoint Interval, use the Number and Unit fields to specify how frequently a checkpoint should be saved. The smaller the value, the higher the frequency.
- Under Advanced Settings, configure the following settings as needed:
- Under Checkpoint Timeout Duration, specify the maximum amount of time a checkpoint will run before timing out.
- Under Enable Periodic Save Point Intervals, specify whether to create save (recovery) points.
- Under Periodic Save Point Intervals, specify the time between the start of each save point.
- If necessary, reset all field values to their defaults during the creation process by clicking the More (⋮) menu, then selecting Reset All to Defaults.
- When finished, click Save to create the deployment template, or Cancel to discard it.
Once a deployment template is created, it can be applied to new deployments. For more information, see Using Deployment Templates.
Using Deployment Templates
When creating new deployments, templates can be used in two different ways:
- Applying settings from a template: This method fills a deployment's default values during creation with the values specified in a template. The deployment and template remain independent of one another, and one can be modified without affecting the other.
- Creating from a template: This method creates a deployment whose values match the selected template's. It keeps the deployment tied to the selected template. Changes made to the template automatically propagate to any deployments created from it.
To apply settings from a deployment template:
- In the New Deployment window, click the More (⋮) menu, and select Apply Settings from Template.
- In the Deployment Templates window:
- From the Templates list, select a template to apply. You can either manually scroll through the list of available templates, or enter a name in the Search field to find particular templates by name.
- Review the template's settings.
- Click Apply to apply the deployment template, or cancel to go back to the New Deployment window without applying the template.
Once a deployment template has been applied, you are returned to the New Deployment screen, and the template's settings are applied to the new deployment.
To create a deployment from a template:
- Follow the procedure in Creating Deployments until Step 3.ii.
- Under Step 2: Deployment Configs, select the Template option button.
- From the Template dropdown menu, select the template to use.
- Resume the Creating Deployments procedure from Step 3.iii.
Configuring Data Sources
Data sources provide data for Cogynt to interpret. In order for Cogynt to read and process the data, connections to the relevant data sources must be configured.
To configure a data source:
- On the project screen, click the Settings icon.
- Click the Data Sources tab.
- Click + New Data Source.
- In the New Data Source window:
- From the Database Type dropdown menu, select the database to serve as the data source. (Note: Different selections will enable or remove different fields under Connector Details.)
- In the Name field, enter a name for the data source.
- In the Description field, enter a description for the data source if desired.
- Under Connector Details:
- In the Connect String field, enter the string value for connecting to the data source. It often takes the form:
ClusterName.PortType:PortNumber
. - In the User Name field, enter the user name for logging in to the data source, if applicable.
- In the Password field, enter the password for the entered user name, if applicable.
- In the Connect String field, enter the string value for connecting to the data source. It often takes the form:
- Under Custom Settings:
- Click + New to add a new custom setting:
- In the Name field, enter the field name for the custom setting.
- In the Setting Value field, enter the value for the custom setting.
- Click the X icon beside an existing custom setting to remove it, if necessary.
- Click + New to add a new custom setting:
- Click Create to create the data source, or Cancel to discard it.
Data source files can also be imported by clicking the v icon beside the + New Data Source button and selecting Import Data Source.
Initiating Deployments
Deployments must be initiated (or activated) in order to be put to use.
To initiate a deployment:
- In the Deployments window, locate the deployment you wish to deploy.
- In the corresponding row, click the More (⋮) menu.
- Click Deploy.
As the deployment deploys, its state changes from Not Deployed
to Deploying
. Then:
- If successful, the deployment's state becomes
Running
. - If errors prevent the deployment from initiating, the state becomes
Failed
. For information about assessing and fixing the problem, see Addressing Issues.
Terminating Deployments
Deployments can be stopped and taken offline as needed. This process is called "terminating" the deployment.
To terminate a deployment:
- In the Deployments window, locate the running deployment to terminate.
- In the corresponding row, click the More (⋮) menu.
- Click Stop.
As the deployment stops, the state of the deployment changes from Running
to Stopping
to Not Deployed
.
If you would like the deployment to remain online but halt its functioning, click Pause instead of Stop. The deployment's state changes from Running
to Pausing
to Paused
.
Addressing Issues
The Deployments window provides alerts if a deployment has encountered any errors.
Viewing Issues
Click the ! icon in the affected deployment's Issues column to see the deployment's Issues Log.
The Issues Log displays the following information about each issue:
- Name: Provides the name (or classification) of the detected issue.
- Last Detected Date: Shows the date and time when the issue was most recently detected.
- Count: Shows the number of instances of the issue.
- Issue Type: Indicates the type (severity) of the issue.
Clicking the Expand (>) icon to the left of an issue's name shows a description of the issue. Clicking the Collapse (v) icon hides the description.
To look for particular issues, enter any relevant criteria in the Search field. The list will be filtered to return matching results.
Diagnosing and Correcting Issues
A deployment's Flink dashboard may provide additional diagnostic data about the causes of various issues. To access it, click the Flink Dashboard button in the top-right of the Issues Log window. For more information, about Flink dashboards, refer to the official Flink documentation.
To correct the deployment's configuration, click Stop & Edit in the top-right of the screen, then edit the configuration as necessary. For more information, see Editing Deployments.
Dismissing Issues
Issues that do not need addressing can be dismissed from the Issues Log.
On the far right of an issue's row, clicking the Dismiss button removes the issue from the Issues Log.
To dismiss all issues:
- Click the Dismiss All button in the top-right of the Issues Log window.
- In the warning dialogue, click Dismiss All to dismiss all the issues, or Cancel to abandon the operation.
Customizing Ingestion Start Date/Time
Sometimes you may need to adjust a small part of a deployment. To avoid redundant data ingestion and conserve resources, Cogynt includes a "restart" feature that lets users modify and redeploy patterns more efficiently. The feature allows users to specify the time when redeployed patterns should begin ingesting data.
To customize the ingestion start date/time:
- On the project screen, click Deployments.
- In the Deployments window, locate the deployment to edit.
- Click the corresponding Edit (pencil) icon.
- Under Step 3: Data Ingestion:
- Take note of the settings of the event type to restart. (It may be helpful to record the settings in a text file.)
- Click the X icon beside the event type to restart. (Note: This will remove the event type.)
- Click + Add Event Type to redefine the event type:
- From the Event Type dropdown menu, select the event type to filter against.
- From the Referenced Date Field, select the timestamp that the ingestion start date should reference (for example,
Kafka Ingestion Time
orCOG_timestamp
). WARNING: If you pick a field inside of your data and make it a filter, Cogynt will have to traverse every entry in your topic to find the time to filter against. UseKafka Ingestion Time
when you can, as it jumps to a time index inside of the message, which saves time and resources. - In the Ingestion Start Date field, specify the date and time to begin ingestion.
- Repeat steps i-iii for each event type to restart.
- Click Save.
When the deployment is redeployed, the selected topics/event types will only start ingestion at the specified time(s).