Skip to content

Commit

Permalink
Adding script for metallb address pool
Browse files Browse the repository at this point in the history
  • Loading branch information
arora-sagar committed Feb 5, 2024
1 parent 512da25 commit 9f57338
Show file tree
Hide file tree
Showing 4 changed files with 80 additions and 11 deletions.
19 changes: 11 additions & 8 deletions content/en/docs/guides/install-guides/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,16 @@ You will need a account in GCP and `gcloud` installed on your local environment.
### Create a Virtual Machine on GCE

```bash
gcloud compute instances create --machine-type e2-standard-8 \
gcloud compute instances create --machine-type e2-standard-16 \
--boot-disk-size 200GB \
--image-family=ubuntu-2004-lts \
--image-project=ubuntu-os-cloud \
--metadata=startup-script-url=https://raw.githubusercontent.com/nephio-project/test-infra/main/e2e/provision/init.sh \
--metadata=startup-script-url=https://raw.githubusercontent.com/nephio-project/test-infra/v2.0.0/e2e/provision/init.sh,nephio-test-infra-branch=v2.0.0 \
nephio-r2-e2e
```

**NOTE**: e2-standard-16 is recommended and e2-standard-8 is minimum.

### Follow the Installation on GCE

If you want to watch the progress of the installation, give it about 30 seconds to reach a network accessible state, and
Expand All @@ -64,7 +66,7 @@ This install has been verified on VMs running on vSphere, OpenStack, AWS, and Az
Order or create a VM with the following specification:

- Linux Flavour: Ubuntu-20.04-focal
- 8 cores
- Minimum 8 cores and recommended 16 Cores
- 32 GB memory
- 200 GB disk size
- Default user with sudo passwordless permissions
Expand Down Expand Up @@ -98,9 +100,9 @@ sudo netplan apply
Log onto your VM and run the following command:

```bash
wget -O - https://raw.githubusercontent.com/nephio-project/test-infra/v1.0.1/e2e/provision/init.sh | \
wget -O - https://raw.githubusercontent.com/nephio-project/test-infra/v2.0.0/e2e/provision/init.sh | \
sudo NEPHIO_DEBUG=false \
NEPHIO_BRANCH=main \
NEPHIO_BRANCH=v2.0.0 \
NEPHIO_USER=ubuntu \
bash
```
Expand All @@ -112,12 +114,11 @@ The following environment variables can be used to configure the installation:
| 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 |
| NEPHIO_DEPLOYMENT_TYPE | r2 or one-summit | r2 | Controls the type of installation to be carried out |
| RUN_E2E | false or true | false | Specifies whether end-to-end tests should be executed or not |
| DOCKERHUB_USERNAME | alpha-num string | | Specifies the dockerhub username |
| DOCKERHUB_TOKEN | alpha-num string | | Specifies the password or token |
| 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 |
| NEPHIO_BRANCH | branch or tag | main/v2.0.0 | Tag or branch name to use in NEPHIO_REPO |
| DOCKER_REGISTRY_MIRRORS | list of URLs in JSON format | | List of docker registry mirrors in JSON format, or empty for no mirrors to be set. Example value: ``["https://docker-registry-remote.mycompany.com", "https://docker-registry-remote2.mycompany.com"]`` |

### Follow the Installation on VM
Expand Down Expand Up @@ -173,7 +174,9 @@ ssh <user>@<vm-address>

## Next Steps

* Step through the [Free5GC](/content/en/docs/guides/user-guides/exercise-1-free5gc.md) and [OAI](/content/en/docs/guides/user-guides/exercise-2-oai.md) exercises
* 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
5 changes: 3 additions & 2 deletions content/en/docs/guides/install-guides/install-on-gce.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ gcloud compute instances create --machine-type e2-standard-16 \
nephio-r2-e2e
```

**NOTE**: e2-standard-16 is recommended and e2-standard-8 is minimum.

### Follow the Installation on GCE

If you want to watch the progress of the installation, give it about 30
Expand All @@ -66,7 +68,7 @@ Azure.
Order or create a VM with the following specification:

- Linux Flavour: Ubuntu-20.04-focal
- 16 cores
- Minimum 8 cores and recommended 16 Cores
- 32 GB memory
- 200 GB disk size
- Default user with sudo passwordless permissions
Expand Down Expand Up @@ -114,7 +116,6 @@ The following environment variables can be used to configure the installation:
| 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 |
| NEPHIO_DEPLOYMENT_TYPE | r1 or one-summit | r1 | Controls the type of installation to be carried out |
| 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 |
Expand Down
67 changes: 66 additions & 1 deletion content/en/docs/guides/user-guides/exercise-2-oai.md
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,71 @@ vpc-ran True
```
</details>

