sysadmin

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
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