Giter VIP home page Giter VIP logo

aerokube / moon Goto Github PK

View Code? Open in Web Editor NEW
211.0 8.0 18.0 6.71 MB

Browser automation solution for Kubernetes and Openshift supporting Selenium, Playwright, Puppeteer and Cypress

Home Page: http://aerokube.com/moon/latest

License: Apache License 2.0

HTML 100.00% Shell 0.01%
selenium selenium-webdriver kubernetes selenium-grid moon openshift playwright chrome-devtools-protocol cypress-io on-premises puppeteer

moon's Introduction

Moon

Docker Pulls

Moon is a commercial closed-source solution for organizing browser automation infrastructure. It is fully compatible with Selenium, Playwright, Cypress and Puppeteer. Moon is using Kubernetes or Openshift to launch browsers.

Moon Animation

Pricing Model

  • The only limitation that determines final Moon price is the total number of browser pods being run in parallel.
  • You can run up to 4 (four) parallel pods for free. Everything on top of free limit is paid as a subscription.
  • Detailed pricing information is available in respective documentation section.
  • You can obtain a free evaluation license key on our web-site.

Free Support

Features

The main idea behind Moon is to be easily installable and require zero maintenance.

One-command Installation

Having a running Kubernetes cluster and Helm configured to use it, you can launch free Moon cluster by typing commands below:

$ helm repo add aerokube https://charts.aerokube.com/
$ helm repo update
$ helm upgrade --install --create-namespace -n moon moon aerokube/moon2

See our documentation for more installation options.

Automatic Browser Management

Browsers

  • We maintain ready to use images for Firefox, Chrome, Opera and Android.
  • New browser versions are automatically accessible right after releases.

Scalability and Fault Tolerance

  • Your cluster size is automatically determined by Kubernetes depending on the load.
  • Moon is completely stateless and allows to run an unlimited number of replicas behind load balancer.
  • No additional configuration is required to add a new Moon replica.
  • User requests are not lost even in case of an accidental crash or downtime of the replica.

Efficient and Lightning Fast

  • Moon is implemented using lightning fast Golang.
  • One Moon replica consumes 0.5 CPU and 512 Mb RAM maximum.
  • One Moon replica is able to work with thousands of running sessions.

Logs and Video

  • You can access live browser screen and logs for debugging purposes during test run.
  • Any browser session can be saved to a video file using desired codec, frame rate and screen size.
  • Logs and video files can be automatically uploaded to S3-compatible storage.

Complete Guide

Complete reference guide can be found at: http://aerokube.com/moon/latest/

Users

Ozon.ru Frontier Car Group SocialTech Showpad

moon's People

Contributors

aandryashin avatar fote avatar lanwen avatar robot-bucket avatar vania-pooh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

moon's Issues

Use latest for pod containers in aerokube/moon:latest

3:05:26 PM  Normal  Pulling   pulling image "aerokube/defender:cad1da0af14ee43856ce3ca635daf0e79ebb1fef"
3 times in the last minute
3:05:26 PM  Warning  Failed   Failed to pull image "aerokube/logger:cad1da0af14ee43856ce3ca635daf0e79ebb1fef": rpc error: code = 2 desc = manifest unknown: manifest unknown
2 times in the last minute
3:05:21 PM  Warning  Failed   Failed to pull image "aerokube/uploader:cad1da0af14ee43856ce3ca635daf0e79ebb1fef": rpc error: code = 2 desc = manifest unknown: manifest unknown
2 times in the last minute
3:05:21 PM  Normal  Pulling   pulling image "aerokube/logger:cad1da0af14ee43856ce3ca635daf0e79ebb1fef"
2 times in the last minute
3:05:18 PM  Normal  Pulling   pulling image "aerokube/uploader:cad1da0af14ee43856ce3ca635daf0e79ebb1fef"
2 times in the last minute
3:05:05 PM  Warning  Failed   Failed to pull image "aerokube/defender:cad1da0af14ee43856ce3ca635daf0e79ebb1fef": rpc error: code = 2 desc = manifest unknown: manifest unknown
2 times in the last minute
3:04:58 PM  Normal  Back off   Back-off pulling image "aerokube/uploader:cad1da0af14ee43856ce3ca635daf0e79ebb1fef"

Video uploading does not work

Environment: Kubernetes on AWS + Amazon S3. Everything configured according to moon documentation, moon logs do not contain any error messages.

Chrome:
Running tests with enableVideo results in creation of new folrders in S3 with selenium logs only.
screen shot 2018-08-15 at 10 14 44 am

