Contact Us
Magenic
  • What We Do
  • How We Do It
  • Our Thinking
  • Join Us
  • Our Work
  • Industries
  • Cloud
  • Software Development
  • Quality Engineering
  • DevOps
  • Strategy
  • Experience Design
  • Data & Integration
  • Advisory Services
  • Careers
  • Culture
  • Events
  • Success Stories
  • Partnerships
  • Technologies
  • Professional Services
  • Financial Services
  • Retail
  • Health Care

Scalable Selenium Grid in Kubernetes with Azure

July 25, 2019 // By Josh Wencl

I figured I’d write a step by step guide to setting up a scalable selenium grid setup in kubernetes.

I’m doing this in Azure, simply because I have unspent Azure credits from my MSDN subscription.

You’re going to need a couple of things installed before you can continue, you probably already have some of these.

  1. Git
  2. Kubectl
  3. Azure CLI

I’m using Aerokube’s Moon project as my grid setup, you can find them here.

Setup a Kubernetes Cluster in Azure

After you setup a new kubernetes service in azure, you just need the to look at the properties.

After that’s setup you just need the resource group and the service name.

Connect to the Cluster

Kubectl is going to handle setting up our cluster, but we need to setup a configuration for this first.  You can do this without the azure cli, but the azure cli makes it incredible easy to set this configuration up.

So start by logging in with the cli.

az login

It will open up your default web-browser to finish the login process.

Now we need to run another command to setup a configuration for kubectl to use.

Replace the name and resource group with your own.

az aks get-credentials -g <your resource group> -n <your service name>

This will add everything you need to your kubectl config.

This is the only thing we needed the azure cli for.

Clone the Aerokube/Moon Repository

You will have to clone the Aerokube/Moon repository, the command do that is this.

git clone https://github.com/aerokube/moon-deploy.git

This will create a local repo in whichever directory you’re in.

finally, cd into the moon-deploy directory.

cd moon-deploy

Create Moon Pod

The last thing we’ll need to do is setup our pod, the talented people at Aerokube included a manifest file you can use to apply your configuration.  So you only have to reference the manifest file to start it.

kubectl apply -f moon.yaml

This will setup moon for you.  This will take about 2 minutes, so go get a drink while you wait.

You’ll see that its ready using the get svc command, once it has an external ip you’re ready to start testing.

kubectl get svc -n moon

Testing Your Cloud Hosted Hub

The UI for Selenoid is forwarded to port 8080, the hub is on port 4444.

You can open up a browser and navigate to the site to see if its accessible publicly.

http://external-ip:8080
http://external-ip:4444/wd/hub

If you can access both of those, you’re ready to run tests!

TL;DR

az login
az aks get-credentials -g K8Moon -n K8Moon
git clone https://github.com/aerokube/moon-deploy.git
cd moon-deploy
kubectl apply -f moon.yaml

Categories // Technology
Tags Kubernetes, Selenium Grid
SHARE:
THE LATEST:
  • FEBRUARY 23, 2021 // blog
    Stronger Product Owner = Better Software, Faster
  • FEBRUARY 19, 2021 // blog
    Security In Five Bi-Weekly Roundup – 2/19/21
  • FEBRUARY 18, 2021 // blog
    Doesn’t Everybody Know This?
Featured Content:
  • JANUARY 25, 2021 // White Paper
    The Top 7 Technology Trends of 2021

Related Posts

Podcast
Tech Consulting Fastcast 13: Top Technology Trends 2021
Learn More
Blog
The Value of Code Reviews
Learn More
Podcast
Security In Five Bi-Weekly Roundup – 11/27/20
Learn More
Podcast
Tech Consulting Fastcast 12: Security
Learn More

Ready to speak with our experts?

Have a question?

This field is required
This field is required
This field is required
This field is required

Thanks for Contacting Magenic

One of our experts will be contacting you directly within the next business day.

Return To Home
Magenic

info@magenic.com+1.877.277.1044

  • Facebook
  • Twitter
  • LinkedIn
  • YouTube
  • RSS Feed

© Magenic Inc.Privacy NoticeTerms & ConditionsSitemap