To build our RAN images, we SHALL use the `codeready-builder-for-rhel-8-x86_64-rpms` repository with all the proper development libraries.
## RHEL8 Entitlements
To build the RAN images, we use the `codeready-builder-for-rhel-8-x86_64-rpms` repository with all the proper development libraries.
This repository is not directly accessible from the UBI RHEL8 image (`registry.access.redhat.com/ubi8/ubi:latest`).
This repository is not directly accessible from the UBI RHEL8 image (`registry.access.redhat.com/ubi8/ubi:latest`).
Therefore, we need to copy certificates and subscription manager configuration files from a registered RHEL8 machine.
So we need to copy from a register RHEL8 machine certificates and subsccription manager configuration files.
on a `RHEL8` physical machine (or a virtual machine) connected to the OpenShift Cluster, recover the entitlement and the RH subscription manager configs:
SO on a `RHEL8` physical machine (or a virtual machine) connected to the OpenShift Cluster, recover the entitlement and the RH subscription manager configs:
These configmaps and secret will be shared by all the build configs in your OC project. No need to do it each time.
These configmaps and secret will be shared by all the build configs in your OC
project. No need to do it each time. However, these files expire every month
**CAUTION: these files expire every month or so. If you have done a build on your OC project and try again a few weeks later, you may need to re-copy them**.
or so. If you have done a build on your OC project and try again a few weeks
later, you may need to re-copy them. (The CI recopies them every time.)
```bash
```bash
oc delete secret etc-pki-entitlement
oc delete secret etc-pki-entitlement
...
@@ -45,55 +41,69 @@ oc delete cm rhsm-conf
...
@@ -45,55 +41,69 @@ oc delete cm rhsm-conf
oc delete cm rhsm-ca
oc delete cm rhsm-ca
```
```
**LAST POINT: your OC project SHALL be `oai`.**
# 2. Build of `base` shared image
# 2. Build the Builder shared image #
Create an image stream and build config that specify image properties and build parameters, then start the build: