Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions content/en/docs/guides/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ weight: 2
This page is draft and the separation of the content to different categories is not clearly done.
{{% /pageinfo %}}

Guides are **complete worked examples** made up of **multiple tasks** that guide the user through a relatively simple
but realistic scenario: building an application that uses some of your project’s features, for example. If you have
already created some Examples for your project you can base Tutorials on them. This section is **optional**. However,
remember that although you may not need this section at first, having tutorials can be useful to help your users engage
with your example code, especially if there are aspects that need more explanation than you can easily provide in code
comments.

* [Nephio install guides](./install-guides/): Help in installing Nephio in different environments
* [Nephio user guides](./user-guides/): Help in understanding the basics of Nephio and provides examples to deploy Network Functions (NF) via Nephio.
17 changes: 12 additions & 5 deletions content/en/docs/guides/install-guides/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,14 @@ description: >
weight: 1
---

{{% pageinfo %}}
This page is draft and the separation of the content to different categories is not clearly done.
{{% /pageinfo %}}

## Introduction

This Installation Guide will set up and run a Nephio demonstration environment. This environment is a single VM that
will be used in the exercises to simulate a topology with a Nephio Management cluster, a Regional Workload
cluster, and two Edge Workload clusters.
will be used in the exercises to simulate a topology with a Nephio management cluster and three workload clusters.

## Installing on GCE

Expand Down Expand Up @@ -93,7 +96,7 @@ sudo NEPHIO_DEBUG=false \
bash
```

**Real K8s Cluster**
**Pre-installed K8s Cluster**

Log onto your VM and run the following command:

Expand Down Expand Up @@ -179,6 +182,10 @@ ssh <user>@<vm-address>
* Step through the exercises
* [Free5GC Testbed Deployment and E2E testing with UERANSIM](/content/en/docs/guides/user-guides/exercise-1-free5gc.md)
* [OAI Core and RAN Testbed Deployment and E2E testing](/content/en/docs/guides/user-guides/exercise-2-oai.md)
* Learn more about the [Nephio demo sandbox](/content/en/docs/guides/install-guides/explore-sandbox.md)
* Dig into the [user guide](/content/en/docs/guides/user-guides/_index.md)
* Create a [Bring-Your-Own-Cluster](/content/en/docs/guides/install-guides/install-on-byoc.md) Nephio Installation
* Nephio sandbox environment
* Install on pre-provisioned single VM
* Install on GCE
* [Explore sandbox environment](/content/en/docs/guides/install-guides/explore-sandbox.md)
* [Bring-Your-Own-Cluster](/content/en/docs/guides/install-guides/install-on-byoc.md)
* [Install using vagrant on Windows (for development)](/content/en/docs/guides/install-guides/demo-vagrant-windows.md)
40 changes: 36 additions & 4 deletions content/en/docs/guides/install-guides/common-components.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ weight: 2
This page is draft and the separation of the content to different categories is not clearly done.
{{% /pageinfo %}}


> **_NOTE:_** If you want to use a version other than that at the tip of Nephio `catalog` repo, then replace the `@main` suffix on the package URLs on the `kpt pkg get` commands below with the tag of the version you wish to use.


Expand Down Expand Up @@ -40,20 +41,47 @@ such as integration with IPAM and VLAN allocation, and NAD generation - as well
as operators that can provision repositories and bootstrap new clusters into
Nephio.


To install the Nephio Operators, repeat the `kpt` steps, but for that package:

```bash
kpt pkg get --for-deployment https://github.com/nephio-project/catalog.git/nephio/core/nephio-operator@main
```

The Nephio Operator package by default uses the Gitea instance at `172.18.0.200:3000` as
the git repository. Change it to point to your git instance in
`nephio-operator/app/controller/deployment-token-controller.yaml` and
`nephio-operator/app/controller/deployment-controller.yaml`

You also need to create a secret with your Git instance credentials:

```bash
kubectl apply -f - <<EOF
apiVersion: v1
kind: Secret
metadata:
name: git-user-secret
namespace: nephio-system
type: kubernetes.io/basic-auth
stringData:
username: <GIT_USER_NAME>
password: <GIT_PASSWORD>
EOF
```

Now you can continue the installation process:

```bash
kpt fn render nephio-operator
kpt live init nephio-operator
kpt live apply nephio-operator --reconcile-timeout=15m --output=table
```

## Management Cluster GitOps Tool

In the R1 demo environment, a GitOps tool (ConfigSync) is installed to allow
GitOps-based application of packages to the management cluster itself. This is
not strictly needed if all you want to do is provision network functions, but it
A GitOps tool (ConfigSync) is installed to allow
GitOps-based application of packages on the management cluster itself. It is
not needed if you only want to provision network functions, but it
is used extensively in the cluster provisioning workflows.

Different GitOps tools may be used, but these instructions only cover ConfigSync.
Expand All @@ -70,7 +98,7 @@ kpt live apply configsync --reconcile-timeout=15m --output=table
## Nephio Stock Repositories

The repositories with the Nephio packages used in the exercises are available to
be installed via a package for convenience. This will install Repository
be installed via a package for convenience. This will install repository
resources pointing directly to the GitHub repositories, with read-only access.

```bash
Expand All @@ -79,3 +107,7 @@ kpt fn render stock-repos
kpt live init stock-repos
kpt live apply stock-repos --reconcile-timeout=15m --output=table
```

## WebUI (Optional)

Nephio WebUI is optional and to install it you can follow this [document](/content/en/docs/guides/install-guides/webui.md)
17 changes: 17 additions & 0 deletions content/en/docs/guides/install-guides/common-dependencies.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,20 @@ kpt fn render resource-backend
kpt live init resource-backend
kpt live apply resource-backend --reconcile-timeout=15m --output=table
```

