Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
I am trying to develop a build process to create a handful of webserver configuration files (httpd.conf, perl modules that are included on server startup, etc.) for multiple non-identical servers. I am planning to use Template Toolkit to generate the configuration files from a set of templates that differ per server, and some common data that the templates pull in. I am using CVS to manage sharing the source files (templates, data, and perl modules that implement the site) between the various servers.

I have a pretty good handle on how to go about writing and organizing the template files and writing the code to expand them into particular config files, but I don't have a very good handle on how to setup the overall build process.

What I envision is doing a CVS update on the server in question, running something that generates a correct Makefile based on the server's hostname. Then run 'make' to build the files prior to install, 'make test' to do some basic sanity checks, 'make install' to copy the files to their final destination in the appropriate config directories.

To me, this sounds a lot like the typical build process for CPAN modules, but I don't have experience with writing modules for CPAN, only installing and using them. The main difference seems to be that the files in question are primarily configuration files for Apache rather than perl modules and that their destination directories differ.

Is doing something based on ExtUtils::MakeMaker a good way to approach this problem (I have no experience with it)? Or, is there something simpler that I should look at? Overall, does what I described here seem like a sound approach?

In reply to Automatic webserver config file generation by mp

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or or How to display code and escape characters are good places to start.
Log In?

What's my password?
Create A New User
Domain Nodelet?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (2)
As of 2021-10-28 00:43 GMT
Find Nodes?
    Voting Booth?
    My first memorable Perl project was:

    Results (95 votes). Check out past polls.