Skip to content

Conversation

@alicefr
Copy link
Contributor

@alicefr alicefr commented Aug 19, 2025

HOWTO creates a local OKD cluster with kcli.

@alicefr
Copy link
Contributor Author

alicefr commented Aug 19, 2025

Currently, this setup works if you relies on the branch cocl-kcli since it includes the fixes for the TPM and to use a custom url for the coreos image.
You can enable kcli by:

git clone https://github.com/alicefr/kcli.git -b cocl-kcli
cd  kcli
python3 -m venv .venv
source .venv/bin/activate
pip install --upgrade pip
pip install -e .

@alicefr
Copy link
Contributor Author

alicefr commented Aug 19, 2025

The part that is still missing is how we can customize the ignition files generated by cli for adding the clevis pin

@alicefr alicefr marked this pull request as draft August 20, 2025 09:11
@alicefr alicefr force-pushed the okd branch 2 times, most recently from 520b4a2 to 107faac Compare August 26, 2025 07:13
@alicefr alicefr marked this pull request as ready for review August 26, 2025 07:14
Integrate the build of the custom scos image.

Signed-off-by: Alice Frosi <[email protected]>
@travier
Copy link
Member

travier commented Aug 26, 2025

This looks super interesting. I'm surprised we can get a cluster faster using UPI & libvirt but that is great. If we can get an OKD/OCP UPI cluster up in 5 minutes then that makes it super interesting.

@alicefr
Copy link
Contributor Author

alicefr commented Aug 26, 2025

@travier it takes 5 mins if you use the import script from a tarball, not if you create it from scratch. Bootstrapping takes around 30-40 mins, but the export script, it basically dumps the control plane VM, and with the import script you can recreate it

@alicefr
Copy link
Contributor Author

alicefr commented Aug 26, 2025

It will be nice to release the tarball somewhere. Right now, it is around 6GB. Unfortunately, the scos image for the control plane is quite large (25-30GB)

HOWTO creates a local OKD cluster with kcli.

Signed-off-by: Alice Frosi <[email protected]>
@alicefr alicefr marked this pull request as draft September 1, 2025 12:07
@alicefr
Copy link
Contributor Author

alicefr commented Sep 1, 2025

Depend on the scos PR: #27

exit 1
fi

sudo virt-sparsify --in-place "$HOME/VirtualMachines/${VM}_0.img"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That path can vary based on system configuration (I don't know what unfortunately), for me it was in /var/lib/libvirt/images.

Just for context (i.e. not criticism) the libvirt interactions also required graphical sudo authentication on my machine even though I have the groups set up to interact with libvirt and create domains as normal user? So it might be something in the kcli config that should be flexibilized or documented here.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's some absolute path hardcoding in the result that I'm not sure can be overcome, but that at least I wanted to mention, e.g. when trying yours:

Cannot access backing file 
'/home/afrosi/VirtualMachines/scos-9.0.20250510-0-openstack.x86_64.qcow2' 
of storage file '/home/jnaucke/VirtualMachines/cocl-ctlplane-0_0.img'

kcli start plan $CLUSTER_NAME
echo "Import completed successfully!"

KUBECONFIG=$HOME/.kcli/clusters/$CLUSTER_NAME/auth/kubeconfig
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You'll need to export this, otherwise the command below won't work (unless $KUBECONFIG was already exported) and may quietly use some other config

Jakob-Naucke added a commit to Jakob-Naucke/trusted-cluster-investigations that referenced this pull request Sep 4, 2025
using machine config. Depends on trusted-execution-clusters#26. Towards resolution of
github.com/trusted-execution-clusters/operator/issues/13.

Signed-off-by: Jakob Naucke <[email protected]>
@Jakob-Naucke Jakob-Naucke mentioned this pull request Sep 4, 2025
Jakob-Naucke added a commit to Jakob-Naucke/trusted-cluster-investigations that referenced this pull request Sep 9, 2025
using machine config. Depends on trusted-execution-clusters#26. Towards resolution of
github.com/trusted-execution-clusters/operator/issues/13.

Signed-off-by: Jakob Naucke <[email protected]>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd also suggest a bigger disk_size, I ran into disk pressure with the default 30G really fast

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants