Installation on OpenShift
This page is draft and the separation of the content to different categories is not done.
In this guide, you will set up Nephio with:
- Management Cluster: OpenShift with Advanced Cluster Management
- Cluster Provisioner: Assisted Service
- Workload Clusters: OpenShift Cluster or Single Node OpenShift Cluster or HyperShift Cluster or Remote Worker Node
- GitOps Tool: OpenShift GitOps backed by ArgoCD
- Git Provider: Gitea running in the Nephio management cluster will be the git provider for cluster deployment repositories. Some external repositories will be on GitHub.
- Web UI Auth: OpenShift OAuth.
- Ingress/Load Balancer: OpenShift Ingress will be used, supplying a Route to the Nephio and Gitea WebUIs.
Prerequisites
- A Red Hat Account and access to https://console.redhat.com/openshift/
- OpenShift cli client oc. Download here
Setup the Management Cluster
If you have already access to an OpenShift cluster, make sure you have cluster-admin privilege. Then go to the Install the requirements section.
Create the management cluster
Two methods exists:
- Self-managed OpenShift: this assumes you have resources available in your private or public cloud environment. Please refer to our installation documentation.
- Managed OpenShift: this assumes you have access to a public cloud environment with enough permission. You can choose one of the two offerings
Install the requirements
Install the two following operators:
Once installed, you need to prepare the management cluster for zero touch provisioning of OpenShift Cluster.
Install Nephio
Option 1: Using init.sh (as a Pre-installed K8s Cluster)
If using init.sh directly to deploy Nephio management components, as one would for a generic K8s Cluster, there are some prerequisites to consider:
- A default StorageClass must be configured providing persistent storage for PVCs (for instance through the LVMS Operator and an LVMCluster)
- Security Context Constraits must be applied for successful Nephio component deployment
Follow the steps present in the Install Guide for a Pre-installed K8s Cluster to install manaement components
Option 2: Using Blueprints Nephio OpenShift Repo OpenShift Package Repository
A repository of OpenShift-installation specific packages must be used to deploy Nephio. This repository contains packages derived from the standard Nephio R1 packages, but with OpenShift-specific modifications.
The blueprint package act as an App of Apps installing all the required Nephio components on the management cluster.
You can register this package as a read-only external repository by applying the blueprints-nephio-openshift
ArgoCD
Application:
oc apply -f https://raw.githubusercontent.com/openshift-telco/blueprints-nephio-openshift/v1.0.1/nephio-mgnt/app-of-apps.yaml
This will take care of applying the common dependencies and the common components
Access the Nephio WebUI
-
Get the Nephio URL:
oc get route nephio -n nephio-webui -o=jsonpath=https://'{.spec.host}'
-
Login using your OpenShift login
Access the Gitea UI
-
Get the Gitea URL:
oc get route gitea -n gitea -o=jsonpath=https://'{.spec.host}'
-
Login
- user: gitea
- password: password
Install edge clusters
Bare metal Single Node OpenShift
You first need to create the OpenShift context ConfigMap entries to customize the cluster configuration. Here is an example:
---
apiVersion: v1
kind: ConfigMap
metadata:
name: openshift-context
annotations:
config.kubernetes.io/local-config: "true"
kpt.dev/config-injection: required
data:
release-image-name: openshift-v4.13.12
cluster-name: ca-montreal
base-domain: adetalhouet.ca
machine-network: 192.168.123.0/24
ssh-pub-key: "YOUR_SSH_KEY"
pull-secret: "YOUR_PULL_SECRET"
bmc-address: "redfish-virtualmedia+http://192.168.1.170:8000/redfish/v1/Systems/c505d99e-bc2a-4690-89a5-463098de4d59"
bmc-username: "ZXhhbXBsZQo="
bmc-password: "ZXhhbXBsZQo="
bmc-boot-mac-address: "02:04:00:00:01:03"
You can now create edge clusters by using kubectl
to apply the following PackageVariantSet to your management cluster.
It will inject the site specific configuration supplied in the ConfigMap.
apiVersion: config.porch.kpt.dev/v1alpha2
kind: PackageVariantSet
metadata:
name: edge-clusters
spec:
upstream:
repo: openshift-packages-main
package: nephio-workload-cluster-sno
revision: main
targets:
- repositories:
- name: management
packageNames:
- ca-montreal
template:
annotations:
approval.nephio.org/policy: initial
injectors:
- kind: ConfigMap
name: openshift-context
pipeline:
mutators:
- image: gcr.io/kpt-fn/set-labels:v0.2.0
configMap:
nephio.org/site-type: edge
nephio.org/region: ca-central