Skip to content

feat(examples): Introduce Chromium CDP#151

Open
razvand wants to merge 4 commits into
unikraft-cloud:mainfrom
razvand:razvand/new/chromium-cdp
Open

feat(examples): Introduce Chromium CDP#151
razvand wants to merge 4 commits into
unikraft-cloud:mainfrom
razvand:razvand/new/chromium-cdp

Conversation

@razvand

@razvand razvand commented Feb 2, 2025

Copy link
Copy Markdown
Contributor

Introduce Chromium running as a browser service using CDP (Chrome DevTools Protocol). It uses Node Playwright to start the browser and the Node http-proxy module to proxy websocket communication.

Add:

  • Kraftfile: build / run rules
  • Dockerfile: placeholder to extract the filesystem
  • package.json / package-lock.json: Node package requirements
  • proxy.js: Node-based websocket proxy
  • wrapper.sh: helper script to start the Node proxy service (and the browser)
  • README.md: document how to use
  • .dockerignore / .gitignore: ignore generated files
  • test/: CDP test client (in Python using Playwright)

@razvand razvand force-pushed the razvand/new/chromium-cdp branch from e1b1e5b to 7ba0200 Compare February 6, 2025 09:49
@razvand razvand marked this pull request as ready for review February 6, 2025 09:53
@razvand razvand added the enhancement New feature or request label Feb 6, 2025
Introduce Chromium running as a browser service using CDP (Chrome
DevTools Protocol). It uses Node Playwright to start the browser and
the Node `http-proxy` module to proxy websocket communication.

Add:

* `Kraftfile`: build / run rules
* `Dockerfile`: placeholder to extract the filesystem
* `package.json` / `package-lock.json`: Node package requirements
* `server.js`: Node-based websocket proxy
* `wrapper.sh`: helper script to start the Node proxy service (and the
  browser)
* `README.md`: document how to use
* `.dockerignore` / `.gitignore`: ignore generated files
* `test/`: CDP test client (in Python using Playwright)

Signed-off-by: Razvan Deaconescu <razvand@unikraft.io>
@razvand razvand force-pushed the razvand/new/chromium-cdp branch from 7ba0200 to 5792db8 Compare February 7, 2025 06:39
Introduce an echo-reply WebSocket server to be deployed on Unikraft
Cloud with Node. It uses the `node:21` image.

Add:

* `Kraftfile`: build / run rules
* `Dockerfile`: placeholder to extract the filesystem
* `package.json` / `package-lock.json`: NPM configuration file
* `server.js`: implementation of Node WebSocket server
* `README.md`: document how to use
* `.dockerignore` / `.gitignore`: ignore generated files
* workflow files in `../.github/workflows/`

Update top-level `README.md` to feature the example.

Signed-off-by: Razvan Deaconescu <razvand@unikraft.io>
Install `wscat` globally using `npm install -g wscat`, as instructed:
https://www.npmjs.com/package/wscat

Signed-off-by: Razvan Deaconescu <razvand@unikraft.io>
Use `websocat` instead of `wscat` as the WebSocket client, as it can be
used non-interactively.

Signed-off-by: Razvan Deaconescu <razvand@unikraft.io>
@craciunoiuc

Copy link
Copy Markdown
Contributor

@razvand can you rebase this just in case so I can get to reviewing?

I can see that the tests failed but those were because of the missing token and/or metro on the fork. If that is the case, we can merge and see afterwards if tests pass

@jschlumpp jschlumpp removed their request for review March 5, 2026 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants