Skip to content

Commit

Permalink
Flatcar for
Browse files Browse the repository at this point in the history
  • Loading branch information
mcbenjemaa committed Nov 14, 2024
1 parent b23c70e commit 8190ae6
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 12 deletions.
60 changes: 60 additions & 0 deletions envfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
## DCP PROD
export PROXMOX_URL="https://87.106.167.195:8006/api2/json"
export PROXMOX_USERNAME='root@pam!capmox'
export PROXMOX_TOKEN="9ccab4da-ed79-40df-a3bb-8cc7ef6cfad9"
export PROXMOX_NODE="pve"
export PROXMOX_ISO_POOL="local"
export PROXMOX_BRIDGE="vmbr1"
export PROXMOX_STORAGE_POOL="pmxpool01"

## TXL
export PROXMOX_URL="https://txl-ceph01.txl.profitbricks.net:8006/api2/json"
export PROXMOX_USERNAME='root@pam!capmox'
export PROXMOX_TOKEN="8fefd37b-6c77-41c8-af39-e497abc81732"
export PROXMOX_NODE="txl-ceph01"
export PROXMOX_ISO_POOL="iso-images"
export PROXMOX_BRIDGE="vmbr29"
export PROXMOX_STORAGE_POOL="rbd_pool_rbd"


# stg
export PROXMOX_URL="https://stg-ceph01.stg.profitbricks.net:8006/api2/json"
export PROXMOX_USERNAME='root@pam!capi'
export PROXMOX_TOKEN="0c780984-34da-43af-bc94-dd95dd8da101"
export PROXMOX_NODE="stg-ceph01"
export PROXMOX_ISO_POOL="iso-images"
export PROXMOX_BRIDGE="vmbr128"
export PROXMOX_STORAGE_POOL="rbd_pool_rbd"


## flatcar
export FLATCAR_VERSION=4081.1.0
export FLATCAR_CHANNEL=beta
export OEM_ID=nutanix

"additional_iso_files": [
{
"device": "ide0",
"iso_storage_pool": "{{user `iso_storage_pool`}}",
"cd_files": ["{{user `http_directory`}}/{{user `version`}}/*"],
"cd_label": "cidata",
"unmount": true
}
],


I am closing this issue since using the following config can achieve offline installation in autoinstall.yaml

apt:
disable_components: []
primary: []
fallback: offline-install
preserve_sources_list: false


https://www.aerialls.eu/posts/ubuntu-server-2204-image-packer-subiquity-for-proxmox/


https://blog.devgenius.io/automate-your-proxmox-with-packer-dff95222cfe8

https://forum.proxmox.com/threads/using-packer-to-deploy-ubuntu-20-04-to-proxmox.104275/
18 changes: 6 additions & 12 deletions images/capi/packer/proxmox/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,11 @@ export ISO_FILE="local:iso/ubuntu-24.04.1-live-server-amd64.iso"

## Flatcar for Proxmox

Currently, Proxmox doesn't support ignition and it's currently in-development.
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
* https://github.com/flatcar/scripts/pull/1783

But we do a trick to make it working on Proxmox, until the support is already released.

We use OEM_ID `nutanix` which is an openstack provider that loads ignition from device with label `config-2`:
https://github.com/coreos/ignition/blob/main/internal/providers/nutanix/nutanix.go#L51

Therefore, we build an image with `OEM_ID=nutanix` so that we can provide an ISO that contain the ignition file in `/openstack/latest/user_data`
https://github.com/coreos/ignition/blob/main/internal/providers/nutanix/nutanix.go#L40C29-L40C56
Therefore, we need to choose the right channel and version for flatcar along with `OEM_ID=proxmoxve`.

**To build a Proxmox template for flatcar**

Expand All @@ -41,8 +35,8 @@ export PROXMOX_BRIDGE="vmbr1"
export PROXMOX_STORAGE_POOL="ceph_pool"

## flatcar version
export FLATCAR_VERSION=4081.1.0
export FLATCAR_CHANNEL=beta
export FLATCAR_VERSION=4152.0.0
export FLATCAR_CHANNEL=alpha

export OEM_ID=nutanix # make sure to choose OEM_ID=nutanix
export OEM_ID=proxmoxve # make sure to choose OEM_ID=proxmoxve
```

0 comments on commit 8190ae6

Please sign in to comment.