coldfusiondevelopment-environmentrailoopenbdcfml

Multi-CFML engine test environment


Does anyone have a good way to set up multiple CFML engines, and versions of them, together in a suitable environment for cross testing a CFML based application.

Ideally, I'd like this to be Ubuntu Server based as I'm using it with VirtualBox (under Windows 7). Plus it'd be helpful if it was possible to switch between, so my laptop can cope with one at a time rather than all running at once. I'm thinking of the following:

I'd also like to get them serving from the same shared directory, so I don't have to have a copy of the code for each engine. Cheers


Solution

  • You mentioned being able to "switch between, so my laptop can cope with one at a time rather than all running at once", I'm guessing that you are thinking that each one will run on a different VM, or that they might require a huge amount of memory. I don't think you need to worry about that. Unless you require that they be on different machines, I think you could do this all on one VM and with one instance of a servlet container (like Tomcat).

    From a high-level view, here is how I would do it.

    1. Install Tomcat
    2. Create or download .wars for each of the engines.
    3. Deploy said .wars to that one instance of Tomcat
    4. Set up Tomcat to use each of those servlets from a different host name (server.xml)
    5. Create a code directory outside of Tomcat for your one copy of the code
    6. Set up a Symbolic link in each webapp to link the code folder into the servlet

    You should then be able to hit the same source from each engine by visiting the different host names in the browser.

    I may be missing something. It has been a long time since I set something like this up. You'll likely need to make a bunch of tweaks (JVM settings, switching to Sun/ORACLE JVM vs. OpenJDK, etc).

    I don't think running this many engines will cause you great trouble. In my experiences, for development, I have had 3 instances of CF9 running on Tomcat using only 189mb of RAM. And each additional instance did not increase that number by 1/3. Far less. It would not surprise me if you could run all of those handily with less than 512md of RAM. Possibly even 256mb if you are really hurting on memory.

    I hope this helps.