Email or username:

Password:

Forgot your password?
32 comments
samurro

@stefano Interesting to read, I have zero knowledge about #freebsd but it was interesting to read about the tooling used in that ecosytem for the described task. I wonder what would be the difference if you would've come up with a similar solution based on #linux.

Stefano Marinelli

@samurro I'd use lxc/lxd containers - or just plain docker/podman.

samurro

@stefano cool thank you for your answer, I am aware about docker/podman but just briefly googled LXC. In my current job we barely use any containerization. We just use KVM capabilites. The interesting thing on #freebsd is the ability to use #ZFS instead of relying on older filesystems in the #linux ecosystem. This has big implications for #backup strategy et cetera.

linus

@samurro @stefano I've used LXD (now forked to Incus) a bit, and you can use ZFS-backed storage pools on Linux with it. I love it, so if you have any questions I'd be happy to help.

ahoyboyhoy

@samurro @stefano I could be wrong, but ZFS support is no longer a unique feature of BSD. OpenZFS is now a shared codebase and many Linux distros package it. Paired with #zfsbootmenu, it's a fantastic experience. I run zbm (root on zfs) with both a laptop and desktop. I also run a raidz pool on the desktop that replicates to an offsite pool attached to a raspberry pi. Aside from the USB enclosures I've connected to the pi, it's been very stable for years.

Stefano Marinelli

@ahoyboyhoy @samurro yes, ZFS is working on Linux, too.
On FreeBSD it's a first class citizen and has been for many years. This means that all the system tools are aware of it and that it's (more) tightly integrated into the OS

patpro

@stefano Very interesting post. Have you taught them how to update/upgrade host+jails?

Stefano Marinelli

@patpro Thanks. Not yet - it wasn't suppose to be more than a test - that'll be my next task 🙂

Malte

@stefano Great title for a blogpost. Thank you for sharing this experience!

Nils Goroll 🕊️:varnishcache:

@stefano thank you for the excellent (and entertaining) write up, showing how details always matter and the "cloud hammer" approach is likely the wrong tool.

DELETED

@stefano An uncanny parallelism with WordPress 🙈

DELETED

@stefano i suspect that their next level in evolution will be switch from php to something else.

Being serious now, i'm really grateful for showing a way.
Wish to be good enough and work with stuff like this.

This for sure improves life and work of others.

Have a nice day!

linus

@sourcerer @stefano If I had a PHP stack, I'd be really psyched about trying out frankenphp.dev/ -- the ability to smash your entire PHP app and server into a single binary is a great fit for these types of environments.

udo m. rader ☕ 🇪🇺 🇺🇦 🐧

@stefano very interesting post! We've been using FreeBSD for a couple of years now mostly for crucial services (aka too important to ever fail), and I couldn't be happier.

On the other hand, looking at what k8s has given us for day to day production workloads, it is mostly the DevOps/GitOps part. Can you apply GitOps principles to the jails based approach you outlined in your blog post?

Stefano Marinelli

@riaschissl thank you! It can surely be done - but some more manual work, depending on what you need.
Also, have a look here: reddit.com/r/freebsd/comments/

vermaden

@stefano

Thank You very much.

Added to Valuable News and to Hacker News :)

linus

@stefano for some reason, every time I've tried getting Alpine vms to work on FreeBSD they fail to boot because they can't find the kernel, both with your blog post settings and with the default profile (I was using vm-bhyve at the time). Eventually I gave up and tried Debian, and it worked right away. Never managed to figure out why though.

Stefano Marinelli

@linus I'm now using UEFI and that is quite reliable. I've had the same problem with some old Alpine Linux releases

Stefano Marinelli

@linus this is one of my Alpine Linux's vm-bhyve config:

loader="uefi"
cpu="4"
memory="4G"
network0_type="virtio-net"
network0_switch="public"
disk0_type="nvme"
disk0_name="disk0.img"

linus

@stefano managed to get uefi boot working at least after installing 'bhyve-firmware', but for some reason after running 'setup-alpine' it looks like it keeps booting from the ISO. do I need to manually disconnect it somehow? on boot, the log lists both "bhyve devices" (img file) and "bhyve iso device" (the alpine iso)

Stefano Marinelli

@linus yes, you need to remove the iso (just edit the vm .conf file "vm config vmname" and remove the iso )

linus

@stefano nice, it works 🥳 for some reason the vm hung so "vm stop" didn't actually stop it, I had already commented those lines out but it probably didn't apply until after "vm poweroff". thanks!

release_candidate

@stefano There are lots of topics and classics in this story!

A WP plugin allowed remote code execution, it uses unmonitored autoscaling in the cloud, and dev team decides "we need moar power!". Classics on top of classics!

I believe this have to happen like every day around the world.

Now, I'd like to point that is not that Alpine/Linux is less secure than FreeBSD. It's just more popular, so vulnerable WP plugins execute Linux binaries if they can.

I am a firm defender of both cloud and self-host. In one hand, It's very hard to have the physical security and electrical/network redundancy of an actual datacenter. On the other hand, no cloud provider will offer truly data ownership, sovereignty and vendor independence . So, both approaches have their places.

I've seen AWS billings that would buy very nice hardware, every month. And salaries of "cloud experts" are no cheaper that old-school sysadmins. Specially if you have to pay their cloud certifications too.

I hope that manager learned the lesson.

@stefano There are lots of topics and classics in this story!

A WP plugin allowed remote code execution, it uses unmonitored autoscaling in the cloud, and dev team decides "we need moar power!". Classics on top of classics!

I believe this have to happen like every day around the world.

Now, I'd like to point that is not that Alpine/Linux is less secure than FreeBSD. It's just more popular, so vulnerable WP plugins execute Linux binaries if they can.

Stefano Marinelli

@release_candidate Alpine Linux is perfectly fine (it's one of my favourite distributions).
I think that the "half way" solution is: get a server (maybe leased) inside a reliable datacenter but keep the control of the entire workflow. So you also know how to keep full and reliable backups of your data.

Go Up