Skip to content

Commit

Permalink
feat: configure the UATs to run behind a proxy using Notebooks (#98)
Browse files Browse the repository at this point in the history
* add poddefault and configure kfp tests

* kfp: use dict.get to avoid KeyError

* configure katib uats

* configure training uats

* add testing with proxy instructions to README
  • Loading branch information
NohaIhab authored Aug 20, 2024
1 parent 57e01e9 commit d8f63ea
Show file tree
Hide file tree
Showing 5 changed files with 1,137 additions and 1,347 deletions.
49 changes: 49 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,55 @@ tox -e kubeflow-remote
tox -e kubeflow-local
```

### Run behind proxy
#### Prerequistes
**To run the tests behind proxy using Notebook or using the driver, the following step is necessary:**

Edit the PodDefault `tests/proxy-poddefault.yaml` to replace the placeholders for:
* `<proxy_address>:<proxy_port>`: The address and port of your proxy server
* `<cluster cidr>`: you can get this value by running:
```
cat /var/snap/microk8s/current/args/kube-proxy | grep cluster-cidr
```
* `<service cluster ip range>`: you can get this value by running:
```
cat /var/snap/microk8s/current/args/kube-apiserver | grep service-cluster-ip-range
```

* `<nodes internal ip(s)>`: the Internal IP of the nodes where your cluster is running, you can
get this value by running:
```
microk8s kubectl get nodes -o wide
```
It is the `INTERNAL-IP` value
* `<hostname>`: the name of your host on which the cluster is deployed, you can use the
`hostname` command to get it

#### Running using Notebook
To run the tests behind proxy using Notebook:
1. Login to the Dashboard and Create a Profile
2. Apply the PodDefault to your Profile's namespace, make sure you already followed the Prerequisites
section to modify the PodDefault. Apply it with:
```
kubectl apply -f ./tests/proxy-poddefault.yaml -n <your_namespace>
```
3. Create a Notebook and from the `Advanced Options > Configurations` select `Add proxy settings`,
then click `Launch` to start the Notebook.
Wait for the Notebook to be Ready, then Connect to it.
4. From inside the Notebook, start a new terminal session and clone this repo:
```bash
git clone https://github.com/canonical/charmed-kubeflow-uats.git
```
Open the `charmed-kubeflow-uats/tests` directory and for each `.ipynb` test file there, open it
and run the Notebook.
Currently, the following tests are supported to run behind proxy:
* katib
* kserve
* kfp_v2
* training (except TFJob due to https://github.com/canonical/training-operator/issues/182)
#### Developer Notes
Any environment that can be used to access and configure the Charmed Kubeflow deployment is
Expand Down
Loading

0 comments on commit d8f63ea

Please sign in to comment.