Multiple instance Howto?

Bron Gondwana brong at fastmail.fm
Sun Aug 16 21:48:45 EDT 2009


On Fri, Aug 14, 2009 at 12:20:55PM -0500, Blake Hudson wrote:
> -------- Original Message  --------
> Subject: Multiple instance Howto?
> From: Blake Hudson <blake at ispn.net>
> To: info-cyrus at lists.andrew.cmu.edu
> Date: Thursday, August 13, 2009 4:30:55 PM
> > Is there a howto for setting up multiple cyrus instances?
> >
> >
> > I have created two sets of:
> > startup scripts
> > cyrus.conf files (each process told to use the corresponding config file 
> > and IP)
> > imapd.conf files
> > /var/spool/imap directories
> > /var/lib/imap directories
> >
> >
> > I thought I had everything running fine (imap/pop works) until I tried 
> > to deliver mail to LMTP and found that if both instances were running 
> > that LMTP would refuse connections. If someone has a proven howto, I'd 
> > appreciate being able to review it.
> >
> > Thanks,
> > --Blake
> >
> >   
> 
> I had started cyrus-master with the -M and -C option, but forgot about 
> -p (pid file). I think this was causing cyrus-master to step on the toes 
> of the other instance. Everything seems to be working now. And for my 
> own benefit, I created a copy of the cyrus-master executive for use with 
> my second instance as it makes the init script and monitoring simpler.
> 
> I would still appreciate some direction with someone that has more 
> experience with running multiple instances (or installs) of cyrus on the 
> same machine.

Don't run a default instance, or even create the default config files
(/etc/imapd.conf, /etc/cyrus.conf) - instead make sure EVERYTHING has
explicit configuration specified, and you'll never wind up hitting the
wrong set of configs!

Similarly, don't use the default directories for the same reason - better
to have everything in custom locations.

We build all our configuration from template-toolkit master config files
which are stored in change management (subversion) and updated with
"make install".  The "make install" phase actually places the files as
$type-$config.conf.new and then the init script copies new configs into
place on service startup, so you don't have to worry about a change that
breaks things being rolled out and having to restart lots of services
at once!

This matters a lot to us because we have up to about 40 cyrus instances on
a single machine in the biggest case!  Our goal is to only have 300Gb of
email per instance, so they can be restored from backup in a couple of hours
if the worst happens.  It also allows much easier phased rollout (because
the init scripts can be updated to point to a whole new copy of the Cyrus
binaries if needed, so we can update one store at a time.

Yeah - my main advice boils down to:

a) don't use the default locations for anything, or you'll wind up with one
   install being a second class citizen with more mistakes made on it.

b) template and change control your configs.

That's about it really :)

Bron.




More information about the Info-cyrus mailing list