See https://issues.redhat.com/browse/MGMT-13669
Note that this repo is just a proof-of-concept. This repo is for debugging / experimenting with single node OpenShift relocation.
Note that single node OpenShift relocation is currently unsupported.
- NMState v2.2.10 or above, this is required due to the nmstate config used in the agent-config.yaml
sudo dnf copr enable nmstate/nmstate-git
sudo dnf install nmstate
Install SNO cluster with bootstrap-in-place:
- Set
PULL_SECRET
environment variable to your pull secret:
make start-iso-abi
- Monitor the progress using
make -C bootstrap-in-place-poc/ ssh
andjournalctl -f -u bootkube.service
orkubectl --kubeconfig ./bootstrap-in-place-poc/sno-workdir/auth/kubeconfig get clusterversion
or execute:
make wait-for-install-complete
- Once the installation is complete create the image template:
make bake
This will apply machine configs to the SNO instance (named sno-test) and then remove it from the hypervisor, leaving us wih the prepaired qcow2 image in /var/lib/libvirt/images/sno-test.qcow2.
- Create the site-config iso wiht the configuration for the SNO instance at edge site:
make site-config.iso CLUSTER_NAME=new-name BASE_DOMAIN=foo.com
This will create the site-config.iso
file, which will later get attached to the instance and once the instance is booted the installation-configuration.service
will scan the attached devices,
mount the iso, read the configuration and start the reconfiguration process.
- To copy the previous VM's image into
/var/lib/libvirt/images/SNO-baked-image.qcow2
and then create a new SNO instance from it, with thesite-config.iso
attached, run:
make start-vm CLUSTER_NAME=new-name BASE_DOMAIN=foo.com
-
In case you want to configure the new SNO with static network config add
STATIC_NETWORK=TRUE
to the above command. -
In case you want to change the SNO hostname add
HOSTNAME=foobar
to the above command. -
You can now monitor the progress using
make ssh
andjournalctl -f -u installation-configuration.service
A vDU profile can be applied to the image before baking with
make vdu
A 5th partition can be created to store the /var/lib/containers separately Before baking, run:
make external-container-partition
To keep the configuration for using an external partition /var/lib/containers, without including that partition into the final image, after baking run:
make remove-container-partition