Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the gce_run.sh to install needed Linux headers #53

Merged
merged 4 commits into from
May 26, 2023
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
49 changes: 49 additions & 0 deletions e2e/provision/README.md
Original file line number Diff line number Diff line change
@@ -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 60GB nephio-r1-e2e
```

2. SSH to the VM:

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
```

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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that this needs to be executed with sudo

Suggested change
$ kubectl --kubeconfig ~/.kube/mgmt-config port-forward --namespace=nephio-webui svc/nephio-webui 7007
$ sudo kubectl --kubeconfig ~/.kube/mgmt-config port-forward --namespace=nephio-webui svc/nephio-webui 7007

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, this works fine without sudo since it's not a privileged port.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know what happen, the one-summit repo is used by default. The CI has been changed to use the cluster-api with the DEPLOYMENT_TYPE env var.

```

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
```

5 changes: 5 additions & 0 deletions e2e/provision/gce_run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand All @@ -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
Expand Down