I'm looking for a way of managing multiple projects with a common tech stack: nginx, php-fpm, mysql.
It will be a managed service provided by my company. This means customers won't deal with the cluster internals. Customers choose a plan so they can have more or less resources reserved. Think of it like a service like wordpress.com or ghost.io.
When a customer comes, we reserve a set of nodes for him. The goal is that any customer can use unused resources from another customer.
First attempt: namespaces per customer
namespace customer1:
namespace customer2:
But I think this division is too rigid in order to share unused resources.
Second attempt: shared namepace, custom names per resources
namespace hive:
customer1.mysql deploy and service
customer2.nginx deploy and service
customer2.php-fpm deploy and service
It look better for me, but I think resources are too tight coupled to cusomer yet.
The only thigs that define a project are a domain, a source code directory and a database (I'll deal later with logs and other stuff).
Are there any other approaches to think of the cluster as a kind of "compute fog"?
I think namespace is the right thing to do what you want. All namespaces can share the same physical resources, unless you preserve nodes for each namespace, there is no rigid resource division for namespace with general usage.