Deployment
Contents
Overview
TBD - add deployment description
Example scoring pipeline
TBD - add data flow description
Scoring lifecycle
Note detailed data channel interactions are skipped here.
- The modelops user uses the UI to define the scoring pipeline (models + scoring flows + data channels)
- The modelops user deploys the scoring pipeline in the form of a internal representation (IR)
- The modelops user starts a scoring job
- The Scheduling Server API is called to start the scoring job
- A new tekton pipeline run is created for this scoring pipeline
- The first task of the pipeline, install, is started
- The unique job identifier is returned to the modelops server - this can be used to query or cancel the scoring job
- The install task downloads the IR
- Scoring pipeline helm chart values are calculated (also known as pre-processing)
- The scoring pipeline helm chart is deployed, parameterized by the values file that represents the IR
- The second task of the pipeline, wait, waits for the scoring to complete ( and pass back any errors found )
- Helm chart templates are used to process the values into scoring flow and scoring service configurations ( in the form of kubernetes objects )
- The creation of the scoring service kubernetes objects starts the scoring service(s)
- Each scoring service downloads models it needs
- The creation of the scoring flow kubernetes objects starts the scoring flow(s)
- Each scoring flow waits for its associated scoring service to be up and running before starting
- Once each scoring flow application is running, the scoring flow configuration is loaded and activated
- The modelops server can use the job identifier to query the scoring job status
- The scoring job status includes details such as state and pipeline task
- Batch scoring jobs may determine that scoring is complete
- Scheduling service is informed that scoring is complete
- The pipeline wait task is cancelled - this triggers the pipeline to move to the finally task
- The pipeline finally tasks is started
- The helm chart is un-installed
- The process of uninstalling the helm chart deletes the scoring flow kubernetes objects
- The process of uninstalling the helm chart deletes the scoring service kubernetes objects
The pre-processing of the IR includes the following :
- Lookup sources and sinks in data channel
- Apply parameters to scoring flow
- Merge all the IR files into a single helm values file ( easier for the helm templates to use )
- Apply global parameters ( such as trace settings, location of git server etc )
Scoring lifecycle cancelled by Modelops server
TBD - add scoring lifecycle cancel description
Scoring lifecycle with namespaces
TBD - add scoring lifecycle namespaces description
Sub charts
The main modelops helm chart can import helm sub-charts via the normal maven dependency mechanism. The installation pipeline uses these sub-charts to build container images and deploy the built applications. Hence this is a useful way to extend the modelops helm chart.
The following sub-charts are included :
- Container tools
- Streaming runtime base
- Modelops server
- Scoring flow
- Scoring severs ( pmml, tensorflow, statistica and python )
- Data channel
- Scheduling server
- Test data source and sink
Each sub-chart may define :
- In values.yaml :
- List of container build steps in values.yaml
- Build steps that need to be built first
- Any sub-chart specific settings ( for example scoring services define a listt of supported models )
- In templates directory :
- Define any custom build steps as tekton task
- Deployment configurations ( kubernetes Deployment, Service, ConfigMap etc )