All Projects → SrinivasanTarget → KubeGrid

SrinivasanTarget / KubeGrid

Licence: GPL-3.0 license
KubeGrid - Kubernetes way of orchestrating Docker-Selenium Grid

Projects that are alternatives of or similar to KubeGrid

Docker Selenium
Docker images for the Selenium Grid Server
Stars: ✭ 5,476 (+15545.71%)
Mutual labels:  docker-selenium, selenium-grid
Docker Selenium
[NOT MAINTAINED] Please use <https://github.com/SeleniumHQ/docker-selenium>
Stars: ✭ 1,431 (+3988.57%)
Mutual labels:  docker-selenium, selenium-grid
Zalenium
A flexible and scalable container based Selenium Grid with video recording, live preview, basic auth & dashboard.
Stars: ✭ 2,381 (+6702.86%)
Mutual labels:  docker-selenium, selenium-grid
Sample Spring Microservices Kubernetes
sample spring boot application that uses some features provided by spring cloud kubernetes, spring cloud ribbon and zuul proxy deployed on Kubernetes
Stars: ✭ 123 (+251.43%)
Mutual labels:  minikube
Awesome Kubernetes
A curated list for awesome kubernetes sources 🚢🎉
Stars: ✭ 12,306 (+35060%)
Mutual labels:  minikube
helm3-charts
Helm3 charts for Nexus IQ
Stars: ✭ 84 (+140%)
Mutual labels:  minikube
selenium-grid-docker-swarm
web scraping in parallel with Selenium Grid and Docker
Stars: ✭ 32 (-8.57%)
Mutual labels:  selenium-grid
Kubernetes Envoy Example
Teaching myself about Envoy on Kubernetes
Stars: ✭ 116 (+231.43%)
Mutual labels:  minikube
oidckube
Wrapper for minikube that provisions and integrates it with Keycloak
Stars: ✭ 40 (+14.29%)
Mutual labels:  minikube
nextjs-graphql-auth
Authentication system using NextJS, GraphQL, Apollo Client, Apollo Server, MongoDB, Nginx, Docker, Docker-Compose and Kubernetes
Stars: ✭ 27 (-22.86%)
Mutual labels:  minikube
SeleniumWebDriverWithCSharp
BDD with Selenium Webdriver and Specflow using C#
Stars: ✭ 22 (-37.14%)
Mutual labels:  selenium-grid
Devspace
DevSpace - The Fastest Developer Tool for Kubernetes ⚡ Automate your deployment workflow with DevSpace and develop software directly inside Kubernetes.
Stars: ✭ 2,559 (+7211.43%)
Mutual labels:  minikube
SHAFT ENGINE
SHAFT is an MIT licensed test automation engine. Powered by best-in-class frameworks like Selenium WebDriver, Appium & RestAssured it provides a wizard-like syntax to increase productivity, and built-in wrappers to eliminate boilerplate code and to ensure your tests are extra stable and your results are extra reliable.
Stars: ✭ 170 (+385.71%)
Mutual labels:  selenium-grid
Laravel Docker K8s
Running Laravel project using Docker and Deploying using Kubernetes
Stars: ✭ 127 (+262.86%)
Mutual labels:  minikube
drone-in-minikube
Run Drone inside minikube
Stars: ✭ 19 (-45.71%)
Mutual labels:  minikube
Kubeflow
Machine Learning Toolkit for Kubernetes
Stars: ✭ 11,028 (+31408.57%)
Mutual labels:  minikube
kubernetes-100days
Notes from 100 days with Kubernetes
Stars: ✭ 32 (-8.57%)
Mutual labels:  minikube
distributed-cache-on-k8s-poc
[PoC] Distributed Cache with Akka Cluster Sharding and Akka HTTP on Kubernetes
Stars: ✭ 15 (-57.14%)
Mutual labels:  minikube
Freshpod
Restart Pods on Minikube automatically on image rebuilds
Stars: ✭ 251 (+617.14%)
Mutual labels:  minikube
chef-selenium
Chef cookbook to install and configure Selenium
Stars: ✭ 17 (-51.43%)
Mutual labels:  selenium-grid

KubeGrid

KubeGrid - Kubernetes way of orchestrating Docker-Selenium Grid

Kubernetes

Kubernetes is an open-source system for automating deployment, scaling, and management of containerized applications.

Basics of Kubernetes

  • Pods
  • Replication controllers
  • Services
  • Deployments

pods

Basic unit of kubernetes workloads.Pod is a group of one or more containers, the shared storage for those containers, and options about how to run the containers.

Replication controllers

ReplicationController makes sure that a pod or homogeneous set of pods are always up and available.

Services

service provides a stable endpoint for group of pods managed by a replication controller

