Hello Gal,
Gal Zaidman [2020-03-17 13:43 +0200]:
On my local env I installed cockpit and cloned the starter-kit,
created
a link to base1 directory
What do you mean by that? You don't need to create any links for base1
yourself. Cockpit's web server (cockpit-ws) knows how to find base1.
My app can import cockpit, now I need to configure cockpit to
interact with
a local running VM instead of my own PC.
I want that the cockpit service which is running local on my machine
connect to a cockpit bridge running on a local VM as a primary server,
basically:
[image: image.png]
There was no actual attachment, but it's fine. I suppose it looks like
https://piware.de/gitweb/?p=talk-cockpit-auth-anywhere.git;a=blob_plain;f...
?
You can do that by adding your VM as a remote server in the dashboard, then the
local cockpit session will connect over SSH to the VM. You can also do that on
the login screen directly in "> Other Options → Connect to".
Honestly I'd find it easier to just install cockpit-ws into the VM and directly
point your web browser to the VM IP. But I guess you have your reasons, and
remote ssh logins work just as well.
The end result I want to achieve is that when I'm developing my
plugin I
will use webserver and only see the plugin windows (without the cockpit UI)
This is unrelated to the local vs. ssh question, but you can also specify an
URL that just shows your page's frame, instead of the whole thing:
https://cockpit-project.org/guide/latest/embedding.html
For example, this only shows the Machines page:
http://your.server:9090/cockpit/@localhost/machines/index.html
Likewise, you can replace @localhost with @1.2.3.4 after you logged in (the URL
will already contain the remote server part).
and each interaction with cockpit will be triggered on a remote VM
running
cockpit, this way I will not have to refresh my page to see changes in the
UI.
You will still have to refresh the page. I. e. if you build your new code, scp
it to your VM, then cockpit's web server and the remote bridge need to load it
at some point. But a Ctrl+R is fairly cheap, you don't even lose your
authentication, you just see your new page. (That's what everyone in the dev
team is using, too)
HTH,
Martin