Since release 4.19.0 of OpenShift Local, the bundles generated by snc contain additional systemd services to provision the cluster and remove the need for
an outside entity to provision the cluster, although an outside process needs to create some files on pre-defined locations inside the VM for the systemd
services to do their work.
The following table lists the systemd services and the location of files they need to provision the cluster, users of SNC need to create those files
| Systemd unit | Runs for (ocp, MicroShift, both) | Input files location | Marker env variables |
|---|---|---|---|
crc-cluster-status.service |
both | none | none |
crc-pullsecret.service |
both | /opt/crc/pull-secret | none |
crc-dnsmasq.service |
both | none | none |
crc-routes-controller.service |
both | none | none |
ocp-cluster-ca.service |
ocp | /opt/crc/custom-ca.crt | none |
ocp-clusterid.service |
ocp | none | none |
ocp-custom-domain.service |
ocp | none | none |
ocp-userpasswords.service |
ocp | /opt/crc/pass_{kubeadmin, developer} | none |
In addition to the above services we have ocp-cluster-ca.path, crc-pullsecret.path and ocp-userpasswords.path that monitors the filesystem paths
related to their *.service counterparts and starts the service when the paths become available.
Note
"Marker env variable" is set using an env file (/etc/sysconfig/crc.env), if the required env variable is not set then unit is skipped some units are run only when CRC_SELF_SUFFICIENT=1 is set, these are only needed when using self-sufficient functionality.
The systemd services are heavily based on the clustersetup.sh script found in the crc-cloud project.
Systemd units that are needed for both 'OpenShift' and 'MicroShift' are named as crc-*.service, units that are needed only for 'OpenShift' are named
as ocp-*.service and when we add units that are only needed for 'MicroShift' they should be named as ucp-*.service