Skip to content

Commit d302502

Browse files
authored
Merge pull request #504 from bpradipt/coco-bm
Misc fixes for baremetal install script
2 parents 21802b6 + 8d602fd commit d302502

File tree

4 files changed

+214
-70
lines changed

4 files changed

+214
-70
lines changed

scripts/install-helpers/baremetal-coco/README.md

Lines changed: 40 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,34 @@
33
These are helper scripts to setup CoCo on a bare-metal OpenShift worker nodes
44
using OpenShift sandboxed containers (OSC) operator.
55

6-
NodeFeatureDiscovery (NFD) operator is used to label the TDX and SNP nodes.
7-
`intel.feature.node.kubernetes.io/tdx: "true"` is used for TDX nodes and
8-
`amd.feature.node.kubernetes.io/snp: "true"` is used for SNP nodes.
9-
10-
Kata runtime is configured on the nodes with the above labels.
11-
Note that currently the script only supports installing a single TEE environment.
6+
When using regular OpenShift cluster, which has at least a single node in the `worker`
7+
MachineConfigPool, then you must add a label to the target worker nodes before starting the
8+
install. For example, you can set "coco_bm=true" on the target nodes.
9+
Note that label is not needed when using SNO or converged cluster as the installation
10+
happens on all the nodes.
11+
12+
The deployment sequence is described below:
13+
14+
```text
15+
1. If using a regular OpenShift cluster (with worker MachineConfigPool having at least one node),
16+
then you must label at least one worker node and set BM_NODE_LABEL env variable to the specific label (eg. BM_NODE_LABEL="coco_bm=true")
17+
If using SNO or converged OpenShift cluster, then you don't need to label any node.
18+
2. Deploy OSC operator
19+
3. Create Kataconfig to install the RHCOS image layer.
20+
If using SNO or converged OpenShift then the RHCOS image layer will be installed
21+
on all the nodes
22+
4. Deploy NFD operator
23+
5. Verify if the target nodes have SNP or TDX capabilities
24+
6. Deploy other prerequisites (eg DCAP for TDX)
25+
7. Set TEE specific Kata configuration
26+
8. Create TEE specific runtime class
27+
```
28+
29+
>**Note**
30+
> >
31+
> - CoCo on baremetal requires custom kernel which is not available in standard RHCOS image layer. Hence we create the Kataconfig to install the RHCOS image layer into the target nodes and then use NFD to add required TEE specific labels as exposed by the kernel `amd.feature.node.kubernetes.io/snp: "true"` is set for the SNP nodes and `intel.feature.node.kubernetes.io/tdx: "true"` is set for the TDX nodes.
32+
> >
33+
> - Currently the script only supports installing a single TEE environment.
1234
1335
## Prerequisites
1436

@@ -17,7 +39,7 @@ Note that currently the script only supports installing a single TEE environment
1739
- Compute attestation operator (Trustee) should be installed and configured for attestation.
1840

1941
- TRUSTEE_URL env variable to be set with Trustee ingress details
20-
42+
2143
If using ClusterIP to access Trustee, then use the following command:
2244

2345
```sh
@@ -31,17 +53,26 @@ Note that currently the script only supports installing a single TEE environment
3153

3254
```sh
3355
TRUSTEE_HOST=$(oc get route -n trustee-operator-system kbs-service -o jsonpath={.spec.host})
34-
export TRUSTEE_URL="https://$TRUSTEE_HOST"
56+
export TRUSTEE_URL="https://$TRUSTEE_HOST"
3557
```
3658

3759
## Install OSC operator GA release
3860

3961
- Update `startingCSV` key in the `subs-ga.yaml` file to use the GA release you need.
4062

63+
- If not using SNO or converged cluster then label at least a single worker node for deployment
64+
and export the label via the 1BM_NODE_LABEL1 env variable
65+
66+
```sh
67+
export NODENAME=<node>
68+
oc label $NODE_NAME coco_bm=true
69+
export BM_NODE_LABEL="coco_bm=true"
70+
```
71+
4172
- Kickstart the installation by running the following:
4273

4374
> Depending on the time it takes for the nodes to reboot, sometimes the commands may timeout.
44-
> You can use a higher timeout eg. export CMD_TIMEOUT=1200
75+
> You can use a higher timeout eg. export CMD_TIMEOUT=3000
4576
> or you can re-run the script to complete the installation.
4677
4778
For TDX hosts:

0 commit comments

Comments
 (0)