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
- Open the Kubeflow dashboard (see Accessing the Kubeflow Dashboard), then access the Pipelines page.
- Click the sample name [Tutorial] DSL - Control Structures.
- Click Create experiment, then follow the on-screen prompts.
- Create a run by clicking the Start button.
- Select the name of the run on the Experiments dashboard.
- Explore the graph and other aspects of your run by selecting the graph components and other interface elements.
Running a Pipeline in Jupyter Notebook
- Create or open the KubeDirector notebook.
- Upload the
lightweight_component.ipynb
notebook to the Jupyter Notebook. - Open the uploaded file and execute each cell in the Notebook until it is finished.
- 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:
- Start a new terminal session in the KubeDirector notebook.
- Open the web terminal in the HPE Ezmeral Runtime Enterprise UI, or
from the terminal within the KubeDirector notebook.NOTEBy default, you cannot execute
kubectl
commands in a newly created KubeDirector notebook. To enablekubectl
in a notebook, select one of the following methods:- Through the HPE Ezmeral Runtime Enterprise UI:
- In the HPE Ezmeral Runtime Enterprise UI, navigate to the Tenant section and initialize a web terminal with the corresponding button.
- 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.
- Move all files you want to work with to the following
path:
/bd-fs-mnt/TenantShare
- You can now access the files inside the web terminal
with
kubectl
.
- From inside the KubeDirector notebook:
- To authorize your user inside the KubeDirector notebook,
execute the following Jupyter code
cell:
from ezmllib.kubeconfig.ezkubeconfig import set_kubeconfig set_kubeconfig()
- A prompt appears below the code cell you executed. Enter your user password in the prompt.
kubectl
is now enabled for your KubeDirector notebook. Start a Terminal session in the KubeDirector notebook to work withkubectl
.
- To authorize your user inside the KubeDirector notebook,
execute the following Jupyter code
cell:
- Through the HPE Ezmeral Runtime Enterprise UI:
- Run the following
kubectl
commands to remove the pipeline's resources:-
kubectl get wf
For example:kubectl delete wf <wf_name>
kubectl delete wf conditional-execution-pipeline-with-exit-handler-k5v2w
-
- 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.