|
| 1 | +# Self sufficient bundles |
| 2 | + |
| 3 | +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 |
| 4 | +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 |
| 5 | +services to do their work. |
| 6 | + |
| 7 | +## 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 |
| 8 | + |
| 9 | +| Systemd unit | Runs for (ocp, MicroShift, both) | Input files location | Marker env variables | |
| 10 | +| :----------------------------: | :------------------------------: | :----------------------------------: | :------------------: | |
| 11 | +| `crc-cluster-status.service` | both | none | none | |
| 12 | +| `crc-pullsecret.service` | both | /opt/crc/pull-secret | none | |
| 13 | +| `crc-dnsmasq.service` | both | none | none | |
| 14 | +| `crc-routes-controller.service`| both | none | none | |
| 15 | +| `ocp-cluster-ca.service` | ocp | /opt/crc/custom-ca.crt | CRC_CLOUD=1 | |
| 16 | +| `ocp-clusterid.service` | ocp | none | none | |
| 17 | +| `ocp-custom-domain.service` | ocp | none | CRC_CLOUD=1 | |
| 18 | +| `ocp-growfs.service` | ocp | none | none | |
| 19 | +| `ocp-userpasswords.service` | ocp | /opt/crc/pass_{kubeadmin, developer} | none | |
| 20 | + |
| 21 | +In addition to the above services we have `ocp-cluster-ca.path`, `crc-pullsecret.path` and `ocp-userpasswords.path` that monitors the filesystem paths |
| 22 | +related to their `*.service` counterparts and starts the service when the paths become available. |
| 23 | + |
| 24 | +> [!NOTE] |
| 25 | +> "Marker env variable" is set using an env file, if the required env variable is not set then unit is skipped |
| 26 | +> some units are run only when CRC_CLOUD=1 is set, these are only needed when using the bundles with crc-cloud |
| 27 | +
|
| 28 | +The systemd services are heavily based on the [`clustersetup.sh`](https://github.com/crc-org/crc-cloud/blob/main/pkg/bundle/setup/clustersetup.sh) script found in the `crc-cloud` project. |
| 29 | + |
| 30 | +## Naming convention for the systemd unit files |
| 31 | + |
| 32 | +Systemd units that are needed for both 'OpenShift' and 'MicroShift' are named as `crc-*.service`, units that are needed only for 'OpenShift' are named |
| 33 | +as `ocp-*.service` and when we add units that are only needed for 'MicroShift' they should be named as `ucp-*.service` |
| 34 | + |
0 commit comments