modules
modules copied to clipboard
JetBrains Fleet: Add a 1-click button for launching Fleet
As per this Fleet issue, it will soon support launching remote environments via a URI scheme.
With Fleet 1.36 (the version after the upcoming version 1.35), Fleet URI handler will support connecting to SSH directly using URIs of this format:
fleet://fleet.ssh/<hostname>?<query_params>
with possible params being
usernameportpwd(the working directory to open)forceNewHost(possible values aretrueandfalse, default isfalse- Setting to true will let Fleet ignore previous known hosts and always create a new connection)
username and port can also be specified alongside the hostname in common SSH URI syntax, i.e., <username>@<hostname>:<port>. To avoid ambiguities, pwd can only be specified explicitly.
Only the hostname is required. If some parameters are not specified, Fleet will try to use the closest known match in previous connections or fall back to default values. .ssh/config is considered as usual. Not specifying pwd will open an empty workspace on the host.
Examples:
fleet://fleet.ssh/example.org?username=foo&pwd=/home/foo/my_test_project
fleet://fleet.ssh/[email protected]?pwd=/home/foo/my_test_project
The current process to connect to a Coder workspace is documented here: https://coder.com/docs/ides/fleet
@kylecarbs @code-asher, what are your thoughts on how we can dynamically populate the URI? We have our plugins for VSCode Desktop and JetBrains gateway, which populates the .ssh/config.
Update: Fleet 1.36, which supports the SSH connection URI, has been released.
Is it possible to have a Fleet extension?
@kylecarbs not yet. But it's on their long-term roadmap. No developers docs ATM.
Yeah without an extension the best we can do is document that coder config-ssh has to be ran manually and then use the coder.workspacename hostname in the URI, I think.
This is insane, but I'm pretty sure Chrome handles ssh://.
In some magically insane world, we could add a small sniffer to the initial HTTPS packet for the SSH prefix (e.g. SSH-), and then authenticate using a secret username. Then we could one-click open anything, even without an extension!
ssh [email protected]
Woaaaah that is actually dope.
nice, what awesome about fleet is that it's free, for now.
Maybe in preparation the fleet icon can be added to the coder server ;)
Also you do need have your ssh config updated ahead of time.
For sure you can access the server via chrome: ssh://coder.platform-onbarding.main and with fleet it would be fleet://fleet.ssh/[email protected]?pwd=/workspace/platform-onboarding. The template would have to get the remote name ie: coder.platform-onbarding.main, for which i assume it coder.<workspace_id>.<agent_id> ?
or which i assume it coder.<workspace_id>.<agent_id>
It should be coder.<workspace_id>.<agent_name> given that coder config-ssh is already run.
i see that fleet 1.37 now out and this url schema works well :)
@matifali i added the fleet icon to coder so long https://github.com/coder/coder/pull/14021
or which i assume it coder.<workspace_id>.<agent_id>
It should be
coder.<workspace_id>.<agent_name>given thatcoder config-sshis already run.
And there is no way to know that the coder cli was installed locally or that coder config-ssh was run
And there is no way to know that the coder cli was installed locally or that coder config-ssh was run
Sadly yes for now. It might change in future when Fleet support extensions or We find another way probably through Coder chrome extension.
The same problem exists for people using JetBrains IDE (you need to pre-install Jetbrain Gateway).
May be we can use https://www.jetbrains.com/help/fleet/install-on-a-remote-machine.html