CloudBeat Playwright-Cucumber Agent - Docker Deployment Guide
1. Overview
The deployment consists of two containers:
cb.controller.cucumberjs— The CloudBeat test controller and Playwright-Cucumber runner. Connects to the CloudBeat Gateway, executes tests, and reports results.
playwright-browsers — A standalone Playwright browser server (official Microsoft image). Hosts browser engines and exposes them via WebSocket on port 3000 (the controller does not embed browsers. It connects to the browser container over WebSocket, allowing independent version upgrades and scaling).
2. Prerequisites
AWS Instance Requirements
OS
Ubuntu 22.04 LTS and later (officially supported by CB) or Amazon Linux 2023 (no official support by CB team)
CPU
4 vCPUs (x86 architecture)
Memory
8 GB RAM (16 GB recommended)
Storage
50 GB SSD (gp3)
Actual hardware requirements depend on the number of required parallel tests.
Network Access
Outbound: All outbound ports should be open.
Inbound: No inbound ports need to be opened. The controller initiates all connections outbound.
3. Setup
3.1 Install Docker
Please refer to the official Docker documentation.
3.2 Create Working Directory
3.3 Create .env File
Create a .env file with your CloudBeat configuration. Replace placeholder values with the credentials provided by CloudBeat:
3.4 Environment Variables Reference
PW_VERSION
Playwright version for the browser container (e.g. 1.57.0)
CB_CONTROLLER_API_KEY
API key for authenticating with the Gateway
CB_CONTROLLER_AGENT_ID
Unique agent identifier assigned by CloudBeat
CB_CONTROLLER_LOCATION_KEY
Location key for this runner instance
CB_CONTROLLER_LOCATION_NAME
Human-readable name for this location
CB_CONTROLLER_GATEWAY_URL
CloudBeat Gateway URL
CB_CONTROLLER_PARALLEL_TESTS
Maximum number of parallel tests (default: 2)
3.5 Create docker-compose.yml
Place the provided docker-compose.yml file in /opt/cloudbeat/. The complete file is included in the Reference section below.
4. Deployment
Start Services
Verify
Both services should show status "Up" with playwright-browsers showing "healthy".
Look for log entries confirming successful connection to the CloudBeat Gateway.
Run a Test
Trigger a test run from the CloudBeat web interface. Monitor in real time:
5. Upgrading Playwright Version
Update
PW_VERSIONin your.envfileRecreate the browser container:
Important: The Playwright version in the browser container must match the version used in your test projects.
6. Upgrading the Controller
Important: It is recommended to update the controller periodically to benefit from the latest fixes and improvements. If a specific version is required due to a CloudBeat Gateway update, the CloudBeat team will notify you in advance
7. Docker Compose File
Last updated