all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* A few questions about guix containers
@ 2019-05-11 14:21 Alex Sassmannshausen
  2019-05-11 22:25 ` Christopher Baines
  0 siblings, 1 reply; 6+ messages in thread
From: Alex Sassmannshausen @ 2019-05-11 14:21 UTC (permalink / raw)
  To: help-guix

Hello,

I'm trying to get to grips with Guix's container support.

Specifically, I can create containerised system using
$ guix system container /path/to/sysconf.scm

I should then be able to run commands in that container using
$ guix container exec PID CMD

But here's the rub: how do I find the PID of the container launched
using 'guix system container'?

Also, I can relatively straight forwardly map network ports to guix
systems using
$ guix system vm /path/to/sysconf.scm
and qemu's -net user,hostfwd syntax

Can I achieve similar mappings using 'guix system container'?

Is anyone using containers to test complex networked services in system
configurations?

Best wishes,

Alex

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: A few questions about guix containers
  2019-05-11 14:21 A few questions about guix containers Alex Sassmannshausen
@ 2019-05-11 22:25 ` Christopher Baines
  2019-05-27 12:52   ` Alex Sassmannshausen
  2019-05-28  5:53   ` Arun Isaac
  0 siblings, 2 replies; 6+ messages in thread
From: Christopher Baines @ 2019-05-11 22:25 UTC (permalink / raw)
  To: alex.sassmannshausen; +Cc: help-guix

[-- Attachment #1: Type: text/plain, Size: 2042 bytes --]


Alex Sassmannshausen <alex.sassmannshausen@gmail.com> writes:

> Hello,
>
> I'm trying to get to grips with Guix's container support.
>
> Specifically, I can create containerised system using
> $ guix system container /path/to/sysconf.scm
>
> I should then be able to run commands in that container using
> $ guix container exec PID CMD
>
> But here's the rub: how do I find the PID of the container launched
> using 'guix system container'?

I usually use htop or pgrep. I've been thinking recently about getting
the script that launches the container to write the PID out somewhere,
although I think you could also achieve this by sharing a directory
between the container and the host system, and having a process in the
container create a file in that directory. Then you could maybe use the
PID that owns that shared file...

> Also, I can relatively straight forwardly map network ports to guix
> systems using
> $ guix system vm /path/to/sysconf.scm
> and qemu's -net user,hostfwd syntax
>
> Can I achieve similar mappings using 'guix system container'?
>
> Is anyone using containers to test complex networked services in system
> configurations?

So I've been using guix system container with some success for a while
now, but I've been relying on this old patch I wrote to add shared
network support, in the same way that guix environment can do it [1]

1: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=28128

I haven't given it enough attention, but recently Arun Isaac looks to
have picked it up, so I'm hopeful that this functionality might be more
widely available soon.

One thing I'd love to see in this area is to be able to do networking
similar to how libvirt/virt-manager does it. You can manage virtual
networks there, and I'm not knowledgeable enough about networking to
know what exactly it's doing, but I'd love to be able to run a
container, and have it's network namespace it on a separate IP address
on a virtual network. This would avoid port conflict problems with
sharing localhost with the host system.

Chris

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 962 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: A few questions about guix containers
  2019-05-11 22:25 ` Christopher Baines
@ 2019-05-27 12:52   ` Alex Sassmannshausen
  2019-05-28 18:38     ` Christopher Baines
  2019-05-28  5:53   ` Arun Isaac
  1 sibling, 1 reply; 6+ messages in thread
From: Alex Sassmannshausen @ 2019-05-27 12:52 UTC (permalink / raw)
  To: Christopher Baines; +Cc: help-guix

Hi Chris,

I wanted to thank you for your notes!  As always, my "I'll write a long
response with thoughts tomorrow" turned into "I'll write a response at
some point in the future."

I appreciated the pointers to the developments that have tentatively
happened.  Very interesting!

Cheers,
Alex


Christopher Baines writes:

> Alex Sassmannshausen <alex.sassmannshausen@gmail.com> writes:
>
>> Hello,
>>
>> I'm trying to get to grips with Guix's container support.
>>
>> Specifically, I can create containerised system using
>> $ guix system container /path/to/sysconf.scm
>>
>> I should then be able to run commands in that container using
>> $ guix container exec PID CMD
>>
>> But here's the rub: how do I find the PID of the container launched
>> using 'guix system container'?
>
> I usually use htop or pgrep. I've been thinking recently about getting
> the script that launches the container to write the PID out somewhere,
> although I think you could also achieve this by sharing a directory
> between the container and the host system, and having a process in the
> container create a file in that directory. Then you could maybe use the
> PID that owns that shared file...
>
>> Also, I can relatively straight forwardly map network ports to guix
>> systems using
>> $ guix system vm /path/to/sysconf.scm
>> and qemu's -net user,hostfwd syntax
>>
>> Can I achieve similar mappings using 'guix system container'?
>>
>> Is anyone using containers to test complex networked services in system
>> configurations?
>
> So I've been using guix system container with some success for a while
> now, but I've been relying on this old patch I wrote to add shared
> network support, in the same way that guix environment can do it [1]
>
> 1: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=28128
>
> I haven't given it enough attention, but recently Arun Isaac looks to
> have picked it up, so I'm hopeful that this functionality might be more
> widely available soon.
>
> One thing I'd love to see in this area is to be able to do networking
> similar to how libvirt/virt-manager does it. You can manage virtual
> networks there, and I'm not knowledgeable enough about networking to
> know what exactly it's doing, but I'd love to be able to run a
> container, and have it's network namespace it on a separate IP address
> on a virtual network. This would avoid port conflict problems with
> sharing localhost with the host system.
>
> Chris

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: A few questions about guix containers
  2019-05-11 22:25 ` Christopher Baines
  2019-05-27 12:52   ` Alex Sassmannshausen
@ 2019-05-28  5:53   ` Arun Isaac
  2019-05-28 10:14     ` Alex Sassmannshausen
  1 sibling, 1 reply; 6+ messages in thread
From: Arun Isaac @ 2019-05-28  5:53 UTC (permalink / raw)
  To: Christopher Baines, alex.sassmannshausen; +Cc: help-guix

[-- Attachment #1: Type: text/plain, Size: 910 bytes --]


> So I've been using guix system container with some success for a while
> now, but I've been relying on this old patch I wrote to add shared
> network support, in the same way that guix environment can do it [1]
>
> 1: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=28128
>
> I haven't given it enough attention, but recently Arun Isaac looks to
> have picked it up, so I'm hopeful that this functionality might be more
> widely available soon.

I finished and pushed this patch to master a week ago. So, it is ready
for wider use! :-)

After this patch, I have started using this on my home server. The
server runs Parabola. I can't migrate all services immediately to
Guix. So, I have a Guix container running inside Parabola that runs some
of the services and the host Parabola runs the rest. Once I migrate all
services to the Guix container, I will simply replace Parabola with a
full Guix installation.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: A few questions about guix containers
  2019-05-28  5:53   ` Arun Isaac
@ 2019-05-28 10:14     ` Alex Sassmannshausen
  0 siblings, 0 replies; 6+ messages in thread
From: Alex Sassmannshausen @ 2019-05-28 10:14 UTC (permalink / raw)
  To: Arun Isaac; +Cc: help-guix


Arun Isaac writes:

>> So I've been using guix system container with some success for a while
>> now, but I've been relying on this old patch I wrote to add shared
>> network support, in the same way that guix environment can do it [1]
>>
>> 1: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=28128
>>
>> I haven't given it enough attention, but recently Arun Isaac looks to
>> have picked it up, so I'm hopeful that this functionality might be more
>> widely available soon.
>
> I finished and pushed this patch to master a week ago. So, it is ready
> for wider use! :-)