## Setup a Downstream Git Repository

Nephio needs a git repository (as a source of truth) to store the packages
which are getting deployed or are already deployed on the cluster. Either you can
use Github/Gitlab or Gitea. If you want to use [Gitea](https://about.gitea.com/),
then you can follow below steps:

```bash
kpt pkg get --for-deployment https://github.com/nephio-project/catalog.git/distros/sandbox/gitea@main
kpt fn render gitea
kpt live init gitea
kpt live apply gitea --reconcile-timeout 15m --output=table
```

You can find the Gitea ip-address via `kubectl get svc -n gitea`
and use port `3000` to access it with login `nephio` and password `secret`.
11 changes: 8 additions & 3 deletions content/en/docs/guides/install-guides/demo-vagrant-windows.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,16 @@ description: >
weight: 6
---

{{% pageinfo %}}
This page is draft and the separation of the content to different categories is not clearly done.
{{% /pageinfo %}}


## Steps

- install git
- install virtualbox
- install [vagrant](https://developer.hashicorp.com/vagrant/docs/installation)
- Install git
- Install virtualbox
- Install [vagrant](https://developer.hashicorp.com/vagrant/docs/installation)
- open git bash
- `git clone https://github.com/nephio-project/test-infra.git && cd test-infra/e2e/provision`
- `vagrant up`
Expand Down
14 changes: 8 additions & 6 deletions content/en/docs/guides/install-guides/install-on-byoc.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ your environment and choices.
- `kubectl` [installed ](https://kubernetes.io/docs/tasks/tools/install-kubectl-linux/)on your workstation
- `kpt` [installed](https://kpt.dev/installation/kpt-cli) on your workstation
(version v1.0.0-beta.43 or later)
- `porchctl` [installed](https://github.com/nephio-project/porch/releases) on your workstation
- `porchctl` [installed](https://github.com/nephio-project/porch/blob/main/docs/porchctl-cli-guide.md) on your workstation
- Sudo-less `docker`, `podman`, or `nerdctl`. If using `podman` or `nerdctl`,
you must set the
[`KPT_FN_RUNTIME`](https://kpt.dev/reference/cli/fn/render/?id=environment-variables)
Expand Down Expand Up @@ -60,6 +60,7 @@ options, if you wish to assemble your own set of components.
| Environment | Description |
| ----------- | ---------------------------------------------------------- |
| [Single VM](/content/en/docs/guides/install-guides/install-on-single-vm.md) | The single VM demo environment, set up "the hard way" - without using the included provisioning script. This creates a complete Nephio-in-a-VM, just like the R1 demo environment. These instructions cover both Ubuntu and Fedora. |
| [Multiple VM](/content/en/docs/guides/install-guides/install-on-multiple-vm.md) | The multiple VM environment, set up Nephio on multiple VMs. These instructions cover both Ubuntu and Fedora. |
| [Google Cloud Platform](/content/en/docs/guides/install-guides/install-on-gcp.md) | Nephio running in GCP. A GKE cluster is used as the management cluster, with Anthos Config Controller for GCP infrastructure provisioning, Gitea as the Git provider, and Web UI authentication and authorization via Google OAuth 2.0 |
| [OpenShift](/content/en/docs/guides/install-guides/install-on-openshift.md) | Nephio running in OpenShift, with Cluster API as the cluster provisioner, Gitea as the Git provider and Web UI authentication backed by Open Shift OIDC. |

Expand All @@ -72,7 +73,7 @@ choices you need to make among various dependencies and components.
### Git Providers

Nephio can support multiple Git providers for the repositories that contain
packages. In R1, only Gitea repositories can be provisioned directly by Nephio;
packages. In R1 and R2, only Gitea repositories can be provisioned directly by Nephio;
other Git providers will require manual provisioning of new repositories. But
most Git providers can be supported (via standard Git protocols) as repositories
for packages for read and write. It is also perfectly fine to use multiple
Expand All @@ -98,7 +99,7 @@ documented in the specific environment instructions.

### GitOps Tool

As configured in the R1 reference implementation, Nephio relies on ConfigSync.
As configured in the R1 and R2 reference implementation, Nephio relies on ConfigSync.
However, it is possible to configure it to use a different GitOps tool, such as
Flux or ArgoCD to apply packages to the clusters.

Expand All @@ -115,9 +116,10 @@ KCC, or AWS Controllers for Kubernetes. You can provision more than one.

### Load Balancer

The R1 demo environment uses [MetalLB](https://metallb.universe.tf/), but if you are running in a cloud, you
probably do not need anything special here. However, depending on your choice of
GitOps tool and Git provider, some of the packages may need customization to
The R1 and R2 demo environments use [MetalLB](https://metallb.universe.tf/),
but if you are running in a cloud, you probably do not need anything special here.
However, depending on your choice of GitOps tool and Git provider,
some of the packages may need customization to
provision or use a well-known load balancer IP or DNS name.

### Gateway or Ingress
Expand Down
97 changes: 6 additions & 91 deletions content/en/docs/guides/install-guides/install-on-gce.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,13 @@ weight: 3

This Installation Guide will set up and run a Nephio demonstration
environment. This environment is a single VM that will be used in the exercises
to simulate a topology with a Nephio Management cluster, a Regional Workload
cluster, and two Edge Workload clusters.
to simulate a topology with a Nephio management cluster and three workload clusters.

## Installing on GCE

### GCE Prerequisites

You will need a account in GCP and `gcloud` installed on your local environment.
You will need an account in GCP and `gcloud` installed on your local environment.

### Create a Virtual Machine on GCE

Expand All @@ -42,97 +41,18 @@ gcloud compute ssh ubuntu@nephio-r2-e2e -- \
sudo journalctl -u google-startup-scripts.service --follow
```

## Installing on a Pre-Provisioned VM

This install has been verified on VMs running on vSphere, OpenStack, AWS, and
Azure.

### VM Prerequisites

Order or create a VM with the following specification:

- Linux Flavour: Ubuntu-20.04-focal
- Minimum 8 cores and recommended 16 Cores
- 32 GB memory
- 200 GB disk size
- Default user with sudo passwordless permissions

**Configure a Route for Kubernetes**

In some installations, the IP range used by Kubernetes in the sandbox can clash with the
IP address used by your VPN. In such cases, the VM will become unreachable during the
sandbox installation. If you have this situation, add the route below on your VM.

Log onto your VM and run the following commands,
replacing **\<interface-name\>** and **\<interface-gateway-ip\>** with your VMs values:

```bash
sudo bash -c 'cat << EOF > /etc/netplan/99-cloud-init-network.yaml
network:
ethernets:
<interface-name>:
routes:
- to: 172.18.2.6/32
via: <interface-gateway-ip>
metric: 100
version: 2
EOF'

sudo netplan apply
```

### Kick Off an Installation on VM

Log onto your VM and run the following command:

```bash
wget -O - https://raw.githubusercontent.com/nephio-project/test-infra/v2.0.0/e2e/provision/init.sh | \
sudo NEPHIO_DEBUG=false \
NEPHIO_BRANCH=v2.0.0 \
NEPHIO_USER=ubuntu \
bash
```

The following environment variables can be used to configure the installation:

| Variable | Values | Default Value | Description |
| ---------------------- | ---------------- | ------------- | ------------------------------------------------------ |
| NEPHIO_USER | userid | ubuntu | The user to install the sandbox on (must have sudo passwordless permissions) |
| NEPHIO_DEBUG | false or true | false | Controls debug output from the install |
| NEPHIO_HOME | path | /home/$NEPHIO_USER | The directory to check out the install scripts into |
| RUN_E2E | false or true | false | Specifies whether end-to-end tests should be executed or not |
| NEPHIO_REPO | URL | https://github.com/nephio-project/test-infra.git |URL of the repository to be used for installation |
| NEPHIO_BRANCH | branch or tag | main | Tag or branch name to use in NEPHIO_REPO |

### Follow the Installation on VM

Monitor the installation on your terminal.

Log onto your VM using ssh on another terminal and use commands *docker* and *kubectl* to monitor the installation.

## Access to the User Interfaces

Once it is completed, ssh in and port forward the port to the UI (7007) and to
Gitea's HTTP interface, if desired (3000):

Using GCE:

```bash
gcloud compute ssh ubuntu@nephio-r2-e2e -- \
-L 7007:localhost:7007 \
-L 3000:172.18.0.200:3000 \
kubectl port-forward --namespace=nephio-webui svc/nephio-webui 7007
```

Using a VM:

```bash
ssh <user>@<vm-address> \
-L 7007:localhost:7007 \
-L 3000:172.18.0.200:3000 \
kubectl port-forward --namespace=nephio-webui svc/nephio-webui 7007
```

You can now navigate to:
- [http://localhost:7007/config-as-data](http://localhost:7007/config-as-data) to
browse the Nephio Web UI
Expand All @@ -144,22 +64,17 @@ You will probably want a second ssh window open to run `kubectl` commands, etc.,
without the port forwarding (which would fail if you try to open a second ssh
connection with that setting).

Using GCE:

```bash
gcloud compute ssh ubuntu@nephio-r2-e2e
```

Using a VM:

```bash
ssh <user>@<vm-address>
```

## Next Steps

* Step through the exercises
* [Free5GC Testbed Deployment and E2E testing with UERANSIM](/content/en/docs/guides/user-guides/exercise-1-free5gc.md)
* [OAI Core and RAN Testbed Deployment and E2E testing](/content/en/docs/guides/user-guides/exercise-2-oai.md)
* Learn more about the [Nephio demo sandbox](/content/en/docs/guides/install-guides/explore-sandbox.md)
* Dig into the [user guide](/content/en/docs/guides/user-guides/_index.md)
* In case you want to install Nephio on pre-provisioned VMs:
* [Single VM](/content/en/docs/guides/install-guides/install-on-single-vm.md)
* [Multiple VM](/content/en/docs/guides/install-guides/install-on-multiple-vm.md)

Loading