EDKCRB's picture

HI

I want to add multiple apps to one base install - such as have dns & file server & LAMP & Odoo & maybe Observium all on the same box

rather than hae a separate install/VM for each

can someone point to where/how to do this

thanks

ed

Forum: 
Cyberben's picture

I don't know if you can do it(add another appliance) to a single appliance.

I was very curious when I read about this particular application on this web site,

"TurnKey LXC simplifies downloading and deploying multiple TurnKey apps side-by-side on the same host in securely isolated lightweight containers while handling tricky details such as network routing. LXC (AKA LinuX Containers) is the rising star lightweight virtualization technology that powers Docker and other next generation software deployment platforms."

I run this Turnkey appliance and host a TKfile server appliance along side a TKwordpress appliance. With the Turnkey LXC application as the host of a machine you are able to use command line to install multiple "containers". I think even another TKLXC.

 

 

 

Jeremy Davis's picture

As Ben hints, each TurnKey appliance is provided/intended as a discrete standalone appliance, including the full OS and the specific dependencies for the particular namesake software and/or specific functionality intended. There are some common components, but generally each one is as minimalist and targeted as possible.

Whilst it is possible to include the functionality of multiple appliances within a single monolithic server, it's not really the problem that TurnKey is trying to solve. So we don't provide any easy way to do that per se (I'll circle back to ways to Ben's note of LXC further down). If you strictly want a single monolithic server that includes the functionality of multiple appliances "all-in-one" style, then you'd need to configure and install yourself. I'd be open to trying to assist, but it's hardly going to be a newb friendly task (although I guarantee you'd learn a lot in the process!).

Personally, I'm not a big fan of an "all-in-one" approach. I much prefer the paradigm of treating VMs "like cattle rather than pets"! From that view, so long as you have good backups of data, the individual servers are disposable. As such, the redundancy that individual servers provide is a plus. It also means that if I'm doing maintenance on my git server (I run a local Gitea instance) it won't interfere with my mediaserver. So I can have something playing in the background while I reboot my git server! :)

Regardless, I get that might not suit everyone.

As Ben notes, TurnKey also provides a LXC host appliance. LXC could be considered a type of virtualisation, but is much more resource efficient as it leverages the host system more directly. So using our LXC appliance would be one option to host a number of TurnKey appliances on a single host (VM or physical). And that would achieve something close to your ends. Sort of a "middle ground" between individual VMs and an "all-in-one" monolithic server.

On the downside, our LXC host is not quite as newb friendly as it perhaps could be. Hopefully when we get to it, the new v16.0 release might be an improvement? But I can't guarantee by how much...


As something of an aside, I personally run a Proxmox VE hypervisor on hardware. In the past I used an old desktop and it worked a treat until I started running out of RAM (the motherboard only supported 8GB total and with 20 odd instances it wasn't enough). I've since upgraded to purpose-built hardware (with 32GB RAM - currently have ~15GB free). Mostly I run TurnKey servers on that and most of them are LXC containers. The beauty of Promox is that besides LXC, it also provides KVM for "proper" VMs too and a unified web UI to control all the guests. Having full VMs too is a bonus as In my experience, some scenarios just work better with fully virtualised hardware, plus KVM also supports running alternate OS, such as Windows - LXC only supports Linux guests.

Wojciech's picture

Combining several applications under one core may make some sense. I  use Proxmox as a host (it's already version 8 !) and run several containers with Turnkey applications. But there are situations like this one: My client has been using Turnkey File Server for years, and recently asked me to add nextcloud functionality to their server. He wants to work normally on selected folders as before, but additionally create a link to the selected folder, or file, and send it to the client. Qnap, or Synology gives this possibility without any problem. Having two different containers it is not possible to do it so easily. If you ran nextcloud on File Server and properly configured directories common to nextcloud and File Server it could work.

 

Jeremy Davis's picture

I'm pretty sure that Nextcloud can support SMB (windows file sharing). That's probably the best if they are a Windows shop. Another option of filesharing between Linux instances is sshfs. So long as the servers are on the same network (doesn't even need to be running on the same host), then setting up something like that to allow Nextcloud access should be fairly easy.

deutrino's picture

Let's say I'm looking to develop and potentially share a cloud server image that offers software similar to the following, and is intended for use with VPS / Openstack providers:

* Nextcloud

* Syncthing

* Mattermost

* Jitsi

Would you say that LXC is the better option? Because my plan so far (with the exact software packages not finalized - obviously that plays a role) is to roll my own traditional Linux server with TKLdev.

One of the variables for my particular application is that the resulting appliance, once configured, require as little maintenance as possible. Because people considerably less tech savvy than me may be installing this and trying to use it. So if it's much more difficult to interact with and/or needs more tending than normal Turnkey, LXC might not be best for my application.

 

Jeremy Davis's picture

I'm personally a big fan of LXC. Actually IMO OpenVZ was superior (something of a precursor to LXC), but LXC is almost as good now.

It does mean there is still some degree of redundancy, but personally, I consider that a plus. I.e. In my personal home setup, just because I'm doing maintenance on my git server, doesn't bring down my internal DNS server. So you get most of the advantages of separate VMs, without the "proper" VM overhead. That is because the LXC guests leverage the host's kernel.

If you are hosting in an environment where you only have one public IP, you'll need to set up NAT port forwarding and/or a reverse proxy to allow access to any of the services which use the same ports. Although you'd need to consider something like that if you host them all on the same OS anyway. Depending on the requirements, you could disable some services (e.g. Webmin, Webshell & Stunnel) to save a little resources.

deutrino's picture

BTW, I understand the motivation for this. People are going to keep wanting to compose multiple Turnkey appliances into one as long as there are poor people who need to do stuff with a VPS. One VPS with 2GB RAM is often considerably less money per month than four VPS with 512MB RAM (which might not always be adequate for their given app).

Since I personally am nomadic and don't have access to always-on hardware right now, and since I don't have a lot of money, I've ended up more than once adding more and more apps to a Turnkey box in the cloud which started off as just one app. Because it doesn't cost me more. But these builds aren't reproducible yet, it's all one-offs by hand.

I understand why it's not easy to compose two arbitrary appliances without something like LXC, but it'd be nice.

I'm curious how LXC divides the containers, for example, if you run it on a 2GB VPS, can the various containers use burst ram if one app is getting hammered, etc.

Jeremy Davis's picture

TBH, I don't actually use the TurnKey LXC appliance myself (I use Proxmox). But AFAIK by default all the LXC guests have full access to the hosts resources. By my understanding, as they all share a single kernel, the host kernel will treat each process more-or-less as if they were all installed on the host.

I haven't mucked around with it much, but you can limit RAM and/or CPU priority by LXC guest if you wish.

Add new comment