Deploy Azure Web app to Tenant issue

I am running version: 3.7.2

I have two environments the package will go through. Release-candidate (RC) and Live. the package will be pushed to RC and deployed to a single environment. There are a few steps in the process:

  1. determine app instance name
  2. ensure web app
  3. deploy web app

the first two are powershell scripts with Azure subscriptions enabled. They simply figure out the name of the web app and then ensure its created. The third is a “Deploy Web App” step.

The RC environment does not have any tenants, and it will deploy just fine. Live had two tenants Company1 and Company2. I want to promote the package from RC to deploy to Company2 only. I select the package from the overview and click “Promote to Live”. I select Tenants, Live env and the Company2 tenant. When I click Deploy Now I get:

There was a problem with your request.
Company2 has no deployment targets in Live. Un-tenanted targets cannot be used in tenanted deployments. Connect Company2 to a deployment target in Live. 
 Once you have corrected these problems you can try again.
 If the problem is related to a variable you will need to update the variables for this release or recreate the release for the changes to take effect.
 If the problem is related to the deployment process you will need to create a new release for the changes to take effect.

I am not sure how to connect it to a deployment target (I assume this means an environment) as the target is an Azure Web App VS an actual machine.

To make this more confusing This project is split into two parts, the API (.net API app) and the front end a NodeJS app. They are two separate packages and deployment process, but in essence they do pretty much the same thing, they create an Azure web app and deploy the code to them. The API will let me deploy to its Tenant in Live the Node app will not. I can not see what the difference is between them.

Can I get any advice, things to check, tutorials to follow to ensure I am doing this correctly please?

Jon

Hi Jon,

Thanks for getting in touch! You mention you have one project working OK, and the other one failing with that message.

A few things to look at, compare between the two projects, and post screenshots to me in this thread:

  1. The Project Settings page, specifically the Multi-tenant deployments option - https://octopus.com/docs/guides/multi-tenant-deployments/multi-tenant-deployment-guide/deploying-a-simple-multi-tenant-project
  2. The Deployment Process page, specifically any steps that will execute on a Tentacle rather than the Octopus Server. When you edit a step in your process, we display the Execution Plan at the top describing where the action will execute and under which context.

The root cause of that error message is a validation we perform when starting a Tenanted Deployment to ensure there are valid deployment targets for the tenant for each step. Azure Script Steps and Azure Deployment Steps all run on the Octopus Server, so I wonder if there’s a step which is configured to execute on a Deployment Target, and there aren’t any scoped to your tenants.

Hope that helps!
Mike