I have no write up of the jails used by FreshPorts. The following originated in an email I sent this morning.
- db – the PostgreSQL database server – the source for all content. connections via TCP/IP
- mx – Postfix 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)
- 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.
- web – nginx, 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