Sep 052020

I have no write up of the jails used by FreshPorts. The following originated in an email I sent this morning.

FreshPorts runs on a FreeBSD host, hosting four jails.

  1. db – the PostgreSQL database server – the source for all content. connections via TCP/IP
  2. mxPostfix takes incoming emails from subversion mailing list via FreeBSD MX – passes them to ingress jails (dev, test, stage, prod – those different environments are not described here)
  3. ingress – Mostly perl, python, shell. Receives email from mx, converts contents into XML, loads XML into the database. All backend reports, notifications, etc are done here. Some data is generated here for the webserver. See note below. Talks to db.
  4. webnginx, php, shell, python. runs the website – talks to db – constructs HTML, caches most of it on local disk. Uses cache when it exists – runs the FreshPorts fp-listen daemon which connects to db and waits for cache-clearing notices.

NOTE: the ingress and web jails share data: ingress creates some HTML for web and supplies it via a nullfs mounted filesystem.

I used jails because:

  • I could
  • kept logical things together
  • forced better design
  • I like jails
  • meant I could put them different servers if I wanted to
  • Website Pin Facebook Twitter Myspace Friendfeed Technorati Digg Google StumbleUpon Premium Responsive