Firefox:
Firefox produces some default .mp4 files wth 1mb size regardless of test session time and it looks like video is broken, not ablt to play via Quicktime or VLC.
screen shot 2018-08-15 at 10 16 13 am

Also, strange behavior when enableVideo=true for FF and I'm trying to redefine videoFrameRate - it applies neither a string nor int value, returning an exception:

org.openqa.selenium.WebDriverException: parse request: json: cannot unmarshal number into Go struct field caps.videoFrameRate of type string 

or

org.openqa.selenium.WebDriverException: json: cannot unmarshal string into Go struct field Caps.videoFrameRate of type uint16 

So the only option to leave this value as default.

Add /results API

Input:

{
    filters: [{
            field: "",
            "value": "",
            "query": "future?"
        }
    ]
}

Output SSE for every connected client:

FilteredSessions[]

export type FilteredSessions = {
    readonly id: string,
    readonly stats: FilteredStats,
    readonly filters: SessionsFilter[],
    readonly sessions: Session[],
};

NPE related to VNC or logs

2017/11/27 13:10:11 [VNC_SESSION] [chrome-59-0-c5d7ab16-e2dc-4614-b553-33e0fc204cf9]
2017/11/27 13:10:11 [LOGS_SESSION] [chrome-59-0-c5d7ab16-e2dc-4614-b553-33e0fc204cf9]
2017/11/27 13:10:11 http: panic serving 10.80.211.128:43988: runtime error: invalid memory address or nil pointer dereference
goroutine 985 [running]:
net/http.(*conn).serve.func1(0xc4202e6fa0)
	/usr/local/go/src/net/http/server.go:1697 +0xd0
panic(0x11bf500, 0x1b7f0b0)
	/usr/local/go/src/runtime/panic.go:491 +0x283
main.logs(0xc4201963f0)
	/go/src/github.com/aandryashin/s8d/cmd/moon-api/moon-api.go:111 +0x1f2
