Model Management and Deployment in DSX Local
To expose a checkpoint of assets to outside users, a DSX administrator can create a project release and deploy the assets within it. A project release represents a project tag that can be launched as a production environment within DSX Local. The DSX administrator can monitor releases and deployments from the IBM Deployment Manager.
Requirement: At least one DSX Local deployment node must be installed and available for a project release to launch successfully. If no DSX Local deployment node was installed, the DSX administrator can add a new deployment node
(that meets the software requirements) from the Nodes page of the Admin Console. Trial license only: During the Model Management and Deployment trial period, you can label your compute
nodes as deployment nodes by running
/wdp/utils/add_remove_deploy.sh --add-deploy-to-compute. Then after you upgrade to an enterprise license, you must run
/wdp/utils/add_remove_deploy.sh --remove-deploy-from-compute to remove the deployment labels and delete all of the related pods.
In the IBM Deployment Manager, a DSX administrator can perform the following tasks:
- Create a project release
- Deploy assets
- Launch project release
- Manage project releases
- Manage deployments
- View data sources
- View active environments
Create a project release
A DSX administrator creates a project release out of the state of a project at a given point in time as denoted by a user-defined tag. After the project release is created, assets within this project release can then be deployed.
Requirement: If you create a project release from a DSX Local source project, this source project must have a tag (specified from the Commit and push window). If you create a project release from a remote Git repository, the project must also have a valid tag. Restriction: You cannot create a release for a library project.
To create a project release, complete the following steps:
- In the IBM Deployment Manager, go to the Project releases page and click new project release.
- Click From DSX to select a Source project and Tag in DSX Local to associate the release to. Click From repository to import a release from a Git repo (a personal access token is required). Click From file to import a preexisting project from your local device (ensure the filename does not contain a space).
- Type in a name that is descriptive and unique. The name can contain hyphens but not special characters such as a period (.).
- Type in the Route. The route is the unique ID for the project release, and is used within the deployments' REST paths and URLs. It can contain at least 2 and at most 26 lowercase alphanumeric characters and hyphens, and must start with a letter and end with a letter or number.
- Click the Create button.
As a result, DSX Local creates an offline release, unlocked for editing. You can now click the Assets tab to preview assets and deploy them into the release.
A DSX administrator can deploy an asset into a project release. The deployment action creates a read-only snapshot of the asset. The following types of assets can be deployed:
|Notebooks||Y||N||Y||Only Jupyter notebooks can be deployed. Zeppelin and H2O Flows are not supported by IBM Deployment Manager.|
|Models||N||Y||N||Requires that you associate a batch scoring script with it.|
|R Shiny||N||N||Y||Deploys the R code inside of an R pod.|
|Flows||Y||N||N||Flows from SPSS Modeler.|
|Decision Optimization Models||N||Y||N||Provides a REST API to submit and execute optimization jobs.|
When the project release launches, each enabled deployment automatically generates either a permalink URL or REST API endpoint where the asset can be accessed:
- A job generates a REST API endpoint to start, stop, and get status for that job. The job can be scheduled (but not unscheduled), and is visible to authenticated users only.
- A web service generates a REST API endpoint for an external application to call. The web service is visible to authenticated users only.
- An app generates a URL that runs the asset code as an interactive UI session. For visibility settings, you can specify Shared with for either Anyone with the link (anyone outside of DSX can view it), Any authenticated user (only signed in DSX Local users can view it), or Deployment Admin (only the creator of the project release can view it).
To deploy an asset, complete the following steps:
- In the IBM Deployment Manager, go to your project release and click the Assets tab.
- Click the asset. Ensure that the first character in the asset name is not a digit.
- Depending on the asset, click the type of deployment you want to create.
- Fill out the fields. If applicable, select which version to deploy.
- Optional: Reserve resources for the computing environment associated with the deployment. Caution: Turning Reserve resources off can affect system performance if available CPU and RAM on the servers become overcommitted.
- For a web service, select the number of replicas (pod copies across which requests to the deployment are load balanced). A job and app deployment can only use one replica.
- Click the Create button.
All deployments remain disabled until the project release is launched. If the project release is already online, your newly created deployment starts immediately.
Launch project release
Click the Launch icon to bring the release online. Wait around a minute for the pods to start and each enabled deployment to activate (you can monitor the status in the Active environments panel) before you click any actions for the deployment. You might also see a similar time delay when you stop or start a script for model deployment.
If you deployed a job, click it to view the REST API endpoint for an external application or to run the job on demand. When the release is online, you can click the API tab and submit a request to Start, Stop, or get Status for the job. You can also click generate code to copy/paste the curl command with the deployment bearer token in it.
If you deployed a web service, it will have a REST API endpoint for an external application to call. From the deployment details API tab, you can submit a JSON request or click generate code to copy/paste the curl
command with the deployment bearer token in it. For an R script, ensure RStudio environment is in running state before you run the curl command (otherwise you might receive a
502 Bad Gateway error).
If you deployed an app, click it to view the URL to the interactive UI session.
You cannot take a release offline; you can only delete the release.
Manage project releases
A DSX administrator can manage releases and deploy assets inside of them.
To view the details of a release, click View next to it.
To pull in the latest assets from the source project and update the deployments with them, click Update next to the release. Note that this action only updates modified assets and adds new assets to the release. It does not delete assets from the release.
To export the deployment settings of a release (for use in another release), click Export deployment settings next to it. You can then upload these same deployment setting into another offline release by clicking the Import deployment settings icon and dragging the settings file into the Input pane. Click the Validate File button to compare these imported settings with the current settings for your release. If the Differences look acceptable, you can click Submit to update your release manifest accordingly. Existing settings will be updated, new settings will be added, and unaffected settings will remain unchanged.
To lock a release so that no one can edit it, click Lock next to it. You can click Unlock to reopen the release for editing.
To delete a release and all of its deployments, click Delete next to it. Alternatively, you can click the Delete icon from the release details page.
From the Deployments tab of your project release, you can click a deployment for an overview of its details including request metrics captured at the function level.
For an app, you can edit its settings, edit is visibility, and view its route.
You can start, stop, delete, or redeploy any deployment in the release. Note that if you redeploy a new version of any of the assets, the URL does not change.
View data sources
In the IBM Deployment Manager, click the Data sources to view your project data sources. You can also edit the production data source connection string and credentials by clicking Edit credentials next to the data source.
Important: Database credentials must be input again after creating a project release. Otherwise, the data source might not work.
View active environments
In the IBM Deployment Manager, click the Active environments tab to monitor all runtime environments, workers, and services to DSX Local.