all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: David Thompson <dthompson2@worcester.edu>
Cc: guix-devel@gnu.org
Subject: Re: Containers on Guix
Date: Thu, 20 Nov 2014 15:51:48 +0100	[thread overview]
Message-ID: <877fypudq3.fsf@gnu.org> (raw)
In-Reply-To: <87lhn6eh12.fsf@izanagi.i-did-not-set--mail-host-address--so-tickle-me> (David Thompson's message of "Wed, 19 Nov 2014 21:34:49 -0500")

Hello!

Disclaimer: I’ve never used systemd-nspawn, and I’m not knowledgeable in
this area.  :-)


AIUI, “containers” are basically what the daemon creates: an execution
environment that uses a separate file system name space, network name
space, etc. (see ‘DerivationGoal::startBuilder’ in libstore/build.cc.)

For what you have in mind, one may want to be able to select which parts
should be separate (apparently systemd-nspawn allows that), rather than
the completely-isolated policy of guix-daemon.

So, in terms of functionality, I think we want that subset of the
daemon, in a more modular fashion (that subset would also be useful for
Plash-like sandboxed execution, something I’d like to have eventually.)

It doesn’t have to be part of the init system IMO, because it doesn’t
have much to do with it.  However, there has to be a mediating process
with root privileges that can create these containers on behalf on
unprivileged users–much like guix-daemon.

In terms of code, I can think of several approaches.

  1. Fork guix-daemon, and modularize it to do what we want.  Perhaps it
     would be enough to add RPCs to create and configure a container
     (see worker-protocol.hh and (guix store).)

     Alternately, create a C library that provides just the
     container-handling logic (possibly with Guile bindings), and use it
     to write a separate daemon responsible for container handling.

  2. Translate/rewrite the container-handling logic in Scheme.  Use it
     to write a separate daemon, with the eventual goal of having a new
     build daemon that uses the same code base (all in Scheme.)

  3. Use LXC to implement containers (?).  liblxc seems to be perhaps
     too high-level from the examples on the web page; does anyone know?

#2 is forward-looking, but quite a lot of work.

#1 and #3 are more pragmatic.

I hope that makes some sense.

Ludo’.

  parent reply	other threads:[~2014-11-20 14:52 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-20  2:34 Containers on Guix David Thompson
2014-11-20  2:36 ` David Thompson
2014-11-20 13:30 ` 宋文武
2014-11-20 14:08   ` Thompson, David
2014-11-20 20:49   ` Ludovic Courtès
2014-11-20 21:24     ` Thompson, David
2014-11-21  4:10     ` David Thompson
2014-11-21  9:16       ` Ludovic Courtès
2014-11-20 14:51 ` Ludovic Courtès [this message]
2014-11-22 16:51 ` Ian Denhardt
2014-11-22 17:31   ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=877fypudq3.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=dthompson2@worcester.edu \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.