Tutorial: Sample Pipeline in the Pipelines Interface

Look at this example from the Kubeflow documentation (link opens an external website in a new browser tab/window).

Running a Basic Pipeline

  1. Open the Kubeflow dashboard (see Accessing the Kubeflow Dashboard), then access the Pipelines page.
  2. Click the sample name [Tutorial] DSL - Control Structures.
  3. Click Create experiment, then follow the on-screen prompts.
  4. Create a run by clicking the Start button.
  5. Select the name of the run on the Experiments dashboard.
  6. Explore the graph and other aspects of your run by selecting the graph components and other interface elements.

Running a Pipeline in Jupyter Notebook

  1. Create or open the KubeDirector notebook.
  2. Upload the lightweight_component.ipynb notebook to the Jupyter Notebook.
  3. Open the uploaded file and execute each cell in the Notebook until it is finished.
  4. In the last step, follow the links to open the experiment and run it in the Pipelines interface.

Cleaning the Namespace After Running the Sample

After completing the tutorials, you can perform cleanup steps to remove the pods from your namespace. These cleanup steps are applicable to both the Running a Basic Pipeline tutorial and the Running a Pipeline in Jupyter Notebook tutorial.

The following is an example of Kubernetes pods in the tenant namespace after successful completion of the Running a Basic Pipeline tutorial:

NAME                                                                READY   STATUS      RESTARTS   AGE
conditional-execution-pipeline-with-exit-handler-tb6p4-1576391149   0/2     Completed   0          15m
conditional-execution-pipeline-with-exit-handler-tb6p4-1865731256   0/2     Error       0          15m
conditional-execution-pipeline-with-exit-handler-tb6p4-2761648130   0/2     Completed   0          14m
conditional-execution-pipeline-with-exit-handler-tb6p4-2796593516   0/2     Completed   0          15m
conditional-execution-pipeline-with-exit-handler-tb6p4-39186315     0/2     Completed   0          16m
NOTE The Error state for one of the pipeline's pods is expected behavior, which occurs after looking through the pipeline's graph and components.
To remove pods from the namespace:
  1. Start a new terminal session in the KubeDirector notebook.
  2. Open the web terminal in the HPE Ezmeral Runtime Enterprise UI, or from the terminal within the KubeDirector notebook.
    NOTE By default, you cannot execute kubectl commands in a newly created KubeDirector notebook. To enable kubectl in a notebook, select one of the following methods:
    • Through the HPE Ezmeral Runtime Enterprise UI:
      1. In the HPE Ezmeral Runtime Enterprise UI, navigate to the Tenant section and initialize a web terminal with the corresponding button.
      2. Start a new Terminal session inside the KubeDirector notebook. Check that the files inside your KubeDirector notebook have the appropriate file permissions that allow you to work with them.
      3. Move all files you want to work with to the following path:
      4. You can now access the files inside the web terminal with kubectl.
    • From inside the KubeDirector notebook:
      1. To authorize your user inside the KubeDirector notebook, execute the following Jupyter code cell:
        from ezmllib.kubeconfig.ezkubeconfig import set_kubeconfig
      2. A prompt appears below the code cell you executed. Enter your user password in the prompt.
      3. kubectl is now enabled for your KubeDirector notebook. Start a Terminal session in the KubeDirector notebook to work with kubectl.
  3. Run the following kubectl commands to remove the pipeline's resources:
    • kubectl get wf
    • kubectl delete wf <wf_name>
      For example:
      kubectl delete wf conditional-execution-pipeline-with-exit-handler-k5v2w
  4. The result of the pipeline run remains on the Runs page of the Kubeflow dashboard. If you want to remove the results from the list on the Runs page, you can archive the results instead.