diff --git a/content/en/docs/guides/install-guides/optional-components.md b/content/en/docs/guides/install-guides/optional-components.md index f3d8e23a..63e7169f 100644 --- a/content/en/docs/guides/install-guides/optional-components.md +++ b/content/en/docs/guides/install-guides/optional-components.md @@ -81,3 +81,23 @@ NAME READY STATUS RESTARTS AGE o2ims-operator-5595cd78b7-thggl 1/1 Running 0 5h27m ``` +## Focom Operator + +Install the operator using the below commands +```bash +kpt pkg get --for-deployment https://github.com/nephio-project/catalog.git/nephio/optional/focom-operator@origin/main /tmp/focom +kpt fn render /tmp/focom +kpt live init /tmp/focom +kpt live apply /tmp/focom --reconcile-timeout=15m --output=table +``` + +The operator is deployed to the *focom-operator-system* namespace by default. + +```bash +kubectl get pods -n focom-operator-system +``` +Output: +``` +NAME READY STATUS RESTARTS AGE +focom-operator-controller-manager-d8f4d5cb6-dqqk8 1/1 Running 0 31s +``` \ No newline at end of file diff --git a/content/en/docs/guides/user-guides/usecase-user-guides/exercise-4-o2ims.md b/content/en/docs/guides/user-guides/usecase-user-guides/exercise-4-o2ims.md deleted file mode 100644 index 30fb1671..00000000 --- a/content/en/docs/guides/user-guides/usecase-user-guides/exercise-4-o2ims.md +++ /dev/null @@ -1,199 +0,0 @@ ---- -title: O-RAN O2 IMS Operator Deployment -description: > - A step by step guide to deploying a workload cluster, - using the provisioningrequests.o2ims.provisioning.oran.org CRD. -weight: 2 ---- - -## Prerequisites - -- A Nephio Management cluster: - - [installation guides](/content/en/docs/guides/install-guides/_index.md) for detailed environment options. -- The following *optional* operator pkg deployed: - - [o2ims operator](/content/en/docs/guides/install-guides/optional-components.md#o2ims-operator) - -{{% alert title="Note" color="primary" %}} - -If using a [sandbox demo environment](/content/en/docs/guides/install-guides/_index.md#kicking-off-an-installation-on-a-virtual-machine), -most of the above prerequisites are already satisfied. - -{{% /alert %}} - -This exercise will take us from a system with only the Nephio Management cluster setup, to a deployment with: - -- A [workload cluster](https://github.com/nephio-project/catalog/tree/main/infra/capi/nephio-workload-cluster) specified as a template when instantiating an instance of the [ProvisioningRequest CRD](https://github.com/nephio-project/api/blob/main/config/crd/bases/o2ims.provisioning.oran.org_provisioningrequests.yaml). -- A repository for said cluster, registered with Nephio Porch. - -To perform these exercises, we will need: - -- Access to the installed demo VM environment as the ubuntu user. -- Access to the Nephio WebUI as described in the installation guide (optional). -- Access to Gitea, used in the demo environment as the Git provider (optional). - - -### Step 1: Deploy the `provisioningrequests.o2ims.provisioning.oran.org` CRD - -{{% alert title="Note" color="primary" %}} - -After a fresh docker install, verify the docker supplementary group is loaded by executing `id | grep docker`. -If not, logout and login to the VM or execute `newgrp docker` to ensure the docker supplementary group is loaded. - -{{% /alert %}} - -First, verify that the [catalog blueprint repositories](https://github.com/nephio-project/catalog.git) are registered -and `Ready`: -```bash -kubectl get repository -``` -Sample output: -```bash -NAME TYPE CONTENT DEPLOYMENT READY ADDRESS -catalog-distros-sandbox git Package false True https://github.com/nephio-project/catalog.git -catalog-infra-capi git Package false True https://github.com/nephio-project/catalog.git -catalog-nephio-core git Package false True https://github.com/nephio-project/catalog.git -catalog-nephio-optional git Package false True https://github.com/nephio-project/catalog.git -catalog-workloads-free5gc git Package false True https://github.com/nephio-project/catalog.git -catalog-workloads-oai-ran git Package false True https://github.com/nephio-project/catalog.git -catalog-workloads-tools git Package false True https://github.com/nephio-project/catalog.git -mgmt git Package true True http://172.18.0.200:3000/nephio/mgmt.git -mgmt-staging git Package false True http://172.18.0.200:3000/nephio/mgmt-staging.git -oai-core-packages git Package false True https://github.com/OPENAIRINTERFACE/oai-packages.git -``` - -Deploy the CRD -```bash -kubectl create -f https://raw.githubusercontent.com/nephio-project/api/refs/heads/main/config/crd/bases/o2ims.provisioning.oran.org_provisioningrequests.yaml -``` -Verify that the CRD is created by executing -```bash -kubectl get crd | grep provisioningrequests -``` -Output -```bash -NAME CREATED AT -provisioningrequests.o2ims.provisioning.oran.org 2025-02-18T20:20:06Z -``` - -## Step 2: Create a new `ProvisioningRequest` CR that will create a Workload Cluster: -```bash -cat << EOF | kubectl apply -f -apiVersion: o2ims.provisioning.oran.org/v1alpha1 -kind: ProvisioningRequest -metadata: - name: edge-cluster -spec: - name: sample-edge - description: "Provisioning request for setting up a sample edge kind cluster." - templateName: nephio-workload-cluster - templateVersion: v3.0.0 - templateParameters: - clusterName: edge - labels: - nephio.org/site-type: edge - nephio.org/region: europe-paris-west - nephio.org/owner: nephio-o2ims -EOF -``` - -Verify if the *provisioningrequest* CR is created -```bash -kubectl get provisioningrequests edge-cluster -``` -Output -```bash -NAME AGE -edge-cluster 7h31m -``` - -Verify if *packagevariants* are created for the edge-cluster -```bash -kubectl get packagevariants -``` -Output -```bashNAME AGE -edge-cluster 4d12h -edge-configsync 4d12h -edge-crds 4d12h -edge-kindnet 4d12h -edge-local-path-provisioner 4d12h -edge-metallb 4d12h -edge-multus 4d12h -edge-repo 4d12h -edge-rootsync 4d12h -edge-vlanindex 4d12h - -``` - -Examine the details of the *provisioningrequest* CR created -```bash -kubectl get provisioningrequests edge-cluster -o yaml -``` -Output -```bash -apiVersion: o2ims.provisioning.oran.org/v1alpha1 -kind: ProvisioningRequest -metadata: - annotations: - kubectl.kubernetes.io/last-applied-configuration: | - {"apiVersion":"o2ims.provisioning.oran.org/v1alpha1","kind":"ProvisioningRequest","metadata":{"annotations":{},"name":"edge-cluster"},"spec":{"description":"Provisioning request for setting up a sample edge kind cluster.","name":"sample-edge","templateName":"nephio-workload-cluster","templateParameters":{"clusterName":"edge","labels":{"nephio.org/owner":"nephio-o2ims","nephio.org/region":"europe-paris-west","nephio.org/site-type":"edge"}},"templateVersion":"v3.0.0"}} - provisioningrequests.o2ims.provisioning.oran.org/kopf-managed: "yes" - provisioningrequests.o2ims.provisioning.oran.org/last-ha-a.A3qw: | - {"spec":{"description":"Provisioning request for setting up a sample edge kind cluster.","name":"sample-edge","templateName":"nephio-workload-cluster","templateParameters":{"clusterName":"edge","labels":{"nephio.org/owner":"nephio-o2ims","nephio.org/region":"europe-paris-west","nephio.org/site-type":"edge"}},"templateVersion":"v3.0.0"}} - provisioningrequests.o2ims.provisioning.oran.org/last-handled-configuration: | - {"spec":{"description":"Provisioning request for setting up a sample edge kind cluster.","name":"sample-edge","templateName":"nephio-workload-cluster","templateParameters":{"clusterName":"edge","labels":{"nephio.org/owner":"nephio-o2ims","nephio.org/region":"europe-paris-west","nephio.org/site-type":"edge"}},"templateVersion":"v3.0.0"}} - creationTimestamp: "2025-02-18T20:30:15Z" - generation: 1 - name: edge-cluster - resourceVersion: "2377164" - uid: 8b17865d-60d4-47d4-b1b7-db7098340a22 -spec: - description: Provisioning request for setting up a sample edge kind cluster. - name: sample-edge - templateName: nephio-workload-cluster - templateParameters: - clusterName: edge - labels: - nephio.org/owner: nephio-o2ims - nephio.org/region: europe-paris-west - nephio.org/site-type: edge - templateVersion: v3.0.0 -status: - provisionedResourceSet: - oCloudInfrastructureResourceIds: - - 5bcaf4ed-b467-4aa0-9dec-fb1517adb3f2 - oCloudNodeClusterId: 6f8759ea-f3ff-4bb5-ab8d-d0c35978f606 - provisioningStatus: - provisioningMessage: Cluster resource created - provisioningState: fulfilled - provisioningUpdateTime: "2025-02-18T20:30:33Z" -``` - -## Step 3: Check the cluster installation - -You can check if the cluster has been added to the management cluster: - -```bash -kubectl get cl -``` -or -```bash -kubectl get clusters.cluster.x-k8s.io -``` -Sample output: -``` -NAME CLUSTERCLASS PHASE AGE VERSION -edge docker Provisioned 179m v1.31.0 -``` - -You should also check that the KinD cluster has come up fully by checking the `machinesets`. -You should see READY and AVAILABLE replicas. - -```bash -kubectl get machinesets -``` -Sample output: -``` -NAME CLUSTER REPLICAS READY AVAILABLE AGE VERSION -edge-md-0-lmsqz-7nzzc edge 1 1 1 3h1m v1.31.0 -``` diff --git a/content/en/docs/guides/user-guides/usecase-user-guides/exercise-4-ocloud-cluster-prov.md b/content/en/docs/guides/user-guides/usecase-user-guides/exercise-4-ocloud-cluster-prov.md new file mode 100644 index 00000000..30cd9418 --- /dev/null +++ b/content/en/docs/guides/user-guides/usecase-user-guides/exercise-4-ocloud-cluster-prov.md @@ -0,0 +1,315 @@ +--- +title: O-RAN O-Cloud K8s Cluster deployment +description: > + A step by step guide to deploying a workload cluster using the o2ims interface. +weight: 2 +--- + +## Prerequisites + +- A Nephio Management cluster: + - See the [installation guides](/content/en/docs/guides/install-guides/_index.md#introduction) for detailed demo environment options. +- With the following *optional* operator pkgs deployed: + - [o2ims operator](/content/en/docs/guides/install-guides/optional-components.md#o2ims-operator) + + +This exercise will take us from a system with only the Nephio Management cluster setup, to a deployment with: + +- A [workload cluster](https://github.com/nephio-project/catalog/tree/main/infra/capi/nephio-workload-cluster) specified + as a template when instantiating an instance of the [ProvisioningRequest CRD](https://github.com/nephio-project/api/blob/main/config/crd/bases/o2ims.provisioning.oran.org_provisioningrequests.yaml). +- A repository for said cluster, registered with Nephio Porch. + +To perform these exercises, we will need: + +- Access to the installed demo VM environment as the ubuntu user. + +The exercise will attempt to simulate the [O-RAN O-Cloud](/content/en/docs/network-architecture/o-ran-integration.md#overview) +architecture by deploying the [focom operator](/content/en/docs/guides/install-guides/optional-components.md#focom-operator) +to a separate KinD cluster, which will represent the SMO Nephio Management Cluster. + +### Step 1: Verify the O2IMS operator deployment + +Check the operator pod status +```bash +kubectl get po -n o2ims +``` +Example output +``` +NAME READY STATUS RESTARTS AGE +o2ims-operator-5595cd78b7-mwdxz 1/1 Running 0 5m +``` +Verify that the o2ims CRD is installed +```bash +kubectl get crd | grep provisioningrequests +``` +Example output +``` +NAME CREATED AT +provisioningrequests.o2ims.provisioning.oran.org 2025-03-19T00:41:57Z +``` + +## Step 2: Deploy the Focom Operator to separate cluster + +Create a default kind cluster to simulate the *SMO cluster* env +```bash +kind create cluster -n focom-cluster --kubeconfig /tmp/focom-kubeconfig +``` + +Verify the cluster is healthy +```bash +kubectl get po -A --kubeconfig /tmp/focom-kubeconfig +``` + +Deploy the [focom operator](/content/en/docs/guides/install-guides/optional-components.md#focom-operator) to the new cluster +```bash +kpt pkg get --for-deployment https://github.com/nephio-project/catalog.git/nephio/optional/focom-operator@origin/main /tmp/focom +kpt fn render /tmp/focom +kpt live init /tmp/focom --kubeconfig /tmp/focom-kubeconfig +kpt live apply /tmp/focom --reconcile-timeout=15m --output=table --kubeconfig /tmp/focom-kubeconfig +``` + +Verify the pod is healthy +```bash +kubectl get po -n focom-operator-system --kubeconfig /tmp/focom-kubeconfig +``` +Example output +``` +NAME READY STATUS RESTARTS AGE +focom-operator-controller-manager-d8f4d5cb6-dbxjh 1/1 Running 0 99s +``` + +Verify that the relevant CRDs are available +```bash +kubectl get crd --kubeconfig /tmp/focom-kubeconfig +``` +Example output +``` +NAME CREATED AT +focomprovisioningrequests.focom.nephio.org 2025-03-19T08:30:07Z +oclouds.focom.nephio.org 2025-03-19T08:30:07Z +resourcegroups.kpt.dev 2025-03-19T08:29:57Z +templateinfoes.provisioning.oran.org 2025-03-19T08:30:07Z +``` + +## Step 3: Create kubeconfig Secret + +This step may vary depending on the networking of the demo environment. + +Get the kube-api IP Address of the target O-Cloud cluster where the o2ims operator is deployed +```bash +IP=$(docker inspect --format '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' kind-control-plane) +``` + +Create a temporary kubeconfig, substituting the *IP* Address +```bash +sed "s|https://127.0.0.1:[^ ]*|https://$IP:6443|" ~/.kube/config > /tmp/kubeconfig-bak +``` + +Verify the edit +```bash +cat /tmp/kubeconfig-bak | grep server +``` +Example output +``` +server: https://172.18.0.2:6443 +``` + +Create the secret on the *SMO cluster* using the demo kubeconfig +```bash +kubectl create secret generic ocloud-kubeconfig --from-file=kubeconfig=/tmp/kubeconfig-bak --kubeconfig /tmp/focom-kubeconfig +``` +Example output +``` +secret/ocloud-kubeconfig created +``` + +## Step 4: Create the demo CRs to trigger the Focom Provisioning Request + +Create the *OCloud* CR, referencing the K8s Secret created previously +```bash +cat << EOF | kubectl apply --kubeconfig /tmp/focom-kubeconfig -f - +apiVersion: focom.nephio.org/v1alpha1 +kind: OCloud +metadata: + name: ocloud-1 + namespace: focom-operator-system +spec: + o2imsSecret: + secretRef: + name: ocloud-kubeconfig + namespace: default + +EOF +``` +Example output +``` +ocloud.focom.nephio.org/ocloud-1 created +``` + +Create the required *TemplateInfo* CR +```bash +cat << EOF | kubectl apply --kubeconfig /tmp/focom-kubeconfig -f - +apiVersion: provisioning.oran.org/v1alpha1 +kind: TemplateInfo +metadata: + name: nephio-workload-cluster-v3.0.0 + namespace: focom-operator-system +spec: + templateName: nephio-workload-cluster + templateVersion: v3.0.0 + templateParameterSchema: | + { + "type": "object", + "infra": { + "param1": { + "type": "string" + }, + "params": { + "type": "integer" + } + }, + "required": ["param1"] + } + +EOF +``` +Example output +``` +templateinfo.provisioning.oran.org/nephio-workload-cluster-v3.0.0 created +``` + +Create the *FocomProvisioningRequest* +```bash +cat << EOF | kubectl apply --kubeconfig /tmp/focom-kubeconfig -f - +apiVersion: focom.nephio.org/v1alpha1 +kind: FocomProvisioningRequest +metadata: + name: focom-cluster-prov-req-nephio + namespace: focom-operator-system +spec: + name: sample-edge + description: "Provisioning request for setting up a sample edge kind cluster" + oCloudId: ocloud-1 + oCloudNamespace: focom-operator-system + templateName: nephio-workload-cluster + templateVersion: v3.0.0 + templateParameters: + clusterName: edge + labels: + nephio.org/site-type: edge + nephio.org/region: europe-paris-west + nephio.org/owner: nephio-o2ims + +EOF +``` +Example output +``` +focomprovisioningrequest.focom.nephio.org/focom-cluster-prov-req-nephio created +``` + +## Step 5: Monitor the progress of the *ProvisioningRequest* + +Verify that the *provisioningrequest* has been created on the target O-Cloud cluster +```bash +kubectl get provisioningrequests +``` +Example output +``` +NAME AGE +focom-cluster-prov-req-nephio 15s +``` + +Verify that the *packagevariants* are created for the edge-cluster. This may take some time. +```bash +kubectl get packagevariants +``` +Example output +``` +NAME AGE +edge-cluster 1m +edge-configsync 1m +edge-crds 1m +edge-kindnet 1m +edge-local-path-provisioner 1m +edge-metallb 1m +edge-multus 1m +edge-repo 1m +edge-rootsync 1m +edge-vlanindex 1m +focom-cluster-prov-req-nephio 2m18s +``` + +Examine the details of the *provisioningrequest* CR created +```bash +kubectl get provisioningrequests focom-cluster-prov-req-nephio -o yaml +``` +Example output +```yaml +apiVersion: o2ims.provisioning.oran.org/v1alpha1 +kind: ProvisioningRequest +metadata: + annotations: + provisioningrequests.o2ims.provisioning.oran.org/kopf-managed: "yes" + provisioningrequests.o2ims.provisioning.oran.org/last-ha-a.A3qw: | + {"spec":{"description":"Provisioning request for setting up a sample edge kind cluster","name":"sample-edge","templateName":"nephio-workload-cluster","templateParameters":{"clusterName":"edge","labels":{"nephio.org/owner":"nephio-o2ims","nephio.org/region":"europe-paris-west","nephio.org/site-type":"edge"}},"templateVersion":"v3.0.0"}} + provisioningrequests.o2ims.provisioning.oran.org/last-handled-configuration: | + {"spec":{"description":"Provisioning request for setting up a sample edge kind cluster","name":"sample-edge","templateName":"nephio-workload-cluster","templateParameters":{"clusterName":"edge","labels":{"nephio.org/owner":"nephio-o2ims","nephio.org/region":"europe-paris-west","nephio.org/site-type":"edge"}},"templateVersion":"v3.0.0"}} + creationTimestamp: "2025-03-19T09:10:23Z" + generation: 1 + name: focom-cluster-prov-req-nephio + resourceVersion: "186743" + uid: 95ba053e-7020-483b-bfc4-41f3cddb39d2 +spec: + description: Provisioning request for setting up a sample edge kind cluster + name: sample-edge + templateName: nephio-workload-cluster + templateParameters: + clusterName: edge + labels: + nephio.org/owner: nephio-o2ims + nephio.org/region: europe-paris-west + nephio.org/site-type: edge + templateVersion: v3.0.0 +status: + provisionedResourceSet: + oCloudInfrastructureResourceIds: + - dd62bdc9-ecea-4b83-9484-a34c9cddbf4a + oCloudNodeClusterId: d10b046d-38bd-4efe-bd08-bb4c4a380371 + provisioningStatus: + provisioningMessage: Cluster resource created + provisioningState: fulfilled + provisioningUpdateTime: "2025-03-19T09:10:31Z" + +``` + +Check the workload cluster deployment status. This may take some time. + +```bash +kubectl get cl +``` +Example output: +``` +NAME CLUSTERCLASS PHASE AGE VERSION +edge docker Provisioned 1m v1.31.0 +``` + +You should also check that the Workload KinD cluster has come up fully by checking the `machinesets` +You should see READY and AVAILABLE replicas. This may take some time. + +```bash +kubectl get machinesets +``` +Example output: +``` +NAME CLUSTER REPLICAS READY AVAILABLE AGE VERSION +edge-md-0-7gp6p-h8gmg edge 1 1 1 3h1m v1.31.0 +``` + +Check that the associated gitea Porch *repository* is ready for the edge cluster +```bash +kubectl get repository | grep edge +``` +Example output: +``` +edge git Package true True http://172.18.0.200:3000/nephio/edge.git +``` \ No newline at end of file diff --git a/content/en/docs/network-architecture/o-ran-integration.md b/content/en/docs/network-architecture/o-ran-integration.md index ed244792..424021e2 100644 --- a/content/en/docs/network-architecture/o-ran-integration.md +++ b/content/en/docs/network-architecture/o-ran-integration.md @@ -126,4 +126,9 @@ In R3 the O-RAN Cloudified NFs consist of a single NF Deployment. The following sequence chart depicts the flow between the NFO and Workload Cluster’s DMS, highlighting the use of the Nephio enablers to deploy the NF Deployment from the NFO to the DMS. -![nf-orch-smo.png](/static/images/network-architecture/o-ran/nf-orch-smo.png) \ No newline at end of file +![nf-orch-smo.png](/static/images/network-architecture/o-ran/nf-orch-smo.png) + +#### Demo User Guide + +For a detailed demo user guide, see +[O-RAN O-Cloud K8s Cluster deployment](/content/en/docs/guides/user-guides/usecase-user-guides/exercise-4-ocloud-cluster-prov.md) \ No newline at end of file