/nephio-lab

Nephio Lab provision scripts

Primary LanguageGo

Nephio Lab

License GitHub Super-Linter Ruby Style Guide Go Report Card GoDoc visitors

The goal of this project is to provision a self-contained environment for the Nephio Workshop hosted during the ONE Summit 2022. The post create command script installs dependencies and configures Nephio services, it uses the KinD API to deploy several Kubernetes clusters locally and Gitea as software package hosting service. Nephio UI consumes Backstage project and local ports are forwarded as follows:

This initial approach pretends to evolve as well as the Nephio project.

Provisioning process

This project supports two provisioning methods:

It's highly recommended to use the setup.sh script of the bootstrap-vagrant project for installing Vagrant dependencies and plugins required for this project. That script supports two Virtualization providers (Libvirt and VirtualBox) which are determine by the PROVIDER environment variable.

Apparently the only way to access to tcpservers (like Nephio UI) in Codespaces is using the VSCode client, which binds all ports to 127.0.0.1 address.

The following diagram shows the result after its execution.

+---------------------------------+     +---------------------------------+     +---------------------------------+     +---------------------------------+
| nephio (k8s)                    |     | regional (k8s)                  |     | edge-1 (k8s)                    |     | edge-2 (k8s)                    |
| +-----------------------------+ |     | +-----------------------------+ |     | +-----------------------------+ |     | +-----------------------------+ |
| | nephio-control-plane        | |     | | regional-control-plane      | |     | | edge-1-control-plane        | |     | | edge-2-control-plane        | |
| | podSubnet: 10.196.0.0/16    | |     | | podSubnet: 10.197.0.0/16    | |     | | podSubnet: 10.198.0.0/16    | |     | | podSubnet: 10.199.0.0/16    | |
| | serviceSubnet: 10.96.0.0/16 | |     | | serviceSubnet: 10.97.0.0/16 | |     | | serviceSubnet: 10.98.0.0/16 | |     | | serviceSubnet: 10.99.0.0/16 | |
| +-----------------------------+ |     | +-----------------------------+ |     | +-----------------------------+ |     | +-----------------------------+ |
| | eth0(172.88.0.2/16)         | |     | | eth0(172.89.0.2/16)         | |     | | eth0(172.90.0.2/16)         | |     | | eth0(172.91.0.2/16)         | |
| +------------+----------------+ |     | +------------+----------------+ |     | +------------+----------------+ |     | +------------+----------------+ |
|              |                  |     |              |                  |     |              |                  |     |              |                  |
+--------------+------------------+     +--------------+------------------+     +--------------+------------------+     +--------------+------------------+
               |                                       |                                       |                                       |
     +=========+============+                +=========+============+                +=========+===========+                 +=========+===========+
     |  net-nephio(bridge)  |                | net-regional(bridge) |                |  net-edge-1(bridge) |                 |  net-edge-2(bridge) |
     |    172.88.0.0/16     |                |    172.89.0.0/16     |                |    172.90.0.0/16    |                 |    172.91.0.0/16    |
     +=========+============+                +=========+============+                +=========+===========+                 +=========+===========+
               |                                       |                                       |                                       |
+--------------+---------------------------------------+---------------------------------------+---------------------------------------+-----------+
| wan-nephio (emulator)                                                                                                                            |
+--------------------------------------------------------------------------------------------------------------------------------------------------+
| eth0(172.80.0.2/24)                                                                                                                              |
| eth1(172.90.0.254/16)                                                                                                                            |
| eth2(172.91.0.254/16)                                                                                                                            |
| eth3(172.89.0.254/16)                                                                                                                            |
| eth4(172.88.0.254/16)                                                                                                                            |
+--------------------------------------------------------------------------------------------------------------------------------------------------+

+===================================+
|          host(host)               |
+========+===================+======+
         |                   |
+--------+---------+ +-------+------+
| frontend (gitea) | | db (mariadb) |
+------------------+ +--------------+
|                  | |              |
+------------------+ +--------------+