Skip to content

Commit 3da1292

Browse files
authored
Merge pull request #1738 from tkatila/xpu-sidcar-tls-note
xpumanager sidecar: add note about using HTTPS with xpum
2 parents 6a01e75 + 7caba39 commit 3da1292

File tree

2 files changed

+85
-15
lines changed

2 files changed

+85
-15
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Table of Contents
2323
* [DLB device plugin](#dlb-device-plugin)
2424
* [IAA device plugin](#iaa-device-plugin)
2525
* [Device Plugins Operator](#device-plugins-operator)
26-
* [XeLink XPU-Manager sidecar](#xelink-xpu-manager-sidecar)
26+
* [XeLink XPU Manager sidecar](#xelink-xpu-manager-sidecar)
2727
* [Demos](#demos)
2828
* [Workload Authors](#workload-authors)
2929
* [Developers](#developers)
@@ -194,11 +194,11 @@ The [Device plugins operator README](cmd/operator/README.md) gives the installat
194194

195195
The [Device plugins Operator for OpenShift](https://github.com/intel/intel-technology-enabling-for-openshift) gives the installation and usage details for the operator available on [Red Hat OpenShift Container Platform](https://catalog.redhat.com/software/operators/detail/61e9f2d7b9cdd99018fc5736).
196196

197-
## XeLink XPU-Manager Sidecar
197+
## XeLink XPU Manager Sidecar
198198

199199
To support interconnected GPUs in Kubernetes, XeLink sidecar is needed.
200200

201-
The [XeLink XPU-Manager sidecar README](cmd/xpumanager_sidecar/README.md) gives information how the sidecar functions and how to use it.
201+
The [XeLink XPU Manager sidecar README](cmd/xpumanager_sidecar/README.md) gives information how the sidecar functions and how to use it.
202202

203203
## Demos
204204

cmd/xpumanager_sidecar/README.md

Lines changed: 82 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@ Table of Contents
55
* [Introduction](#introduction)
66
* [Modes and Configuration Options](#modes-and-configuration-options)
77
* [Installation](#installation)
8-
* [Install XPU-Manager with the Sidecar](#install-xpu-manager-with-the-sidecar)
9-
* [Install Sidecar to an Existing XPU-Manager](#install-sidecar-to-an-existing-xpu-manager)
8+
* [Install XPU Manager with the Sidecar](#install-xpu-manager-with-the-sidecar)
9+
* [Install Sidecar to an Existing XPU Manager](#install-sidecar-to-an-existing-xpu-manager)
1010
* [Verify Sidecar Functionality](#verify-sidecar-functionality)
11+
* [Use HTTPS with XPU Manager](#use-https-with-xpu-manager)
1112

1213
## Introduction
1314

@@ -21,14 +22,14 @@ Intel GPUs can be interconnected via an XeLink. In some workloads it is benefici
2122
| -interval | int | 10 | Interval for XeLink topology fetching and label writing (seconds, >= 1) |
2223
| -startup-delay | int | 10 | Startup delay before the first topology fetching (seconds, >= 0) |
2324
| -label-namespace | string | gpu.intel.com | Namespace or prefix for the labels. i.e. **gpu.intel.com**/xe-links |
24-
| -allow-subdeviceless-links | bool | false | Include xelinks that are not on subdevices |
25-
| -use-https | bool | false | Use HTTPS protocol when connecting to XPU-Manager |
25+
| -allow-subdeviceless-links | bool | false | Include xelinks also for devices that do not have subdevices |
26+
| -use-https | bool | false | Use HTTPS protocol when connecting to XPU Manager |
2627

2728
The sidecar also accepts a number of other arguments. Please use the -h option to see the complete list of options.
2829

2930
## Installation
3031

31-
The following sections detail how to obtain, deploy and test the XPU-Manager XeLink sidecar.
32+
The following sections detail how to obtain, deploy and test the XPU Manager XeLink sidecar.
3233

3334
### Pre-built Images
3435

@@ -44,31 +45,100 @@ Note: Replace `<RELEASE_VERSION>` with the desired [release tag](https://github.
4445

4546
See [the development guide](../../DEVEL.md) for details if you want to deploy a customized version of the plugin.
4647

47-
#### Install XPU-Manager with the Sidecar
48+
#### Install XPU Manager with the Sidecar
4849

49-
Install XPU-Manager daemonset with the XeLink sidecar
50+
Install XPU Manager daemonset with the XeLink sidecar
5051

5152
```bash
5253
$ kubectl apply -k 'https://github.com/intel/intel-device-plugins-for-kubernetes/deployments/xpumanager_sidecar?ref=<RELEASE_VERSION>'
5354
```
5455

55-
Please see XPU-Manager Kubernetes files for additional info on [installation](https://github.com/intel/xpumanager/tree/master/deployment/kubernetes).
56+
Please see XPU Manager Kubernetes files for additional info on [installation](https://github.com/intel/xpumanager/tree/master/deployment/kubernetes).
5657

57-
#### Install Sidecar to an Existing XPU-Manager
58+
#### Install Sidecar to an Existing XPU Manager
5859

59-
Use patch to add sidecar into the XPU-Manager daemonset.
60+
Use patch to add sidecar into the XPU Manager daemonset.
6061

6162
```bash
6263
$ kubectl patch daemonsets.apps intel-xpumanager --patch-file 'https://github.com/intel/intel-device-plugins-for-kubernetes/deployments/xpumanager_sidecar/kustom/kustom_xpumanager.yaml?ref=<RELEASE_VERSION>'
6364
```
6465

65-
NOTE: The sidecar patch will remove other resources from the XPU-Manager container. If your XPU-Manager daemonset is using, for example, the smarter device manager resources, those will be removed.
66+
NOTE: The sidecar patch will remove other resources from the XPU Manager container. If your XPU Manager daemonset is using, for example, the smarter device manager resources, those will be removed.
6667

67-
#### Verify Sidecar Functionality
68+
### Verify Sidecar Functionality
6869

6970
You can verify the sidecar's functionality by checking node's xe-links labels:
7071

7172
```bash
7273
$ kubectl get nodes -A -o=jsonpath="{range .items[*]}{.metadata.name},{.metadata.labels.gpu\.intel\.com\/xe-links}{'\n'}{end}"
7374
master,0.0-1.0_0.1-1.1
7475
```
76+
77+
### Use HTTPS with XPU Manager
78+
79+
XPU Manager can be configured to use HTTPS on the metrics interface. For the gunicorn sidecar, cert and key files have to be added to the command:
80+
```
81+
- command:
82+
- gunicorn
83+
...
84+
- --certfile=/certs/tls.crt
85+
- --keyfile=/certs/tls.key
86+
...
87+
- xpum_rest_main:main()
88+
```
89+
90+
The gunicorn container will also need the tls.crt and tls.key files within the container. For example:
91+
92+
```
93+
containers:
94+
- name: python-exporter
95+
volumeMounts:
96+
- mountPath: /certs
97+
name: certs
98+
readOnly: true
99+
volumes:
100+
- name: certs
101+
secret:
102+
defaultMode: 420
103+
secretName: xpum-server-cert
104+
```
105+
106+
In this case, the secret providing the certificate and key is called `xpum-server-cert`.
107+
108+
The certificate and key can be [added manually to a secret](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_create/kubectl_create_secret_tls/). Another way to achieve a secret is to leverage [cert-manager](https://cert-manager.io/).
109+
110+
<details>
111+
<summary>Example for the Cert-manager objects</summary>
112+
113+
Cert-manager will create a self-signed certificate and the private key, and store them into a secret called `xpum-server-cert`.
114+
115+
```
116+
apiVersion: cert-manager.io/v1
117+
kind: Issuer
118+
metadata:
119+
name: selfsigned-issuer
120+
spec:
121+
selfSigned: {}
122+
---
123+
apiVersion: cert-manager.io/v1
124+
kind: Certificate
125+
metadata:
126+
name: serving-cert
127+
spec:
128+
dnsNames:
129+
- xpum.svc
130+
- xpum.svc.cluster.local
131+
issuerRef:
132+
kind: Issuer
133+
name: selfsigned-issuer
134+
secretName: xpum-server-cert
135+
```
136+
137+
</details>
138+
139+
For the XPU Manager sidecar, `use-https` has to be added to the arguments. Then the sidecar will leverage HTTPS with the connection to the metrics interface.
140+
```
141+
args:
142+
- -v=2
143+
- -use-https
144+
```

0 commit comments

Comments
 (0)