I’ve been working on a deployment process that can deploy an entire environment to Azure. The application consists of two virtual machines for backend worker processes. The process currently runs as:
Create Azure Environment using Azure Resource Templates
Run PowerShell process to call the Octopus Rest API to add the tentacle to the machine with “Role1”
Run the NuGet deploy to the push the application to “Role1”, run a PowerShell post deploy.
The issue is that when I get to step 3 it doesn’t find any servers in the “Role1” role. If I run the deploy again it finds them. Is there a way to do this, if not what would be the best way to dynamically get the machine?
Hi Dan,
I would split this into 2 different projects, the first will create the environment and deploy the tentacles, then use the Rest API to call a second project which will deploy the application.
Hope this helps
I just ran into this issue when dynamically spinning up EC2 instances. I’ll proceed as suggested by splitting the project, but you mentioned that this is on your road-map. How far down the road is this feature?
The only hiccup was that I needed to include the new “Health check” step (as per Deploying to transient targets), then select the option to “Include new deployment targets in the deployment”.
Oh no! This was working perfectly in OD 3.4.14, but I just upgraded to 3.4.15 and when I click the final “Deploy release” button, I get this error (quoted below and image attached).
There was a problem with your request.
There must be at least one enabled healthy machine to deploy to in the environment
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 simply don’t have any machines at all when I kick off a deploy. As I’ve mentioned in another post:
I’m spinning up brand new machines in environments from nothing, during this process the VM’s auto install and register the Machines/Tentacles and Roles are added to the Machines (with the intention of deploying packages to them in subsequent steps of the same deployment).
Can we please override this error somehow, as I said it was working perfect for me in 3.4.14.
There are two possible approaches to the “no machines” problem:
The first is the approach you have taken; create a “dummy” machine in the environment. We find Cloud Regions are handy for this (as you don’t require a physical machine).
The second (and this is only applicable if you are using the two-project approach discussed at the beginning of this thread) is to create a trigger (as described in this document), and create a Release Override (as in your scenario there won’t be a machine present in the environment to determine which release to use).