|
1 | 1 | # Introduction
|
2 | 2 |
|
3 |
| -This is a brief readme explaining the usage of the podvm-builder scripts and related files |
| 3 | +This is a brief readme explaining the usage of the podvm-builder scripts and |
| 4 | +related files. The scripts and related manifest files are primarily used by |
| 5 | +the operator to generate a pod VM image. |
4 | 6 |
|
5 |
| -## Create PodVM image generation configuration |
| 7 | +## PodVM image generation configuration |
6 | 8 |
|
7 | 9 | The configuration used for the podvm image generation is available in the following configmaps:
|
8 | 10 |
|
9 | 11 | - Azure: `azure-podvm-image-cm`
|
10 | 12 | - AWS: `aws-podvm-image-cm`
|
11 | 13 |
|
12 |
| -Depending on the cloud provider (eg. aws or azure) create the respective |
13 |
| -configmaps. Please review and modify the settings in the configMap as required. |
| 14 | +If you want to change the default configuration, then depending on the cloud |
| 15 | +provider (eg. aws or azure) you'll need to pre-create the respective |
| 16 | +configmaps. Please review and modify the settings in the configMap as |
| 17 | +required. For example, if you need to add NVIDIA GPU drivers in the podvm |
| 18 | +image then set `ENABLE_NVIDIA_GPU: yes`. Likewise if you want to create image |
| 19 | +for confidential containers then set `CONFIDENTIAL_COMPUTE_ENABLED: yes`. |
14 | 20 |
|
15 |
| -For AWS |
| 21 | +Use the following command to create the configMap for AWS: |
16 | 22 |
|
17 | 23 | ```sh
|
18 | 24 | kubectl apply -f aws-podvm-image-cm.yaml
|
19 | 25 | ```
|
20 | 26 |
|
21 |
| -For Azure |
| 27 | +Use the following command to create the configMap for Azure: |
22 | 28 |
|
23 | 29 | ```sh
|
24 | 30 | kubectl apply -f azure-podvm-image-cm.yaml
|
25 | 31 | ```
|
26 | 32 |
|
27 |
| -## Create podvm image |
28 |
| - |
29 |
| -The podvm image is created in a Kubernetes job. To create the job run the following command |
30 |
| - |
31 |
| -```sh |
32 |
| -kubectl apply -f osc-podvm-create-job.yaml |
33 |
| -``` |
34 |
| - |
35 |
| -On successful image creation, the podvm image details will be updated as an annotation in the `peer-pods-cm` |
36 |
| -under `openshift-sandboxed-containers-operator` namespace. |
37 |
| - |
38 |
| -The annotation key for AWS is `LATEST_AMI_ID` and for Azure it's `LATEST_IMAGE_ID` |
39 |
| - |
40 |
| -## Delete podvm image |
41 |
| - |
42 |
| -Update the IMAGE_ID for Azure or AMI_ID for AWS that you want to delete and then run the following command |
43 |
| - |
44 |
| -```sh |
45 |
| -kubectl delete -f osc-podvm-delete-job.yaml |
46 |
| -``` |
| 33 | +Now when you create a KataConfig with `enablePeerPods: true` with empty |
| 34 | +`AZURE_IMAGE_ID` or `AWS_AMI_ID` in `peer-pods-cm`, then depending on the cloud |
| 35 | +provider configured, the operator will create the pod VM image based on the |
| 36 | +provided config. |
0 commit comments