https://github.com/ddavison/selenium-openshift-templates
OpenShift Templates for a scalable Selenium infrastructure
https://github.com/ddavison/selenium-openshift-templates
Last synced: 12 months ago
JSON representation
OpenShift Templates for a scalable Selenium infrastructure
- Host: GitHub
- URL: https://github.com/ddavison/selenium-openshift-templates
- Owner: ddavison
- Created: 2016-02-01T22:48:18.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2021-09-14T23:49:53.000Z (almost 5 years ago)
- Last Synced: 2025-04-13T17:46:05.067Z (about 1 year ago)
- Language: Shell
- Homepage:
- Size: 17.6 KB
- Stars: 43
- Watchers: 6
- Forks: 64
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Selenium OpenShift Templates
===
> OpenShift Templates used for a Scalable Selenium infrastructure and these templates tested on OpenShift 4.5.8.
Usage
===
```bash
$ oc create -f selenium-hub.yaml
$ oc create -f selenium-node-chrome.yaml
$ oc create -f selenium-node-firefox.yaml
$ oc process selenium-hub | oc create -f -
$ oc process selenium-node-chrome | oc create -f -
$ oc process selenium-node-firefox | oc create -f -
```
Once all pods up and running and check the grid status with the following endpoint and you should see following output.
Hub status url: https://OCP-ROUTE/wd/hub/status
**Note:** Please replace OCP-ROUTE based on your environment.
```
{
"value": {
"ready": true,
"message": "Selenium Grid ready.",
"nodes": [
{
"id": "72eaea16-1c0a-44b2-987f-c71cc36d6a77",
"uri": "http:\u002f\u002f10.254.16.254:5555",
"maxSessions": 1,
"stereotypes": [
{
"capabilities": {
"browserName": "chrome"
},
"count": 1
}
],
"sessions": [
]
},
{
"id": "ee1d92e8-52cd-40a0-9516-cb4c424da8d8",
"uri": "http:\u002f\u002f10.254.17.0:5555",
"maxSessions": 1,
"stereotypes": [
{
"capabilities": {
"browserName": "firefox"
},
"count": 1
}
],
"sessions": [
]
}
]
}
}
```
In case you want to have VNC access to your chrome node, you need to add node chrome debug and you can follow same steps for firefox node as well.
```
$ oc create -f selenium-node-chrome-debug.yaml
```
and then to view the node via VNC, you use port forwarding to localhost.
First you get the pod of chrome debug
```
$ oc get pods
NAME READY STATUS RESTARTS AGE
selenium-hub-1-b8w96 1/1 Running 5 4d
selenium-node-chrome-debug-1-2gcqn 1/1 Running 4 3d
```
Run port forwarding
```
$ oc port-forward -p selenium-node-chrome-debug-1-2gcqn 5900:5900
Forwarding from 127.0.0.1:5900 -> 5900
Forwarding from [::1]:5900 -> 5900
Handling connection for 5900
```
```
$ vncviewer 127.0.0.1:5900
```
NB: The default password to access to VNC is `secret`. You can change it by editing the chrome debug Dockerfile following [this](https://github.com/SeleniumHQ/docker-selenium/tree/master/NodeChromeDebug#how-to-use-this-image).
Example
===



