Using Selenium Grid with Docker Compose

Selenium Grid combined with Docker is a simple but powerful solution to getting Selenium based infrastructure up and running quickly and easily.

Rather than dealing with the hassle of manually configuring and installing Selenium Grid we decided to go with Docker, it’s quicker and easier to use.

Our Selenium grid is used heavily for Protractor testing and to run our Jasmine unit tests on a constant cycle making sure we don’t introduce issues into our product.

The docker selenium image repositories are located at:

https://github.com/SeleniumHQ/docker-selenium

It includes instructions on how to get the containers up and running, which is great as it’s 1 docker run comamnd per container and you are up and running.

However, let’s take this further and combine it with docker compose to make using it even easier to use.

This compose file is designed to:

  1. Pull down the required images from docker hub for you.
  2. Allow easy create, start, stop and destroying the grid.
  3. Do the hard work of joining the containers together in a docker network (docker link is deprecated).
  4. Easily scale the number of Chrome or FireFox nodes.
version: '2'
services:
    selenium_hub:
        image: selenium/hub:3.0.1-aluminum
        container_name: selenium_hub
        privileged: true
        ports:
            - 4444:4444
        environment:
            - GRID_TIMEOUT=120000
            - GRID_BROWSER_TIMEOUT=120000
        networks:
            - selenium_grid_internal
    nodechrome:
        image: selenium/node-chrome-debug:3.0.1-aluminum
        privileged: true
        depends_on:
            - selenium_hub
        ports:
            - 5900
        environment:
            - no_proxy=localhost
            - TZ=Europe/London
            - HUB_PORT_4444_TCP_ADDR=selenium_hub
            - HUB_PORT_4444_TCP_PORT=4444
        networks:
            - selenium_grid_internal
    nodefirefox:
        image: selenium/node-firefox-debug:3.0.1-aluminum
        privileged: true
        depends_on:
            - selenium_hub
        ports:
            - 5900
        environment:
            - no_proxy=localhost
            - TZ=Europe/London
            - HUB_PORT_4444_TCP_ADDR=selenium_hub
            - HUB_PORT_4444_TCP_PORT=4444
        networks:
            - selenium_grid_internal
networks:
    selenium_grid_internal:

To use this docker compose file you could issue commands like:

docker-compose up -d to bring up the 3 containers and run as a background process.

However, @Yantrio, our Linux magician, a while ago came up with the idea of using Makefiles to help simplify the commands.

https://www.yantr.io/post/docker-makefiles/

Take this Makefile:

NODECHROME=5
NODEFIREFOX=1
.PHONY: default up down start stop scale
default: up
up:
    docker-compose up -d
    docker-compose scale nodechrome=$(NODECHROME) nodefirefox=$(NODEFIREFOX)
down:
    docker-compose down
start:
    docker-compose start
stop:
    docker-compose stop
# Have to restart hub due to it trying to connect to destroyed nodes
scale:
    docker-compose scale nodechrome=$(NODECHROME) nodefirefox=$(NODEFIREFOX)
    docker restart selenium_hub

It abstracts away having to remember to say put -d on the up compose command to run as a background process.

You simply can do:

make up to create and start all the containers

make down to stop and remove all the containers

make stop to just stop the containers

make start to just start the containers

But, the key win is how to scale the selenium grid.

You simply call:

make scale NODECHROME=10 NODEFIREFOX=5

To bring up another 5 Chrome containers and another 4 FireFox containers.

As docker compose will see you already have 5 Chrome containers and scale up to the requested 10 containers by making another 5.

Scaling down your grid is as simple as lowering the number of containers you require.

As the comment suggests, we restart the hub container to get around network connection timeout issues when containers disappear.

Simples!

VQ’s Partner Programme

Over the past couple of weeks we have been busy rolling out the first stage of our new partner programme.

There has been a real eagerness of the partners to come on board to help provide their customers the solution they are looking for. Many are former Acano partners who know Acano Manager well and are keen to take their existing Acano Manager customers to version 2.1 and, moving forwards, to include Acano Manager with their new Cisco Meeting Server opportunities.

