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

Enhancement - Allow override of selenium containers and use real DinD info #1107

Open
AndyGee opened this issue Feb 9, 2019 · 0 comments · May be fixed by #1128
Open

Enhancement - Allow override of selenium containers and use real DinD info #1107

AndyGee opened this issue Feb 9, 2019 · 0 comments · May be fixed by #1128

Comments

@AndyGee
Copy link
Contributor

AndyGee commented Feb 9, 2019

Enhancement - Allow override of selenium containers. Currently, they're added after the cubeSpecificProperties are evaluated and applied. And also determine the real container hostname/IP for a cube.

I am working on a patch, so this ticket is a heads up and allows me to create a branch name.

Issue Overview

The browser is not on DOCKER_HOST:14444 (hence dockerHost internally) in a CICD env.

When running in a CICD env it is common that the 'runners' are DIND (Docker in Docker) - This means the docker daemon is actually on the host, and the runner is mapped/mounted to use the hosts daemon.

When something like docker run -p 14444:4444 ... is executed, then the image is actually started on the host, and not in the runner. This means that the hostname/IP of the running image is NOT the host or the runner, ie. it gets its own name/ip. In this case, DOCKER_HOST is not useful.

$DOCKER_HOST:14444 <- This is not where the image service is available

172.18.0.4:14444 <- This is where the browser 'might' be.

We can inspect information from a container:

docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' container_name_or_id, so I'm guessing right now that the API will also be able to help us here to get the container IP dynamically. Another way is to configure the docker network and override the configuration.

The URL for the selenium server is then going to be something like http://containerIP:14444 - Eiter way, we need to set it dynamically or allow the cubeSpecificProperties to define overrides for the await strategy and webdriver connection etc..

Expected Behaviour

Await polls the 'real' browser host
The WebDriver (and other selenium containers) use the 'real' container host

Current Behaviour

The internal dockerHost variable is evaluated to DOCKER_HOST, which is not where the container is available.

Steps To Reproduce
  1. Run the 'browser' container on a remote machine
  2. Cube tries to call http://dockerHost:14444
Additional Information

I'll be adding my findings here as I work on the patch.

@AndyGee AndyGee changed the title Enhancement - Allow override of selenium containers Enhancement - Allow override of selenium containers and use real DinD info Mar 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant