<p>I'm looking for a way of managing multiple projects with a common tech stack: nginx, php-fpm, mysql.</p>

<p>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.</p>

<p>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.</p>

<p>First attempt: namespaces per customer</p>

<p><strong>namespace <em>customer1</em></strong>:</p>

<ul>
<li>nginx deploy and service</li>
<li>php-fpm deploy and service</li>
<li>mysql deploy and service</li>
</ul>

<p><strong>namespace <em>customer2</em></strong>:</p>

<ul>
<li>nginx deploy and service</li>
<li>php-fpm deploy and service</li>
<li>mysql deploy and service</li>
</ul>

<p>But I think this division is too rigid in order to share unused resources.</p>

<p>Second attempt: shared namepace, custom names per resources</p>

<p><strong>namespace <em>hive</em></strong>:</p>

<ul>
<li>customer1.nginx deploy and service</li>
<li>customer1.php-fpm deploy and service</li>
<li><p>customer1.mysql deploy and service</p></li>
<li><p>customer2.nginx deploy and service</p></li>
<li>customer2.php-fpm deploy and service</li>
<li>customer2.mysql deploy and service</li>
</ul>

<p>It look better for me, but I think resources are too tight coupled to cusomer yet.</p>

<p>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).</p>

<p>Are there any other approaches to think of the cluster as a kind of "compute fog"?</p>

Manel R. Doménech
<p>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. </p>