github.com/aandryashin/s8d/cmd/moon-api/vendor/golang.org/x/net/websocket.Server.serveWebSocket(0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
	/go/src/github.com/aandryashin/s8d/cmd/moon-api/vendor/golang.org/x/net/websocket/server.go:89 +0x181
github.com/aandryashin/s8d/cmd/moon-api/vendor/golang.org/x/net/websocket.Handler.ServeHTTP(0x1385470, 0x1b39e80, 0xc4203702a0, 0xc420446400)
	/go/src/github.com/aandryashin/s8d/cmd/moon-api/vendor/golang.org/x/net/websocket/server.go:112 +0xb4
net/http.(*ServeMux).ServeHTTP(0xc4202fcea0, 0x1b39e80, 0xc4203702a0, 0xc420446400)
	/usr/local/go/src/net/http/server.go:2254 +0x130
net/http.serverHandler.ServeHTTP(0xc420190f70, 0x1b39e80, 0xc4203702a0, 0xc420446400)
	/usr/local/go/src/net/http/server.go:2619 +0xb4
net/http.(*conn).serve(0xc4202e6fa0, 0x1b3acc0, 0xc420061500)
	/usr/local/go/src/net/http/server.go:1801 +0x71d
created by net/http.(*Server).Serve
	/usr/local/go/src/net/http/server.go:2720 +0x288
2017/11/27 13:10:24 [VNC_ERROR] [dial tcp 10.81.123.136:5900: getsockopt: connection timed out]
2017/11/27 13:10:27 [VNC_ERROR] [dial tcp 10.81.164.214:5900: getsockopt: connection timed out]
2017/11/27 13:11:42 [WEBSOCKET_CLIENT_DISCONNECTED] [chrome-59-0-dd9f2ed5-835a-48a4-9488-751eb2ace45f]

Add /suggest API

Frontend types
Input: string, e.g. key1=value1 key2=value2 with OR
Output:

{
    suggested: [
        {
            "key": "ID",
            "value": "<user-input>",
            "size": 15,
            "type": "Capability"
        }
    ]
}

image 2018-03-15 16 28 56

Session freezes after creation

kubectl logs moon-d45878ddf-b7pxs
2018/03/19 13:14:31 guest access is supported as user "browsers"
2018/03/19 13:14:31 S3 storage is not configured, content upload is unavailable.
2018/03/19 13:14:31 Limiting simultaneous browser sessions to 4 because of: open license/license.key: no such file or directory
2018/03/19 13:14:31 Moon is now working properly
2018/03/19 13:35:33 [SESSION_ATTEMPTED]
2018/03/19 13:35:33 [CREATING_POD] [chrome-64-0-d797fd05-95cf-4990-a3e9-c4bb287cb8db]
2018/03/19 13:35:33 [CREATING_SERVICE] [chrome-64-0-d797fd05-95cf-4990-a3e9-c4bb287cb8db]
2018/03/19 13:35:33 [POD_CREATED] [chrome-64-0-d797fd05-95cf-4990-a3e9-c4bb287cb8db]
2018/03/19 13:35:33 [SERVICE_CREATED] [chrome-64-0-d797fd05-95cf-4990-a3e9-c4bb287cb8db]
2018/03/19 13:35:33 [AWAITING_SERVICE] [chrome-64-0-d797fd05-95cf-4990-a3e9-c4bb287cb8db]
2018/03/19 13:35:49 [CLIENT_DISCONNECTED] [172.17.0.1]
2018/03/19 13:35:49 [DELETING_SERVICE] [chrome-64-0-d797fd05-95cf-4990-a3e9-c4bb287cb8db]
2018/03/19 13:35:49 http: proxy error: context canceled
2018/03/19 13:35:49 [DELETING_POD] [chrome-64-0-d797fd05-95cf-4990-a3e9-c4bb287cb8db]
2018/03/19 13:35:49 [POD_DELETED] [chrome-64-0-d797fd05-95cf-4990-a3e9-c4bb287cb8db]
2018/03/19 13:35:49 [SERVICE_DELETED] [chrome-64-0-d797fd05-95cf-4990-a3e9-c4bb287cb8db]
2018/03/19 13:38:34 [SESSION_ATTEMPTED]
2018/03/19 13:38:34 [CREATING_POD] [chrome-64-0-1b4996b7-09f5-40c1-b055-33e6cccbf281]
2018/03/19 13:38:34 [CREATING_SERVICE] [chrome-64-0-1b4996b7-09f5-40c1-b055-33e6cccbf281]
2018/03/19 13:38:34 [SERVICE_CREATED] [chrome-64-0-1b4996b7-09f5-40c1-b055-33e6cccbf281]
2018/03/19 13:38:34 [POD_CREATED] [chrome-64-0-1b4996b7-09f5-40c1-b055-33e6cccbf281]
2018/03/19 13:38:34 [AWAITING_SERVICE] [chrome-64-0-1b4996b7-09f5-40c1-b055-33e6cccbf281]
2018/03/19 13:38:57 [SERVICE_IS_UP] [chrome-64-0-1b4996b7-09f5-40c1-b055-33e6cccbf281]
2018/03/19 13:38:57 [SESSION_CREATED] [23.291970873s]
2018/03/19 13:41:52 [SESSION_ATTEMPTED]
2018/03/19 13:41:52 [CREATING_POD] [chrome-64-0-ca696ec5-244a-4c74-8511-ec41bef2fa0a]
2018/03/19 13:41:52 [CREATING_SERVICE] [chrome-64-0-ca696ec5-244a-4c74-8511-ec41bef2fa0a]
2018/03/19 13:41:52 [POD_CREATED] [chrome-64-0-ca696ec5-244a-4c74-8511-ec41bef2fa0a]
2018/03/19 13:41:52 [SERVICE_CREATED] [chrome-64-0-ca696ec5-244a-4c74-8511-ec41bef2fa0a]
2018/03/19 13:41:52 [AWAITING_SERVICE] [chrome-64-0-ca696ec5-244a-4c74-8511-ec41bef2fa0a]
2018/03/19 13:42:28 [SERVICE_IS_UP] [chrome-64-0-ca696ec5-244a-4c74-8511-ec41bef2fa0a]
2018/03/19 13:42:28 [SESSION_CREATED] [35.381005462s]
2018/03/19 14:14:31 Limiting simultaneous browser sessions to 4 because of: open license/license.key: no such file or directory
2018/03/19 14:14:31 Moon is now working properly

Tests timeout and browser pods remain running. Seems to be an issue in proxying logic, e.g. somewhere near cleanup logic.

Panic in Defender service

Defender log

2018/06/06 09:47:36 execute http request: Delete http://moon:4444/wd/hub/session/chrome-65-0-d6e16aee-2122-4568-b85e-2a7062e39d5b: context deadline exceeded
2018/06/06 09:47:36 http: proxy error: context canceled
2018/06/06 09:47:40 http: panic serving 192.168.13.1:47142: close of closed channel
goroutine 37 [running]:
net/http.(*conn).serve.func1(0xc42012e1e0)
	/usr/local/go/src/net/http/server.go:1697 +0xd0
panic(0x67ee80, 0x705bd0)
	/usr/local/go/src/runtime/panic.go:491 +0x283
main.(*Expiration).On(0x849cb0, 0xdf8475800, 0x6e48b8)
	/go/src/github.com/aandryashin/moon/cmd/defender/defender.go:149 +0x110
main.mux.func3(0xc42049c200)
	/go/src/github.com/aandryashin/moon/cmd/defender/defender.go:124 +0xe9
net/http/httputil.(*ReverseProxy).ServeHTTP(0xc42004e5c0, 0x816f80, 0xc42049e0e0, 0xc42049c100)
	/usr/local/go/src/net/http/httputil/reverseproxy.go:169 +0x17c
net/http.(*ServeMux).ServeHTTP(0xc42000f3e0, 0x816f80, 0xc42049e0e0, 0xc42049c100)
	/usr/local/go/src/net/http/server.go:2254 +0x130
net/http.serverHandler.ServeHTTP(0xc420120340, 0x816f80, 0xc42049e0e0, 0xc42049c100)
	/usr/local/go/src/net/http/server.go:2619 +0xb4
net/http.(*conn).serve(0xc42012e1e0, 0x817440, 0xc42004e640)
	/usr/local/go/src/net/http/server.go:1801 +0x71d
created by net/http.(*Server).Serve
	/usr/local/go/src/net/http/server.go:2720 +0x288

and so on

2018/06/06 09:47:40 http: panic serving 192.168.13.1:49076: close of closed channel
goroutine 4789 [running]:
net/http.(*conn).serve.func1(0xc42041a000)
	/usr/local/go/src/net/http/server.go:1697 +0xd0
panic(0x67ee80, 0x705bd0)
	/usr/local/go/src/runtime/panic.go:491 +0x283
main.(*Expiration).On(0x849cb0, 0xdf8475800, 0x6e48b8)
	/go/src/github.com/aandryashin/moon/cmd/defender/defender.go:149 +0x110
main.mux.func3(0xc42016e100)
	/go/src/github.com/aandryashin/moon/cmd/defender/defender.go:124 +0xe9
net/http/httputil.(*ReverseProxy).ServeHTTP(0xc42004e5c0, 0x816f80, 0xc4203da000, 0xc42016e000)
	/usr/local/go/src/net/http/httputil/reverseproxy.go:169 +0x17c
net/http.(*ServeMux).ServeHTTP(0xc42000f3e0, 0x816f80, 0xc4203da000, 0xc42016e000)
	/usr/local/go/src/net/http/server.go:2254 +0x130
net/http.serverHandler.ServeHTTP(0xc420120340, 0x816f80, 0xc4203da000, 0xc42016e000)
	/usr/local/go/src/net/http/server.go:2619 +0xb4
net/http.(*conn).serve(0xc42041a000, 0x817440, 0xc4201ce080)
	/usr/local/go/src/net/http/server.go:1801 +0x71d
created by net/http.(*Server).Serve
	/usr/local/go/src/net/http/server.go:2720 +0x288
2018/06/06 09:47:50 http: panic serving 192.168.13.1:49158: close of closed channel
goroutine 4777 [running]:
net/http.(*conn).serve.func1(0xc4204ee140)
	/usr/local/go/src/net/http/server.go:1697 +0xd0
panic(0x67ee80, 0x705bd0)
	/usr/local/go/src/runtime/panic.go:491 +0x283
main.(*Expiration).On(0x849cb0, 0xdf8475800, 0x6e48b8)
	/go/src/github.com/aandryashin/moon/cmd/defender/defender.go:149 +0x110
main.mux.func3(0xc42032c300)
	/go/src/github.com/aandryashin/moon/cmd/defender/defender.go:124 +0xe9
net/http/httputil.(*ReverseProxy).ServeHTTP(0xc42004e5c0, 0x816f80, 0xc4204e6000, 0xc42032c200)
	/usr/local/go/src/net/http/httputil/reverseproxy.go:169 +0x17c
net/http.(*ServeMux).ServeHTTP(0xc42000f3e0, 0x816f80, 0xc4204e6000, 0xc42032c200)
	/usr/local/go/src/net/http/server.go:2254 +0x130
net/http.serverHandler.ServeHTTP(0xc420120340, 0x816f80, 0xc4204e6000, 0xc42032c200)
	/usr/local/go/src/net/http/server.go:2619 +0xb4
net/http.(*conn).serve(0xc4204ee140, 0x817440, 0xc42009a600)
	/usr/local/go/src/net/http/server.go:1801 +0x71d
created by net/http.(*Server).Serve
	/usr/local/go/src/net/http/server.go:2720 +0x288

Full log https://pastebin.com/ZRuDEvuq

Add htpasswd authentication support

  1. Should read an encrypted htpasswd users list from a secret like Ggr does from the file.
  2. Authentication should be required based on this data.
  3. Should still have guest account support.

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.