Chapter 4. Managing connection types
Chapter 4. Managing connection types In Red Hat OpenShift AI, a connection comprises environment variables along with their respective values. Data scientists can add connections to project resources, such as workbenches and model servers. When a data scientist creates a connection, they start by selecting a connection type. Connection types are templates that include customizable fields and optional default values. Starting with a connection type decreases the time required by a user to add connections to data sources and sinks. OpenShift AI includes pre-installed connection types for S3-compatible object storage databases and URI-based repositories. As an OpenShift AI administrator, you can manage connection types for users in your organization as follows: View connection types and preview user connection forms Create a connection type Duplicate an existing connection type Edit a connection type Delete a custom connection type Enable or disable a connection type in a project, to control whether it is available as an option to users when they create a connection 4.1. Viewing connection types As an OpenShift AI administrator, you can view the connection types that are available in a project. Prerequisites You have logged in to OpenShift AI as a user with OpenShift AI administrator privileges. Procedure From the OpenShift AI dashboard, click Settings Connection types . The Connection types page appears, displaying the available connection types for the current project. Optionally, you can select the Options menu and then click Preview to see how the connection form associated with the connection type appears to your users. 4.2. Creating a connection type As an OpenShift AI administrator, you can create a connection type for users in your organization. You can create a new connection type as described in this procedure or you can create a copy of an existing connection type and edit it, as described in Duplicating a connection type . Prerequisites You have logged in to OpenShift AI as a user with OpenShift AI administrator privileges. You know the environment variables that are required or optional for the connection type that you want to create. Procedure From the OpenShift AI dashboard, click Settings Connection types . The Connection types page appears, displaying the available connection types. Click Create connection type . In the Create connection type form, enter the following information: Enter a name for the connection type. A resource name is generated based on the name of the connection type. A resource name is the label for the underlying resource in OpenShift. Optionally, edit the default resource name. Note that you cannot change the resource name after you create the connection type. Optionally, provide a description of the connection type. Specify at least one category label. By default, the category labels are database, model registry, object storage, and URI. Optionally, you can create a new category by typing the new category label in the field. You can specify more than one category. The category label is for descriptive purposes only. It allows you and the users in your origanization to sort the available connection types when viewing them in the OpenShift AI dashboard interface. Check the Enable users in your organization to use this connection type when adding connections" option if you want the connection type to appear in the list of connections available to users, for example, when they configure a workbench, a model server, or a pipeline. Note that you can also enable/disable the connection type after you create it. For the Fields section, add the fields and section headings that you want your users to see in the form when they add a connection to a project resource (such as a workbench or a model server). Note that the connection name and description fields are included by default, so you do not need to add them. Optionally, select a model serving compatible type to automatically add the fields required to use its corresponding model serving method. Click Add field to add a field to prompt users to input information, and optionally assign default values to those fields. Click Add section heading to organize the fields under headings. Click Preview to open a preview of the connection form as it will appear to your users. Click Save . Verification On the Settings Connection types page, the new connection type appears in the list. 4.3. Duplicating a connection type As an OpenShift AI administrator, you can create a new connection type by duplicating an existing one, as described in this procedure, or you can create a new connection type as described in Creating a connection type . You might also want to duplicate a connection type if you want to create versions of a specific connection type. Prerequisites You have logged in to OpenShift AI as a user with OpenShift AI administrator privileges. Procedure From the OpenShift AI dashboard, click Settings Connection types . From the list of available connection types, find the connection type that you want to duplicate. Optionally, you can select the Options menu and then click Preview to see how the related connection form appears to your users. Click the Options menu , and then click Duplicate . The Create connection type form appears populated with the information from the connection type that you duplicated. Edit the form according to your use case. Click Preview to open a preview of the connection form as it will appear to your users and verify that the form appears as you expect. Click Save . Verification In the Settings Connection types page, the duplicated connection type appears in the list. 4.4. Editing a connection type As an OpenShift AI administrator, you can edit a connection type for users in your organization. Note that you cannot edit the connection types that are pre-installed with OpenShift AI. Instead, you have the option of duplicating a pre-installed connection type, as described in Duplicating a connection type . When you edit a connection type, your edits do not apply to any existing connections that users previously created. If you want to keep track of versions of this connection type, consider duplicating it instead of editing it. Prerequisites You have logged in to OpenShift AI as a user with OpenShift AI administrator privileges. The connection type must exist and must not be a pre-installed connection type (which you are unable to edit). Procedure From the OpenShift AI dashboard, click Settings Connection types . From the list of available connection types, find the connection type that you want to edit. Click the Options menu , and then click Edit . The Edit connection type form appears. Edit the form fields and sections. Click Preview to open a preview of the connection form as it will appear to your users and verify that the form appears as you expect. Click Save . Verification In the Settings Connection types page, the duplicated connection type appears in the list. 4.5. Enabling a connection type As an OpenShift AI administrator, you can enable or disable a connection type to control whether it is available as an option to your users when they create a connection. Note that if you disable a connection type, any existing connections that your users created based on that connection type are not effected. Prerequisites You have logged in to OpenShift AI as a user with OpenShift AI administrator privileges. The connection type that you want to enable exists in your project, either pre-installed or created by a user with administrator privileges. Procedure From the OpenShift AI dashboard, click Settings Connection types . From the list of available connection types, find the connection type that you want to enable or disable. On the row containing the connection type, click the toggle in the Enable column. Verification If you enabled a connection type, it is available for selection when a user adds a connection to a project resource (for example, a workbench or model server). If you disabled a connection type, it does not show in the list of available connection types when a user adds a connection to a project resource. 4.6. Deleting a connection type As an OpenShift AI administrator, you can delete a connection type that you or another administrator created. Note that you cannot delete the connection types that are pre-installed with OpenShift AI. Instead, you have the option of disabling them so that they are not visible to your users, as described in Enabling a connection type . Prerequisites You have logged in to OpenShift AI as a user with OpenShift AI administrator privileges. The connection type must exist and must not be a pre-installed connection type (which you are unable to delete). Procedure From the OpenShift AI dashboard, click Settings Connection types . From the list of available connection types, find the connection type that you want to delete. Optionally, you can select the Options menu and then click Preview to see how the related connection form appears to your users. Click the Options menu , and then click Delete . In the Delete connection type? form, type the name of the connection type that you want to delete and then click Delete . Verification In the Settings Connection types page, the connection type no longer appears in the list.