top | item 13600937

BSDploy – FreeBSD jail provisioning

136 points| HugoDaniel | 9 years ago |docs.bsdploy.net | reply

85 comments

order
[+] ianai|9 years ago|reply
Why doesn't *BSD have a greater market share? I just set up an openbsd firewall and loved it. Plus I have experience with zfs on FreeBSD-also loved it.
[+] loeg|9 years ago|reply
FreeBSD developer here. A lot of Linux' success vs BSD is due to the USL lawsuit in the early 90s. I believe Linus has said he wouldn't have even made Linux in the first place if BSD hadn't been embattled in a lawsuit at the time.

As far as today — Linux has far more developers. It has driver support for a wider array of hardware. It gets more and faster vendor driver support (Intel, AMD, Nvidia, etc; even Microsoft) than the BSDs. It scales better on NUMA and on very high core count systems than any BSD. These are all legit reasons people use Linux instead of a BSD.

Then there's RHEL and Ubuntu. The BSD world doesn't have anything like either. RHEL is a huge boon to the Linux ecosystem — they take money for support contracts, and invest it in improving the GNU & Linux ecosystem for everyone. Ubuntu is a very beginner-friendly distribution that is serious enough for server use. On the FreeBSD side there's maybe TrueOS (née PC-BSD) but it doesn't attract anything like the audience that Ubuntu does. It also doesn't have Shuttleworth's funding.

[+] junk_disposal|9 years ago|reply
In my opinion (mostly Debian user with a bit of FreeBSD playing), people use Debian as a server for the same reason a lot of people like MacOS over Linux - It Just Works.

1. For many years, the only way to install software was ports. Now if you're a full time sysadmin with time on his hands, it's great. But if you just need something up and running fast (and if you don't know your software internals, and don't know if you'll need perl's FLAG_ABC) , it's horrible.

It just feels like Linux in the 90's (been there), where recompiling the kernel/freex86 was a right-of-passage into Linux hackerdom. Nowadays, most of the time it's just not worth it.

2. apt vs ports/pkg. This is actually the biggest thing keeping me on Debian - stable + backports.

If I'm running my server, I want things to be stable. Now I know that there's no other project the size of Debian, which can backport security fixes to two year old software (and sometimes four year old software), but there's nothing like apt update && apt upgrade and 99% of the time have everything update without a hitch.

