From 713f65aa37c70d1a395b4ec78ab6c78e756c090d Mon Sep 17 00:00:00 2001 From: Travis Milum Date: Sun, 7 Jul 2024 11:34:18 -0700 Subject: [PATCH 1/2] Add docs regarding env vars and permissions setup --- docs/book/src/capi/providers/proxmox.md | 38 +++++++++++++++++++++++-- 1 file changed, 36 insertions(+), 2 deletions(-) diff --git a/docs/book/src/capi/providers/proxmox.md b/docs/book/src/capi/providers/proxmox.md index 053ea244f5..09adf390a6 100644 --- a/docs/book/src/capi/providers/proxmox.md +++ b/docs/book/src/capi/providers/proxmox.md @@ -28,11 +28,45 @@ the different operating systems. |--------------------|-----------------------------------------| | `ubuntu-2204.json` | The settings for the Ubuntu 22.04 image | +The full list of available environment vars can be found in the `variables` section of `images/capi/packer/proxmox/packer.json`. + +Each variable in this section can also be overridden via the `PACKER_FLAGS` environment var. + +```bash +export PACKER_FLAGS="--var 'kubernetes_rpm_version=1.29.6' --var 'kubernetes_semver=v1.29.6' --var 'kubernetes_series=v1.29' --var 'kubernetes_deb_version=1.29.6-1.1'" +make build-proxmox-ubuntu-2204 +``` + +If different packages are desired then find the available dep packages [here](https://build.opensuse.org/package/revisions/isv:kubernetes:core:shared:build/kubernetes-cni) +and [here](https://build.opensuse.org/project/show/isv:kubernetes:core:stable). + +If using a proxmox API token the format of the PROXMOX_USERNAME and PROXMOX_TOKEN must look like so: + +| PROXMOX_USERNAME | PROXMOX_TOKEN | +|-------------------------------|----------------| +| @! | | + +For example: + +| PROXMOX_USERNAME | PROXMOX_TOKEN | +|------------------------|--------------------------------------| +| image-builder@pve!capi | 9db7ce4e-4c7f-46ed-8ab4-3c8e98e88c7e | + +Then the user (not token) must be given the following permissions on the path `/` and propagated: + +* Datastore.* +* SDN.* +* Sys.AccessNetwork +* Sys.Audit +* VM.* + +*Suggest creating a new role since no built-in PVE role covers just these.* + ### Example Prior to building images you need to ensure you have set the required environment variables: -``` +```bash export PROXMOX_URL="https://pve.example.com:8006/api2/json" export PROXMOX_USERNAME= export PROXMOX_TOKEN= @@ -44,6 +78,6 @@ export PROXMOX_STORAGE_POOL="local-lvm" Build ubuntu 2204 template: -``` +```bash make build-proxmox-ubuntu-2204 ``` From 1bb53bd8100549266ed21f6f2742820ac0291b04 Mon Sep 17 00:00:00 2001 From: Travis Milum Date: Sun, 7 Jul 2024 18:25:36 -0700 Subject: [PATCH 2/2] Grammar update --- docs/book/src/capi/providers/proxmox.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/book/src/capi/providers/proxmox.md b/docs/book/src/capi/providers/proxmox.md index 09adf390a6..cb46c3ab50 100644 --- a/docs/book/src/capi/providers/proxmox.md +++ b/docs/book/src/capi/providers/proxmox.md @@ -60,7 +60,7 @@ Then the user (not token) must be given the following permissions on the path `/ * Sys.Audit * VM.* -*Suggest creating a new role since no built-in PVE role covers just these.* +*We suggest creating a new role, since no built-in PVE roles covers just these.* ### Example