Skip to content

Commit 62fb9fb

Browse files
[sandbox/docs/cueweb/rest_gateway] Add full stack sandbox deployment with CueWeb and REST Gateway
- Add deploy_opencue_full.sh script for one-command full stack deployment - Add docker-compose.full.yml with all services (db, flyway, cuebot, rqd, rest-gateway, cueweb) - Update cueweb/Dockerfile to use ARG for NEXT_PUBLIC_* variables (build-time override) - Add CueWeb reference documentation (docs/_docs/reference/cueweb.md) - Add REST Gateway quick start guide (docs/_docs/quick-starts/quick-start-rest-gateway.md) - Update sandbox-testing.md with full stack deployment instructions and desktop client tools - Update sandbox/README.md with full stack deployment section Services deployed by full stack: - PostgreSQL database (port 5432) - Flyway migrations - Cuebot server (port 8443) - RQD render daemon (port 8444) - REST Gateway (port 8448) - CueWeb UI (port 3000)
1 parent 7372825 commit 62fb9fb

File tree

7 files changed

+1769
-42
lines changed

7 files changed

+1769
-42
lines changed

cueweb/Dockerfile

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,18 @@ ENV LDAP_CERTIFICATE=tobeoverriden
6262
ENV LDAP_URI=tobeoverriden
6363

6464
# The following environment variables need to be accurately defined during production or dev builds as their
65-
# values cannot be changed after build time
66-
ENV NEXT_PUBLIC_URL=tobeoverriden
67-
ENV NEXT_PUBLIC_OPENCUE_ENDPOINT=tobeoverriden
68-
ENV NEXT_PUBLIC_AUTH_PROVIDER=google,okta,github,ldap
65+
# values cannot be changed after build time. Use ARG to allow override at build time.
66+
ARG NEXT_PUBLIC_URL=http://localhost:3000
67+
ENV NEXT_PUBLIC_URL=${NEXT_PUBLIC_URL}
68+
69+
ARG NEXT_PUBLIC_OPENCUE_ENDPOINT=http://localhost:8448
70+
ENV NEXT_PUBLIC_OPENCUE_ENDPOINT=${NEXT_PUBLIC_OPENCUE_ENDPOINT}
71+
72+
# Authentication providers - use ARG to allow override at build time
73+
# Set to empty string to disable authentication (sandbox mode)
74+
# Set to comma-separated list for production (e.g., "google,okta,github,ldap")
75+
ARG NEXT_PUBLIC_AUTH_PROVIDER=google,okta,github,ldap
76+
ENV NEXT_PUBLIC_AUTH_PROVIDER=${NEXT_PUBLIC_AUTH_PROVIDER}
6977

7078
RUN npm run build
7179
CMD ["npm", "run", "start"]

docs/_docs/developer-guide/sandbox-testing.md

Lines changed: 217 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,13 @@ layout: default
66
date: 2025-08-06
77
description: >
88
Learn how to quickly set up and use the OpenCue sandbox environment
9-
for local testing and development with Cuebot, RQD, CueGUI, and CueSubmit.
9+
for local testing and development with Cuebot, RQD, CueGUI, CueSubmit, CueWeb, REST Gateway,
10+
CueAdmin, CueCmd, CueMan, CueNimby, PyCue, and PyOutline.
1011
---
1112

1213
# Using the OpenCue Sandbox for Testing
1314

14-
The OpenCue sandbox provides a quick way to run Cuebot, RQD, CueGUI, and CueSubmit locally for testing. This environment is ideal for developers who want to test changes, experiment with features, or learn how OpenCue works without setting up a full production environment.
15+
The OpenCue sandbox provides a quick way to run the complete OpenCue stack locally for testing. This environment is ideal for developers who want to test changes, experiment with features, or learn how OpenCue works without setting up a full production environment.
1516

1617
## Prerequisites
1718

