BSD building/testing machines? reddit / BSD ---------------------------------------------------------------------- bilog78 · 2017-09-05 14:57 I strive to make my software as portable as possible (or at least to ease the work of porters), but I do most of my development on Linux. Due to disk space constraints and the general dislike for the idea of multi-booting, I'm looking for possible solutions to at least test- build (and if possible test-run, but it's mostly small command-line applications) my software on any (or all, if possible) the BSDs. Possible solution I've considering are virtual machines, or shell accounts on dedicated machines. I would have a preference for the latter (due to the aforementioned disk space constraints), but I could settle for the former, especially if there are preconfigured VM images already available. Any recommendations or suggestions? ---------------------------------------------------------------------- elchief99 · 2017-09-05 18:32 go buy a 1TB hard drive for $40 ---------------------------------------------------------------------- jaypatelani · 2017-09-05 18:36 Pkgsrc ? ---------------------------------------------------------------------- bilog78 · 2017-09-05 18:54 > Pkgsrc ? Interesting, I didn't know about that. It is definitely something relevant to my interests, and I will consider integrate my stuff, but at least from a quick glance at the documentation it doesn't look it solves the underlying problem I wish to solve, which is ensuring cross-platform portability (think about differences concerning which libraries are necessary, which APIs are available and do they work the same, etc). I'd still have to at least test-build on the BSDs. ---------------------------------------------------------------------- bilog78 · 2017-09-05 19:00 Well, storage expansion for this laptop is somewhat more complicated than that (and about 10x pricier, if I want to keep performance), but yes, it would at least solve one of the issues. Still, pre-built VMs would help in the setup. ---------------------------------------------------------------------- elchief99 · 2017-09-05 20:19 go buy a USB hard drive adapter for $10 :) ---------------------------------------------------------------------- liveoneggs · 2017-09-05 21:01 If your app is open source and in pkgsrc it will be automatically built constantly on netbsd, illumos, and osx at least. virtual machines are probably your best bet for local CI ---------------------------------------------------------------------- bobobo1618 · 2017-09-05 22:48 Vultr [offers BSD](https://www.vultr.com/servers/freebsd) and is pretty cheap. ---------------------------------------------------------------------- gumnos · 2017-09-05 23:05 I've got a couple low-end/hand-me-down machines/laptops that are fine for most of my OpenBSD/FreeBSD experimentation. Some have come from family members, others as rejects from work. - a Dell Mini9 netbook with RAM maxed out to 2GB, a dual-core Atom processor, an upgraded Wifi (took out the never-worked-well Broadcom and replaced it with an Atheros that does) and an old/slow 32GB SSD. Usually runs Debian, but works well enough with FreeBSD/OpenBSD - a Dell Mini10 netbook hand-me-down with similar specs (same dysfunctional Broadcom Wifi), but a 250GB spinning-rust HDD. Also handles both FreeBSD and OpenBSD well. - a hand-me-down Dell Inspiron laptop with 3GB of RAM and a 250GB HDD and a non-Atom processor. - an ancient Mac iBook PPC G4 with a flaky screen, 1.5GB of RAM, and a 30GB drive. Haven't tried FreeBSD on this one, but OpenBSD seems okay. Between the flaky screen and the one-button-mouse touchpad, I don't tend to run X there. Haven't tested the Wifi. - a Raspberry Pi B(2) with 512 MB of RAM and FreeBSD on a 16 or 32GB SD card. So there are a lot of free sources if you can find them, and it's not hard to find cheap older laptops on eBay. There are a couple small issues - Wifi on the Mini10 is an unsupported Broadcom, not sure on the Inspiron & Mac. I only travel with the Mini9 Wifi there is the only important one; the rest all generally have a wired LAN connection on my desk. - the SD/MMC slots don't seem to be supported on FreeBSD (haven't tested on OpenBSD) - I'm not sure about Bluetooth on any of them as I don't use it - while I've gotten X working, I don't exercise it with videos or high-FPS games. It might just be VESA but that works for my needs. Not sure. Or maybe it's blazingly fast. I mostly do Python web development, and each of those work fine with your favorite DB engine (I use PostgreSQL, but also swap it out for MySQL as needed in testing), web server (I default to nginx, but Apache & OpenBSD's httpd seem to work well too), and dev stack. They're all good for testing. Building C/C++ programs takes a little longer on some of the under-powered processors (doing a FreeBSD `buildworld` on the RPi took ~3 days), but if you're just building a single application instead of the entire BSD kernel+userland, it shouldn't be as painful. Alternatively, you can use a hosted service like Digital Ocean which will let you spin up a VM with FreeBSD (or hack OpenBSD onto it). If all you want to do is test building/installing an application, you can spin one up, do your install/build tests, and spin it back down for mere pennies per test. ---------------------------------------------------------------------- rhavenn · 2017-09-06 00:08 AWS instances work fine. There is an official FreeBSD image in the marketplace. Turn it off when not in use. ---------------------------------------------------------------------- bilog78 · 2017-09-06 06:59 Oh, interesting, I wasn't aware AWS supported a FreeBSD option. That's definitely something I'll look into. ---------------------------------------------------------------------- bilog78 · 2017-09-06 07:05 Getting a new low-end machine might be a good option if I ever plan to using BSD for something more than just test-building my software Otherwise, the option suggested by /u/elchief99 to get more storage capacity for my laptop (even just external), and then using that to set up a couple of VMs is probably a better choice for me. Hosted services are definitely something I'll be looking into as well, you and others have mentioned some, I'll look at the available options and compare the offers. ---------------------------------------------------------------------- bilog78 · 2017-09-06 07:07 Interesting option, I'll keep it in mind, thanks. ---------------------------------------------------------------------- ctisred · 2017-09-23 21:12 I'd say: kvm+vagrant+ansible (depending on how automated you want to make this) Using sparse qcow2 images and prebuilt packages for dependencies most cases should fit in 10-20GB, and if you get the automation down, can conceivably do this sequentially trashing each vm in the process to avoid 10-20*NConfigurations of VM disk space. Random things: NFS mounting the build area from the host to the guest should allow minimally sized OS images and limited wasted build space (e.g no dangling junk inside VM images), though will slow things down and assumes your build process is happy with NFS (almost everything is. almost.) With automation, since they are trash VM's, you could run the job just on a big usb stick that you are prepared to replace periodically, and/or have tiny core-OS image usb sticks per build system depending on if you want to do this all the time, or have it available for sanity checking. Manually, doing a direct install of any of the main BSD releases & fetching binary packages for dependancies should be pretty straightforward in a DHCP environment for most stuff.. You won't need to fiddle with basic toolchain setup since compiler is built in or mess with dev packages since package foo* includes headers for foo, etc. Trickiest part is disklabeling if you are not familiar with BSD systems - it's bsically a second partition table within your bsd bartition that is lettered and doesn't use 'c'. Just make one giant 'a' slice for '/' or maybe a for '/' and b for swap and you should be good to go in this case. Using qcow2 disks you should be able to snapshot initial installs and rollback to clean state pretty simply if that is ever needed. ---------------------------------------------------------------------- bilog78 · 2017-09-24 05:44 Thank you very much about all the suggestions. ---------------------------------------------------------------------- ctisred · 2017-09-25 13:42 cheers & good luck :D