After the networks are succesfully configured lets configure metallb ip-address pool for each workload cluster. Some workloads in the workload cluster require metallb to expose their services.


```bash
./test-infra/e2e/tests/oai/001b-infra-metal-lb.sh
```

<details>
<summary>The output is similar to:</summary>

```console
21:58:35 - INFO: looking for packagerev default/mgmt-staging-7ad404ab9e0e02af747501c6ce9c2c183d02694b using /home/ubuntu/.kube/config
21:58:35 - INFO: Found packagerev default/mgmt-staging-7ad404ab9e0e02af747501c6ce9c2c183d02694b
[RUNNING] "gcr.io/kpt-fn/search-replace:v0.2"
[PASS] "gcr.io/kpt-fn/search-replace:v0.2" in 2.5s
Results:
[info] spec.addresses[0]: Mutated field value to "172.18.16.0/20"
[RUNNING] "gcr.io/kpt-fn/set-annotations:v0.1.4"
[PASS] "gcr.io/kpt-fn/set-annotations:v0.1.4" in 3.1s
21:58:42 - INFO: looking for Update.*packagerevisionresources/mgmt-staging-7ad404ab9e0e02af747501c6ce9c2c183d02694b, log entry in porch server(porch-server-68bfdddbbf-pmnmd)
21:58:42 - INFO: Found Update.*packagerevisionresources/mgmt-staging-7ad404ab9e0e02af747501c6ce9c2c183d02694b, log entry in porch server
mgmt-staging-7ad404ab9e0e02af747501c6ce9c2c183d02694b proposed
21:58:43 - INFO: looking for Update.*packagerevisions/mgmt-staging-7ad404ab9e0e02af747501c6ce9c2c183d02694b, log entry in porch server(porch-server-68bfdddbbf-pmnmd)
21:58:43 - INFO: Found Update.*packagerevisions/mgmt-staging-7ad404ab9e0e02af747501c6ce9c2c183d02694b, log entry in porch server
mgmt-staging-7ad404ab9e0e02af747501c6ce9c2c183d02694b approved
21:58:46 - INFO: looking for Update.*/mgmt-staging-7ad404ab9e0e02af747501c6ce9c2c183d02694b.*/approval log entry in porch server(porch-server-68bfdddbbf-pmnmd)
21:58:46 - INFO: Found Update.*/mgmt-staging-7ad404ab9e0e02af747501c6ce9c2c183d02694b.*/approval log entry in porch server
~
21:58:48 - INFO: looking for packagerev default/mgmt-staging-0c11427319b42b1f9e85f27ad22f82d27c9978a3 using /home/ubuntu/.kube/config
21:58:48 - INFO: Found packagerev default/mgmt-staging-0c11427319b42b1f9e85f27ad22f82d27c9978a3
[RUNNING] "gcr.io/kpt-fn/search-replace:v0.2"
[PASS] "gcr.io/kpt-fn/search-replace:v0.2" in 300ms
Results:
[info] spec.addresses[0]: Mutated field value to "172.18.32.0/20"
[RUNNING] "gcr.io/kpt-fn/set-annotations:v0.1.4"
[PASS] "gcr.io/kpt-fn/set-annotations:v0.1.4" in 1.3s
21:58:51 - INFO: looking for Update.*packagerevisionresources/mgmt-staging-0c11427319b42b1f9e85f27ad22f82d27c9978a3, log entry in porch server(porch-server-68bfdddbbf-pmnmd)
21:58:51 - INFO: Found Update.*packagerevisionresources/mgmt-staging-0c11427319b42b1f9e85f27ad22f82d27c9978a3, log entry in porch server
mgmt-staging-0c11427319b42b1f9e85f27ad22f82d27c9978a3 proposed
21:58:52 - INFO: looking for Update.*packagerevisions/mgmt-staging-0c11427319b42b1f9e85f27ad22f82d27c9978a3, log entry in porch server(porch-server-68bfdddbbf-pmnmd)
21:58:52 - INFO: Found Update.*packagerevisions/mgmt-staging-0c11427319b42b1f9e85f27ad22f82d27c9978a3, log entry in porch server
mgmt-staging-0c11427319b42b1f9e85f27ad22f82d27c9978a3 approved
21:58:55 - INFO: looking for Update.*/mgmt-staging-0c11427319b42b1f9e85f27ad22f82d27c9978a3.*/approval log entry in porch server(porch-server-68bfdddbbf-pmnmd)
21:58:55 - INFO: Found Update.*/mgmt-staging-0c11427319b42b1f9e85f27ad22f82d27c9978a3.*/approval log entry in porch server
~
21:58:57 - INFO: looking for packagerev default/mgmt-staging-f1b8e75b6c87549d67037f784abc0083ac601722 using /home/ubuntu/.kube/config
21:58:57 - INFO: Found packagerev default/mgmt-staging-f1b8e75b6c87549d67037f784abc0083ac601722
[RUNNING] "gcr.io/kpt-fn/search-replace:v0.2"
[PASS] "gcr.io/kpt-fn/search-replace:v0.2" in 200ms
Results:
[info] spec.addresses[0]: Mutated field value to "172.18.48.0/20"
[RUNNING] "gcr.io/kpt-fn/set-annotations:v0.1.4"
[PASS] "gcr.io/kpt-fn/set-annotations:v0.1.4" in 1.3s
21:59:00 - INFO: looking for Update.*packagerevisionresources/mgmt-staging-f1b8e75b6c87549d67037f784abc0083ac601722, log entry in porch server(porch-server-68bfdddbbf-pmnmd)
21:59:00 - INFO: Found Update.*packagerevisionresources/mgmt-staging-f1b8e75b6c87549d67037f784abc0083ac601722, log entry in porch server
mgmt-staging-f1b8e75b6c87549d67037f784abc0083ac601722 proposed
21:59:01 - INFO: looking for Update.*packagerevisions/mgmt-staging-f1b8e75b6c87549d67037f784abc0083ac601722, log entry in porch server(porch-server-68bfdddbbf-pmnmd)
21:59:01 - INFO: Found Update.*packagerevisions/mgmt-staging-f1b8e75b6c87549d67037f784abc0083ac601722, log entry in porch server
mgmt-staging-f1b8e75b6c87549d67037f784abc0083ac601722 approved
21:59:04 - INFO: looking for Update.*/mgmt-staging-f1b8e75b6c87549d67037f784abc0083ac601722.*/approval log entry in porch server(porch-server-68bfdddbbf-pmnmd)
21:59:04 - INFO: Found Update.*/mgmt-staging-f1b8e75b6c87549d67037f784abc0083ac601722.*/approval log entry in porch server
~
```
</details>

