Running one project on different servers in order but with some conditions


In Octupos I have a project consists of 10 processes. 5 process for the database server and 5 process for the application server. I defined tenant for each server and I used the multi tenant feature .Also, I separated the each process by using a role which separate process by “DB” and “App” so when you make a release it will run processes based on the role which is related to the target server.

The goal is to do the installation on database server first and then start installing on application server but when I create a new release and put two tenants for the database server and app server, it will be run for both servers at the same time. How can I define an order like I said in the goal?

Hi Alex,

Thanks for getting in touch.

Let me make sure I understand your setup correctly. You have a project that has some steps for configuring the database, followed by some steps for configuring the application. You have two tenants connected to this project.

You then try to deploy a release to this project, and in the deployment options for that release, you select to deploy to both of your tenants. Your goal is that all of the database steps are executed for both tenants, followed sequentially by the application steps for both tenants.

Is this correct? If not, it might be helpful if you provide some screenshots of your setup to help me understand a bit better.

In this case, Octopus Deploy will start two separate deployment processes for your project, one for each tenant. Since you started these two deployment processes at the same time, they could each be up to different steps in the deployment process at any point in time. So it is possible that one of those deployment processes is executing the application steps, while the other process is executing the database steps.

Octopus has been designed this way because usually when you are deploying a multi-tenanted application, the deployment for each tenant should be completely isolated from other tenants. So it should be safe to deploy a tenant at any point in time, regardless of the state of any other tenant deployments.

It might be possible that parts of your project are not a good fit for multi-tenancy. Could you provide some more information as to why you require all of the database steps for all of the tenants to be executed before the application steps are executed?