Multiple deployments: 50 Machines (the same one) in one environment

I’m working on a project that required one website per tenant. We currently have one server which is hosting the 50 instances and we’re trying to use octopus for deployments.

I ran into a number of problems during my attempts to find a solution.

We wanted to keep the variables simple as we have 50 site names to configure so we added 50 instances of the same machine to our production environment. Note being able to apply variables over groups of environments may be useful as an alternative.

Because there would be a naming conflict and we wanted each site to be grouped on the file system by the name of the tenant/WebsiteName we added the following variables:

OctopusPackageDirectoryPath: C:\Octopus\Applications#{OctopusWebSiteName}#{OctopusPackageVersion}
OctopusWebSiteName: WebsiteName (x50)

First I found that the tentacle was trying to extract the package to the environment folder first. This would then prevent the deployment of the other 49 unless I forced the package to be redeployed. The forces redeployment also quickly exceeded disk space as everything was done twice.

There was also a second problem, all the deployments seemed to be trying to hit the same server in parallel which resulted in many of them timing out.

As it was clear this approach was not working I then made 50 environments instead. The hardest part here was not being able to use a script to help add the variables again. Once that was ready I tried to use Octo to deploy a release I’d made however It returned a page of HTML in the console saying Invalid Request.

I’d like to hear if there are any better ways to do this or if better support for machine reuse is coming. I’d also add batch operations but I think the new API will make that a lot easier.

Hi Daniel,

Thanks for sharing this issue. Currently Octopus uses packages with the assumption that a single package is usually only deployed once, and as you’ve discovered this breaks in multi-tennant scenarios. Finding a way to handle multi-tennant scenarios (whether on a single machine or multiple) is going to be something we look at enabling come version 2.0. We’ll definitely take this feedback into account when we plan this feature.


Was this issue resolved ? I am getting same issues while trying to run multiple projects on target machine…

Hi Aseem,

Thanks for getting in touch! We do have multi-tenant deployments on the development pipeline.
Currently we suggest the following when dealing with multi-tentant deployments for Octopus:

Hope that helps!