Bespoke services: site/redis
For prototyping web applications, I have recently come to rely on having Redis handy. In various sketches or early versions, I’ve used it to store event logs, to persist a collection of simple objects, or to conveniently manage a particularly large dictionary.
To make it easy to have a
redis-server running on an OpenSolaris-derived system, I’ve written an smf(5) service manifest:
The default configuration of Redis is good enough for most prototyping scenarios, so this manifest assumes (a) that you’ve built and installed Redis to
/usr/local, its default install location, and (b) are happy with the default configuration. In its default configuration,
redis-server does not daemonize, and writes a log message every 5 seconds—you’ll very much want to change the latter if you move to production.
- Add a property group and property to store a configuration location, and modify the start method appropriately. This enhancement should be on the service, such that it can be easily overridden on each instance. (*)