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.