Dennis Perry's picture
Is it possible to use multiple appliances on one machine? I would like to use the File Server appliance and the Gallery appliance on the same machine. If yes is there any special setup issues or requirements?
Forum: 
Jeremy Davis's picture

Sorry for the cryptic title. Bottom line is that TKL is built on Ubuntu so you are able to do whatever you want, problem is that by doing that it somewhat eliminates the ease of setup that is gained by using an appliance. You can have a close look at the appliances, start with one and add the functionality of the other on top. However it will be a steep learning curve I suspect.

Possibly a better (and definitely easier) way to go would be to install a hypervisor OS and install both appliances as VMs. The advantage of that is that you can add additional functionality as need or desire arises. If your hardware is relatively new (CPU is 64 bit capable and supports virtual extensions) then I recommend ProxmoxVE. Its free, open source like TKL and its Debian based so similar in many ways to TKL (Ubuntu-based). It has a nifty WebUI so after you have set it up you can run it completely headless. There are other options too.

Adrian Moya's picture

I don't know if it'll work but you can try using tklbam to backup on and restore it on the other one. This is an idea, maybe tklbam can restore all the packages and configuration files on the other appliance and if they don't mix up, maybe you end with an usable system. 

But I don't know if it's possible, as my knowledge of tklbam is very basic. This could be done using tklpatches by applying more than one patch to the same image. Also the result would depend on what both patchs do and if they don't have conflicts. Anyway, there are no available tklpatches for the appliances, so this is just an idea I had some time ago (mixing functionality by applying multiple patches)

If you try the tklbam way, please post if it worked

Liraz Siri's picture

Interesting idea. I initially dismissed it, then realized it just might work if you trick TKLBAM into thinking the current appliance is Core, even if it's something else (e.g., TurnKey Joomla):
$ cat /etc/turnkey_version
turnkey-joomla-2009.10-hardy-x86

$ echo turnkey-core-2009.10-hardy-x86 > /etc/turnkey_version
$ tklbam-backup
To understand why this might work, you need some background: TKLBAM calculates the delta (I.e., changeset) between the base installation state and the current state of an appliance. So for example, if you backup a freshly installed Joomla appliance, the changeset TKLBAM backs up is close to empty (a few KB).

The base installation state is determined by the profile, which is downloaded from the Hub. So if we trick TKLBAM into using the Core profile we might fool it into backing up the delta / difference between TurnKey Core and TurnKey Joomla.

If you do that for a bunch of appliances and then restore into a single Core appliance that's the closest thing you'll get to merging appliances. But of course, that has never been tested and it's not officially supported.

Jeremy Davis's picture

It also sounds potentially frought with issues and I think its probably wise to not officially support it (its not like you're sitting around twiddling your thumbs looking for something else to do!)

Cool that it may be a possibility though, because despite the reasons why I think there are better ways of doing things (ie hypervisor) people seem to continually want to do this sort of thing. It'd be nice if there is a way that could work relatively easily (even if its not officially supported)

Liraz Siri's picture

If you restore from multiple backups to a single Core appliance you are very very likely to overwrite the same files over and over again. So the effective configuration for something like Apache is going to be the last backup you restored. With the exception of users and groups, TKLBAM doesn't "merge" configuration files and restore, and it's probably never going to because I don't think it's a good idea to add complexity to support fringe cases.

As I recently wrote to Rik on this topic:

I can understand the appeal of an all-in-one solution I just don't think all-in-one appliances are the way forward so I would recommend against investing too heavily in that direction.

If you traveled a couple of years into the future I think you would see a meta TurnKey / "mothership" appliance optimized to setup TurnKey based appliances in lightweight virtual machines (e.g., OpenVZ / lxc).

You'd install that on bare metal and it would give you a TurnKey network in a box. A multi-core 32GB machine could easily run 64 or so of these appliances at the same time.

Jeremy Davis's picture

That's exactly what I'd like to see! And I think once all the pieces are there that would be a complete winner!

Add new comment