Giter Site home page Giter Site logo

kubernetes-docker-selenium's Introduction

Kubernetes-docker-selenium

Orchestrating docker-selenium via Kubernetes

Kubernetes is a platform for hosting Docker containers in a clustered environment with multiple Docker hosts. Kubernetes is a system for managing containerized applications across a cluster of nodes.

Minikube runs a single-node Kubernetes cluster inside a VM on your laptop for users looking to try out Kubernetes.Basics of Kubernetes

Kubernetes 101

  • Pod: A group of containers
  • Labels: Labels for identifying pods
  • Kubelet: Container Agent
  • etcd: A metadata service
  • Proxy: A load balancer for pods
  • Replication Controller: Manages replication of pods

Using Minikube

Running a Kubernetes environment using Minikube for simplicity purpose.

Launching selenium hub

$ kubectl run selenium-hub --image selenium/hub:3.4.0 --port 4444

Exposing selenium-hub to be able to access externally

$ kubectl expose deployment selenium-hub --type=NodePort

To Access the selenium-hub url

$ minikube service selenium-hub --url

It would show something like,
http://192.168.99.100:xxxx

Bringing up Selenium Nodes

$ kubectl run selenium-node-chrome --image selenium/node-chrome:3.4.0 --env="HUB_PORT_4444_TCP_ADDR=selenium-hub" --env="HUB_PORT_4444_TCP_PORT=4444"
$ kubectl run selenium-node-firefox --image selenium/node-firefox:3.4.0 --env="HUB_PORT_4444_TCP_ADDR=selenium-hub" --env="HUB_PORT_4444_TCP_PORT=4444"

Scaling Selenium Grid cluster

$ kubectl run selenium-node-chrome --image selenium/node-chrome:3.4.0 --env="HUB_PORT_4444_TCP_ADDR=selenium-hub" --env="HUB_PORT_4444_TCP_PORT=4444"

Using Google Container Engine

Launch a Selenium hub

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

Selenium hub as a service for nodes to connect

kubectl create -f selenium-hub-svc.yml

Bringing up Selenium nodes

Chrome

$kubectl create -f selenium-node-chrome-rc.yaml

Firefox

$kubectl create -f selenium-node-firefox-rc.yaml

Using Helm

Helm is a tool that streamlines installing and managing Kubernetes applications. Think of it like apt/yum/homebrew for Kubernetes.

  • A Helm package is bundled up as a chart.

  • Charts are Helm packages that contain at least two things:

    • A description of the package (Chart.yaml)
    • One or more templates, which contain Kubernetes manifest files
  • Charts can be stored on disk, or fetched from remote chart repositories (like Debian or RedHat packages) it users git under the hood

Helm package can be found here: helm-selenium 

To get started, its as simple as:

$ helm install stable/selenium

kubernetes-docker-selenium's People

Contributors

manoj9788 avatar wangan2017 avatar kna avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.