Skip to content

Commit 0dd1914

Browse files
Siddhant-K-codeona-agentTobbe
authored
[Dev environment] Migrate from Gitpod Classic to Ona (#12093)
Co-authored-by: Ona <[email protected]> Co-authored-by: Tobbe Lundberg <[email protected]>
1 parent dc514bd commit 0dd1914

File tree

7 files changed

+184
-77
lines changed

7 files changed

+184
-77
lines changed

.changesets/12093.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
- [Dev environment] Migrate from Gitpod Classic to Ona (#12093) by @Siddhant-K-code
2+
3+
# Migration from Gitpod Classic to Ona
4+
5+
Gitpod has been renamed to Ona. This PR updates the Redwood documentation and
6+
Ona/Gitpod integration files

.devcontainer/devcontainer.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"name": "RedwoodGraphQL",
3+
"image": "mcr.microsoft.com/devcontainers/javascript-node:1-20-bullseye",
4+
"features": {
5+
"ghcr.io/devcontainers/features/github-cli:1": {}
6+
},
7+
"workspaceFolder": "/workspaces/RedwoodGraphQL",
8+
"forwardPorts": [8910, 8911],
9+
"portsAttributes": {
10+
"8910": {
11+
"label": "RedwoodJS Web",
12+
"onAutoForward": "notify"
13+
},
14+
"8911": {
15+
"label": "RedwoodJS API",
16+
"onAutoForward": "ignore"
17+
}
18+
},
19+
"postCreateCommand": "npm i -g corepack --force && corepack enable"
20+
}

.gitpod.yml

Lines changed: 0 additions & 53 deletions
This file was deleted.

.ona/automations.yaml

Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
services:
2+
dev-server:
3+
name: RedwoodJS Development Server
4+
description: Runs the RedwoodJS development server for both web and api sides
5+
commands:
6+
start: |
7+
# Ensure corepack is enabled in service environment
8+
corepack enable
9+
cd /workspaces/rw-test-app
10+
NODE_ENV=development corepack yarn rw dev
11+
12+
tasks:
13+
setup-environment:
14+
name: Setup RedwoodJS Environment
15+
description: Setup RedwoodJS development environment (runs automatically after devcontainer starts)
16+
triggeredBy:
17+
- postDevcontainerStart
18+
command: |
19+
export RWFW_PATH="/workspaces/RedwoodGraphQL"
20+
export REDWOOD_DISABLE_TELEMETRY=1
21+
echo "Setting up RedwoodJS development environment..."
22+
mkdir -p /workspaces/rw-test-app
23+
cd /workspaces/RedwoodGraphQL
24+
echo "Cleaning up existing symlinks and cache..."
25+
rm -rf node_modules/@redwoodjs
26+
rm -rf node_modules/.cache
27+
rm -f yarn.lock
28+
corepack yarn cache clean --all 2>/dev/null || true
29+
echo "Installing framework dependencies..."
30+
corepack yarn install
31+
echo "Building test project..."
32+
corepack yarn run build:test-project ../rw-test-app --typescript --link --verbose
33+
cd /workspaces/rw-test-app
34+
sed -i "s/\(open *= *\).*/\1false/" redwood.toml
35+
echo -e "\n\n\033[94m ======================================================\n\033[33m ⌛ RedwoodJS development environment is ready!\n Test app \"rw-test-app\" has been generated & linked with framework code.\n\n If you make changes to the framework:\n 1. \033[33mEnsure env vars are set \033[92mexport RWFW_PATH=\"/workspaces/RedwoodGraphQL\"\033[33m\n 2. \033[33mRun \033[92mcorepack yarn rwfw project:sync\033[33m to sync changes\n 3. \033[33mOr use the \033[92mSync Framework Changes\033[33m task from Ona dashboard\n\033[94m ======================================================\n\n"
36+
# Open ports for RedwoodJS development servers
37+
echo "Opening ports for development servers..."
38+
gitpod environment port open 8910 --name "RedwoodJS Web Server" --protocol https
39+
gitpod environment port open 8911 --name "RedwoodJS API Server" --protocol https
40+
echo "✅ Ports 8910 (Web) and 8911 (API) are now open with HTTPS"
41+
# Signal completion
42+
touch /tmp/redwood-setup-complete
43+
echo "✅ Setup task completed successfully"
44+
45+
start-dev-after-setup:
46+
name: Start Development Server After Setup
47+
description: Automatically start the development server after setup completes
48+
triggeredBy:
49+
- postDevcontainerStart
50+
command: |
51+
# Wait for setup to complete
52+
echo "Waiting for setup to complete..."
53+
while [ ! -f /tmp/redwood-setup-complete ]; do
54+
sleep 2
55+
done
56+
echo "Setup completed, starting development server..."
57+
# Ensure ports are open before starting service
58+
gitpod environment port open 8910 --name "RedwoodJS Web Server" --protocol https 2>/dev/null || true
59+
gitpod environment port open 8911 --name "RedwoodJS API Server" --protocol https 2>/dev/null || true
60+
gitpod automations service start dev-server
61+
echo "✅ Development server started"
62+
63+
sync-framework-changes:
64+
name: Sync Framework Changes
65+
description: Manually sync framework changes to test project
66+
triggeredBy:
67+
- manual
68+
command: |
69+
export RWFW_PATH="/workspaces/RedwoodGraphQL"
70+
cd /workspaces/rw-test-app
71+
corepack yarn rwfw project:sync
72+
echo "Framework changes synced to test project"
73+
74+
start-dev-server:
75+
name: Start Development Server
76+
description: Start the RedwoodJS development server
77+
triggeredBy:
78+
- manual
79+
command: |
80+
gitpod automations service start dev-server
81+
82+
stop-dev-server:
83+
name: Stop Development Server
84+
description: Stop the RedwoodJS development server
85+
triggeredBy:
86+
- manual
87+
command: |
88+
gitpod automations service stop dev-server
89+
90+
restart-dev-server:
91+
name: Restart Development Server
92+
description: Restart the RedwoodJS development server
93+
triggeredBy:
94+
- manual
95+
command: |
96+
gitpod automations service stop dev-server
97+
sleep 2
98+
gitpod automations service start dev-server
99+
100+
open-ports:
101+
name: Open Development Ports
102+
description: Open ports 8910 (Web) and 8911 (API) for external access with HTTPS
103+
triggeredBy:
104+
- manual
105+
command: |
106+
echo "Opening RedwoodJS development ports with HTTPS..."
107+
gitpod environment port open 8910 --name "RedwoodJS Web Server" --protocol https
108+
gitpod environment port open 8911 --name "RedwoodJS API Server" --protocol https
109+
echo "✅ Ports opened successfully with HTTPS protocol"
110+
gitpod environment port list
111+
112+
close-ports:
113+
name: Close Development Ports
114+
description: Close ports 8910 (Web) and 8911 (API)
115+
triggeredBy:
116+
- manual
117+
command: |
118+
echo "Closing RedwoodJS development ports..."
119+
gitpod environment port close 8910
120+
gitpod environment port close 8911
121+
echo "✅ Ports closed successfully"
122+
123+
list-ports:
124+
name: List Port Status
125+
description: Show current status of all ports
126+
triggeredBy:
127+
- manual
128+
command: |
129+
echo "Current port status:"
130+
gitpod environment port list

CONTRIBUTING.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -183,9 +183,12 @@ You can use the button below to start a developer environment in the cloud and a
183183

184184
This generates a functional test project and links it with the Redwood Framework code in `main`, giving you an easy playground to try out your fixes and contributions.
185185

186-
> Note: if you make changes to the framework, you will need to run `yarn rwfw project:sync` in the terminal, so that your changes are watched and reflected in the test project
186+
> Note: if you make changes to the framework, you will need to sync your changes to the test project. You can either:
187+
>
188+
> - Run `yarn rwfw project:sync` in the terminal, or
189+
> - Use the **"Sync Framework Changes"** task directly from the Ona dashboard
187190
188-
[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/redwoodjs/redwood)
191+
[![Open in Ona](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/redwoodjs/redwood)
189192

190193
## Local QA and Integration Tests
191194

@@ -307,17 +310,17 @@ If needed, there's more information in [this PR #3154 comment](https://github.co
307310

308311
# Creating a Reproduction to Include with Issues
309312

310-
Are you about to open an issue? Including a reproduction, either as a series of steps, as a public GitHub repo, or as a Gitpod snapshot, will definitely let us help you faster!
313+
Are you about to open an issue? Including a reproduction, either as a series of steps, as a public GitHub repo, or as an Ona snapshot, will definitely let us help you faster!
311314

312-
## Option 1: Create a Gitpod Snapshot
315+
## Option 1: Create an Ona Snapshot
313316

314-
This is a great option when the issue you're reporting is cross-platform. I.e., it isn't a Windows-specific issue. Here's a video walkthrough on how to create a snapshot of the [Redwood-Gitpod starter repo](https://github.com/redwoodjs/starter):
317+
This is a great option when the issue you're reporting is cross-platform. I.e., it isn't a Windows-specific issue. You can create a snapshot of the [Redwood starter repo](https://github.com/redwoodjs/starter) using Ona's cloud development environment.
315318

316319
https://user-images.githubusercontent.com/1521877/176033049-d3c57b92-3ee6-4c60-918b-fdbcfa83fd0f.mp4
317320

318321
## Option 2: Fork the Starter Repo
319322

320-
You can always fork the [Redwood-Gitpod starter repo](https://github.com/redwoodjs/starter) which is a brand new project with the latest stable version of Redwood.
323+
You can always fork the [Redwood starter repo](https://github.com/redwoodjs/starter) which is a brand new project with the latest stable version of Redwood.
321324
Once you make your changes in your fork, include the link to your repo in your issue. This'll make it much easier for us to understand what's going on.
322325

323326
# Release Publishing

docs/docs/how-to/using-gitpod.md renamed to docs/docs/how-to/using-ona.md

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,27 @@
1-
# Using GitPod
1+
# Using Ona
22

3-
## What is GitPod?
3+
## What is Ona?
44

5-
GitPod is a cloud development environment with all the necessary tools and dependencies, allowing you to focus on building your RedwoodJS application without worrying about the setup. Get started quickly and efficiently by launching RedwoodJS inside GitPod!
5+
Ona is a cloud development environment with all the necessary tools and dependencies, allowing you to focus on building your RedwoodJS application without worrying about the setup. Get started quickly and efficiently by launching RedwoodJS inside Ona!
66

7-
## Getting Started
7+
## Getting started
88

9-
Click on the Open in GitPod button:
9+
Click on the Run in Ona button:
1010

11-
[![Open in GitPod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/redwoodjs/starter)
11+
[![Run in Ona](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/redwoodjs/starter)
1212

13-
<iframe width="100%" height="315" src="https://www.youtube.com/embed/guz67aa_1Wk?si=p1uc2EK6o8HJGBax" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
13+
This will launch Ona and ask you to configure a new workspace. Click continue.
1414

15-
This will launch GitPod and ask you to configure a new workspace. Click continue.
15+
Ona will then begin to build your workspace using Dev Containers and Automations. This may take several minutes as it:
1616

17-
![GitPod Onboarding Screen](https://github.com/redwoodjs/starter/raw/main/images/gitpod-new-workspace.png)
18-
19-
GitPod will then begin to build your workspace. This may take several minutes.
17+
1. Sets up the development environment
18+
2. Installs dependencies
19+
3. Creates a test project linked to the framework
20+
4. Starts the development server automatically
2021

2122
What's going on behind the scenes:
2223

23-
- GitPod is setting up the workspace
24+
- Ona is setting up the environment
2425
- It installs our recommended VS Code plugins:
2526
- [ESLint](https://github.com/redwoodjs/starter/blob/main)
2627
- [Git Lens](https://github.com/redwoodjs/starter/blob/main)
@@ -48,11 +49,11 @@ You can click on the address or the globe icon to open that particular port in a
4849
- Port 8911 is your backend and will show you a list of all available functions. If you add `/graphql` to the end of the URL, you should see the GraphQL Playground
4950
![Port 8911 GraphQL Playground](https://github.com/redwoodjs/starter/raw/main/images/gitpod-graphql.png)
5051

51-
## How to Use GitPod
52+
## How to use Gitpod (Ona)
5253

5354
<iframe width="560" height="315" src="https://www.youtube.com/embed/5pNHaqJWKL4?si=OmkQvmPL_Cc3djLg" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
5455

55-
If you have an existing project, you can still use GitPod:
56+
If you have an existing project, you can still use Gitpod:
5657

57-
1. Take any repository within GitHub and append `gitpod.io/#` to the URL. This will quickly launch a GitPod workspace.
58+
1. Take any repository within GitHub and append `gitpod.io/#` to the URL. This will quickly launch a Ona environment.
5859
2. Within the Terminal, run `yarn install` to install all the dependencies

docs/docs/quick-start.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,11 @@ yarn redwood --help
5151

5252
For all the details, see the [CLI reference](cli-commands.md).
5353

54-
### GitPod
54+
### Ona
5555

56-
The fastest way to start a new Redwood project is to use GitPod ([additional documentation for working with GitPod](./how-to/using-gitpod)).
56+
The fastest way to start a new Redwood project is to use Ona's (formerly Gitpod) cloud development environment ([additional documentation for working with Ona](./how-to/using-ona)).
5757

58-
[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/redwoodjs/starter)
58+
[![Run in Ona](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/redwoodjs/starter)
5959

6060
## Prisma and the database
6161

0 commit comments

Comments
 (0)