@@ -20,7 +21,16 @@ Before starting, ensure you have:
2021
- Docker and Docker Compose installed ([Get Docker](https://docs.docker.com/get-docker/))
2122
- Git for cloning the repository
2223

23-
## Installation Steps
24+
## Deployment Options
25+
26+
The sandbox supports two deployment modes:
27+
28+
| Mode | Services | Use Case |
29+
|------|----------|----------|
30+
| **Basic** | db, flyway, cuebot, rqd | Quick testing with desktop GUI clients |
31+
| **Full Stack** | db, flyway, cuebot, rqd, rest-gateway, cueweb | Complete deployment including web UI |
32+
33+
## Basic Sandbox Setup
2434

2535
### 1. Install the OpenCue Client Packages
2636

@@ -47,7 +57,7 @@ This script will:
4757
- Set up PyCue, PyOutline, CueGUI, and CueSubmit
4858
- Configure dependencies required for local development
4959

50-
### 3. Start the Sandbox
60+
### 3. Start the Basic Sandbox
5161

5262
You'll need to run services in multiple terminal windows:
5363

@@ -84,7 +94,163 @@ cuesubmit &
8494

8595
CueSubmit is the job submission interface where you can create and submit render jobs to the farm.
8696

87-
### 4. Submit a Test Job
97+
## Full Stack Deployment
98+
99+
For a complete sandbox deployment (Cuebot, DB, Flyway, RQD, REST Gateway, and CueWeb), use the full stack deployment script.
100+
101+
### Quick Start
102+
103+
The easiest way to deploy the full stack:
104+
105+
```bash
106+
# From the OpenCue root directory
107+
./sandbox/deploy_opencue_full.sh
108+
```
109+
110+
This script will:
111+
- Build all required Docker images (Cuebot, REST Gateway, CueWeb)
112+
- Generate a JWT secret for authentication
113+
- Start all services (db, flyway, cuebot, rqd, rest-gateway, cueweb)
114+
- Display access URLs
115+
116+
### Services Deployed
117+
118+
The full stack deployment includes:
119+
120+
| Service | Port | Description |
121+
|---------|------|-------------|
122+
| **db** | 5432 | PostgreSQL database for storing OpenCue data |
123+
| **flyway** | - | Database migration tool for schema management |
124+
| **cuebot** | 8443 | The OpenCue server that manages jobs, frames, and hosts |
125+
| **rqd** | 8444 | The render queue daemon that runs on render hosts |
126+
| **rest-gateway** | 8448 | HTTP/REST API gateway for web access |
127+
| **cueweb** | 3000 | Web UI for monitoring and managing OpenCue |
128+
129+
### Access Services
130+
131+
Once deployed, access the services at:
132+
133+
- **CueWeb UI**: [http://localhost:3000](http://localhost:3000)
134+
- **REST Gateway**: [http://localhost:8448](http://localhost:8448)
135+
- **Cuebot gRPC**: localhost:8443
136+
- **PostgreSQL**: localhost:5432
137+
138+
**Note:** Replace `localhost` with the correct hostname or IP address if accessing from a different machine.
139+
140+
### Using Desktop Client Tools
141+
142+
The full stack deployment works with all OpenCue desktop client tools. To use them alongside CueWeb, install the client packages in a Python virtual environment:
143+
144+
```bash
145+
# Create and activate virtual environment
146+
python3 -m venv sandbox-venv
147+
source sandbox-venv/bin/activate # On Windows: sandbox-venv\Scripts\activate
148+
149+
# Install all OpenCue client packages from source
150+
./sandbox/install-client-sources.sh
151+
```
152+
153+
This installs the following tools:
154+
155+
| Tool | Description |
156+
|------|-------------|
157+
| **CueGUI** | Desktop GUI for monitoring and managing jobs, hosts, and the render farm |
158+
| **CueSubmit** | Desktop GUI for submitting render jobs |
159+
| **CueAdmin** | CLI tool for system administrators managing render farm infrastructure |
160+
| **CueCmd** | CLI tool for job management operations |
161+
| **CueMan** | Advanced CLI tool for batch job management and control |
162+
| **CueNimby** | Tool for managing host availability (Not In My Back Yard) |
163+
| **PyCue** | Python API library for programmatic OpenCue access |
164+
| **PyOutline** | Python library for building job outlines programmatically |
165+
166+
Once installed, launch the desktop tools:
167+
168+
```bash
169+
# Launch CueGUI for job monitoring
170+
cuegui &
171+
172+
# Launch CueSubmit for job submission
173+
cuesubmit &
174+
175+
# Use CLI tools
176+
cueadmin -lh # List hosts
177+
cuecmd -h # Show available commands
178+
cueman -h # Show cueman help
179+
```
180+
181+
### Managing the Full Stack
182+
183+
```bash
184+
# Check service status
185+
./sandbox/deploy_opencue_full.sh status
186+
187+
# View logs
188+
./sandbox/deploy_opencue_full.sh logs
189+
190+
# View specific service logs
191+
./sandbox/deploy_opencue_full.sh logs cuebot
192+
./sandbox/deploy_opencue_full.sh logs rqd
193+
./sandbox/deploy_opencue_full.sh logs cueweb
194+
./sandbox/deploy_opencue_full.sh logs rest-gateway
195+
196+
# Stop all services
197+
./sandbox/deploy_opencue_full.sh down
198+
199+
# Rebuild and restart
200+
./sandbox/deploy_opencue_full.sh build
201+
./sandbox/deploy_opencue_full.sh up
202+
203+
# Clean up everything (removes volumes and images)
204+
./sandbox/deploy_opencue_full.sh clean
205+
```
206+
207+
### Manual Full Stack Deployment
208+
209+
If you prefer manual deployment:
210+
211+
```bash
212+
# 1. Create required directories
213+
mkdir -p /tmp/rqd/logs /tmp/rqd/shots
214+
215+
# 2. Generate a JWT secret
216+
export JWT_SECRET=$(openssl rand -base64 32)
217+
218+
# 3. Build the images
219+
docker build -t opencue/cuebot -f cuebot/Dockerfile .
220+
docker build -t opencue/rest-gateway:latest -f rest_gateway/Dockerfile .
221+
docker build -t opencue/cueweb:latest ./cueweb
222+
223+
# 4. Start the full stack
224+
docker compose -f sandbox/docker-compose.full.yml up -d
225+
```
226+
227+
## Testing the REST Gateway
228+
229+
To test the REST Gateway API, you need to generate a JWT token:
230+
231+
**Note:** Install `PyJWT` to generate JWT tokens:
232+
233+
```bash
234+
pip install PyJWT
235+
```
236+
237+
**Important:** Do not install the `jwt` package - it's a different library and won't work.
238+
239+
```bash
240+
# Get the JWT secret from the running container
241+
export JWT_SECRET=$(docker exec opencue-rest-gateway printenv JWT_SECRET)
242+
243+
# Generate a JWT token
244+
export JWT_TOKEN=$(python3 -c "import jwt, datetime; payload = {'user': 'test', 'exp': datetime.datetime.now(datetime.timezone.utc) + datetime.timedelta(hours=1)}; print(jwt.encode(payload, '$JWT_SECRET', algorithm='HS256'))")
245+
246+
# Test API access
247+
curl -X POST http://localhost:8448/show.ShowInterface/GetShows \
248+
-H "Authorization: Bearer $JWT_TOKEN" \
249+
-H "Content-Type: application/json" \
250+
-d '{}'
251+
```
252+
253+
## Submit a Test Job
88254

89255
To verify your sandbox is working correctly:
90256

@@ -96,7 +262,7 @@ To verify your sandbox is working correctly:
96262

97263
2. Click "Submit" to send the job to Cuebot
98264

99-
3. Switch to CueGUI to monitor the job:
265+
3. Monitor the job in CueGUI or CueWeb:
100266
- You should see your job appear in the Jobs panel
101267
- The frames should begin processing on the RQD host
102268
- Each frame will sleep for 5 seconds then complete
@@ -105,9 +271,9 @@ To verify your sandbox is working correctly:
105271

106272
Your sandbox is working correctly if:
107273
- Docker containers are running without errors
108-
- CueGUI connects to Cuebot and shows the RQD host
274+
- CueGUI/CueWeb connects to Cuebot and shows the RQD host
109275
- CueSubmit can submit jobs successfully
110-
- Jobs appear in CueGUI and frames complete
276+
- Jobs appear in CueGUI/CueWeb and frames complete
111277

112278
## Common Use Cases
113279

@@ -131,30 +297,49 @@ docker compose logs -f cuebot
131297

132298
# View RQD logs
133299
docker compose logs -f rqd
300+
301+
# For full stack deployment
302+
./sandbox/deploy_opencue_full.sh logs cuebot
303+
./sandbox/deploy_opencue_full.sh logs rqd
134304
```
135305

136306
## Stopping the Sandbox
137307

138-
To shut down the sandbox environment:
308+
### Basic Sandbox
139309

140-
1. Stop the Docker containers:
141-
```bash
142-
docker compose down
143-
```
310+
```bash
311+
# Stop the Docker containers
312+
docker compose down
144313

145-
2. Deactivate the virtual environment:
146-
```bash
147-
deactivate
148-
```
314+
# Deactivate the virtual environment
315+
deactivate
316+
```
317+
318+
### Full Stack Deployment
319+
320+
```bash
321+
# Stop all services
322+
./sandbox/deploy_opencue_full.sh down
323+
324+
# Or clean up everything (removes volumes and images)
325+
./sandbox/deploy_opencue_full.sh clean
326+
```
149327

150328
## Troubleshooting
151329

152330
### Port Conflicts
153331

154-
If you encounter port conflicts:
155-
- Cuebot uses port 8443 (gRPC)
156-
- PostgreSQL uses port 5432
157-
- Ensure these ports are not in use by other applications
332+
If you encounter port conflicts, check these default ports:
333+
334+
| Service | Port |
335+
|---------|------|
336+
| Cuebot gRPC | 8443 |
337+
| PostgreSQL | 5432 |
338+
| RQD | 8444 |
339+
| REST Gateway | 8448 |
340+
| CueWeb | 3000 |
341+
342+
Ensure these ports are not in use by other applications.
158343

159344
### Database Connection Issues
160345

@@ -172,8 +357,16 @@ If CueGUI cannot connect to Cuebot:
172357
- Check the Cuebot logs for errors
173358
- Ensure you're using the correct config file
174359

175-
## Additional Resources
360+
### CueWeb Not Loading
361+
362+
If CueWeb is not responding:
363+
- Check that rest-gateway is healthy: `./sandbox/deploy_opencue_full.sh status`
364+
- Verify the JWT secret is set correctly
365+
- Check CueWeb logs: `./sandbox/deploy_opencue_full.sh logs cueweb`
176366

177-
For more detailed information about the sandbox environment, including advanced configuration options and troubleshooting, see the full [sandbox guide](https://github.com/AcademySoftwareFoundation/OpenCue/blob/master/sandbox/README.md).
367+
### REST Gateway Authentication Errors
178368

179-
For general OpenCue documentation, visit the [quick start guides](/OpenCue/docs/quick-starts/) for platform-specific instructions.
369+
If you get 401 Unauthorized errors:
370+
- Make sure you're using `PyJWT` (not `jwt` package)
371+
- Get the JWT secret from the running container, not from your shell
372+
- Verify the token hasn't expired

0 commit comments

Comments
 (0)