[Catalyst] deployment with 3-tiered server setup: How to handleconfig?

Merlyn Kline merlyn at zynet.net
Tue Apr 21 08:39:16 GMT 2009


> here we use a very simple solution to include different .yml-files with
> db-config and stuff. For each project (we run several Catalyst instances
> on one production server and some development-servers) we have an own
> .yml stored in our repository. The name of the .yml is the same as the
> directory where the instance is stored, so Catalyst reads out its dir
> and so determines the correct config-file.

I use a system where I have devised a convention for including different
configurations in the same config.yml file. For most config there is no
change but for some specifc things I have alternative config stored, eg:

  appname:           MyCatApp(dev)
  context:test::appname:  MyCatApp(test)
  context:live::appname:  MyCatApp

So on the dev server the extra contexts are ignored. I then have a script
which updates the test (or live) server from the svn repository. That script
post-processes the config.yml to put the right contexts in place (and does a
bunch of other things like stripping comments and compressing JS and
deleting tests and so on).

Perceived advantages:
  - Minimises variations in config, eliminating some sources of mysterious
bugs.
  - Keeps all config in one place so when you change something you don't
forget to change it for all the other servers (if they differ) or don't have
to maintain it for all the other servers (if they're the same).
  - Better management of test/live servers (my update script takes a
revision number as a parameter, among other things).

HTH

Merlyn


[snip]
> >
> > I am planing to have a 3-tiered catalyst setup: one development
> server, one test server and one production server. Each of those
> has of course different setups (mysql-users, hostnames, apache
> configs, etc). How can I create a catalyst application that can
> cope with these different settings without having to manually
> alter the settings on each system? (My app is under subversion
> control.). Is there a 'best practice'?




More information about the Catalyst mailing list