[lxc-users] LXD module for Cockpit?

Martin Pitt mpitt at redhat.com
Tue Jun 20 15:47:50 UTC 2017


Hello Mark,

Mark Constable [2017-06-15 13:30 +1000]:
> On 15/06/17 12:56, Stéphane Graber wrote:
> > > https://lists.linuxcontainers.org/pipermail/lxc-users/2015-November/010516.html
> > > Anyone aware of any new Cockpit module development for LXD?

There is none to my knowledge. Might be related to the fact that LXD
unfortunately isn't packaged in Fedora/RHEL/CentOS, so it has very little
exposure there.

> Well I would certainly be prepared to put some time into this because
> I've got the beginnings of a prototype PHP + sudo/bash module that
> could work but using Cockpit as a foundation would make so much more
> sense. However I've only just started to re-evaluate Cockpit so I'm
> not too familiar with how it works yet.

It indeed provides the necessary frameworks for authentication (so that
everything that you run in your client JS is having the same privileges as if
you would do the equivalent steps in a ssh shell), talking to command line
applications or REST APIs. The docker page [1] does exactly the latter (it
wraps that in a DockerClient class in client.js[2]), and the docs [3] have
JavaScript examples too.

I suggest to start with a "toy" page that just lists available images and
running containers to get a feeling for it, and then work your way upwards.
Please feel free to ping me in #cockpit on Freenode, I'm happy to guide you
there!

My very first "hello world" thing on Cockpit was [4] for a minimal interface to
schroot. It's ugly and not well structured, but at least it should give you
some feeling how to get started.

Martin

[1] https://github.com/cockpit-project/cockpit/tree/master/pkg/docker
[2] https://github.com/cockpit-project/cockpit/blob/master/pkg/docker/client.js
[3] http://cockpit-project.org/guide/latest/api-base1.html
[4] http://piware.de/projects/cockpit-schroot/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20170620/dcc95104/attachment.sig>


More information about the lxc-users mailing list