Two of our resellers, DEKOM’s CEO Jorg Weisflog and InSync Technology’s CTO Stuart Moore, have spoken about their experiences of being a reseller for VQ which you can watch in the videos below. It makes us very proud of the work the team provides on a daily basis to help our partners deliver support to customers.

If you are interested in being a reseller for VQ, please contact me at gadams@vqcomms.com.

 

Introducing 2.1 Analytics…

I’ve been giving demonstrations of analytics for a while now and I thought I’d share some of my experiences with you.

Analytics in Acano Manager 2.1 was a long time coming; reporting and analytics were dropped from our 2.0 release because we were late and needed to avoid being even later.

Our objective with the Acano Manager 2.x platform was to address some of the issues we’d learned in earlier versions of Acano Manager and VQ Conference Manager.

Analytics uses some of the same techniques used elsewhere in Acano Manager 2; users are given the flexibility to select the data they want to report on, what processing should be applied to the data and then how it is to be presented (both in tabular and graph form).

It’s been really encouraging to see how well Analytics has been received. One particular report generates particular interest; it’s shows how well calls are performing and shows the calls that have alerts associated with them such as packet loss, jitter or round trip time.

One of the things that has surprised us during the years we’ve been doing this is how many people delivering video conferencing services don’t know how their service is performing. It’s less ‘data driven’ and more ‘hope driven’.

VQ Conference Manager provided previous generations of our customers with reporting tools which helped our customers avoid ‘flying blind’; we’re now really pleased that we’ve added a more flexible and extensive version, Analytics, into Acano Manager 2.

Acano Manager 2.1 is now available for all of our users, please log into the members area of vqcomms.com and download your 90 day free trial. Email licensing@vqcomms.com to get your 2.1 license needed for the download.

 

Giles

2015; another busy and successful year

We had another amazing year! I know it doesn’t look like we’ve been up to much as we’ve been so hunkered down ‘doing’ that the web-site has been seriously neglected (again).

Here’s a summary of some of the things that have been going on:

  • Acano Manager 1.x has been ‘holding the fort’ as we worked on Acano Manager 2.0.
  • Acano Manager 2.0; we’re still pre-release but now at RC4. AM 2.0 has been a massive undertaking and has completely consumed us. It does, however, look really good and will provide a fantastic platform; not only does it look good, we’ve invested heavily in automated test tools and processes which is now yielding great results. We’ll post more details along with more content on AM 2.0 (VQ 7.0 platform).
  • VQ Conference Manager 6.5; a steady stream of refinements, performance increases and TLC. 6.5 is a trusted work-horse being used by some pretty big players. Going into 2016, we’re working on some fairly major changes that’ll push scalability and performance. We’ll post more as things firm up.

Finally, a big thank you to our customers and partners.
Mike

How we use and contribute to OSS at VQ

Open source software is a key area for many developers and it is exciting that more .NET based companies are joining this world. Take for example Microsoft’s ASP.NET vNext project on Github as a sign of the times!

We’re really pleased to have finally got to the stage where we’re contributing back to the open source world. It’s small at the moment but we expect it to grow. Watch this space.

We’re now on Github at:

https://github.com/vqcomms

We look forward to your pull requests!

News catch-up…..

We haven’t posted any news items for a while and our news section looks distinctly skinny. We had an amazing 2013:

  • We restructured the team which resulted in people leaving; although this was painful at the time, we’re now seeing massive benefits.
  • We moved office; we’re now in much larger, spacier offices with loads of natural light. Fantastic!
  • We signed an OEM agreement with the major new disruptive force in video conferencing.
  • Two new major international customers became customers (Aerospace and Banking)
  • Our existing customers continued to ramp up call volumes.

2014 has started well with new customers coming on board and first versions of OEM software shipping. The team is growing with some very talented new engineers joining the team who will help accelerate the innovation we deliver.

How we use cookies

On this website we use cookies for a variety of reasons including to provide anonymised statistics for improving the customer experience.

The 3rd party services we use e.g. Youtube also might use cookies for their own analytics.

If you would like to block the usage of these cookies, please choose "Block all but essential cookies" below.