|
1 | | -# Disclaimer |
2 | | -Please note that this module is currently under development and may contain partially implemented features, therefore it is not supported in the current release. |
| 1 | +# Developers Guide |
| 2 | + |
| 3 | +> Disclaimer: Please note that this module is currently under development and may contain partially implemented features, therefore it is not supported in the current release. |
3 | 4 |
|
4 | 5 | ## Debug Intel Data Center GPU Driver Container Image on OpenShift Cluster |
5 | 6 |
|
6 | 7 | To debug the driver container image, please make sure the OpenShift cluster is provisioned with Intel Data Center GPU Flex cards available on the cluster nodes. |
7 | 8 |
|
8 | | -`Notes: the following operations are verified on OCP-4.11 and OCP-4.12 cluster with Intel® Data Center GPU Flex 140` |
| 9 | +> Note: The following operations are verified on OCP-4.11 and OCP-4.12 cluster with Intel® Data Center GPU Flex 140 |
9 | 10 |
|
10 | | -### Debugging driver build |
| 11 | +### Debugging Driver Build |
11 | 12 | Firstly, [Red Hat OCP buildconfig](https://docs.openshift.com/container-platform/4.11/cicd/builds/understanding-buildconfigs.html) is used to debug driver building process. The Dockerfile section in [driver-build.yaml](driver-build.yaml) can be updated to debug the building and packaging of the driver container Image. |
12 | 13 |
|
13 | | -- Using the below command to deploy the buildconfig and start a building process on openShift cluster. |
14 | | - |
15 | | - `$ oc apply –f driver-build.yaml` |
| 14 | +Using the below command to deploy the buildconfig and start a building process on openShift cluster. |
| 15 | +``` |
| 16 | +$ oc apply –f driver-build.yaml |
| 17 | +``` |
16 | 18 |
|
17 | 19 | If everything runs smoothly, the image created from the building process will be saved into [Red Hat OpenShift image stream](https://docs.openshift.com/container-platform/4.11/openshift_images/image-streams-manage.html), which can be used to debug the deployment of driver container image on the cluster. |
18 | 20 |
|
19 | | -### Debugging permission |
| 21 | +### Debugging Permission |
20 | 22 | Before that we need to create the proper [service account](https://kubernetes.io/docs/concepts/security/service-accounts/) with the proper permission to deploy and debug the driver container image. Even now the privileged permission is used, the least permission is needed to deploy the driver. |
21 | 23 |
|
22 | | -* Using below command to create the service account with [driver-build.yaml](driver-build.yaml) |
23 | | - |
24 | | - `$ oc apply –f driver-build.yaml` |
25 | | - |
26 | | -### Debugging driver deployment |
27 | | -* Now driver [driver-deploy.yaml](driver-deploy.yaml) can be used to deploy and debug the driver container image |
28 | | - |
29 | | - `$ oc apply –f driver-deploy.yaml ` |
30 | | - |
31 | | -### Debugging the driver |
32 | | -* Below command can be used to log into the driver container to do further debugging work |
33 | | - |
34 | | - `$ oc debug –n name_space pod/pod_name` |
35 | | - |
36 | | -* Below command can also be used to debug the node where the driver container is running if further debugging on the work node is needed |
37 | | - |
38 | | - `$ oc dbug –n name_space node/node_name` |
| 24 | +Using below command to create the service account with [driver-rbac.yaml](driver-rbac.yaml) |
| 25 | +``` |
| 26 | +$ oc apply –f driver-rbac.yaml |
| 27 | +``` |
| 28 | + |
| 29 | +### Debugging Driver Deployment |
| 30 | +Now driver [driver-deploy.yaml](driver-deploy.yaml) can be used to deploy and debug the driver container image |
| 31 | +``` |
| 32 | + $ oc apply –f driver-deploy.yaml |
| 33 | +``` |
| 34 | + |
| 35 | +### Debugging Driver |
| 36 | +Below command can be used to log into the driver container to do further debugging work |
| 37 | +``` |
| 38 | +$ oc debug –n <namespace> pod/<pod_name> |
| 39 | +``` |
| 40 | + |
| 41 | +Below command can also be used to debug the node where the driver container is running if further debugging on the work node is needed |
| 42 | +``` |
| 43 | +$ oc debug –n <namespace> node/<node_name> |
| 44 | +``` |
0 commit comments