09
Apr

Provisioning a Red Hat VirtualBox VM With Vagrant

In what I hope will be the last entry in the "Brent learns the basics of VM provisioning" series, I finally moved to using Hashicorp's Vagrant yesterday. I'm glad I took the time to mess around in VirtualBox itself first - I always like understanding what I'm working with before I move to abstractions - but Vagrant makes it significantly easier. Vagrant sets up SSH in your VM by default, which is a nice time-saver, and generally makes the process of automating VM setup quick and easy. Behold:

1) Install Vagrant & VirtualBox.

2) In your project folder, add the

Read more
1 min read
08
Apr

Setting Up Port Forwarding on a VirtualBox RedHat VM With A NAT Network Adapter

OK, quickly discovered that I was less brilliant than I thought yesterday. It appears that for the functionality I wanted (both the ability to SSH into the VM and to port forward from my local machine to an application running on the VM) I need to use a NAT and not a bridge network.

I spent a while struggling with this and discovered that to assign your VM to the standard 10.0.2.* range and successfully connect to the internet, a NAT drive should be your first network adapter. I'd initially had a bridge network as Adapter 1 and

Read more
3 min read
07
Apr

Setting Up SSH And Shared Folders in A RHEL VirtualBox VM

I discovered recently that RHEL has a free developer license, something that could have saved me a lot of trouble if I'd known it earlier. Since I do a lot of work in RHEL I've wanted to have a virtual environment that mimics it - I had been working in WSL, but I think having to work with VirtualBox VM does a better job of replicating the experience of working on it in production.

You'll need to get a RHEL Developer License to download the necessary ISO image. You can pretty much roll with the default settings while creating the

Read more
3 min read
05
Apr

Things I Am Consuming: 4.5.2025

It's the weekend, I've got no brilliant tech tutorials in my pocket and I have no particular desire to write about societal collapse for at least a little bit. So I'm just gonna write about some stuff I enjoyed this week. I've finally burned out on videogames for a bit after spending a few weeks housing my backlog of visual novels and I'm finally getting back on my book/show/movie shit. There appears to be a throughline of lore-heavy nerd escapism which frankly I deserve.

“Children are dying."
Lull nodded. "That's a succinct summary of humankind, I'd say. Who
Read more
3 min read
04
Apr

Running gunicorn from a Python virtual environment with systemd and selinux

There are a lot of tutorials out there for running a gunicorn server on systemd, but I wasn't able to find one that actually told me how to do so in selinux. Since I'd never used selinux before, this relatively simple task turned into hours of trial and error, but my loss is your gain. YMMV dependent on how custom your selinux setup is, but this worked for me:

Assuming your project is in /www/myproject:

/www/myproject/gunicorn_config.py:

bind = 'unix:/run/gunicorn.sock'
worker_class = 'sync'
workers = 4
timeout = 60

/etc/systemd/system/gunicorn.socket:

[Unit]
Description=
Read more
1 min read