How to configure multiple Fusionforge instances in one single server

There is probably many ways to achieve this. You will find here one solution, probably not the only one.

Why running multiple instances in one single server.

With the current tool, such as lxc or any other virtualization tool like linux kvm, you can easily setup multiple machines. Sometime, especially in development process, running multiple Fusionforge instances is definitely handy.

Fusionforge provides initial configuration files for Apache HTTPD Server and Fusionforge itself. These files are located in the ~/src/etc/ directory. Fusionforge also provides a very basic shell utility to manage the initial Apache HTTPD Server configuration files. You may take a look at ~/src/utils/ shell script for more information.

Prerequisite: multiple Fusionforge instances means multiples FQDN. Yeah, you will need a FQDN per instance. The solution presented is using Apache HTTPD VirtualHosts. Do not forget to declare include httpd.conf.d directories in your main httpd.conf.

Organize your configuration filesĀ : Use the ServerName value.

There are many ways to organize your configuration files. Here is a proposition. Put everything in /etc/fusionforge directory. Then create a specific directory per instance. Use the ServerName value to name this specific directory. Then, in each specific directory, copy your config.ini, config.ini.d, httpd.conf.d and plugins directories. Adjust your config.ini and your config.ini.d/*.ini files accordingly to your installation. You can run the same Fusionforge code with specific configuration. This is a fantastic solution for testing ssh or dav access in specific plugin such as Subversion.

The Fusionforge initialization php routine makes multiple checks to find your configuration. First, it tests if the FORGE_CONFIG_PATH is set and if the config.ini file is there, if both are true, Fusionforge will use this config.ini file. Since it uses an environment variable, it is an unique instance solution. Comment the FORGE_CONFIG_PATH in your httpd.conf.d/ file, then Fusionforge initialization php routine will look for /etc/fusionforge/{ServerName}/config.ini file.

Bingo! Multiple instances allowed.

You might need to tweak a little bit your httpd.conf.d/*.inc files. Split your log files, easier to debug.

To run multiple Fusionforge instances you will need multiple databases. Fusionforge needs a PostgreSQL database. 2 Fusionforges will need 2 distinct Fusionforge databases. This will be true for most of integrated tools used. You will need to create specific directories to not mix up data from one to another instance. Think carefully before setting up your multiple instances of Fusionforge.

Just an open question, what are the configuration needed by mailman to run your multiple instances? Think carefully.

About nerville

TrivialDev founder
This entry was posted in News. Bookmark the permalink.

Comments are closed.