Skip to content
This repository has been archived by the owner on Oct 22, 2024. It is now read-only.

Commit

Permalink
🚀 Do final release preparations
Browse files Browse the repository at this point in the history
  • Loading branch information
TilBlechschmidt committed Jul 31, 2020
1 parent 757232c commit 37df318
Show file tree
Hide file tree
Showing 3 changed files with 134 additions and 12 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ helm install example webgrid/webgrid
kubectl port-forward service/example-webgrid 8080:80
```

Your grid is now available at the [`localhost:8080`](http://localhost:8080/) service. Use any standard Kubernetes method to access it!
Your grid is now available at the [`localhost:8080`](http://localhost:8080/) service.

If you are deploying to a RBAC enabled cluster you might have to tweak some settings. Take a look at the [documentation](https://webgrid.dev/kubernetes/configuration/) on how to use your own ServiceAccount and PersistentVolumeClaims.

Expand Down
15 changes: 6 additions & 9 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ docker-compose up

Continue [reading below](#using-the-grid) on how to send requests to your grid.

!!! todo
The compose file refers locally built images. Replace them with hub.docker.com ones once the repository goes public!

## Kubernetes

WebGrid provides a [Helm](https://helm.sh) chart to get started as quickly as possible. Below is a guide on how to add the chart repository and install the chart.
Expand All @@ -49,7 +46,7 @@ Once you have started the grid you can send requests to it using the regular Sel
=== "Java"
```java
FirefoxOptions firefoxOptions = new FirefoxOptions();
WebDriver driver = new RemoteWebDriver(new URL("http://localhost"), firefoxOptions);
WebDriver driver = new RemoteWebDriver(new URL("http://localhost:8080"), firefoxOptions);
driver.get("http://www.google.com");
driver.quit();
```
Expand All @@ -60,7 +57,7 @@ Once you have started the grid you can send requests to it using the regular Sel

firefox_options = webdriver.FirefoxOptions()
driver = webdriver.Remote(
command_executor='http://localhost',
command_executor='http://localhost:8080',
options=firefox_options
)
driver.get("http://www.google.com")
Expand All @@ -70,7 +67,7 @@ Once you have started the grid you can send requests to it using the regular Sel
=== "C#"
```csharp
FirefoxOptions firefoxOptions = new FirefoxOptions();
IWebDriver driver = new RemoteWebDriver(new Uri("http://localhost"), firefoxOptions);
IWebDriver driver = new RemoteWebDriver(new Uri("http://localhost:8080"), firefoxOptions);
driver.Navigate().GoToUrl("http://www.google.com");
driver.Quit();
```
Expand All @@ -79,7 +76,7 @@ Once you have started the grid you can send requests to it using the regular Sel
```ruby
require 'selenium-webdriver'

