|
| 1 | +# Setup the local environment |
| 2 | + |
| 3 | +All the following commands must be executed in a single terminal instance. |
| 4 | + |
| 5 | +## Increase inotify Limits |
| 6 | +To prevent file monitoring issues in development environments (e.g., IDEs or file sync tools), increase inotify limits: |
| 7 | +```bash |
| 8 | +sudo sysctl fs.inotify.max_user_instances=2280 |
| 9 | +sudo sysctl fs.inotify.max_user_watches=1255360 |
| 10 | +``` |
| 11 | +## Create kind cluster |
| 12 | +```bash |
| 13 | +cat <<EOF | kind create cluster --name=kubeflow --config=- |
| 14 | +kind: Cluster |
| 15 | +apiVersion: kind.x-k8s.io/v1alpha4 |
| 16 | +nodes: |
| 17 | +- role: control-plane |
| 18 | + image: kindest/node:v1.31.0@sha256:53df588e04085fd41ae12de0c3fe4c72f7013bba32a20e7325357a1ac94ba865 |
| 19 | + kubeadmConfigPatches: |
| 20 | + - | |
| 21 | + kind: ClusterConfiguration |
| 22 | + apiServer: |
| 23 | + extraArgs: |
| 24 | + "service-account-issuer": "kubernetes.default.svc" |
| 25 | + "service-account-signing-key-file": "/etc/kubernetes/pki/sa.key" |
| 26 | +EOF |
| 27 | +``` |
| 28 | + |
| 29 | +## kubeconfig |
| 30 | +Instead of replacing your kubeconfig, we are going to set to a diff file |
| 31 | +```bash |
| 32 | +kind get kubeconfig --name kubeflow > /tmp/kubeflow-config |
| 33 | +export KUBECONFIG=/tmp/kubeflow-config |
| 34 | +``` |
| 35 | +# docker |
| 36 | +In order to by pass the docker limit issue while downloading the images. Let's use your credentials |
| 37 | +```bash |
| 38 | +docker login |
| 39 | +``` |
| 40 | + |
| 41 | +Upload the secret. The following command will return an error. You need to replace `to` with user `username` |
| 42 | +```bash |
| 43 | +kubectl create secret generic regcred \ |
| 44 | +--from-file=.dockerconfigjson=/home/to/.docker/config.json \ |
| 45 | +--type=kubernetes.io/dockerconfigjson |
| 46 | +``` |
| 47 | + |
| 48 | +# Test environment variables |
| 49 | +Replace the `/path/to` in order to match the `data-science-pipelines-operator` folder |
| 50 | +```bash |
| 51 | +export GIT_WORKSPACE=/path/to/data-science-pipelines-operator |
| 52 | +``` |
| 53 | +The image registry is required because you are running the test locally. |
| 54 | +It will build and upload the image to your repository. |
| 55 | + |
| 56 | +Replace `username` with your quay user |
| 57 | +```bash |
| 58 | +export REGISTRY_ADDRESS=quay.io/username |
| 59 | +``` |
| 60 | + |
| 61 | +# Run the test |
| 62 | +```bash |
| 63 | +sh .github/scripts/tests/tests.sh --kind |
| 64 | +``` |
0 commit comments