GithubHelp home page GithubHelp logo

donpage / grid-composer Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 22 KB

A layer on top of Selenium Docker that exposes docker-compose commands via API (using express)

JavaScript 100.00%
selenium-grid docker-compose docker-selenium

grid-composer's Introduction

Grid Composer

Grid Composer is a layer on top of Docker-Selenium and Docker-Compose to provide API endpoints for commonly used commands for your Selenium Nodes.

API

All API methods are public by default. Passing in {token: 'secretToken'} will confirm request by checking the token parameter in the request. IE /status?token=secretToken.

Method Endpoint Docker-Compose equivalent Description
POST /start $ docker-compose up -d boot up docker containers.
POST /stop $ docker-compose down shutdown docker containers.
POST /restart $ docker-compose restart restart all docker containers.
PUT /scale/:browserName/:numberOfNodes $ docker-compose scale <browser>=<numberOfNodes> Scale up a specific browser node.
GET /status $ docker-compose ps get info on node containers.

How to use

  1. cd into the location of docker-compose.yml.
  2. clone repo: $ git clone https://github.com/DonPage/grid-composer.git . (the . is so it clones everything within in the repo.)
  3. (optional) create config.json.
  4. run $ npm install.
  5. run $ npm start.

Config options

These options should be a json format inside config.json

Option Type Default Description
maxNodes number 20 Max number of nodes that should be idle/up at any given time.
token string false token to confirm against before executing docker-compose commands. If false, all API endpoints will be open
port number 8080 The open port you want the API to listen on.

grid-composer's People

Contributors

donpage avatar

Stargazers

 avatar

Watchers

 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.