IOCage and Linux!

JoeAtWork

Contributor
Joined
Aug 20, 2018
Messages
165
Well it seems the guys are very busy making FreeBSD do cool tricks.

Not sure if FreeBSD 12.0 is required but the IOCage update from December 2018 added a cool feature, Debian container support.

https://iocage.readthedocs.io/en/latest/debian.html

So the real reason why I posted this is when can we have a Debian IOCage jail so that we can run Docker in that? There are many other tools that a container would be better than doing a Debian VM.

Thanks,
Joe
 

JoeAtWork

Contributor
Joined
Aug 20, 2018
Messages
165
bummer, seems that it should be something FreeBSD should want, a better way to run Linux, run it on FreeBSD... LOL
 

raidflex

Guru
Joined
Mar 14, 2012
Messages
531
I would just be happy with being able to run some Linux software in a Freebsd jail.
 

Tsaukpaetra

Patron
Joined
Jan 7, 2014
Messages
215
I would just be happy with being able to run some Linux software in a Freebsd jail.

Uh, Are you not already able to do this?

I'm currently running Perforce in a IOCage jail, for example. IIRC all I had to do was add the rc variable linux_enable=YES on the host side (reboot or kldload some module) and install the centos package inside the jail. Edit: the command is pkg install emulators/linux_base-c7


You don't get a linux package manager (afaik) but it seems to mostly work fine...
 

raidflex

Guru
Joined
Mar 14, 2012
Messages
531
Uh, Are you not already able to do this?

I'm currently running Perforce in a IOCage jail, for example. IIRC all I had to do was add the rc variable linux_enable=YES on the host side (reboot or kldload some module) and install the centos package inside the jail. Edit: the command is pkg install emulators/linux_base-c7


You don't get a linux package manager (afaik) but it seems to mostly work fine...

I did not realize this was working now. I will have to check it out. Thanks.
 

Tsaukpaetra

Patron
Joined
Jan 7, 2014
Messages
215
I did not realize this was working now. I will have to check it out. Thanks.

Yeah, it's not turn-key like a typical Linux distro (as mentioned it doesn't have a package manager so you're going to have to un-tar stuff and all that by hand) but it should mostly work. I'm sure there are caveats all over the place. :)
 

raidflex

Guru
Joined
Mar 14, 2012
Messages
531
Yeah, it's not turn-key like a typical Linux distro (as mentioned it doesn't have a package manager so you're going to have to un-tar stuff and all that by hand) but it should mostly work. I'm sure there are caveats all over the place. :)

Hey it's a start though.
 

SillyPosition

Dabbler
Joined
Dec 31, 2018
Messages
20
What about spawning a linux VM just for the sake of running containers?
Because containers pluggable and deployed very easily it makes sense to just migrate your existing containers today to a VM.
Its not an option?
 

Tsaukpaetra

Patron
Joined
Jan 7, 2014
Messages
215
What about spawning a linux VM just for the sake of running containers?
Because containers pluggable and deployed very easily it makes sense to just migrate your existing containers today to a VM.
Its not an option?

That's exactly what a "Docket Host" VM is. It looks like this:

1547106997108.png


Of course, you can create your own BHYVE VM with your own image if the RancherOS image isn't what you want.
 

SillyPosition

Dabbler
Joined
Dec 31, 2018
Messages
20
That's exactly what a "Docket Host" VM is. It looks like this:

View attachment 27691

Of course, you can create your own BHYVE VM with your own image if the RancherOS image isn't what you want.


The VM is based on Rancher runtime?
Why not plain docker (or moby, call it however you want)?
I assume its a stripped down VM that contains merely a docker service, to become lighter than a debian headless installation for instance?

My plan is exactly that. Im coming to Freenas (have built my server yet) from a linux env and I heavily rely on containers.
I have about 7-8 services that are all well defined in a docker image. My plan is to just spawn a VM with relatively good amount of resources to let them all run inside.
 

Tsaukpaetra

Patron
Joined
Jan 7, 2014
Messages
215
The VM is based on Rancher runtime?

Yes.


Why not plain docker (or moby, call it however you want)?

A virtual machine has to have an OS on it. Docker is just a suite of programs that interact with the OS, it's not an OS in and of itself. But I assume you know that.

I assume its a stripped down VM that contains merely a docker service, to become lighter than a debian headless installation for instance?

Yes. See the documentation for more details, as well as the RancherOS pages.

My plan is exactly that. Im coming to Freenas (have built my server yet) from a linux env and I heavily rely on containers.
I have about 7-8 services that are all well defined in a docker image. My plan is to just spawn a VM with relatively good amount of resources to let them all run inside.

Yes, that's a good plan, just make sure FreeNAS itself gets a nice chunk of RAM for itself too. Remember the minimum spec for FreeNAS alone (no plugins, VMs, etc.) is 8GB. You'll want more if you're doing VMs in any capacity.
 

SillyPosition

Dabbler
Joined
Dec 31, 2018
Messages
20
Yes.




A virtual machine has to have an OS on it. Docker is just a suite of programs that interact with the OS, it's not an OS in and of itself. But I assume you know that.



Yes. See the documentation for more details, as well as the RancherOS pages.



Yes, that's a good plan, just make sure FreeNAS itself gets a nice chunk of RAM for itself too. Remember the minimum spec for FreeNAS alone (no plugins, VMs, etc.) is 8GB. You'll want more if you're doing VMs in any capacity.

Thanks. I guess I didnt expressed my question good enough but you understood me anyway :smile:
My initial build is going to be 16GB ECC ram, while storing about 6TB of data (actual available storage, not absolute physical storage), So I assume it will be fine. Worst case will get more ram.

How well does it behaves with only 2cores?
 

Tsaukpaetra

Patron
Joined
Jan 7, 2014
Messages
215
Thanks. I guess I didnt expressed my question good enough but you understood me anyway :)
My initial build is going to be 16GB ECC ram, while storing about 6TB of data (actual available storage, not absolute physical storage), So I assume it will be fine. Worst case will get more ram.

How well does it behaves with only 2cores?

Two cores feels like a low-powered system, but so long as you're not depending on your containers being zippy it shouldn't have too many issues. FreeNAS itself doesn't take too much CPU most of the time.
 

ornias

Wizard
Joined
Mar 6, 2020
Messages
1,458
Two cores feels like a low-powered system, but so long as you're not depending on your containers being zippy it shouldn't have too many issues. FreeNAS itself doesn't take too much CPU most of the time.
I currently use a 2 core 4 thread intel CPU with 1 docker VM with about 20 containers (one of which Plex), 9 TB (striped mirror) and one 1 10gb iSCSI client.
2 1K transcodes, gaming using the iSCSI client and scrubbing isn't really an issue...

FreeNAS is more efficient than you think ;)

*edit*
Shoot I just realised I necroed this. Sorry O:)
 
Top