Nephio manual deployment on multiple VMs

Nephio manual deployment on different VMs

Prerequisites

  • Cluster Management (master)
    • 4 vCPU
    • 8 GB RAM
    • Kubernetes version 1.26+
    • kubectl installed
    • Ingress/Load Balancer: MetalLB, but only internally to the VM
  • Cluster Edge
    • 2 vCPU 1 NODE
    • 4 GB RAM
    • Kubernetes version 1.26+
    • kubectl installed
  • kpt installed (version v1.0.0-beta.43 or later)
  • porchctl installed on your workstation

Installation of the management cluster

Manual Installation of the management cluster using kpt

Manual Installation of the Edge cluster using kpt

All the workload clusters need config-sync, root-sync and a cluster git repository to manage packages. The below steps have to be repeated for each workload cluster:

Install Config-sync

Install config-sync using:

kpt pkg get --for-deployment https://github.com/nephio-project/catalog.git/nephio/core/configsync@@origin/v3.0.0
kpt fn render configsync
kpt live init configsync
kpt live apply configsync --reconcile-timeout=15m --output=table

Create Git Repository

Create a repository for your cluster either in your git provider or in gitea.

If you want to use GitHub or GitLab then follow below steps

Get a GitHub token if your repository is private, to allow Porch to make modifications.

Register the edge repository using kpt cli or nephio web-ui.

GITHUB_USERNAME=<Github Username>
GITHUB_TOKEN=<GitHub Token>

porchctl repo register \
  --namespace default \
  --repo-basic-username=${GITHUB_USERNAME} \
  --repo-basic-password=${GITHUB_TOKEN} \
  --create-branch=true \
  --deployment=true \
  <http url of your edge repo>

In case, you are using Gitea then you can use the following steps

kpt pkg get --for-deployment https://github.com/nephio-project/catalog.git/distros/sandbox/repository@@origin/v3.0.0 <cluster-name>
kpt fn render <cluster-name>
kpt live init <cluster-name>
kpt live apply <cluster-name> --reconcile-timeout=15m --output=table

Install Root-sync

Get the Root-sync kpt package and edit it:

kpt pkg get https://github.com/nephio-project/catalog.git/nephio/optional/rootsync@@origin/v3.0.0

Change ./rootsync/rootsync.yaml and point spec.git.repo to the edge git repository and the

 spec:
   sourceFormat: unstructured
   git:
    repo: <http url of your edge repo>
     branch: main
     auth: none

If need credentials to access repository your repository then copy the token name from previous section and provide it in ./rootsync/rootsync.yaml

spec:
  sourceFormat: unstructured
  git:
    repo: <http url of your edge repo>
    branch: main
    auth: token
    secretRef:
      name: <TOKEN-NAME>

Deploy the modified root-sync

kpt live init rootsync
kpt live apply rootsync --reconcile-timeout=15m --output=table

If the output of kubectl get rootsyncs.configsync.gke.io -A is similar as below then root-sync is properly configured.

kubectl get rootsyncs.configsync.gke.io -A
NAMESPACE                  NAME   RENDERINGCOMMIT                            RENDERINGERRORCOUNT   SOURCECOMMIT                               SOURCEERRORCOUNT   SYNCCOMMIT                                 SYNCERRORCOUNT
config-management-system   mgmt   ddc9676c997696d4a102a5cf2c67d0a0c459ceb3                         ddc9676c997696d4a102a5cf2c67d0a0c459ceb3                      ddc9676c997696d4a102a5cf2c67d0a0c459ceb3   

Add Workload CRDs in Edge workload cluster

Workload CRDs are required to manage network functions.

kpt pkg get --for-deployment https://github.com/nephio-project/catalog.git/nephio/core/workload-crds@@origin/v3.0.0
kpt live init workload-crds
kpt live apply workload-crds --reconcile-timeout=15m --output=table

Deploy packages to the edge clusters

Using web-ui or command line add a new deployment to the edge workload cluster.