Ooh, amazing!  I look forward to giving this a whirl :D

Alex

>
> After this patch, I have started using this on my home server. The
> server runs Parabola. I can't migrate all services immediately to
> Guix. So, I have a Guix container running inside Parabola that runs some
> of the services and the host Parabola runs the rest. Once I migrate all
> services to the Guix container, I will simply replace Parabola with a
> full Guix installation.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: A few questions about guix containers
  2019-05-27 12:52   ` Alex Sassmannshausen
@ 2019-05-28 18:38     ` Christopher Baines
  0 siblings, 0 replies; 6+ messages in thread
From: Christopher Baines @ 2019-05-28 18:38 UTC (permalink / raw)
  To: alex.sassmannshausen; +Cc: help-guix

[-- Attachment #1: Type: text/plain, Size: 363 bytes --]


Alex Sassmannshausen <alex.sassmannshausen@gmail.com> writes:

> I wanted to thank you for your notes!  As always, my "I'll write a long
> response with thoughts tomorrow" turned into "I'll write a response at
> some point in the future."
>
> I appreciated the pointers to the developments that have tentatively
> happened.  Very interesting!

You're welcome :)

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 962 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-05-28 18:39 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-11 14:21 A few questions about guix containers Alex Sassmannshausen
2019-05-11 22:25 ` Christopher Baines
2019-05-27 12:52   ` Alex Sassmannshausen
2019-05-28 18:38     ` Christopher Baines
2019-05-28  5:53   ` Arun Isaac
2019-05-28 10:14     ` Alex Sassmannshausen

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.