There are several ways of orchestrating a selenium grid using kubernetes

  1. Using Minikube (local solution)
  2. Using Google Container Registry (cloud solution)
    • Self-healing capability
  3. Using kompose (docker-compose equivalent)

Minikube

Minikube runs a single-node Kubernetes cluster inside a VM on your laptop for users looking to try out Kubernetes or develop with it day-to-day.

Launching selenium hub

$ kubectl run selenium-hub --image selenium/hub:3.3.1 --port 4444
deployment "selenium-hub" created
$ kubectl get pods
NAME                          READY     STATUS    RESTARTS   AGE
selenium-hub-53154924-tkz4j   1/1       Running   0          43s

Expose selenium hub to be accessible

$ kubectl expose deployment selenium-hub --type=NodePort
service "selenium-hub" exposed
$ kubectl get services
NAME           CLUSTER-IP   EXTERNAL-IP   PORT(S)          AGE
kubernetes     10.0.0.1     <none>        443/TCP          2m
selenium-hub   10.0.0.186   <nodes>       4444:32077/TCP   46s

Selenium hub Url can be accessed through,

$ minikube service selenium-hub --url
http://192.168.99.100:32077

Spin up Chrome Node

$ kubectl run selenium-node-chrome --image selenium/node-chrome:3.3.1 --env="HUB_PORT_4444_TCP_ADDR=selenium-hub" --env="HUB_PORT_4444_TCP_PORT=4444"
deployment "selenium-node-chrome" created
$   kubectl get pods
NAME                                    READY     STATUS              RESTARTS   AGE
selenium-hub-53154924-tkz4j             1/1       Running             0          7m
selenium-node-chrome-1222720312-tmx92   0/1       ContainerCreating   0          31s

Scaling

$ kubectl scale deployment selenium-node-chrome --replicas=4
deployment "selenium-node-chrome" scaled
$  kubectl get pods
NAME                                    READY     STATUS    RESTARTS   AGE
selenium-hub-53154924-tkz4j             1/1       Running   0          10m
selenium-node-chrome-1222720312-b0vvs   1/1       Running   0          9s
selenium-node-chrome-1222720312-j2xs6   1/1       Running   0          9s
selenium-node-chrome-1222720312-s7n2r   1/1       Running   0          9s
selenium-node-chrome-1222720312-tmx92   1/1       Running   0          3m

alt tag

Minikube Dashboard

$ minikube dashboard

alt tag

Using Google Container Registry

Google Container Engine is also a quick way to get Kubernetes up and running: https://cloud.google.com/container-engine/ Your cluster must have 4 CPU and 6 GB of RAM to complete the example up to the scaling portion.

Create Selenium Hub

$ kubectl create -f selenium-hub-rc.yml

Lets create a service for nodes to connect to,

$ kubectl create -f selenium-hub-service.yml

Selenium hub can be exposed to public to access the hub,

$ kubectl expose rc selenium-hub --name=selenium-hub-external --labels="app=selenium-hub,external=true" --type=LoadBalancer

Exposing a selenium hub to public is not secure and preferrable. It is intended here just for a showcase,

$ kubectl get services

Spin up Chrome & Firefox Nodes

Now since hub is up and exposed lets spin up nodes and register into hub,

$ kubectl create -f selenium-node-chrome-rc.yml
$ kubectl create -f selenium-node-firefox-rc.yml

Now nodes are up and registered to hub created above can be seen in exposed selenium-hub's console.

Self-Healing Capability

One of the greatest adavantage of kubernetes is Self healing.Though docker-swarm also supports self-healing, kubernetes is more reliable solution over a period of time due to replication controllers. To demonstrate lets get the list of pods created,

$ kubectl get pods
NAME                         READY     STATUS    RESTARTS   AGE
selenium-hub-6m8v1           1/1       Running   1          1h
selenium-node-chrome-p6fkn   1/1       Running   0          1h
selenium-node-chrome-pv46k   1/1       Running   0          1h

Let's delete a google chrome node using below command,

$ kubectl delete pod selenium-node-chrome-pv46k
pod "selenium-node-chrome-pv46k" deleted

Now again get list of pods (chrome nodes),

$ kubectl get pods
NAME                         READY     STATUS    RESTARTS   AGE
selenium-hub-6m8v1           1/1       Running   2          1h
selenium-node-chrome-p6fkn   1/1       Running   0          1h
selenium-node-chrome-phb0c   1/1       Running   0          50s

We can see that within few seconds selenium hub replication controller automatically generates a new chrome node or pod selenium-node-chrome-phb0c and assigns itself. Replication Controller is one of the greatest asset of kubernetes to manage nodes automatically in a cluster.

kompose

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].