|
| 1 | +<!-- TOC --> |
| 2 | +* [Introduction](#introduction) |
| 3 | +* [Docker Desktop](#docker-desktop) |
| 4 | + * [Install Required Software](#install-required-software) |
| 5 | + * [Configure Kubernetes cluster in Docker Desktop](#configure-kubernetes-cluster-in-docker-desktop) |
| 6 | + * [Deploy Selenium Grid solution using Helm chart](#deploy-selenium-grid-solution-using-helm-chart) |
| 7 | + * [Deploy PVC for video recording and video manager storage.](#deploy-pvc-for-video-recording-and-video-manager-storage) |
| 8 | + * [Add Docker Selenium Helm chart repository](#add-docker-selenium-helm-chart-repository) |
| 9 | + * [Install latest chart with reference values.](#install-latest-chart-with-reference-values) |
| 10 | + * [Verify Grid installation](#verify-grid-installation) |
| 11 | + * [Browser Nodes in autoscaling from zero mode.](#browser-nodes-in-autoscaling-from-zero-mode) |
| 12 | + * [Run a test in Grid](#run-a-test-in-grid) |
| 13 | +<!-- TOC --> |
| 14 | + |
| 15 | +# Introduction |
| 16 | + |
| 17 | +This directory contains the reference values for the Helm charts in the `charts` directory. The reference values are used to test the Helm charts and ensure that they are working correctly. The reference values are stored in YAML files, which can be used to generate the expected output of the Helm charts. |
| 18 | + |
| 19 | +# Docker Desktop |
| 20 | + |
| 21 | +## Install Required Software |
| 22 | + |
| 23 | +_Note: This guide is for macOS. For other operating systems, please refer to particular tool documentation._ |
| 24 | +```sh |
| 25 | +brew install docker kubectl helm |
| 26 | +``` |
| 27 | + |
| 28 | +Verify the installation |
| 29 | +```sh |
| 30 | +java -version |
| 31 | +docker --version |
| 32 | +kubectl version --client |
| 33 | +helm version |
| 34 | +``` |
| 35 | + |
| 36 | +## Configure Kubernetes cluster in Docker Desktop |
| 37 | + |
| 38 | +Most users are able to installed Docker Desktop and start Kubernetes cluster in settings as below. |
| 39 | + |
| 40 | + |
| 41 | + |
| 42 | +If you are having a local machine with good resources, configure Docker Desktop to use more resources. Then you can install orchestration containers with autoscaling capability. |
| 43 | + |
| 44 | + |
| 45 | + |
| 46 | +Open a terminal, ensure `kubectl` is able to connect to the cluster |
| 47 | + |
| 48 | +```sh |
| 49 | +kubectl cluster-info |
| 50 | +``` |
| 51 | + |
| 52 | +## Deploy Selenium Grid solution using Helm chart |
| 53 | + |
| 54 | +#### Deploy PVC for video recording and video manager storage. |
| 55 | + |
| 56 | +Checkout file [local-pvc-docker-desktop.yaml](local-pvc-docker-desktop.yaml) |
| 57 | + |
| 58 | +```sh |
| 59 | +kubectl apply -f local-pvc-docker-desktop.yaml |
| 60 | +``` |
| 61 | + |
| 62 | +#### Add Docker Selenium Helm chart repository |
| 63 | + |
| 64 | +```sh |
| 65 | +helm repo add docker-selenium https://www.selenium.dev/docker-selenium |
| 66 | +helm repo update |
| 67 | +``` |
| 68 | + |
| 69 | +#### Install latest chart with reference values. |
| 70 | + |
| 71 | +Checkout file [simplex-docker-desktop.yaml](simplex-docker-desktop.yaml) |
| 72 | + |
| 73 | +```sh |
| 74 | +helm upgrade -i selenium docker-selenium/selenium-grid \ |
| 75 | + --namespace default \ |
| 76 | + -f simplex-docker-desktop.yaml |
| 77 | +``` |
| 78 | + |
| 79 | +#### Verify Grid installation |
| 80 | + |
| 81 | +- Grid components in cluster: `kubectl get pod -n default` |
| 82 | +- Grid UI: [http://localhost/selenium](http://localhost/selenium) |
| 83 | +- Recordings manager: [http://localhost/recordings](http://localhost/recordings) |
| 84 | + |
| 85 | +#### Browser Nodes in autoscaling from zero mode. |
| 86 | + |
| 87 | +There is no Node visible on Grid UI. The browser nodes are created on demand when a test is started. The browser nodes are automatically removed when the test is finished. |
| 88 | + |
| 89 | +#### Run a test in Grid |
| 90 | + |
| 91 | +Refer to [get_started.py](../../get_started.py) for a simple test using Python and Selenium. The test will run remotely on the Grid. |
| 92 | + |
| 93 | +- Check the Grid UI to see the test running. |
| 94 | +- Check the Recordings manager to see the video recording of the test. |
| 95 | +- Check if the test passed or failed. |
0 commit comments