Multi-Tenancy Environments and Tenant Tags

Hi,

We recently upgraded to v2019.8.3 of the Octopus deployment software which has enabled us to start using multi-tenancy and I was after some advice to confirm that I have set it up correctly.

We are a software company that has multiple servers on which we host our customers.

We have ServerA which has a polling tentacle installed on it. There are several target roles that we have created for various projects, but the one in question is the multi-tenancy environment. This is the one that I need to make this work in multi-tenanted mode, I think.

There are 10 customers on this hosted server. I have a tenant for each of those customers with their specific information configured in the variables (customer number, sql db connection info, etc.). On the server, our code is separate for each customer by folder structure in C:.

Previously I have had to schedule the release of new software in a staggered scheduled deployment. For example, I’d start customer 1 at 9:00pm, customer 2 at 9:30, customer 3 at 10:00, and so on.

To use multi-tenanted releases, do I just need to add the “multitenancy-environment” target role, and that’s it, or is there other configuration that needs to happen at the tentacle level, or tenant level? I haven’t been able to find anything starting that in the documentation.

I have created location tags for each tenant pointing to their own server (deployment target) so that hopefully, I can deploy to that entire group instead of clicking deploy for each individual still. Does this setup sound correct for what I’m doing?

Thanks,

Hi,

Thanks for getting in touch, it’s great to hear you’re using multi-tenancy!

We recommend having 10 or fewer environments, and potentially keeping them as you would have had them before introducing multi-tenancy. Taking the detailed information you’ve provided (thank you!) and imagining you have a website and a database along with some shared hosting and some specific hosting, I would imagine having something like:

Environments

  • dev
  • test
  • staging
  • production

Deployment Targets

  • sharedhosting-prod-web
    • with Target Role of projectx-web
    • with enviroment of Production
    • associated with multiple tenants
  • sharedhosting-prod-db
    • with Target Role of projectx-db
    • with enviroment of Production
    • associated with multiple tenants
  • sharedhosting-staging-web
    • with Target Role of projectx-web
    • with enviroment of Staging
    • associated with multiple tenants
  • sharedhosting-staging-db
    • with Target Role of projectx-db
    • with enviroment of Staging
    • associated with multiple tenants
  • customer1-prod-web
    • with Target Role of projectx-web
    • with enviroment of Production
    • associated with tenant - customer1
  • customer1-prod-db
    • with Target Role of projectx-db
    • with enviroment of Production
    • associated with tenant - customer1

Tenant Tags

  • projectx

With this setup when you choose to deploy to the Production environment on a project where the steps will run against Deployment Targets with a Target Role of projectx-web or projectx-db you can select which Tenants to deploy to or deploy to all associated Tenants.

I’d really recommend watching this excellent webinar on Multi-tenant Deployments: https://www.youtube.com/watch?v=rUytzbrDZl4

Also, here are some links to the documentation for multi-tenancy that I think will help:

Any further questions please get in contact!