From 057e53c34aeafa821661959e665bab9f5776ee5b Mon Sep 17 00:00:00 2001 From: John Belamaric Date: Thu, 25 May 2023 17:49:12 -0700 Subject: [PATCH 1/4] Install kernel headers if needed --- e2e/provision/gce_run.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/e2e/provision/gce_run.sh b/e2e/provision/gce_run.sh index 14656f2e..ebfbb768 100755 --- a/e2e/provision/gce_run.sh +++ b/e2e/provision/gce_run.sh @@ -30,6 +30,8 @@ rm -f ~/.ssh/id_rsa* echo -e "\n\n\n" | ssh-keygen -t rsa -N "" cat "$HOME/.ssh/id_rsa.pub" >>"$HOME/.ssh/authorized_keys" +KVER=$(uname -r) + if ! lsmod | grep -q gtp5g; then [[ -d "$HOME/gtp5g" ]] || git clone --depth 1 -b v0.6.8 https://github.com/free5gc/gtp5g.git "$HOME/gtp5g" @@ -38,6 +40,9 @@ if ! lsmod | grep -q gtp5g; then sudo apt-get update sudo apt-get -y install gcc fi + if [[ ! -d "/lib/modules/$KVER/build" ]]; then + sudo apt-get -y install "linux-headers-$KVER" + fi make sudo make install sudo modprobe gtp5g From 13808c1abfc22dedb24baf6c91013eb794f2ade0 Mon Sep 17 00:00:00 2001 From: John Belamaric Date: Thu, 25 May 2023 18:26:36 -0700 Subject: [PATCH 2/4] Add README for GCE --- e2e/provision/README.md | 49 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 e2e/provision/README.md diff --git a/e2e/provision/README.md b/e2e/provision/README.md new file mode 100644 index 00000000..65580d6e --- /dev/null +++ b/e2e/provision/README.md @@ -0,0 +1,49 @@ +# Quick Start for GCE + +1. Create a VM: + +```bash +$ gcloud compute instances create --machine-type e2-standard-8 --boot-disk-size 50GB nephio-r1-e2e +``` + +2. SSH to the VM: + +Googlers: +```bash +$ gcloud compute ssh nephio-r1-e2e -- -o ProxyCommand='corp-ssh-helper %h %p' -L 7007:localhost:7007 +``` + +Everyone else: +```bash +$ gcloud compute ssh nephio-r1-e2e -- -L 7007:localhost:7007 +``` + +3. On the machine, run this: + +```bash +$ sudo apt-get install -y git +$ git clone https://github.com/nephio-project/test-infra.git +$ sed -e "s/vagrant/$USER/" < test-infra/e2e/provision/nephio.yaml > ~/nephio.yaml +$ cd test-infra/e2e/provision/ +$ ./gce_run.sh +$ kubectl --kubeconfig ~/.kube/mgmt-config 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 UI. + +You 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). + +Googlers: +```bash +$ gcloud compute ssh nephio-r1-e2e -- -o ProxyCommand='corp-ssh-helper %h %p' +``` + +Everyone else: +```bash +$ gcloud compute ssh nephio-r1-e2e +``` + From c68140bb9edfda151a66ec7b8793c88fb169a4ac Mon Sep 17 00:00:00 2001 From: John Belamaric Date: Thu, 25 May 2023 18:28:34 -0700 Subject: [PATCH 3/4] Increase boot disk to 60GB, as 50GB free space is needed --- e2e/provision/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/e2e/provision/README.md b/e2e/provision/README.md index 65580d6e..4903b50f 100644 --- a/e2e/provision/README.md +++ b/e2e/provision/README.md @@ -3,7 +3,7 @@ 1. Create a VM: ```bash -$ gcloud compute instances create --machine-type e2-standard-8 --boot-disk-size 50GB nephio-r1-e2e +$ gcloud compute instances create --machine-type e2-standard-8 --boot-disk-size 60GB nephio-r1-e2e ``` 2. SSH to the VM: From d5faaaadffae31baaf0846b30650b4e83adea9bd Mon Sep 17 00:00:00 2001 From: John Belamaric Date: Thu, 25 May 2023 18:30:15 -0700 Subject: [PATCH 4/4] Additional instruction for Googlers --- e2e/provision/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/e2e/provision/README.md b/e2e/provision/README.md index 4903b50f..f54b2b4f 100644 --- a/e2e/provision/README.md +++ b/e2e/provision/README.md @@ -8,7 +8,7 @@ $ gcloud compute instances create --machine-type e2-standard-8 --boot-disk-size 2. SSH to the VM: -Googlers: +Googlers (you also need to run `gcert`): ```bash $ gcloud compute ssh nephio-r1-e2e -- -o ProxyCommand='corp-ssh-helper %h %p' -L 7007:localhost:7007 ```