## Step 3: Deploy Dependencies, MySQL database, OAI Core and RAN Operator in the Workload clusters

Now you will need to deploy the MySQL database required by OAI UDR network function, OAI Core and RAN operators across the Workload clusters. To do this, you use `PackageVariant` and `PackageVariantSet`. Later uses an objectSelector to select the WorkloadCluster resources previously added to the Management cluster when you had deployed the nephio-workload-cluster packages (manually as well as via
Expand Down Expand Up @@ -476,7 +541,7 @@ packagevariant.config.porch.kpt.dev/oai-upf-edge created
```
</details>

All the NFs will wait for NRF to come up and then they will register to NRF. SMF has a dependency on UPF which is described by `dependency.yaml` file in SMF package. It will wait till the time UPF is deployed. It takes around ~20 mins for the whole core network to come up.
All the NFs will wait for NRF to come up and then they will register to NRF. SMF has a dependency on UPF which is described by `dependency.yaml` file in SMF package. It will wait till the time UPF is deployed. It takes around ~20 mins for the whole core network to come up. NRF is exposing its service via metallb external ip-address. In case metallb ip-address pool is not properly defined in the previous section, then UPF will not be able to register to NRF and in this case SMF and UPF will not be able to communicate.

### Check Core Network Deployment

Expand Down
Binary file modified static/images/user-guides/nephio-r2-5g-network.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 9f57338

Please sign in to comment.