Yes, FreeBSD is more elegant (why couldn't GNU/RedHat have just modeled ifconfig rather than ifconfig, ifup, ip, etc.). Yes, FreeBSD's man pages are amazing (which is quite important, as there's not as many FreeBSD blogs around), but if you're learning a new system (coming from Windows), Linux isn't that much harder to learn than FreeBSD.

EDIT

And RedHat?

They work like Oracle - You pay them, and they'll hold your hand, and (unlike Oracle) they release their software under an OS license.

If you're a non-tech Fortune 500, that's very important.

Note, by the way, that those two distros have the vast majority of GNU/Linux installs.

[+] tete|9 years ago|reply
I agree on that question, but it's also a bit strange to say, because if you think about where BSD code ends up it's a pretty big market.

You have stuff where there is a big amount of FreeBSD code in it:

MacOS, iOS, Playstation 3/4, Cisco Routers, Juniper Routers, Android (though way less, then in the rest)

You have a couple of big names using FreeBSD in big amounts or for important parts of their infrastructure:

Facebook (WhatsApp), Netflix, NetApp, VMWare, Trivago, DuckDuckGo, Flightaware, ...

And you have big amounts of code in other projects. Stuff like OpenSSH and many libraries.

I didn't include the usual suspects, such as non router hardware manufacturers (ARM, Intel, HP, Dell, ...) that use it a lot, but they also use other stuff.

In other words: The market share I think grows if you use big companies. For smaller companies there is a rule of kind of sticking with the most used stuff. And that simply is Linux (among other things for that legal reason, already mentioned here).

[+] jlgaddis|9 years ago|reply
For me (network/server guy for a small ISP, with complete decision-making authority in this context), I'd love to run FreeBSD on all my servers and OpenBSD on all my routers (even though I (mostly) make my living from my Cisco knowledge).

Here at home, within a six foot radius of me, I've got a nice new (waaaay overbuilt) workstation, a pair of ThinkPads, some cheap Dell laptop, and a rMBP. The Dell and rMBP are rarely used but I had to decide what to run on my three "primary" machines (and the couple of neglected machines in the garage).

I'd much prefer to run FreeBSD everywhere but suspend/resume on the laptops is a deal breaker for me. I could run FreeBSD on the workstation (which is always running) but then I've got two operating systems to keep up on instead of one, so instead I just run Linux on all of them.

At work, on the servers, my line of thinking is basically the same. I pretty much have to run Linux (over BSD) in a few cases, so do I run FreeBSD where I can and Linux everywhere else or just make things easier on myself and run Linux across the board? Since I'm already running Linux on all my personal machines it makes sense to use the same at work.

[+] fictioncircle|9 years ago|reply
> Why doesn't BSD have a greater market share? I just set up an openbsd firewall and loved it. Plus I have experience with zfs on FreeBSD-also loved it.

Lawsuits and subpar driver support in the 90s, basically.

https://wiki.freebsd.org/Myths

> This is a problem faced by all operating systems - even new versions of Windows. Most of the time, users don't care about the total number of drivers, only if drivers exist for their hardware. There are some omissions in terms of driver support, but FreeBSD supports a wide range of network cards (including an increasing number of 802.11n chipsets), most sound cards, and AMD, Intel and nVidia GPUs.

> Device support is a constantly moving target because we can't tell hardware makers to just stop releasing new hardware for a few years while we catch up. New devices do take some time to support, although some manufacturers do provide drivers themselves, for example nVidia provide drivers for their GPUs, and Intel for their newest network and storage controllers. Other manufacturers provide significant help to FreeBSD driver writers, including Broadcom, JMicron, HP, Mellanox, Chelsio and Solarflare. If you find a device that isn't supported, please let the project know and also notify the manufacturer: the only thing that motivates hardware manufacturers to support any operating system is the knowledge that their customers want it.

This is much, much less of a problem now than it used to be but I remember building a hobby box in the 90s when I wanted to run FreeBSD and I had to be very, very careful about what hardware I put in it so I ended up installing Debian. (Anecdotal and likely possibly coincidence, but Debian had all the correct drivers.)

The net result is no one really switched back to BSD once those issues were (mostly) resolved since too many Devs were bringing out software for Linux by that point. Driver support still lags on the BSDs (although nowhere near as badly as it used to!) so its just easier to use Linux for most people.

[+] 2trill2spill|9 years ago|reply
The ATT lawsuit stopped BSD development for a year or so and many people moved to the Linux community during this time, because of the uncertainty caused be the lawsuit.
[+] mentat2737|9 years ago|reply
It was said already in the past, and I agree.

Naming.

Too many letters in a *BSD, too scary. Linux is more toy-ish and thus more appealing as a name.

Plus the UCL vs BSD legal war, which shifted much of the community towards Linux.

[+] pjmlp|9 years ago|reply
Because the way the license works, lots of *BSD users, specially companies selling routers, never contribute anything back.

Also the lawsuit with AT&T did not help.

[+] patrickg_zill|9 years ago|reply
I think the real reason is that in the mid to late 90s, there were several hardware vendors that focused on Linux. One of them at least went public (VA Linux).

In fear of losing hardware sales, Dell/HP/Sun (their X86 hardware unit)/ IBM all made sure that their servers could run Linux also. This resulted in a lot of hardware support being added very quickly.

FreeBSD never had that "tornado" of uptake from major hardware vendors, and thus, support always lagged, if it was there at all.

[+] tete|9 years ago|reply
A similar amazing project in my opinion is iohyve. It has a fairly large portion of what you need to become a vserver provider in one command, easy to use:

https://github.com/pr1ntf/iohyve

[+] Mordak|9 years ago|reply
Also vm-bhyve, which I've been happily using since 2015. Also amazing, also dead simple.

https://github.com/churchers/vm-bhyve

It is nice that there are multiple wrappers around bhyve - competition is good, and it shows a healthy community.

[+] jimktrains2|9 years ago|reply
I've never understood why jails didn't take off. I guess maybe since linux took off and the bsds didn't, but they're just nice and elegant.
[+] rsync|9 years ago|reply
"I've never understood why jails didn't take off. I guess maybe since linux took off and the bsds didn't, but they're just nice and elegant."

The very first VPS[1] provider, JohnCompanies, was built entirely on jail (and FreeBSD 4.x).

At the peak we had over a thousand FreeBSD jails running for customers all over the world.

In the end, fancy provisioning and fine-grained resource tuning (with products like Virtuozzo) won out. Although JC is still operating and still provides jail-based VPS.

The offsite backup infrastructure that was built for JC customers became a standalone company in 2006 and was named "rsync.net".

[1] The term "VPS" had not been coined in mid-2001 so I made up the term "server instance" which didn't stick.

[+] 4ad|9 years ago|reply
It's surprising to me as well. I think it's because of the way these technologies were marketed.

FreeBSD jails, Solaris Zones, OpenVZ, and Linux LXC were marketed as fundamental building blocks for improved consolidation and/or improved separation of concerns. These technologies could solve all these problems, but fundamentally they were sold as a transparent abstraction. "To end-users, jails operate and feel just like VMs or real hardware" they said.

Docker was different, docker was fundamentally sold as a higher-level product. Docker is not "just like real hardware", docker was a new way to think about deployment, a new way to think about pre-packaged building blocks.

Docker is operationally different.

[+] icebraining|9 years ago|reply
Linux "containers" didn't take off before Docker either, despite existing for many years (first in the form of OpenVZ, then as LXC).
[+] johnsmith21006|9 years ago|reply
To me the separation of kernel and OS with Linux versus all together with BSD makes the container solution cleaner.

Take Google that is rumored to be using the same kernel in their cloud, ChromeOS and Android.

They concievably could have the same kernel from iOT, wearables, phone, tablet, 2 in 1, laptops, TV and cloud.

Google now is using the container functionality in ChromeOS to enable Android. Now if they give access I can run my cloud service on a laptop or a tablet. Instead of spending a fortune for a Swift version and a copy in Java.

But I also could develop once and deploy. Google has the containers like!E this on ARM and X86 and in their cloud on Power.

Now the containers are arch specific but not far from fixing that.

Google needs to allow a second SSD that is walled from the system SSD and give us access to launching containers. We get such storage in something like the M3 with rumored 16gb Samsung Pros but it is flash.

It is just not possible to do the same in BSD based on my very old experience. Has it changed?

[+] thecolorblue|9 years ago|reply
Is this docker for BSD or is there more going on here?
[+] stonogo|9 years ago|reply
The technologies upon which this is based have been part of FreeBSD long before Docker was even conceived. This appears to be a new management tool for existing functionality, along with a praxis for use.
[+] djsumdog|9 years ago|reply
Docker for FreeBSD is over a year out of date and not production ready. I tried to use it for some things and it does work, but doesn't support any of the newer APIs in newer versions of docker compose and other orchestration tools.

I really wish the Docker team would have made FreeBSD a first-class citizen, considering the native zfs support in FreeBSD. Currently the only thing Docker runs on natively is Linux. Even with the newest MacOS/Win variants, it still running in a hypervisor.

[+] twic|9 years ago|reply
> BSDploy’s scope is quite ambitious, so naturally it does not attempt to do all of the work on its own. In fact, BSDPloy is just a fairly thin, slightly opinionated wrapper around existing excellent tools.

But how is the author going to become rich and famous and be invited to all those conferences doing that? They need to drop this silliness and write the whole thing from the ground up! Get cracking, we want to see AT LEAST 30 000 lines of Go, or 10 000 of OCaml!

[+] ianai|9 years ago|reply
S/he threw about 100,000 lines of fortran in for rendering a completely CGI cat gif.