I have a project, where in step 1 it runs an ARM template to create a VM with a DSC extension which adds the VM to Octopus server as a deployment target, sets the environments and Role “WW”.
The following steps need to be ran on the VM in step 1. Each step 2-7 have been set to run on the deployment target matching the role “WW”.
Instead of them running, I get some information telling me :-
"Skipping this step as no matching targets were found "
What do I have to do to get this to work?
If this is down to when it originally ran the role wasn’t there. Can I add a step in to "refresh the following steps to check the role and see that it does it exist and runs
Thanks for reaching out and for all of the information.
We actually have a step called Health Check that you can add after you create the VM and within that step you will see this option:
You will want to select the bottom option “Include new deployment targets”.
Please let me know if that gets you unstuck or if you have any questions.
Fantastic, thanks for coming back so fast.
and that worked brilliantly
Following on from this - is there a step which adds a deployment target? I need one on another server after it’s been created.
You’re very welcome! Thanks for letting me know it worked for you.
Regarding the other tentacle, to better give you a solution I have a few questions.
I’m assuming this 2nd target is on a machine that doesn’t have a tentacle on it?
And the machine exists prior to this deployment?
Is it Linux or windows?
Do you want the target to also be deleted at the end of the deployment?
What’s the high level look at the use case for the new target being added as part of the process?
Please let me know if you have any questions or concerns.
It’s a windows workstation. The reason I want to the deployment target configuration separate to the deployment of this machine is because when this machine gets created I call an existing project, which configures the workstations in a particular way, I don’t want to change that process. So I was hoping there was a step, I could set to say make this machine a target. I’ve got around it with some DSC script which deploys the octopus tentacle, this is ran on a worker node which configures the workstation as a target. It’s a lot of work for making something part of the deployment process.
What was your idea?
Thanks for the explanation.
I think the easiest method here would be running scripts via Remote PowerShell or an SSH connection. Do you have either of those available to you with that box? You could run the commands on the server or a worker to establish the targets and then delete them later.
You could use OctopusDeploy-Api/RegisterListeningTentacle.ps1 at master · OctopusDeploy/OctopusDeploy-Api · GitHub
and OctopusDeploy-Api/RegisterPollingTentacle.ps1 at master · OctopusDeploy/OctopusDeploy-Api · GitHub
and OctopusDeploy-Api/DeleteTargetByName.ps1 at master · OctopusDeploy/OctopusDeploy-Api · GitHub
Unfortunately there are no built in steps, so it would kind of fall on scripting it on demand.
Please let me know if you think that will work for your use case or not.
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.