[PR #446] [MERGED] 1.17.4 #738

Closed
opened 2025-10-31 15:20:27 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/moghtech/komodo/pull/446
Author: @mbecker20
Created: 4/25/2025
Status: Merged
Merged: 4/27/2025
Merged by: @mbecker20

Base: mainHead: 1.17.4


📝 Commits (10+)

📊 Changes

74 files changed (+3312 additions, -596 deletions)

View changed files

📝 Cargo.lock (+241 -133)
📝 Cargo.toml (+9 -6)
📝 bin/core/Cargo.toml (+1 -0)
📝 bin/core/aio.Dockerfile (+3 -4)
bin/core/debian-deps.sh (+14 -0)
📝 bin/core/multi-arch.Dockerfile (+3 -4)
📝 bin/core/single-arch.Dockerfile (+3 -4)
📝 bin/core/src/api/read/mod.rs (+1 -0)
📝 bin/core/src/api/read/server.rs (+70 -30)
📝 bin/core/src/api/write/mod.rs (+3 -4)
📝 bin/core/src/api/write/server.rs (+80 -1)
📝 bin/core/src/helpers/query.rs (+44 -1)
📝 bin/core/src/main.rs (+6 -0)
📝 bin/core/src/resource/server.rs (+6 -0)
bin/core/src/ws.rs (+0 -209)
bin/core/src/ws/mod.rs (+112 -0)
bin/core/src/ws/terminal.rs (+200 -0)
bin/core/src/ws/update.rs (+102 -0)
bin/core/starship.toml (+67 -0)
📝 bin/periphery/Cargo.toml (+4 -0)

...and 54 more files

📄 Description

Changelog

  • Server: Adds the Terminals tab, which allows you to connect to and manage multiple persistent shells on the server.

    • Uses portable-pty for the pseudoterminal on the backend and xterm.js for the frontend.
    • Networked over websockets.
    • Supports TUI applications like htop / ncdu / nvim (and runnables-cli)
    • Each shell history / active running process is persisted on periphery after the client disconnects, making them suitable for long running tasks (you can run servers from them etc)
    • The shell starts as the same linux user that periphery runs as.
      • For systemctl --user installs, you login as your linux user on the host (complete with any custom prompt).
      • For root systemctl installs, you would login as root linux user. You should consider creating a custom periphery user with intented permissions, and updating your periphery.service systemctl config to use this user instead: link
      • For container Periphery, you connect to shell inside periphery container. The functionality will be more limited, but you can still communicate with docker socket in there (its mounted in), and docker exec into containers
    • The terminals can have mutliple Komodo users connected at once, and their view is synced.
    • If Periphery is restarted, the Terminal sessions will be lost, as they are child processes of periphery.
    • User must be admin or have Write permission on Server to connect to terminals
    • Use disable_terminals (PERIPHERY_DISABLE_TERMINALS) in periphery config to disable this functionality on particular servers.
    • Easy access to docker exec -it (container shell access) from Container page, Terminal tab
  • Deployment / Stack: Adds the Terminal tab to Deployments and Stack services.

    • Configurable shell command inside container, eg sh or bash.

Screenshot 2025-04-26 at 12 20 42 AM
Screenshot 2025-04-26 at 12 20 29 AM
Screenshot 2025-04-26 at 12 20 13 AM


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/moghtech/komodo/pull/446 **Author:** [@mbecker20](https://github.com/mbecker20) **Created:** 4/25/2025 **Status:** ✅ Merged **Merged:** 4/27/2025 **Merged by:** [@mbecker20](https://github.com/mbecker20) **Base:** `main` ← **Head:** `1.17.4` --- ### 📝 Commits (10+) - [`c9055bf`](https://github.com/moghtech/komodo/commit/c9055bfb5f1730fc67ac188ac442865243b907bc) add terminal (ssh) apis - [`f828c01`](https://github.com/moghtech/komodo/commit/f828c013f8d5bb02cd80ce6545abf709848ae87a) add core terminal exec method - [`cbffe4e`](https://github.com/moghtech/komodo/commit/cbffe4eb293af8c1da8d83a8ce2ca9258a883c37) terminal typescript client method - [`1e97bb9`](https://github.com/moghtech/komodo/commit/1e97bb96c3e34df8620c30d6301fc4f27ab95c80) terminals WIP - [`c05010b`](https://github.com/moghtech/komodo/commit/c05010b75e4377f54de3b704c53256494198a16b) backend for pty - [`b74ba45`](https://github.com/moghtech/komodo/commit/b74ba45e5945da89004ceae2611921ea524c6547) add ts responses - [`c9f7702`](https://github.com/moghtech/komodo/commit/c9f77028809ba8f90c168b31986f1ef79d5ab153) about wire everything - [`aa0c29c`](https://github.com/moghtech/komodo/commit/aa0c29c1ca226a3df18b705097503b740b8875fd) add new blog - [`ef907d4`](https://github.com/moghtech/komodo/commit/ef907d43d0300f2b4fb29d281c0001ff1a3704aa) credit Skyfay - [`67cf675`](https://github.com/moghtech/komodo/commit/67cf67514e91fa976258986ac9ac83a3ee38a1ab) working ### 📊 Changes **74 files changed** (+3312 additions, -596 deletions) <details> <summary>View changed files</summary> 📝 `Cargo.lock` (+241 -133) 📝 `Cargo.toml` (+9 -6) 📝 `bin/core/Cargo.toml` (+1 -0) 📝 `bin/core/aio.Dockerfile` (+3 -4) ➕ `bin/core/debian-deps.sh` (+14 -0) 📝 `bin/core/multi-arch.Dockerfile` (+3 -4) 📝 `bin/core/single-arch.Dockerfile` (+3 -4) 📝 `bin/core/src/api/read/mod.rs` (+1 -0) 📝 `bin/core/src/api/read/server.rs` (+70 -30) 📝 `bin/core/src/api/write/mod.rs` (+3 -4) 📝 `bin/core/src/api/write/server.rs` (+80 -1) 📝 `bin/core/src/helpers/query.rs` (+44 -1) 📝 `bin/core/src/main.rs` (+6 -0) 📝 `bin/core/src/resource/server.rs` (+6 -0) ➖ `bin/core/src/ws.rs` (+0 -209) ➕ `bin/core/src/ws/mod.rs` (+112 -0) ➕ `bin/core/src/ws/terminal.rs` (+200 -0) ➕ `bin/core/src/ws/update.rs` (+102 -0) ➕ `bin/core/starship.toml` (+67 -0) 📝 `bin/periphery/Cargo.toml` (+4 -0) _...and 54 more files_ </details> ### 📄 Description # Changelog - **Server**: Adds the `Terminals` tab, which allows you to connect to and manage **multiple persistent shells** on the server. - Uses [portable-pty](https://docs.rs/portable-pty/0.9.0/portable_pty/) for the pseudoterminal on the backend and [xterm.js](https://xtermjs.org/) for the frontend. - Networked over websockets. - Supports TUI applications like `htop` / `ncdu` / `nvim` (and [runnables-cli](https://crates.io/crates/runnables-cli/1.3.7)) - Each shell history / active running process is persisted on periphery after the client disconnects, making them suitable for long running tasks (you can run servers from them etc) - The shell starts as the same linux user that `periphery` runs as. - For `systemctl --user` installs, you login as **your linux user** on the host (complete with any custom prompt). - For **root** systemctl installs, you would login as root linux user. You should consider creating a custom `periphery` user with intented permissions, and updating your `periphery.service` systemctl config to use this user instead: [link](https://bbs.archlinux.org/viewtopic.php?id=162297) - For container Periphery, you connect to shell inside periphery container. The functionality will be more limited, but you can still communicate with docker socket in there (its mounted in), and `docker exec` into containers - The terminals can have **mutliple Komodo users connected at once**, and their view is synced. - If Periphery is restarted, the Terminal sessions will be lost, as they are child processes of periphery. - User must be admin or have `Write` permission on Server to connect to terminals - Use `disable_terminals` (`PERIPHERY_DISABLE_TERMINALS`) in periphery config to **disable this functionality** on particular servers. - Easy access to **`docker exec -it`** (container shell access) from Container page, Terminal tab - **Deployment / Stack**: Adds the Terminal tab to Deployments and Stack services. - Configurable shell command inside container, eg `sh` or `bash`. ![Screenshot 2025-04-26 at 12 20 42 AM](https://github.com/user-attachments/assets/f23e3fcb-4bfc-482f-83e5-977c32eadfa4) ![Screenshot 2025-04-26 at 12 20 29 AM](https://github.com/user-attachments/assets/922b4d66-62c0-4870-abdb-1b2fb2ffcbbd) ![Screenshot 2025-04-26 at 12 20 13 AM](https://github.com/user-attachments/assets/4ad5b583-95b8-4c20-a57d-955d5defce25) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-10-31 15:20:27 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/komodo#738