driver = Selenium::WebDriver.for :remote, url: "http://localhost", desired_capabilities: :firefox
driver = Selenium::WebDriver.for :remote, url: "http://localhost:8080", desired_capabilities: :firefox
driver.get "http://www.google.com"
driver.close
```
Expand All @@ -90,7 +87,7 @@ Once you have started the grid you can send requests to it using the regular Sel
var capabilities = Capabilities.firefox();
(async function helloSelenium() {
let driver = new Builder()
.usingServer("http://localhost")
.usingServer("http://localhost:8080")
.withCapabilities(capabilities)
.build();
try {
Expand All @@ -104,7 +101,7 @@ Once you have started the grid you can send requests to it using the regular Sel
=== "Kotlin"
```kotlin
firefoxOptions = FirefoxOptions()
driver: WebDriver = new RemoteWebDriver(new URL("http://localhost"), firefoxOptions)
driver: WebDriver = new RemoteWebDriver(new URL("http://localhost:8080"), firefoxOptions)
driver.get("http://www.google.com")
driver.quit()
```
Expand Down
129 changes: 127 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,129 @@
# Home
<h1 align="center">WebGrid</h1>

Here shall be a tag line and a link to GitHub plus a link to the [Getting started](getting-started.md)
<!-- Logo & Summary -->
<p align="center">
<img width="75%" src="https://placekitten.com/882/250" alt="Banner">
</p>

<!-- Navigation -->
<p align="center">
<b>
<a href="#install">
Install
</a>
<span> | </span>
<a href="#usage">
Usage
</a>
<span> | </span>
<a href="https://webgrid.dev">
Docs
</a>
</b>
</p>

<!-- Badges -->
<p align="center">
<a href="https://github.com/TilBlechschmidt/WebGrid/blob/main/CODE_OF_CONDUCT.md">
<img src="https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg" alt="Contributor Covenant">
</a>
<a href="https://github.com/TilBlechschmidt/WebGrid/blob/main/LICENSE.md">
<img alt="GitHub" src="https://img.shields.io/github/license/TilBlechschmidt/WebGrid">
</a>

<br>

<a href="">
<img alt="Maintenance" src="https://img.shields.io/maintenance/yes/2020">
</a>
<a href="https://github.com/TilBlechschmidt/WebGrid/commits/main">
<img alt="GitHub last commit" src="https://img.shields.io/github/last-commit/TilBlechschmidt/WebGrid">
</a>

<br/>
<sub>You have an idea for a logo? <a href="https://github.com/TilBlechschmidt/WebGrid/issues/1">Submit it here!</a></sub>
</p>

---

<!-- Bullet points -->
* **Cluster ready.** Designed with concurrency, on-demand scalability and cluster operation in mind
* **Debuggable.** Provides browser screen recordings and extensive logs
* **Resilient.** Built with automatic error recovery at its core
* **[W3C Specification](https://www.w3.org/TR/webdriver1/) compilant.** Fully compatible with existing Selenium clients

---

## Install

Below are quick-start tutorials to get you started. For a more detailed guide visit the dedicated [Getting Started guide](https://webgrid.dev/getting-started/)!

### 🐳 Docker

To run a basic grid in Docker you can use Docker Compose. Below is a bare-bones example of getting all required components up and running!

```bash
# Create prerequisites
docker volume create webgrid
docker network create webgrid

# Download compose file
curl -fsSLO https://webgrid.dev/docker-compose.yml

# Launch the grid
docker-compose up
```

You can now point your Selenium client to [`localhost:8080`](http://localhost/) and browse the API at [`/api`](http://localhost/api).

### ☸️ Kube

For deployment to Kubernetes a Helm repository is available. The default values provide a good starting point for basic cluster setups like [K3s](https://k3s.io) or [microk8s](https://microk8s.io).

```bash
# Add the repository
helm repo add webgrid https://webgrid.dev/

# Install the chart
helm install example webgrid/webgrid

# Make it accessible locally for evaluation
kubectl port-forward service/example-webgrid 8080:80
```

Your grid is now available at the [`localhost:8080`](http://localhost:8080/) service.

If you are deploying to a RBAC enabled cluster you might have to tweak some settings. Take a look at the [documentation](https://webgrid.dev/kubernetes/configuration/) on how to use your own ServiceAccount and PersistentVolumeClaims.

## Usage

Once you have your grid up and running there is a couple of things you can do!

### 🚀 Launch browser instances

Point your selenium client to [`http://localhost:8080`](http://localhost:8080) to create a new browser container/pod and interact with it! You can use all features supported by Selenium.

### 🔍 Browse the API

The grid provides a GraphQL API at [`/api`](http://localhost:8080/api) with a Playground for you to explore. It exposes all available metadata about sessions, grid health and advanced features like video recordings.

### 📺 Watch your browsers

You can take a **live** look at what your browsers are doing by taking the [Session ID](https://webgrid.dev/features/screen-recording/#session-id) of a instance and visiting `localhost:8080/embed/<session-id>`. You can also embed the videos in your existing tools! Head over to the <a href="(https://webgrid.dev/features/screen-recording/#embedding">embedding documentation</a> to learn how.

!!! warning "Screen recordings in clusters"
Video recordings are disabled by default in K8s as every cluster has specific requirements for file storage. The <a href="https://webgrid.dev/kubernetes/storage/">storage documentation</a> explains how to enable it.

## Developing

If you want to build the project locally you can use the [Makefile](https://github.com/TilBlechschmidt/WebGrid/blob/main/Makefile). To create Docker images for every component and run them locally run these commands:

```bash
# Build docker images
make

# Start components in docker
make install
```

To start individual components outside of Docker or setup the development environment, see the [development environment documentation](https://webgrid.dev/contribute/dev-environment/).

0 comments on commit 37df318

Please sign in to comment.