generated from kubernetes/kubernetes-template-project
-
Notifications
You must be signed in to change notification settings - Fork 402
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for Flatcar build for Proxmox VE
try flatcar try flatcar -2 fix comment sort jsonm Build Proxmox flatcar with openstack OEM Add scsi controller and write docs Flatcar for Proxmox VE
- Loading branch information
1 parent
4937791
commit ecd5cd8
Showing
5 changed files
with
73 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,42 @@ | ||
## Custom Kubernetes version | ||
|
||
To build an image using a specific version of Kubernetes use the "PACKER_FLAGS" env var like in the example below: | ||
|
||
``` | ||
PACKER_FLAGS="--var 'kubernetes_rpm_version=1.28.3' --var 'kubernetes_semver=v1.28.3' --var 'kubernetes_series=v1.28' --var 'kubernetes_deb_version=1.28.3-1.1'" make build-proxmox-ubuntu-2204 | ||
``` | ||
|
||
|
||
# ISO files | ||
## ISO files | ||
|
||
To use existing ISO files, set the `ISO_FILE` environment variable to the path of the ISO file. | ||
For example, to use a local ISO file, set the `ISO_FILE` environment variable like this: | ||
|
||
``` | ||
export ISO_FILE="local:iso/ubuntu-24.04.1-live-server-amd64.iso" | ||
``` | ||
|
||
## Flatcar for Proxmox | ||
|
||
Currently, Proxmox support is only available in the `alpha` channel of Flatcar. | ||
* https://www.flatcar.org/releases#alpha-release | ||
* https://github.com/coreos/fedora-coreos-tracker/issues/1652 | ||
|
||
Therefore, we need to choose the right channel and version for flatcar along with `OEM_ID=proxmoxve`. | ||
|
||
**To build a Proxmox template for flatcar** | ||
|
||
```shell | ||
export PROXMOX_URL="https://example.net:8006/api2/json" | ||
export PROXMOX_USERNAME='root@pam!proxmox' | ||
export PROXMOX_TOKEN="xxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxxxxx" | ||
export PROXMOX_NODE="pve1" | ||
export PROXMOX_ISO_POOL="local" | ||
export PROXMOX_BRIDGE="vmbr1" | ||
export PROXMOX_STORAGE_POOL="ceph_pool" | ||
|
||
## flatcar version | ||
export FLATCAR_VERSION=4152.0.0 | ||
export FLATCAR_CHANNEL=alpha | ||
|
||
export OEM_ID=proxmoxve # make sure to choose OEM_ID=proxmoxve | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"ansible_extra_vars": "ansible_python_interpreter=/opt/bin/python oem_id={{user `oem_id`}}", | ||
"boot_command_prefix": "sudo systemctl mask sshd.socket --now<enter><wait>curl -sLo /tmp/ignition.json ", | ||
"boot_command_suffix": "/bootstrap-pass-auth.json<enter>sed -i \"s|BUILDERPASSWORDHASH|$(mkpasswd -5 {{user `ssh_password`}})|\" /tmp/ignition.json<enter>sudo flatcar-install -d /dev/sda -C {{user `channel_name`}} -V {{user `release_version`}} -i /tmp/ignition.json && sudo reboot<enter>", | ||
"boot_media_path": "http://{{ .HTTPIP }}:{{ .HTTPPort }}", | ||
"boot_wait": "180s", | ||
"build_name": "flatcar-{{env `FLATCAR_CHANNEL`}}-{{env `FLATCAR_VERSION`}}", | ||
"channel_name": "{{env `FLATCAR_CHANNEL`}}", | ||
"crictl_source_type": "http", | ||
"distribution_version": "{{env `FLATCAR_CHANNEL`}}-{{env `FLATCAR_VERSION`}}", | ||
"distro_name": "flatcar", | ||
"guest_os_type": "linux-64", | ||
"http_directory": "./packer/files/flatcar/ignition/", | ||
"iso_checksum": "https://{{env `FLATCAR_CHANNEL`}}.release.flatcar-linux.net/amd64-usr/{{env `FLATCAR_VERSION`}}/flatcar_production_iso_image.iso.DIGESTS.asc", | ||
"iso_checksum_type": "file", | ||
"iso_url": "https://{{env `FLATCAR_CHANNEL`}}.release.flatcar-linux.net/amd64-usr/{{env `FLATCAR_VERSION`}}/flatcar_production_iso_image.iso", | ||
"kubernetes_cni_source_type": "http", | ||
"kubernetes_source_type": "http", | ||
"oem_id": "{{env `OEM_ID`}}", | ||
"os_display_name": "Flatcar Container Linux ({{env `FLATCAR_CHANNEL`}} channel release {{env `FLATCAR_VERSION`}})", | ||
"python_path": "/opt/bin/builder-env/site-packages", | ||
"release_version": "{{env `FLATCAR_VERSION`}}", | ||
"shutdown_command": "shutdown -P now", | ||
"systemd_prefix": "/etc/systemd", | ||
"sysusr_prefix": "/opt", | ||
"sysusrlocal_prefix": "/opt", | ||
"unmount_iso": "true" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters